| @@ -20,7 +20,7 @@ | ||
| 20 | 20 | <form name="install" id="install_form" action="index.php?action=options" method="post"> | 
| 21 | 21 | <?php | 
| 22 | 22 |  if ($errors == 0) { | 
| 23 | - // check if install folder is removeable | |
| 23 | + // check if install folder is removeable | |
| 24 | 24 |      if (is_writable("../install")) { ?> | 
| 25 | 25 | <span id="removeinstall" style="float:left;cursor:pointer;color:#505050;line-height:18px;" onclick="var chk=document.install.rminstaller; if(chk) chk.checked=!chk.checked;"><input type="checkbox" name="rminstaller" onclick="event.cancelBubble=true;" <?php echo (empty ($errors) ? 'checked="checked"' : '') ?> style="cursor:default;" /><?php echo $_lang['remove_install_folder_auto'] ?></span> | 
| 26 | 26 | <?php | 
| @@ -8,10 +8,10 @@ | ||
| 8 | 8 | $self = 'install/connection.databasetest.php'; | 
| 9 | 9 |  $base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); | 
| 10 | 10 |  if (is_file("{$base_path}assets/cache/siteManager.php")) { | 
| 11 | -	include_once("{$base_path}assets/cache/siteManager.php"); | |
| 11 | +    include_once("{$base_path}assets/cache/siteManager.php"); | |
| 12 | 12 | } | 
| 13 | 13 |  if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { | 
| 14 | -	define('MGR_DIR','manager'); | |
| 14 | +    define('MGR_DIR','manager'); | |
| 15 | 15 | } | 
| 16 | 16 |  require_once("lang.php"); | 
| 17 | 17 | |
| @@ -18,8 +18,7 @@ discard block | ||
| 18 | 18 | $output = $_lang["status_checking_database"]; | 
| 19 | 19 |  if (!$conn = mysqli_connect($host, $uid, $pwd)) { | 
| 20 | 20 | $output .= '<span id="database_fail" style="color:#FF0000;">'.$_lang['status_failed'].'</span>'; | 
| 21 | -} | |
| 22 | -else { | |
| 21 | +} else { | |
| 23 | 22 | $database_name = mysqli_real_escape_string($conn, $_POST['database_name']); | 
| 24 | 23 |      $database_name = str_replace("`", "", $database_name); | 
| 25 | 24 | $tableprefix = mysqli_real_escape_string($conn, $_POST['tableprefix']); | 
| @@ -31,20 +30,16 @@ discard block | ||
| 31 | 30 | $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); | 
| 32 | 31 | $query = "CREATE DATABASE `".$database_name."` CHARACTER SET ".$database_charset." COLLATE ".$database_collation.";"; | 
| 33 | 32 | |
| 34 | -        if (! mysqli_query($conn, $query)){ | |
| 33 | +        if (! mysqli_query($conn, $query)) { | |
| 35 | 34 | $output .= '<span id="database_fail" style="color:#FF0000;">'.$_lang['status_failed_could_not_create_database'].'</span>'; | 
| 36 | - } | |
| 37 | -        else { | |
| 35 | +        } else { | |
| 38 | 36 | $output .= '<span id="database_pass" style="color:#80c000;">'.$_lang['status_passed_database_created'].'</span>'; | 
| 39 | 37 | } | 
| 40 | - } | |
| 41 | -    elseif (($installMode == 0) && (mysqli_query($conn, "SELECT COUNT(*) FROM {$database_name}.`{$tableprefix}site_content`"))) { | |
| 38 | +    } elseif (($installMode == 0) && (mysqli_query($conn, "SELECT COUNT(*) FROM {$database_name}.`{$tableprefix}site_content`"))) { | |
| 42 | 39 | $output .= '<span id="database_fail" style="color:#FF0000;">'.$_lang['status_failed_table_prefix_already_in_use'].'</span>'; | 
| 43 | - } | |
| 44 | -    elseif (($database_connection_method != 'SET NAMES') && ($rs = mysqli_query($conn, "show variables like 'collation_database'")) && ($row = mysqli_fetch_row($rs)) && ($row[1] != $database_collation)) { | |
| 40 | +    } elseif (($database_connection_method != 'SET NAMES') && ($rs = mysqli_query($conn, "show variables like 'collation_database'")) && ($row = mysqli_fetch_row($rs)) && ($row[1] != $database_collation)) { | |
| 45 | 41 | $output .= '<span id="database_fail" style="color:#FF0000;">'.sprintf($_lang['status_failed_database_collation_does_not_match'], $row[1]).'</span>'; | 
| 46 | - } | |
| 47 | -    else { | |
| 42 | +    } else { | |
| 48 | 43 | $output .= '<span id="database_pass" style="color:#80c000;">'.$_lang['status_passed'].'</span>'; | 
| 49 | 44 | } | 
| 50 | 45 | } | 
| @@ -16,10 +16,10 @@ | ||
| 16 | 16 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); | 
| 17 | 17 | |
| 18 | 18 |  if (is_file("{$base_path}assets/cache/siteManager.php")) { | 
| 19 | -	include_once("{$base_path}assets/cache/siteManager.php"); | |
| 19 | +    include_once("{$base_path}assets/cache/siteManager.php"); | |
| 20 | 20 | } | 
| 21 | 21 |  if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { | 
| 22 | -	define('MGR_DIR', 'manager'); | |
| 22 | +    define('MGR_DIR', 'manager'); | |
| 23 | 23 | } | 
| 24 | 24 | |
| 25 | 25 | |
| @@ -28,7 +28,9 @@ discard block | ||
| 28 | 28 | 'type7' => $_lang["lock_element_type_7"], | 
| 29 | 29 | 'type8' => $_lang["lock_element_type_8"] | 
| 30 | 30 | ); | 
| 31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); | |
| 31 | +foreach($unlockTranslations as $key => $value) { | |
| 32 | + $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); | |
| 33 | +} | |
| 32 | 34 | |
| 33 | 35 | // Prepare lang-strings for mgrResAction() | 
| 34 | 36 | $mraTranslations = array( | 
| @@ -44,7 +46,9 @@ discard block | ||
| 44 | 46 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], | 
| 45 | 47 | 'confirm_delete_module' => $_lang["confirm_delete_module"], | 
| 46 | 48 | ); | 
| 47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); | |
| 49 | +foreach($mraTranslations as $key => $value) { | |
| 50 | + $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); | |
| 51 | +} | |
| 48 | 52 | ?> | 
| 49 | 53 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> | 
| 50 | 54 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> | 
| @@ -1,48 +1,48 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | 2 |  if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { | 
| 3 | -	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); | |
| 3 | +    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); | |
| 4 | 4 | } | 
| 5 | 5 | |
| 6 | 6 |  if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { | 
| 7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); | |
| 7 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); | |
| 8 | 8 |  } else { | 
| 9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); | |
| 9 | + include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); | |
| 10 | 10 | } | 
| 11 | 11 |  if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { | 
| 12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); | |
| 12 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); | |
| 13 | 13 |  } else { | 
| 14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); | |
| 14 | + include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); | |
| 15 | 15 | } | 
| 16 | 16 | |
| 17 | 17 | $resources = new mgrResources(); | 
| 18 | 18 | |
| 19 | 19 | // Prepare lang-strings for "Lock Elements" | 
| 20 | 20 | $unlockTranslations = array( | 
| 21 | - 'msg' => $_lang["unlock_element_id_warning"], | |
| 22 | - 'type1' => $_lang["lock_element_type_1"], | |
| 23 | - 'type2' => $_lang["lock_element_type_2"], | |
| 24 | - 'type3' => $_lang["lock_element_type_3"], | |
| 25 | - 'type4' => $_lang["lock_element_type_4"], | |
| 26 | - 'type5' => $_lang["lock_element_type_5"], | |
| 27 | - 'type6' => $_lang["lock_element_type_6"], | |
| 28 | - 'type7' => $_lang["lock_element_type_7"], | |
| 29 | - 'type8' => $_lang["lock_element_type_8"] | |
| 21 | + 'msg' => $_lang["unlock_element_id_warning"], | |
| 22 | + 'type1' => $_lang["lock_element_type_1"], | |
| 23 | + 'type2' => $_lang["lock_element_type_2"], | |
| 24 | + 'type3' => $_lang["lock_element_type_3"], | |
| 25 | + 'type4' => $_lang["lock_element_type_4"], | |
| 26 | + 'type5' => $_lang["lock_element_type_5"], | |
| 27 | + 'type6' => $_lang["lock_element_type_6"], | |
| 28 | + 'type7' => $_lang["lock_element_type_7"], | |
| 29 | + 'type8' => $_lang["lock_element_type_8"] | |
| 30 | 30 | ); | 
| 31 | 31 | foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); | 
| 32 | 32 | |
| 33 | 33 | // Prepare lang-strings for mgrResAction() | 
| 34 | 34 | $mraTranslations = array( | 
| 35 | - 'create_new' => $_lang["create_new"], | |
| 36 | - 'edit' => $_lang["edit"], | |
| 37 | - 'duplicate' => $_lang["duplicate"], | |
| 38 | - 'remove' => $_lang["remove"], | |
| 39 | - 'confirm_duplicate_record' => $_lang["confirm_duplicate_record"], | |
| 40 | - 'confirm_delete_template' => $_lang["confirm_delete_template"], | |
| 41 | - 'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"], | |
| 42 | - 'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"], | |
| 43 | - 'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"], | |
| 44 | - 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], | |
| 45 | - 'confirm_delete_module' => $_lang["confirm_delete_module"], | |
| 35 | + 'create_new' => $_lang["create_new"], | |
| 36 | + 'edit' => $_lang["edit"], | |
| 37 | + 'duplicate' => $_lang["duplicate"], | |
| 38 | + 'remove' => $_lang["remove"], | |
| 39 | + 'confirm_duplicate_record' => $_lang["confirm_duplicate_record"], | |
| 40 | + 'confirm_delete_template' => $_lang["confirm_delete_template"], | |
| 41 | + 'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"], | |
| 42 | + 'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"], | |
| 43 | + 'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"], | |
| 44 | + 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], | |
| 45 | + 'confirm_delete_module' => $_lang["confirm_delete_module"], | |
| 46 | 46 | ); | 
| 47 | 47 | foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); | 
| 48 | 48 | ?> | 
| @@ -65,46 +65,46 @@ discard block | ||
| 65 | 65 | </script> | 
| 66 | 66 | |
| 67 | 67 | <?php | 
| 68 | -		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { | |
| 69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); | |
| 70 | -		} else { | |
| 71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); | |
| 72 | - } | |
| 68 | +        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { | |
| 69 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); | |
| 70 | +        } else { | |
| 71 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); | |
| 72 | + } | |
| 73 | 73 | |
| 74 | -		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { | |
| 75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); | |
| 76 | -		} else { | |
| 77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); | |
| 78 | - } | |
| 74 | +        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { | |
| 75 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); | |
| 76 | +        } else { | |
| 77 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); | |
| 78 | + } | |
| 79 | 79 | |
| 80 | -		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { | |
| 81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); | |
| 82 | -		} else { | |
| 83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); | |
| 84 | - } | |
| 80 | +        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { | |
| 81 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); | |
| 82 | +        } else { | |
| 83 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); | |
| 84 | + } | |
| 85 | 85 | |
| 86 | -		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { | |
| 87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); | |
| 88 | -		} else { | |
| 89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); | |
| 90 | - } | |
| 86 | +        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { | |
| 87 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); | |
| 88 | +        } else { | |
| 89 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); | |
| 90 | + } | |
| 91 | 91 | |
| 92 | -		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { | |
| 93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); | |
| 94 | -		} else { | |
| 95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); | |
| 96 | - } | |
| 92 | +        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { | |
| 93 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); | |
| 94 | +        } else { | |
| 95 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); | |
| 96 | + } | |
| 97 | 97 | |
| 98 | -		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { | |
| 99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); | |
| 100 | -		} else { | |
| 101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); | |
| 102 | - } | |
| 98 | +        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { | |
| 99 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); | |
| 100 | +        } else { | |
| 101 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); | |
| 102 | + } | |
| 103 | 103 | |
| 104 | 104 | |
| 105 | -		if(is_numeric($_GET['tab'])) { | |
| 106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; | |
| 107 | - } | |
| 108 | - ?> | |
| 105 | +        if(is_numeric($_GET['tab'])) { | |
| 106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; | |
| 107 | + } | |
| 108 | + ?> | |
| 109 | 109 | </div> | 
| 110 | 110 | </div> | 
| @@ -177,9 +177,9 @@ | ||
| 177 | 177 | <td colspan="2"><div class="split"></div></td> | 
| 178 | 178 | </tr> | 
| 179 | 179 | <?php | 
| 180 | - // Check for GD before allowing captcha to be enabled | |
| 181 | -      $gdAvailable = extension_loaded('gd');
 | |
