@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | // Determine upgradeability |
3 | 3 | $upgradeable = 0; |
4 | -if (is_file($base_path . MGR_DIR . '/includes/config.inc.php')) { // Include the file so we can test its validity |
|
5 | - include_once $base_path . MGR_DIR . '/includes/config.inc.php'; |
|
4 | +if (is_file($base_path.MGR_DIR.'/includes/config.inc.php')) { // Include the file so we can test its validity |
|
5 | + include_once $base_path.MGR_DIR.'/includes/config.inc.php'; |
|
6 | 6 | // We need to have all connection settings - tho prefix may be empty so we have to ignore it |
7 | 7 | if (isset($dbase)) { |
8 | 8 | if (!$conn = @mysqli_connect($database_server, $database_user, $database_password)) |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | $ph['moduleName'] = $moduleName; |
20 | -$ph['displayNew'] = ($upgradeable!=0) ? 'display:none;' : ''; |
|
21 | -$ph['displayUpg'] = ($upgradeable==0) ? 'display:none;' : ''; |
|
20 | +$ph['displayNew'] = ($upgradeable != 0) ? 'display:none;' : ''; |
|
21 | +$ph['displayUpg'] = ($upgradeable == 0) ? 'display:none;' : ''; |
|
22 | 22 | $ph['displayAdvUpg'] = $ph['displayUpg']; |
23 | -$ph['checkedNew'] = !$upgradeable ? 'checked' : ''; |
|
24 | -$ph['checkedUpg'] = ($_POST['installmode']==1 || $upgradeable==1) ? 'checked' : ''; |
|
25 | -$ph['checkedAdvUpg'] = ($_POST['installmode']==2 || $upgradeable==2) ? 'checked' : ''; |
|
23 | +$ph['checkedNew'] = !$upgradeable ? 'checked' : ''; |
|
24 | +$ph['checkedUpg'] = ($_POST['installmode'] == 1 || $upgradeable == 1) ? 'checked' : ''; |
|
25 | +$ph['checkedAdvUpg'] = ($_POST['installmode'] == 2 || $upgradeable == 2) ? 'checked' : ''; |
|
26 | 26 | $ph['install_language'] = $install_language; |
27 | -$ph['disabledUpg'] = ($upgradeable!=1) ? 'disabled' : ''; |
|
28 | -$ph['disabledAdvUpg'] = ($upgradeable==0) ? 'disabled' : ''; |
|
27 | +$ph['disabledUpg'] = ($upgradeable != 1) ? 'disabled' : ''; |
|
28 | +$ph['disabledAdvUpg'] = ($upgradeable == 0) ? 'disabled' : ''; |
|
29 | 29 | |
30 | -$tpl = file_get_contents($base_path . 'install/actions/tpl_mode.html'); |
|
30 | +$tpl = file_get_contents($base_path.'install/actions/tpl_mode.html'); |
|
31 | 31 | $content = parse($tpl, $ph); |
32 | -echo parse($content, $_lang,'[%','%]'); |
|
32 | +echo parse($content, $_lang, '[%', '%]'); |
@@ -1,20 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | // Determine upgradeability |
3 | 3 | $upgradeable = 0; |
4 | -if (is_file($base_path . MGR_DIR . '/includes/config.inc.php')) { // Include the file so we can test its validity |
|
4 | +if (is_file($base_path . MGR_DIR . '/includes/config.inc.php')) { |
|
5 | +// Include the file so we can test its validity |
|
5 | 6 | include_once $base_path . MGR_DIR . '/includes/config.inc.php'; |
6 | 7 | // We need to have all connection settings - tho prefix may be empty so we have to ignore it |
7 | 8 | if (isset($dbase)) { |
8 | - if (!$conn = @mysqli_connect($database_server, $database_user, $database_password)) |
|
9 | - $upgradeable = isset($_POST['installmode']) && $_POST['installmode'] == 'new' ? 0 : 2; |
|
10 | - elseif (!@mysqli_select_db($conn, trim($dbase, '`'))) |
|
11 | - $upgradeable = isset($_POST['installmode']) && $_POST['installmode'] == 'new' ? 0 : 2; |
|
12 | - else |
|
13 | - $upgradeable = 1; |
|
9 | + if (!$conn = @mysqli_connect($database_server, $database_user, $database_password)) { |
|
10 | + $upgradeable = isset($_POST['installmode']) && $_POST['installmode'] == 'new' ? 0 : 2; |
|
11 | + } elseif (!@mysqli_select_db($conn, trim($dbase, '`'))) { |
|
12 | + $upgradeable = isset($_POST['installmode']) && $_POST['installmode'] == 'new' ? 0 : 2; |
|
13 | + } else { |
|
14 | + $upgradeable = 1; |
|
15 | + } |
|
16 | + } else { |
|
17 | + $upgradeable = 2; |
|
18 | + } |
|
14 | 19 | } |
15 | - else |
|
16 | - $upgradeable = 2; |
|
17 | -} |
|
18 | 20 | |
19 | 21 | $ph['moduleName'] = $moduleName; |
20 | 22 | $ph['displayNew'] = ($upgradeable!=0) ? 'display:none;' : ''; |