Completed
Push — develop ( acc675...3313cf )
by Dmytro
12:18
created
manager/actions/resources.static.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab3_user_settings.inc.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,9 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab7_filebrowser_settings.inc.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab4_manager_settings.inc.php 1 patch
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 ?>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab1_site_settings.inc.php 1 patch
Braces   +16 added lines, -13 removed lines patch added patch discarded remove patch
@@ -82,23 +82,23 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/snippet_smtp.inc.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,14 @@
 block discarded – undo
15 15
     <td >
16 16
      <select name="smtp_secure" size="1" class="inputBox">
17 17
   <option value="none" ><?php echo $_lang['no'] ?></option>
18
-   <option value="ssl" <?php if($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option>
19
-  <option value="tls" <?php if($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option>
18
+   <option value="ssl" <?php if($smtp_secure == 'ssl') {
19
+    echo "selected='selected'";
20
+}
21
+?> >SSL</option>
22
+  <option value="tls" <?php if($smtp_secure == 'tls') {
23
+    echo "selected='selected'";
24
+}
25
+?> >TLS</option>
20 26
  </select>
21 27
  <br />
22 28
   </td>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab2_furl_settings.inc.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,9 @@
 block discarded – undo
159 159
     <?php
160 160
         // invoke OnFriendlyURLSettingsRender event
161 161
         $evtOut = $modx->invokeEvent('OnFriendlyURLSettingsRender');
162
-        if(is_array($evtOut)) echo implode("",$evtOut);
162
+        if(is_array($evtOut)) {
163
+            echo implode("",$evtOut);
164
+        }
163 165
     ?>
164 166
 </td>
165 167
 </tr>
Please login to merge, or discard this patch.
manager/actions/refresh_site.dynamic.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,10 +29,12 @@
 block discarded – undo
29 29
 
30 30
 <div class="tab-page">
31 31
 	<div class="container container-body">
32
-		<?php if($num_rows_pub)   printf('<p>' . $_lang["refresh_published"]   . '</p>', $num_rows_pub) ?>
32
+		<?php if($num_rows_pub) {
33
+    printf('<p>' . $_lang["refresh_published"]   . '</p>', $num_rows_pub) ?>
33 34
 		<?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?>
34 35
 		<?php
35 36
 		$modx->clearCache('full', true);
37
+}
36 38
 		// invoke OnSiteRefresh event
37 39
 		$modx->invokeEvent("OnSiteRefresh");
38 40
 		?>
Please login to merge, or discard this patch.
manager/frames/mainmenu.php 1 patch
Braces   +35 added lines, -33 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	'active'
33 33
 );
34 34
 
35
-if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('file_manager')) {
35
+if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('file_manager')) {
36 36
 	$sitemenu['elements'] = array(
37 37
 		'elements',
38 38
 		'main',
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	);
49 49
 }
50 50
 