| 182 | - ?> | |
| 180 | + // Check for GD before allowing captcha to be enabled | |
| 181 | +        $gdAvailable = extension_loaded('gd');
 | |
| 182 | + ?> | |
| 183 | 183 | <?php | 
| 184 | 184 |  $gdAvailable = extension_loaded('gd');
 | 
| 185 | 185 | if(!$gdAvailable) $use_captcha = 0; | 
| @@ -1,7 +1,9 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 | 
| 3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) $valid_hostnames = $_SERVER['HTTP_HOST']; | |
| 4 | -?> | |
| 3 | +    if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { | |
| 4 | + $valid_hostnames = $_SERVER['HTTP_HOST']; | |
| 5 | + } | |
| 6 | + ?> | |
| 5 | 7 | <!-- Interface & editor settings --> | 
| 6 | 8 | <div class="tab-page" id="tabPageSecurity"> | 
| 7 | 9 | <h2 class="tab"><?php echo $_lang['settings_security'] ?></h2> | 
| @@ -153,7 +155,9 @@ discard block | ||
| 153 | 155 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> | 
| 154 | 156 | <td> | 
| 155 | 157 | <?php | 
| 156 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; | |
| 158 | +if(empty($pwd_hash_algo)) { | |
| 159 | + $phm['sel']['UNCRYPT'] = 1; | |
| 160 | +} | |
| 157 | 161 |  $phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0:1;
 | 
