@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <!-- snippets --> |
| 2 | 2 | <?php |
| 3 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 4 | 4 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 5 | 5 | } |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <!-- Templates --> |
| 2 | 2 | <?php |
| 3 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 4 | 4 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 5 | 5 | } |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <!-- plugins --> |
| 2 | 2 | <?php |
| 3 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 4 | 4 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 5 | 5 | } |
| 6 | 6 | |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 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 | -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'); |
|
| 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'); |
|
| 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 | -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'); |
|
| 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'); |
|
| 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(); |
@@ -28,7 +28,7 @@ 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) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 32 | 32 | |
| 33 | 33 | // Prepare lang-strings for mgrResAction() |
| 34 | 34 | $mraTranslations = array( |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
| 45 | 45 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
| 46 | 46 | ); |
| 47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 47 | +foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 48 | 48 | ?> |
| 49 | 49 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
| 50 | 50 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -65,45 +65,45 @@ 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'); |
|
| 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 | 70 | } else { |
| 71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
| 71 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php'); |
|
| 72 | 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'); |
|
| 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 | 76 | } else { |
| 77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 77 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php'); |
|
| 78 | 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'); |
|
| 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 | 82 | } else { |
| 83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
| 83 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php'); |
|
| 84 | 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'); |
|
| 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 | 88 | } else { |
| 89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
| 89 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php'); |
|
| 90 | 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'); |
|
| 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 | 94 | } else { |
| 95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
| 95 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php'); |
|
| 96 | 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'); |
|
| 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 | 100 | } else { |
| 101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 101 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php'); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | |
| 105 | - if(is_numeric($_GET['tab'])) { |
|
| 106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 105 | + if (is_numeric($_GET['tab'])) { |
|
| 106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
| 107 | 107 | } |
| 108 | 108 | ?> |
| 109 | 109 | </div> |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('change_password')) {
|
|
| 5 | +if (!$modx->hasPermission('change_password')) {
|
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | ?> |
@@ -2,16 +2,16 @@ discard block |
||
| 2 | 2 | /** |
| 3 | 3 | * Ajax Requests |
| 4 | 4 | */ |
| 5 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 5 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 6 | 6 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -if( isset( $_REQUEST[$cm->get('request_key')]['ajax'] ) ) |
|
| 9 | +if (isset($_REQUEST[$cm->get('request_key')]['ajax'])) |
|
| 10 | 10 | { |
| 11 | 11 | $_data = $_REQUEST[$cm->get('request_key')]; |
| 12 | 12 | $output = ''; |
| 13 | 13 | $task = $_data['task']; |
| 14 | - switch( $task ) |
|
| 14 | + switch ($task) |
|
| 15 | 15 | { |
| 16 | 16 | /** |
| 17 | 17 | * get categories |
@@ -19,19 +19,19 @@ discard block |
||
| 19 | 19 | case 'categorize_load_elements': |
| 20 | 20 | $elements = $_data['elements']; |
| 21 | 21 | |
| 22 | - if( $uncategorized_elements = $cm->getAssignedElements( 0, $_data['elements'] ) ) |
|
| 22 | + if ($uncategorized_elements = $cm->getAssignedElements(0, $_data['elements'])) |
|
| 23 | 23 | { |
| 24 | 24 | $output .= $cm->renderView('chunks/categorize/uncategorized_elements', $uncategorized_elements); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - foreach( $cm->getCategories() as $category ) |
|
| 27 | + foreach ($cm->getCategories() as $category) |
|
| 28 | 28 | { |
| 29 | - $category['elements'] = $cm->getAssignedElements( $category['id'], $_data['elements'] ); |
|
| 29 | + $category['elements'] = $cm->getAssignedElements($category['id'], $_data['elements']); |
|
| 30 | 30 | $output .= $cm->renderView('chunks/categorize/category', $category); |
| 31 | 31 | } |
| 32 | 32 | break; |
| 33 | 33 | } |
| 34 | - exit( $output ); |
|
| 34 | + exit($output); |
|
| 35 | 35 | } |
| 36 | 36 | /** |
| 37 | 37 | * Categorize elements |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @see http://modxcms.com/forums/index.php/topic,40430.msg251476.html#msg251476 |
| 42 | 42 | * |
| 43 | 43 | */ |
| 44 | -if( isset( $_POST[$cm->get('request_key')]['categorize']['submit'] ) ) |
|
| 44 | +if (isset($_POST[$cm->get('request_key')]['categorize']['submit'])) |
|
| 45 | 45 | { |
| 46 | 46 | $_data = $_POST[$cm->get('request_key')]['categorize']; |
| 47 | 47 | $_changes = 0; |
@@ -54,15 +54,15 @@ discard block |
||
| 54 | 54 | 'categorize' |
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | - if( !isset( $_data['elements'] ) ) |
|
| 57 | + if (!isset($_data['elements'])) |
|
| 58 | 58 | { |
| 59 | - $cm->addMessage( $cm->txt('cm_unknown_error'), 'categorize' ); |
|
| 59 | + $cm->addMessage($cm->txt('cm_unknown_error'), 'categorize'); |
|
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - foreach( $_data['elements'] as $element_id => $data ) |
|
| 63 | + foreach ($_data['elements'] as $element_id => $data) |
|
| 64 | 64 | { |
| 65 | - if( $cm->updateElement( $_data['elementsgroup'], $element_id, $data['category_id'] ) ) |
|
| 65 | + if ($cm->updateElement($_data['elementsgroup'], $element_id, $data['category_id'])) |
|
| 66 | 66 | { |
| 67 | 67 | $cm->addMessage( |
| 68 | 68 | sprintf( |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - if( $_changes === 0 ) |
|
| 81 | + if ($_changes === 0) |
|
| 82 | 82 | { |
| 83 | - $cm->addMessage( $cm->txt('cm_no_categorization'), 'categorize' ); |
|
| 83 | + $cm->addMessage($cm->txt('cm_no_categorization'), 'categorize'); |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | else |
@@ -98,29 +98,29 @@ discard block |
||
| 98 | 98 | /** |
| 99 | 99 | * Add a new category |
| 100 | 100 | */ |
| 101 | -if( isset( $_POST[$cm->get('request_key')]['add']['submit'] ) ) |
|
| 101 | +if (isset($_POST[$cm->get('request_key')]['add']['submit'])) |
|
| 102 | 102 | { |
| 103 | 103 | $_data = $_POST[$cm->get('request_key')]['add']['data']; |
| 104 | - $category = trim( html_entity_decode($_data['name']) ); |
|
| 104 | + $category = trim(html_entity_decode($_data['name'])); |
|
| 105 | 105 | $rank = (int) $_data['rank']; |
| 106 | 106 | |
| 107 | - if( empty( $category ) ) |
|
| 107 | + if (empty($category)) |
|
| 108 | 108 | { |
| 109 | - $cm->addMessage( $cm->txt('cm_enter_name_for_category'), 'add' ); |
|
| 109 | + $cm->addMessage($cm->txt('cm_enter_name_for_category'), 'add'); |
|
| 110 | 110 | return; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - if( $cm->isCategoryExists( $category ) ) |
|
| 113 | + if ($cm->isCategoryExists($category)) |
|
| 114 | 114 | { |
| 115 | - $cm->addMessage( sprintf( $cm->txt('cm_category_x_exists'), $category ), 'add' ); |
|
| 115 | + $cm->addMessage(sprintf($cm->txt('cm_category_x_exists'), $category), 'add'); |
|
| 116 | 116 | return; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if( $cm->addCategory( $category, $rank ) !== 0 ) |
|
| 119 | + if ($cm->addCategory($category, $rank) !== 0) |
|
| 120 | 120 | { |
| 121 | 121 | $cm->addMessage( |
| 122 | 122 | sprintf( |
| 123 | - $cm->txt( 'cm_category_x_saved_at_position_y' ), |
|
| 123 | + $cm->txt('cm_category_x_saved_at_position_y'), |
|
| 124 | 124 | $category, |
| 125 | 125 | $rank |
| 126 | 126 | ), |
@@ -129,26 +129,26 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | else |
| 131 | 131 | { |
| 132 | - $cm->addMessage( $cm->txt('cm_unknown_error'), 'add' ); |
|
| 132 | + $cm->addMessage($cm->txt('cm_unknown_error'), 'add'); |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | 137 | * Sort categories |
| 138 | 138 | */ |
| 139 | -if( isset( $_POST[$cm->get('request_key')]['sort']['submit'] ) ) |
|
| 139 | +if (isset($_POST[$cm->get('request_key')]['sort']['submit'])) |
|
| 140 | 140 | { |
| 141 | 141 | $categories = $_POST[$cm->get('request_key')]['sort']['data']; |
| 142 | 142 | $_changes = 0; |
| 143 | 143 | |
| 144 | - foreach( $categories as $category_id => $_data ) |
|
| 144 | + foreach ($categories as $category_id => $_data) |
|
| 145 | 145 | { |
| 146 | 146 | $data = array( |
| 147 | - 'category' => urldecode( $_data['category'] ), |
|
| 147 | + 'category' => urldecode($_data['category']), |
|
| 148 | 148 | 'rank' => $_data['rank'] |
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | - if( $cm->updateCategory( $category_id, $data ) ) |
|
| 151 | + if ($cm->updateCategory($category_id, $data)) |
|
| 152 | 152 | { |
| 153 | 153 | $cm->addMessage( |
| 154 | 154 | sprintf( |
@@ -162,9 +162,9 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if( $_changes === 0 ) |
|
| 165 | + if ($_changes === 0) |
|
| 166 | 166 | { |
| 167 | - $cm->addMessage( $cm->txt( 'cm_no_changes' ), 'sort'); |
|
| 167 | + $cm->addMessage($cm->txt('cm_no_changes'), 'sort'); |
|
| 168 | 168 | } |
| 169 | 169 | else |
| 170 | 170 | { |
@@ -181,21 +181,21 @@ discard block |
||
| 181 | 181 | /** |
| 182 | 182 | * Edit categories |
| 183 | 183 | */ |
| 184 | -if( isset( $_POST[$cm->get('request_key')]['edit']['submit'] ) ) |
|
| 184 | +if (isset($_POST[$cm->get('request_key')]['edit']['submit'])) |
|
| 185 | 185 | { |
| 186 | 186 | $categories = $_POST[$cm->get('request_key')]['edit']['data']; |
| 187 | 187 | $_changes = 0; |
| 188 | 188 | |
| 189 | - foreach( $categories as $category_id => $_data ) |
|
| 189 | + foreach ($categories as $category_id => $_data) |
|
| 190 | 190 | { |
| 191 | - if( isset( $_data['delete'] ) ) |
|
| 191 | + if (isset($_data['delete'])) |
|
| 192 | 192 | { |
| 193 | - if( $cm->deleteCategory( $category_id ) ) |
|
| 193 | + if ($cm->deleteCategory($category_id)) |
|
| 194 | 194 | { |
| 195 | 195 | $cm->addMessage( |
| 196 | 196 | sprintf( |
| 197 | 197 | $cm->txt('cm_category_x_deleted'), |
| 198 | - urldecode( $_data['origin'] ) |
|
| 198 | + urldecode($_data['origin']) |
|
| 199 | 199 | ), |
| 200 | 200 | 'edit' |
| 201 | 201 | ); |
@@ -205,16 +205,16 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | $data = array( |
| 208 | - 'category' => trim( html_entity_decode( $_data['category'] ) ), |
|
| 208 | + 'category' => trim(html_entity_decode($_data['category'])), |
|
| 209 | 209 | 'rank' => $_data['rank'] |
| 210 | 210 | ); |
| 211 | 211 | |
| 212 | - if( $cm->updateCategory( $category_id, $data ) ) |
|
| 212 | + if ($cm->updateCategory($category_id, $data)) |
|
| 213 | 213 | { |
| 214 | 214 | $cm->addMessage( |
| 215 | 215 | sprintf( |
| 216 | 216 | $cm->txt('cm_category_x_renamed_to_y'), |
| 217 | - urldecode( $_data['origin'] ), |
|
| 217 | + urldecode($_data['origin']), |
|
| 218 | 218 | $data['category'] |
| 219 | 219 | ), |
| 220 | 220 | 'edit' |
@@ -223,26 +223,26 @@ discard block |
||
| 223 | 223 | } |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - if( $_changes === 0 ) |
|
| 226 | + if ($_changes === 0) |
|
| 227 | 227 | { |
| 228 | - $cm->addMessage( $cm->txt( 'cm_no_changes' ), 'edit'); |
|
| 228 | + $cm->addMessage($cm->txt('cm_no_changes'), 'edit'); |
|
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | /** |
| 233 | 233 | * Delete singel category by $_GET |
| 234 | 234 | */ |
| 235 | -if( isset( $_GET[$cm->get('request_key')]['delete'] ) |
|
| 236 | - && !empty( $_GET[$cm->get('request_key')]['delete'] ) ) |
|
| 235 | +if (isset($_GET[$cm->get('request_key')]['delete']) |
|
| 236 | + && !empty($_GET[$cm->get('request_key')]['delete'])) |
|
| 237 | 237 | { |
| 238 | - $category_id = (int)$_GET[$cm->get('request_key')]['delete']; |
|
| 238 | + $category_id = (int) $_GET[$cm->get('request_key')]['delete']; |
|
| 239 | 239 | |
| 240 | - if( $cm->deleteCategory( $category_id ) ) |
|
| 240 | + if ($cm->deleteCategory($category_id)) |
|
| 241 | 241 | { |
| 242 | 242 | $cm->addMessage( |
| 243 | 243 | sprintf( |
| 244 | 244 | $cm->txt('cm_category_x_deleted'), |
| 245 | - urldecode( $_GET[$cm->get('request_key')]['category'] ) |
|
| 245 | + urldecode($_GET[$cm->get('request_key')]['category']) |
|
| 246 | 246 | ), |
| 247 | 247 | 'edit' |
| 248 | 248 | ); |
@@ -251,15 +251,15 @@ discard block |
||
| 251 | 251 | /** |
| 252 | 252 | * Translate phrases |
| 253 | 253 | */ |
| 254 | -if( isset( $_POST[$cm->get('request_key')]['translate']['submit'] ) ) |
|
| 254 | +if (isset($_POST[$cm->get('request_key')]['translate']['submit'])) |
|
| 255 | 255 | { |
| 256 | 256 | $translations = $_POST[$cm->get('request_key')]['translate']['data']; |
| 257 | 257 | |
| 258 | - foreach( $translations as $native_phrase => $translation ) |
|
| 258 | + foreach ($translations as $native_phrase => $translation) |
|
| 259 | 259 | { |
| 260 | - $native_phrase = urldecode( $native_phrase ); |
|
| 260 | + $native_phrase = urldecode($native_phrase); |
|
| 261 | 261 | |
| 262 | - if( empty( $translation ) ) |
|
| 262 | + if (empty($translation)) |
|
| 263 | 263 | { |
| 264 | 264 | $translation = $native_phrase; |
| 265 | 265 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | ); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - $cm->c('Translator')->addTranslation( $native_phrase, $translation, 'phrase' ); |
|
| 275 | + $cm->c('Translator')->addTranslation($native_phrase, $translation, 'phrase'); |
|
| 276 | 276 | |
| 277 | 277 | $cm->addMessage( |
| 278 | 278 | sprintf( |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | * Message Quit Template |
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | -if(( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) && IN_PARSER_MODE!="true") { |
|
| 6 | +if ((!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) && IN_PARSER_MODE != "true") { |
|
| 7 | 7 | die("<b>INCLUDE ACCESS ERROR</b><br /><br />Direct access to this file prohibited."); |
| 8 | 8 | } |
| 9 | 9 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | </script> |
| 21 | 21 | </head><body> |
| 22 | 22 | "; |
| 23 | -if($is_error) { |
|
| 23 | +if ($is_error) { |
|
| 24 | 24 | $parsedMessageString .= "<h3 style='color:red;background:#e0e0e0;padding:2px;'> MODX Parse Error </h3> |
| 25 | 25 | <table border='0' cellpadding='1' cellspacing='0'> |
| 26 | 26 | <tr><td colspan='3'>MODX encountered the following error while attempting to parse the requested resource:</td></tr> |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | <tr><td colspan='3'><b style='color:#003399;'>« $msg »</b></td></tr>"; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if(!empty($query)) { |
|
| 35 | +if (!empty($query)) { |
|
| 36 | 36 | $parsedMessageString .= "<tr><td colspan='3'><hr size='1' width='98%' style='color:#e0e0e0'/><b style='color:#999;font-size: 9px;border-left:1px solid #c0c0c0; margin-left:10px;'> SQL: <span id='sqlHolder'>$query</span></b><hr size='1' width='98%' style='color:#e0e0e0'/> |
| 37 | 37 | <a href='javascript:copyToClip();' style='color:#821517;font-size: 9px; text-decoration: none'>[Copy SQL to ClipBoard]</a><textarea id='holdtext' style='display:none;'></textarea></td></tr>"; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -if($text!='') { |
|
| 40 | +if ($text != '') { |
|
| 41 | 41 | |
| 42 | - $errortype = array ( |
|
| 42 | + $errortype = array( |
|
| 43 | 43 | E_ERROR => "Error", |
| 44 | 44 | E_WARNING => "Warning", |
| 45 | 45 | E_PARSE => "Parsing Error", |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $parsedMessageString .= "<tr><td> Line: </td>"; |
| 71 | 71 | $parsedMessageString .= "<td colspan='2'>$line</td><td> </td>"; |
| 72 | 72 | $parsedMessageString .= "</tr>"; |
| 73 | - if($source!='') { |
|
| 73 | + if ($source != '') { |
|
| 74 | 74 | $parsedMessageString .= "<tr><td valign='top'> Line $line source: </td>"; |
| 75 | 75 | $parsedMessageString .= "<td colspan='2'>$source</td><td> </td>"; |
| 76 | 76 | $parsedMessageString .= "</tr>"; |
@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 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 | // show debug information |
| 7 | -if(isset($enable_debug) && $enable_debug==true) { |
|
| 7 | +if (isset($enable_debug) && $enable_debug == true) { |
|
| 8 | 8 | ?> |
| 9 | 9 | <script language="javascript"> |
| 10 | 10 | //document.onload = removeDebug(); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | </style> |
| 37 | 37 | <?php |
| 38 | - $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $tstart); |
|
| 38 | + $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $tstart); |
|
| 39 | 39 | ?> |
| 40 | 40 | <div class='debug' id='debug' name='debug' onClick="removeDebugDiv();"> |
| 41 | 41 | <table border="0" cellspacing="0" cellpadding="0"> |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | </tr> |
| 45 | 45 | <tr> |
| 46 | 46 | <td width="70">Time taken</td> |
| 47 | - <td width="80"><?php echo printf ("%6.5f s", $totaltime); ?></td> |
|
| 47 | + <td width="80"><?php echo printf("%6.5f s", $totaltime); ?></td> |
|
| 48 | 48 | </tr> |
| 49 | 49 | </table> |
| 50 | 50 | </div> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 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 | |
@@ -41,4 +41,4 @@ discard block |
||
| 41 | 41 | )); |
| 42 | 42 | |
| 43 | 43 | // show login screen |
| 44 | -header('Location: ' . MODX_MANAGER_URL); |
|
| 44 | +header('Location: '.MODX_MANAGER_URL); |
|