51
-if($modx->hasPermission('exec_module')) {
51
+if($modx->hasPermission('exec_module')) {
52 52
 	$sitemenu['modules'] = array(
53 53
 		'modules',
54 54
 		'main',
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	);
65 65
 }
66 66
 
67
-if($modx->hasPermission('edit_user') || $modx->hasPermission('edit_web_user') || $modx->hasPermission('edit_role') || $modx->hasPermission('access_permissions') || $modx->hasPermission('web_access_permissions')) {
67
+if($modx->hasPermission('edit_user') || $modx->hasPermission('edit_web_user') || $modx->hasPermission('edit_role') || $modx->hasPermission('access_permissions') || $modx->hasPermission('web_access_permissions')) {
68 68
 	$sitemenu['users'] = array(
69 69
 		'users',
70 70
 		'main',
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	);
81 81
 }
82 82
 
83
-if($modx->hasPermission('empty_cache') || $modx->hasPermission('bk_manager') || $modx->hasPermission('remove_locks') || $modx->hasPermission('import_static') || $modx->hasPermission('export_static')) {
83
+if($modx->hasPermission('empty_cache') || $modx->hasPermission('bk_manager') || $modx->hasPermission('remove_locks') || $modx->hasPermission('import_static') || $modx->hasPermission('export_static')) {
84 84
 	$sitemenu['tools'] = array(
85 85
 		'tools',
86 86
 		'main',
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 }
98 98
 
99 99
 $tab = 0;
100
-if($modx->hasPermission('edit_template')) {
100
+if($modx->hasPermission('edit_template')) {
101 101
 	$sitemenu['element_templates'] = array(
102 102
 		'element_templates',
103 103
 		'elements',
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		'dropdown-toggle'
113 113
 	);
114 114
 }
115
-if($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) {
115
+if($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) {
116 116
 	$sitemenu['element_tplvars'] = array(
117 117
 		'element_tplvars',
118 118
 		'elements',
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		'dropdown-toggle'
128 128
 	);
129 129
 }
130
-if($modx->hasPermission('edit_chunk')) {
130
+if($modx->hasPermission('edit_chunk')) {
131 131
 	$sitemenu['element_htmlsnippets'] = array(
132 132
 		'element_htmlsnippets',
133 133
 		'elements',
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		'dropdown-toggle'
143 143
 	);
144 144
 }
145
-if($modx->hasPermission('edit_snippet')) {
145
+if($modx->hasPermission('edit_snippet')) {
146 146
 	$sitemenu['element_snippets'] = array(
147 147
 		'element_snippets',
148 148
 		'elements',
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 		'dropdown-toggle'
158 158
 	);
159 159
 }
160
-if($modx->hasPermission('edit_plugin')) {
160
+if($modx->hasPermission('edit_plugin')) {
161 161
 	$sitemenu['element_plugins'] = array(
162 162
 		'element_plugins',
163 163
 		'elements',
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 }
175 175
 //$sitemenu['element_categories']     = array('element_categories','elements',$_lang['element_categories'],'index.php?a=76&tab=5',$_lang['element_categories'],'','new_template,edit_template,new_snippet,edit_snippet,new_chunk,edit_chunk,new_plugin,edit_plugin','main',1,60,'');
176 176
 
177
-if($modx->hasPermission('file_manager')) {
177
+if($modx->hasPermission('file_manager')) {
178 178
 	$sitemenu['manage_files'] = array(
179 179
 		'manage_files',
180 180
 		'elements',
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 		''
190 190
 	);
191 191
 }
192
-if($modx->hasPermission('category_manager')) {
192
+if($modx->hasPermission('category_manager')) {
193 193
 	$sitemenu['manage_categories'] = array(
194 194
 		'manage_categories',
195 195
 		'elements',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 }
207 207
 
208 208
 // Modules Menu Items
209
-if($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('save_module')) {
209
+if($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('save_module')) {
210 210
 	$sitemenu['new_module'] = array(
211 211
 		'new_module',
212 212
 		'modules',
@@ -222,19 +222,19 @@  discard block
 block discarded – undo
222 222
 	);
223 223
 }
224 224
 
225
-if($modx->hasPermission('exec_module')) {
226
-	if($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
225
+if($modx->hasPermission('exec_module')) {
226
+	if($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
227 227
 		$rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.icon, mg.member
228 228
 				FROM ' . $modx->getFullTableName('site_modules') . ' AS sm
229 229
 				LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
230 230
 				LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
231 231
                 WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1
232 232
                 ORDER BY sm.name');
233
-	} else {
233
+	} else {
234 234
 		$rs = $modx->db->select('*', $modx->getFullTableName('site_modules'), 'disabled != 1', 'name');
235 235
 	}
236
-	if($modx->db->getRecordCount($rs)) {
237
-	    while ($row = $modx->db->getRow($rs)) {
236
+	if($modx->db->getRecordCount($rs)) {
237
+	    while ($row = $modx->db->getRow($rs)) {
238 238
             $sitemenu['module' . $row['id']] = array(
239 239
                 'module' . $row['id'],
240 240
                 'modules',
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
 // security menu items (users)
256 256
 
257
-if($modx->hasPermission('edit_user')) {
257
+if($modx->hasPermission('edit_user')) {
258 258
 	$sitemenu['user_management_title'] = array(
259 259
 		'user_management_title',
260 260
 		'users',
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	);
271 271
 }
272 272
 
273
-if($modx->hasPermission('edit_web_user')) {
273
+if($modx->hasPermission('edit_web_user')) {
274 274
 	$sitemenu['web_user_management_title'] = array(
275 275
 		'web_user_management_title',
276 276
 		'users',
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 	);
287 287
 }
288 288
 
289
-if($modx->hasPermission('edit_role')) {
289
+if($modx->hasPermission('edit_role')) {
290 290
 	$sitemenu['role_management_title'] = array(
291 291
 		'role_management_title',
292 292
 		'users',
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 	);
303 303
 }
304 304
 
305
-if($modx->hasPermission('access_permissions')) {
305
+if($modx->hasPermission('access_permissions')) {
306 306
 	$sitemenu['manager_permissions'] = array(
307 307
 		'manager_permissions',
308 308
 		'users',
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	);
319 319
 }
320 320
 
321
-if($modx->hasPermission('web_access_permissions')) {
321
+if($modx->hasPermission('web_access_permissions')) {
322 322
 	$sitemenu['web_permissions'] = array(
323 323
 		'web_permissions',
324 324
 		'users',
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	''
375 375
 );
376 376
 
377
-if($modx->hasPermission('bk_manager')) {
377
+if($modx->hasPermission('bk_manager')) {
378 378
 	$sitemenu['bk_manager'] = array(
379 379
 		'bk_manager',
380 380
 		'tools',
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 	);
391 391
 }
392 392
 
393
-if($modx->hasPermission('remove_locks')) {
393
+if($modx->hasPermission('remove_locks')) {
394 394
 	$sitemenu['remove_locks'] = array(
395 395
 		'remove_locks',
396 396
 		'tools',
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 	);
407 407
 }
408 408
 
409
-if($modx->hasPermission('import_static')) {
409
+if($modx->hasPermission('import_static')) {
410 410
 	$sitemenu['import_site'] = array(
411 411
 		'import_site',
412 412
 		'tools',
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 	);
423 423
 }
424 424
 
425
-if($modx->hasPermission('export_static')) {
425
+if($modx->hasPermission('export_static')) {
426 426
 	$sitemenu['export_site'] = array(
427 427
 		'export_site',
428 428
 		'tools',
@@ -439,19 +439,21 @@  discard block
 block discarded – undo
439 439
 }
440 440
 
441 441
 $menu = $modx->invokeEvent("OnManagerMenuPrerender", array('menu' => $sitemenu));
442
-if(is_array($menu)) {
442
+if(is_array($menu)) {
443 443
 	$newmenu = array();
444
-	foreach($menu as $item){
445
-		if(is_array(unserialize($item))){
444
+	foreach($menu as $item) {
445
+		if(is_array(unserialize($item))) {
446 446
 			$newmenu = array_merge($newmenu, unserialize($item));
447 447
 		}
448 448
 	}
449
-	if(count($newmenu)> 0) $sitemenu = $newmenu;
450
-}
449
+	if(count($newmenu)> 0) {
450
+	    $sitemenu = $newmenu;
451
+	}
452
+	}
451 453
 
452
-if(file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php')) {
454
+if(file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php')) {
453 455
 	include_once(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php');
454
-} else {
456
+} else {
455 457
 	include_once(MODX_MANAGER_PATH . 'includes/menu.class.inc.php');
456 458
 }
457 459
 $menu = new EVOmenu();
Please login to merge, or discard this patch.