| 158 | 162 |  $phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0:1;
 | 
| 159 | 163 |  $phm['e']['SHA512']     = $modx->manager->checkHashAlgorithm('SHA512') ? 0:1;
 | 
| @@ -182,7 +186,9 @@ discard block | ||
| 182 | 186 | ?> | 
| 183 | 187 | <?php | 
| 184 | 188 |  $gdAvailable = extension_loaded('gd');
 | 
| 185 | -if(!$gdAvailable) $use_captcha = 0; | |
| 189 | +if(!$gdAvailable) { | |
| 190 | + $use_captcha = 0; | |
| 191 | +} | |
| 186 | 192 | ?> | 
| 187 | 193 | <tr> | 
| 188 | 194 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> | 
| @@ -127,7 +127,9 @@ | ||
| 127 | 127 | <?php | 
| 128 | 128 | // invoke OnUserSettingsRender event | 
| 129 | 129 |              $evtOut = $modx->invokeEvent('OnUserSettingsRender');
 | 
| 130 | -            if(is_array($evtOut)) echo implode("",$evtOut);
 | |
| 130 | +            if(is_array($evtOut)) { | |
| 131 | +                echo implode("",$evtOut); | |
| 132 | + } | |
| 131 | 133 | ?> | 
| 132 | 134 | </td> | 
| 133 | 135 | </tr> | 
| @@ -23,7 +23,7 @@ discard block | ||
| 23 | 23 | <td> | 
| 24 | 24 | <select name="which_browser" size="1" class="inputBox" onchange="documentDirty=true;"> | 
| 25 | 25 | <?php | 
| 26 | -            foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) {
 | |
| 26 | +            foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) { | |
| 27 | 27 |                  $dir = str_replace('\\', '/', $dir);
 | 
| 28 | 28 | $browser_name = substr($dir, strrpos($dir, '/') + 1); | 
| 29 | 29 | $selected = $browser_name == $which_browser ? ' selected="selected"' : ''; | 
| @@ -235,7 +235,9 @@ discard block | ||
| 235 | 235 | <?php | 
| 236 | 236 | // invoke OnMiscSettingsRender event | 
| 237 | 237 |              $evtOut = $modx->invokeEvent('OnMiscSettingsRender');
 | 
| 238 | -            if(is_array($evtOut)) echo implode("",$evtOut);
 | |
| 238 | +            if(is_array($evtOut)) { | |
| 239 | +                echo implode("",$evtOut); | |
| 240 | + } | |
| 239 | 241 | ?> | 
| 240 | 242 | </td> | 
| 241 | 243 | </tr> | 
| @@ -49,9 +49,9 @@ discard block | ||
| 49 | 49 | <select name="manager_theme" size="1" class="inputBox" onChange="documentDirty=true; document.forms['settings'].theme_refresher.value = Date.parse(new Date());"> | 
| 50 | 50 | <?php | 
| 51 | 51 |                      $dir = dir("media/style/");
 | 
| 52 | -                    while ($file = $dir->read()) {
 | |
| 53 | -                        if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') {
 | |
| 54 | -                            if ($file === 'common') {
 | |
| 52 | +                    while ($file = $dir->read()) { | |
| 53 | +                        if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') { | |
| 54 | +                            if ($file === 'common') { | |
| 55 | 55 | continue; | 
| 56 | 56 | } | 
| 57 | 57 | $themename = $file; | 
| @@ -209,7 +209,7 @@ discard block | ||
| 209 | 209 | $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n"; | 
| 210 | 210 |                      $option = explode(',', $_lang['settings_group_tv_options']);
 | 
| 211 | 211 | $output = array(); | 
| 212 | -                    foreach ($option as $k => $v) {
 | |
| 212 | +                    foreach ($option as $k => $v) { | |
| 213 | 213 | $selected = ($k == $group_tvs) ? 'selected' : ''; | 
| 214 | 214 |                          $s = array('[+value+]', '[+selected+]', '[+title+]');
 | 
| 215 | 215 | $r = array($k, $selected, $v); | 
| @@ -282,7 +282,7 @@ discard block | ||
| 282 | 282 | $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n"; | 
| 283 | 283 |                      $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon');
 | 
| 284 | 284 | $output = array(); | 
| 285 | -                    foreach ($option as $v) {
 | |
| 285 | +                    foreach ($option as $v) { | |
| 286 | 286 | $selected = ($v == $resource_tree_node_name) ? 'selected' : ''; | 
| 287 | 287 |                          $s = array('[+value+]', '[+selected+]');
 | 
| 288 | 288 | $r = array($v, $selected); | 
| @@ -363,7 +363,7 @@ discard block | ||
| 363 | 363 | <?php | 
| 364 | 364 |                      $datetime_format_list = array('dd-mm-YYYY', 'mm/dd/YYYY', 'YYYY/mm/dd');
 | 
| 365 | 365 | $str = ''; | 
| 366 | -                    foreach ($datetime_format_list as $value) {
 | |
| 366 | +                    foreach ($datetime_format_list as $value) { | |
| 367 | 367 | $selectedtext = ($datetime_format == $value) ? ' selected' : ''; | 
| 368 | 368 | $str .= '<option value="' . $value . '"' . $selectedtext . '>'; | 
| 369 | 369 | $str .= $value . '</option>' . PHP_EOL; | 
| @@ -445,7 +445,7 @@ discard block | ||
| 445 | 445 | <?php | 
| 446 | 446 | // invoke OnRichTextEditorRegister event | 
| 447 | 447 |          $evtOut = $modx->invokeEvent('OnRichTextEditorRegister');
 | 
| 448 | -        if (!is_array($evtOut)) {
 | |
| 448 | +        if (!is_array($evtOut)) { | |
| 449 | 449 | $evtOut = array(); | 
| 450 | 450 | $use_editor = 0; | 
| 451 | 451 | } | 
| @@ -477,8 +477,8 @@ discard block | ||
| 477 | 477 | <?php | 
| 478 | 478 | // invoke OnRichTextEditorRegister event | 
| 479 | 479 | echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n"; | 
| 480 | -                    if (is_array($evtOut)) {
 | |
| 481 | -                        foreach ($evtOut as $editor) {
 | |
| 480 | +                    if (is_array($evtOut)) { | |
| 481 | +                        foreach ($evtOut as $editor) { | |
| 482 | 482 | echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n"; | 
| 483 | 483 | } | 
| 484 | 484 | } | 
| @@ -534,7 +534,7 @@ discard block | ||
| 534 | 534 | <?php | 
| 535 | 535 | // invoke OnInterfaceSettingsRender event | 
| 536 | 536 |                  $evtOut = $modx->invokeEvent('OnInterfaceSettingsRender');
 | 
| 537 | -                if (is_array($evtOut)) {
 | |
| 537 | +                if (is_array($evtOut)) { | |
| 538 | 538 |                      echo implode("", $evtOut);
 | 
| 539 | 539 | } | 
| 540 | 540 | ?> | 
| @@ -1,5 +1,5 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | - $site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default']; | |
| 2 | + $site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default']; | |
| 3 | 3 | ?> | 
| 4 | 4 | <style> | 
| 5 | 5 |  table.sysSettings > tbody td, table.sysSettings > tbody th {border-bottom:1px dotted #ccc;padding:10px;}
 | 
| @@ -135,8 +135,8 @@ discard block | ||
| 135 | 135 | <?php | 
| 136 | 136 | // Check if PHX is enabled | 
| 137 | 137 | $count = $modx->db->getRecordCount( | 
| 138 | -              $modx->db->select('id', '[+prefix+]site_plugins', 
 | |
| 139 | - "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") | |
| 138 | +                $modx->db->select('id', '[+prefix+]site_plugins', 
 | |
| 139 | + "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") | |
| 140 | 140 | ); | 
| 141 | 141 |              if($count) {
 | 
| 142 | 142 | $disabledFilters = 1; | 
| @@ -259,14 +259,14 @@ discard block | ||
| 259 | 259 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> | 
| 260 | 260 | <td> <select name="server_offset_time" size="1" class="inputBox"> | 
| 261 | 261 | <?php | 
| 262 | -      for($i=-24; $i<25; $i++) {
 | |
| 263 | - $seconds = $i*60*60; | |
| 264 | - $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; | |
| 265 | - ?> | |
| 262 | +        for($i=-24; $i<25; $i++) {
 | |
| 263 | + $seconds = $i*60*60; | |
| 264 | + $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; | |
| 265 | + ?> | |
| 266 | 266 | <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option> | 
| 267 | 267 | <?php | 
| 268 | - } | |
| 269 | - ?> | |
| 268 | + } | |
| 269 | + ?> | |
| 270 | 270 | </select> | 
| 271 | 271 |        	<div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></div>
 | 
| 272 | 272 | </td> | 
| @@ -82,23 +82,23 @@ discard block | ||
| 82 | 82 | <?php | 
| 83 | 83 | |
| 84 | 84 | $currentCategory = ''; | 
| 85 | -                        while ($row = $modx->db->getRow($rs)) {
 | |
| 85 | +                        while ($row = $modx->db->getRow($rs)) { | |
| 86 | 86 | $thisCategory = $row['category']; | 
| 87 | -            if($thisCategory == null) {
 | |
| 87 | +            if($thisCategory == null) { | |
| 88 | 88 | $thisCategory = $_lang['no_category']; | 
| 89 | 89 | } | 
| 90 | -            if($thisCategory != $currentCategory) {
 | |
| 91 | -                if($closeOptGroup) {
 | |
| 90 | +            if($thisCategory != $currentCategory) { | |
| 91 | +                if($closeOptGroup) { | |
| 92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; | 
| 93 | 93 | } | 
| 94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; | 
| 95 | 95 | $closeOptGroup = true; | 
| 96 | -            } else {
 | |
| 96 | +            } else { | |
| 97 | 97 | $closeOptGroup = false; | 
| 98 | 98 | } | 
| 99 | 99 | |
| 100 | 100 | $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : ''; | 
| 101 | -            if ($selectedtext) {
 | |
| 101 | +            if ($selectedtext) { | |
| 102 | 102 | $oldTmpId = $row['id']; | 
| 103 | 103 | $oldTmpName = $row['templatename']; | 
| 104 | 104 | } | 
| @@ -106,7 +106,7 @@ discard block | ||
| 106 | 106 | echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n"; | 
| 107 | 107 | $currentCategory = $thisCategory; | 
| 108 | 108 | } | 
| 109 | -        if($thisCategory != '') {
 | |
| 109 | +        if($thisCategory != '') { | |
| 110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; | 
| 111 | 111 | } | 
| 112 | 112 | ?> | 
| @@ -138,11 +138,12 @@ discard block | ||
| 138 | 138 |                $modx->db->select('id', '[+prefix+]site_plugins', 
 | 
| 139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") | 
| 140 | 140 | ); | 
| 141 | -            if($count) {
 | |
| 141 | +            if($count) { | |
| 142 | 142 | $disabledFilters = 1; | 
| 143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; | 
| 144 | - } | |
| 145 | - else $disabledFilters = false; | |
| 144 | +            } else { | |
| 145 | + $disabledFilters = false; | |
| 146 | + } | |
| 146 | 147 | ?> | 
| 147 | 148 |          <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br />
 | 
| 148 | 149 |          <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?>
 | 
| @@ -204,7 +205,7 @@ discard block | ||
| 204 | 205 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> | 
| 205 | 206 | <?php | 
| 206 | 207 |          $ct = explode(",",$custom_contenttype);
 | 
| 207 | -        for($i=0;$i<count($ct);$i++) {
 | |
| 208 | +        for($i=0;$i<count($ct);$i++) { | |
| 208 | 209 | echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>"; | 
| 209 | 210 | } | 
| 210 | 211 | ?> | 
| @@ -259,7 +260,7 @@ discard block | ||
| 259 | 260 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> | 
| 260 | 261 | <td> <select name="server_offset_time" size="1" class="inputBox"> | 
| 261 | 262 | <?php | 
| 262 | -      for($i=-24; $i<25; $i++) {
 | |
| 263 | +      for($i=-24; $i<25; $i++) { | |
| 263 | 264 | $seconds = $i*60*60; | 
| 264 | 265 | $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; | 
| 265 | 266 | ?> | 
| @@ -296,7 +297,9 @@ discard block | ||
| 296 | 297 | <?php | 
| 297 | 298 | // invoke OnSiteSettingsRender event | 
| 298 | 299 |              $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
 | 
| 299 | -            if(is_array($evtOut)) echo implode("",$evtOut);
 | |
| 300 | +            if(is_array($evtOut)) { | |
| 301 | +                echo implode("",$evtOut); | |
| 302 | + } | |
| 300 | 303 | ?> | 
| 301 | 304 | </td> | 
| 302 | 305 | </tr> |