Completed
Push — develop ( cb7ecf...5e631f )
by Dmytro
17s
created
manager/actions/mutate_role.dynamic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
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
-switch ((int)$modx->getManagerApi()->action) {
6
+switch ((int) $modx->getManagerApi()->action) {
7 7
     case 35:
8 8
         if (!$modx->hasPermission('edit_role')) {
9 9
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21
-$role = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
21
+$role = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
22 22
 
23 23
 $tbl_user_roles = $modx->getFullTableName('user_roles');
24 24
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 // Add lock-element JS-Script
47 47
 $lockElementId = $role;
48 48
 $lockElementType = 8;
49
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
49
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
50 50
 ?>
51 51
 <script type="text/javascript">
52 52
     function changestate(element) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     <input type="hidden" name="id" value="<?= $_GET['id'] ?>">
83 83
 
84 84
     <h1>
85
-        <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'] . '<small>(' . $roledata['id'] . ')</small>' : $_lang['role_title']) ?>
85
+        <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'].'<small>('.$roledata['id'].')</small>' : $_lang['role_title']) ?>
86 86
     </h1>
87 87
 
88 88
     <?= $_style['actionbuttons']['dynamic']['savedelete'] ?>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab1_site_settings.inc.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
   <tr>
14 14
     <th><?php echo $_lang['sitestatus_title'] ?><br><small>[(site_status)]</small></th>
15 15
     <td>
16
-        <?php echo wrap_label($_lang['online'],  form_radio('site_status', 1));?><br />
17
-        <?php echo wrap_label($_lang['offline'], form_radio('site_status', 0));?>
16
+        <?php echo wrap_label($_lang['online'], form_radio('site_status', 1)); ?><br />
17
+        <?php echo wrap_label($_lang['offline'], form_radio('site_status', 0)); ?>
18 18
     </td>
19 19
   </tr>
20 20
   <tr>
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
       <br />
59 59
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
60 60
       <select name="reload_site_unavailable" id="reload_site_unavailable_select" onchange="confirmLangChange(this, 'siteunavailable_message_default', 'site_unavailable_message_textarea');">
61
-<?php echo get_lang_options('siteunavailable_message_default');?>
61
+<?php echo get_lang_options('siteunavailable_message_default'); ?>
62 62
       </select>
63 63
     </th>
64 64
     <td> <textarea name="site_unavailable_message" id="site_unavailable_message_textarea" style="width:100%; height: 120px;"><?php echo $site_unavailable_message_view; ?></textarea>
65
-        <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']);?>" />
66
-  <div class="comment"><?php echo $_lang['siteunavailable_message'];?></div>
65
+        <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']); ?>" />
66
+  <div class="comment"><?php echo $_lang['siteunavailable_message']; ?></div>
67 67
     </td>
68 68
   </tr>
69 69
   <tr>
@@ -78,17 +78,17 @@  discard block
 block discarded – undo
78 78
             'c.category, t.templatename ASC'
79 79
             );
80 80
     ?>
81
-      <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template;?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px">
81
+      <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template; ?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px">
82 82
         <?php
83 83
 
84 84
         $currentCategory = '';
85 85
                         while ($row = $modx->getDatabase()->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";
@@ -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
 ?>
@@ -114,19 +114,19 @@  discard block
 block discarded – undo
114 114
           <br />
115 115
         <div id="template_reset_options_wrapper" style="display:none;">
116 116
             <label><input type="radio" name="reset_template" value="1" /> <?php echo $_lang['template_reset_all']; ?></label><br />
117
-            <label><input type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang['template_reset_specific'],$oldTmpName); ?></label>
117
+            <label><input type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang['template_reset_specific'], $oldTmpName); ?></label>
118 118
         </div>
119 119
         <input type="hidden" name="old_template" value="<?php echo $oldTmpId; ?>" />
120 120
   <div class="comment"><?php echo $_lang['defaulttemplate_message'] ?></div>
121 121
     </td>
122 122
   </tr>
123 123
   <tr>
124
-        <th><?php echo $_lang['defaulttemplate_logic_title'];?><br><small>[(auto_template_logic)]</small></th>
124
+        <th><?php echo $_lang['defaulttemplate_logic_title']; ?><br><small>[(auto_template_logic)]</small></th>
125 125
         <td>
126
-            <p><?php echo $_lang['defaulttemplate_logic_general_message'];?></p>
127
-            <label><input type="radio" name="auto_template_logic" value="system"<?php if($auto_template_logic == 'system') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br />
128
-            <label><input type="radio" name="auto_template_logic" value="parent"<?php if($auto_template_logic == 'parent') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br />
129
-            <label><input type="radio" name="auto_template_logic" value="sibling"<?php if($auto_template_logic == 'sibling') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br />
126
+            <p><?php echo $_lang['defaulttemplate_logic_general_message']; ?></p>
127
+            <label><input type="radio" name="auto_template_logic" value="system"<?php if ($auto_template_logic == 'system') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br />
128
+            <label><input type="radio" name="auto_template_logic" value="parent"<?php if ($auto_template_logic == 'parent') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br />
129
+            <label><input type="radio" name="auto_template_logic" value="sibling"<?php if ($auto_template_logic == 'sibling') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br />
130 130
         </td>
131 131
     </tr>
132 132
     <tr>
@@ -138,22 +138,22 @@  discard block
 block discarded – undo
138 138
               $modx->getDatabase()->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 144
             }
145 145
             else $disabledFilters = false;
146 146
         ?>
147
-        <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br />
148
-        <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?>
147
+        <?php echo wrap_label($_lang['yes'], form_radio('enable_filter', 1, '', $disabledFilters)); ?><br />
148
+        <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters)); ?>
149 149
         <div class="comment"><?php echo $_lang['enable_filter_message']; ?></div>
150 150
       </td>
151 151
     </tr>
152 152
     <tr>
153 153
       <th><?php echo $_lang['enable_at_syntax_title'] ?><br><small>[(enable_at_syntax)]</small></th>
154 154
       <td >
155
-        <?php echo wrap_label($_lang['yes'],form_radio('enable_at_syntax', 1));?><br />
156
-        <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0));?>
155
+        <?php echo wrap_label($_lang['yes'], form_radio('enable_at_syntax', 1)); ?><br />
156
+        <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0)); ?>
157 157
         <div class="comment">
158 158
             <?php echo $_lang['enable_at_syntax_message']; ?>
159 159
             <ul>
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
   <tr>
168 168
     <th><?php echo $_lang['defaultpublish_title'] ?><br><small>[(publish_default)]</small></th>
169 169
     <td>
170
-        <?php echo wrap_label($_lang['yes'],form_radio('publish_default', 1));?><br />
171
-        <?php echo wrap_label($_lang['no'],form_radio('publish_default', 0));?>
170
+        <?php echo wrap_label($_lang['yes'], form_radio('publish_default', 1)); ?><br />
171
+        <?php echo wrap_label($_lang['no'], form_radio('publish_default', 0)); ?>
172 172
         <div class="comment"><?php echo $_lang['defaultpublish_message'] ?></div>
173 173
     </td>
174 174
   </tr>
@@ -176,24 +176,24 @@  discard block
 block discarded – undo
176 176
   <tr>
177 177
     <th><?php echo $_lang['defaultcache_title'] ?><br><small>[(cache_default)]</small></th>
178 178
     <td>
179
-        <?php echo wrap_label($_lang['yes'],form_radio('cache_default', 1));?><br />
180
-        <?php echo wrap_label($_lang['no'],form_radio('cache_default', 0));?>
179
+        <?php echo wrap_label($_lang['yes'], form_radio('cache_default', 1)); ?><br />
180
+        <?php echo wrap_label($_lang['no'], form_radio('cache_default', 0)); ?>
181 181
         <div class="comment"><?php echo $_lang['defaultcache_message'] ?></div>
182 182
     </td>
183 183
   </tr>
184 184
   <tr>
185 185
     <th><?php echo $_lang['defaultsearch_title'] ?><br><small>[(search_default)]</small></th>
186 186
     <td>
187
-        <?php echo wrap_label($_lang['yes'],form_radio('search_default', 1));?><br />
188
-        <?php echo wrap_label($_lang['no'],form_radio('search_default', 0));?>
187
+        <?php echo wrap_label($_lang['yes'], form_radio('search_default', 1)); ?><br />
188
+        <?php echo wrap_label($_lang['no'], form_radio('search_default', 0)); ?>
189 189
         <div class="comment"><?php echo $_lang['defaultsearch_message'] ?></div>
190 190
     </td>
191 191
   </tr>
192 192
   <tr>
193 193
     <th><?php echo $_lang['defaultmenuindex_title'] ?><br><small>[(auto_menuindex)]</small></th>
194 194
     <td>
195
-        <?php echo wrap_label($_lang['yes'],form_radio('auto_menuindex', 1));?><br />
196
-        <?php echo wrap_label($_lang['no'],form_radio('auto_menuindex', 0));?>
195
+        <?php echo wrap_label($_lang['yes'], form_radio('auto_menuindex', 1)); ?><br />
196
+        <?php echo wrap_label($_lang['no'], form_radio('auto_menuindex', 0)); ?>
197 197
         <div class="comment"><?php echo $_lang['defaultmenuindex_message'] ?></div>
198 198
     </td>
199 199
   </tr>
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
     <table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">
204 204
     <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5">
205 205
     <?php
206
-        $ct = explode(",",$custom_contenttype);
207
-        for($i=0;$i<count($ct);$i++) {
206
+        $ct = explode(",", $custom_contenttype);
207
+        for ($i = 0; $i < count($ct); $i++) {
208 208
             echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>";
209 209
         }
210 210
     ?>
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
 <th><?php echo $_lang['docid_incrmnt_method_title'] ?><br><small>[(docid_incrmnt_method)]</small></th>
219 219
 <td>
220 220
 <label><input type="radio" name="docid_incrmnt_method" value="0"
221
-    <?php echo ($docid_incrmnt_method=='0') ? 'checked="checked"' : "" ; ?> />
221
+    <?php echo ($docid_incrmnt_method == '0') ? 'checked="checked"' : ""; ?> />
222 222
     <?php echo $_lang['docid_incrmnt_method_0']?></label><br />
223 223
 
224 224
 <label><input type="radio" name="docid_incrmnt_method" value="1"
225
-    <?php echo ($docid_incrmnt_method=='1') ? 'checked="checked"' : "" ; ?> />
225
+    <?php echo ($docid_incrmnt_method == '1') ? 'checked="checked"' : ""; ?> />
226 226
     <?php echo $_lang['docid_incrmnt_method_1']?></label><br />
227 227
 <label><input type="radio" name="docid_incrmnt_method" value="2"
228
-    <?php echo ($docid_incrmnt_method=='2') ? 'checked="checked"' : "" ; ?> />
228
+    <?php echo ($docid_incrmnt_method == '2') ? 'checked="checked"' : ""; ?> />
229 229
     <?php echo $_lang['docid_incrmnt_method_2']?></label><br />
230 230
 </td>
231 231
 </tr>
@@ -233,24 +233,24 @@  discard block
 block discarded – undo
233 233
 <tr>
234 234
 <th><?php echo $_lang['enable_cache_title'] ?><br><small>[(enable_cache)]</small></th>
235 235
 <td>
236
-    <?php echo wrap_label($_lang['enabled'],form_radio('enable_cache', 1));?><br />
237
-    <?php echo wrap_label($_lang['disabled'], form_radio('enable_cache', 0));?><br />
238
-    <?php echo wrap_label($_lang['disabled_at_login'], form_radio('enable_cache', 2));?>
236
+    <?php echo wrap_label($_lang['enabled'], form_radio('enable_cache', 1)); ?><br />
237
+    <?php echo wrap_label($_lang['disabled'], form_radio('enable_cache', 0)); ?><br />
238
+    <?php echo wrap_label($_lang['disabled_at_login'], form_radio('enable_cache', 2)); ?>
239 239
 </td>
240 240
 </tr>
241 241
 
242 242
 <tr>
243 243
 <th><?php echo $_lang['cache_type_title'] ?><br><small>[(cache_type)]</small></th>
244 244
 <td>
245
-<?php echo wrap_label($_lang['cache_type_1'],form_radio('cache_type', 1));?><br />
246
-<?php echo wrap_label($_lang['cache_type_2'], form_radio('cache_type', 2));?>
245
+<?php echo wrap_label($_lang['cache_type_1'], form_radio('cache_type', 1)); ?><br />
246
+<?php echo wrap_label($_lang['cache_type_2'], form_radio('cache_type', 2)); ?>
247 247
 </td>
248 248
 </tr>
249 249
   <tr>
250 250
 <th><?php echo $_lang['minifyphp_incache_title'] ?><br><small>[(minifyphp_incache)]</small></th>
251 251
     <td>
252
-<?php echo wrap_label($_lang['enabled'],form_radio('minifyphp_incache', 1));?><br />
253
-<?php echo wrap_label($_lang['disabled'], form_radio('minifyphp_incache', 0));?>
252
+<?php echo wrap_label($_lang['enabled'], form_radio('minifyphp_incache', 1)); ?><br />
253
+<?php echo wrap_label($_lang['disabled'], form_radio('minifyphp_incache', 0)); ?>
254 254
 <div class="comment"><?php echo $_lang['minifyphp_incache_message'] ?></div>
255 255
     </td>
256 256
   </tr>
@@ -259,23 +259,23 @@  discard block
 block discarded – undo
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'" : "" ;
262
+      for ($i = -24; $i < 25; $i++) {
263
+          $seconds = $i * 60 * 60;
264
+          $selectedtext = $seconds == $server_offset_time ? "selected='selected'" : "";
265 265
       ?>
266 266
           <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option>
267 267
           <?php
268 268
       }
269 269
       ?>
270 270
         </select>
271
-        <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></div>
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>
273 273
     </tr>
274 274
     <tr>
275 275
       <th><?php echo $_lang['server_protocol_title'] ?><br><small>[(server_protocol)]</small></th>
276 276
       <td>
277
-        <?php echo wrap_label($_lang['server_protocol_http'],form_radio('server_protocol', 'http'));?><br />
278
-        <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https'));?>
277
+        <?php echo wrap_label($_lang['server_protocol_http'], form_radio('server_protocol', 'http')); ?><br />
278
+        <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https')); ?>
279 279
         <div class="comment"><?php echo $_lang['server_protocol_message'] ?></div>
280 280
       </td>
281 281
     </tr>
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
     <tr>
289 289
      <th><?php echo $_lang['track_visitors_title'] ?><br><small>[(track_visitors)]</small></th>
290 290
      <td>
291
-         <?php echo wrap_label($_lang['yes'],form_radio('track_visitors', 1));?><br />
292
-         <?php echo wrap_label($_lang['no'],form_radio('track_visitors', 0));?>
291
+         <?php echo wrap_label($_lang['yes'], form_radio('track_visitors', 1)); ?><br />
292
+         <?php echo wrap_label($_lang['no'], form_radio('track_visitors', 0)); ?>
293 293
          <div class="comment"><?php echo $_lang['track_visitors_message'] ?></div>
294 294
      </td>
295 295
    </tr>
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         <?php
302 302
             // invoke OnSiteSettingsRender event
303 303
             $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
304
-            if(is_array($evtOut)) echo implode("",$evtOut);
304
+            if (is_array($evtOut)) echo implode("", $evtOut);
305 305
         ?>
306 306
     </td>
307 307
   </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab5_security_settings.inc.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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)) {
3
+    if (empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) {
4 4
         $valid_hostnames = $_SERVER['HTTP_HOST'];
5 5
     } else {
6 6
         $valid_hostnames = $MODX_SITE_HOSTNAMES;
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 <tr>
16 16
 <th><?php echo $_lang['allow_eval_title']; ?><br><small>[(allow_eval)]</small></th>
17 17
 <td>
18
-<?php echo wrap_label($_lang['allow_eval_with_scan']         , form_radio('allow_eval','with_scan'));?><br />
19
-<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'] , form_radio('allow_eval','with_scan_at_post'));?><br />
20
-<?php echo wrap_label($_lang['allow_eval_everytime_eval']    , form_radio('allow_eval','everytime_eval'));?><br />
21
-<?php echo wrap_label($_lang['allow_eval_dont_eval']         , form_radio('allow_eval','dont_eval'));?>
18
+<?php echo wrap_label($_lang['allow_eval_with_scan'], form_radio('allow_eval', 'with_scan')); ?><br />
19
+<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'], form_radio('allow_eval', 'with_scan_at_post')); ?><br />
20
+<?php echo wrap_label($_lang['allow_eval_everytime_eval'], form_radio('allow_eval', 'everytime_eval')); ?><br />
21
+<?php echo wrap_label($_lang['allow_eval_dont_eval'], form_radio('allow_eval', 'dont_eval')); ?>
22 22
     <div class="comment">
23 23
         <?php echo $_lang['allow_eval_msg'] ?>
24 24
     </div>
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 <tr>
44 44
     <th><?php echo $_lang['check_files_onlogin_title'] ?><br><small>[(check_files_onlogin)]</small></th>
45 45
     <td>
46
-      <textarea name="check_files_onlogin"><?php echo $check_files_onlogin;?></textarea><br />
46
+      <textarea name="check_files_onlogin"><?php echo $check_files_onlogin; ?></textarea><br />
47 47
 
48 48
 </td>
49 49
 </tr>
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
     <tr>
54 54
       <td nowrap class="warning"><?php echo $_lang['validate_referer_title'] ?><br><small>[(validate_referer)]</small></td>
55 55
       <td>
56
-        <?php echo wrap_label($_lang['yes'],form_radio('validate_referer', 1));?><br />
57
-        <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0));?>
56
+        <?php echo wrap_label($_lang['yes'], form_radio('validate_referer', 1)); ?><br />
57
+        <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0)); ?>
58 58
       </td>
59 59
     </tr>
60 60
     <tr>
@@ -89,25 +89,25 @@  discard block
 block discarded – undo
89 89
   <tr>
90 90
 <th><?php echo $_lang['a17_error_reporting_title']; ?><br><small>[(error_reporting)]</small></th>
91 91
 <td>
92
-<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting','0'));?><br />
93
-<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting','1'));?><br />
94
-<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting','2'));?><br />
95
-<?php echo wrap_label($_lang['a17_error_reporting_opt99'],form_radio('error_reporting','99'));?>
92
+<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting', '0')); ?><br />
93
+<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting', '1')); ?><br />
94
+<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting', '2')); ?><br />
95
+<?php echo wrap_label($_lang['a17_error_reporting_opt99'], form_radio('error_reporting', '99')); ?>
96 96
 </td>
97 97
 </tr>
98 98
 <tr>
99 99
     <td width="200">&nbsp;</td>
100
-    <td class="comment"> <?php echo $_lang['a17_error_reporting_msg'];?></td>
100
+    <td class="comment"> <?php echo $_lang['a17_error_reporting_msg']; ?></td>
101 101
 </tr>
102 102
 <tr><td colspan="2"><div class="split"></div></td></tr>
103 103
 <tr>
104 104
 <th><?php echo $_lang['mutate_settings.dynamic.php6']; ?><br><small>[(send_errormail)]</small></th>
105 105
 <td>
106
-<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'],form_radio('send_errormail','0'));?><br />
107
-<?php echo wrap_label('error',form_radio('send_errormail','3'));?><br />
108
-<?php echo wrap_label('error + warning',form_radio('send_errormail','2'));?><br />
109
-<?php echo wrap_label('error + warning + information',form_radio('send_errormail','1'));?><br />
110
-<?php echo parseText($_lang['mutate_settings.dynamic.php8'],array('emailsender'=>$modx->config['emailsender']));?></td>
106
+<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'], form_radio('send_errormail', '0')); ?><br />
107
+<?php echo wrap_label('error', form_radio('send_errormail', '3')); ?><br />
108
+<?php echo wrap_label('error + warning', form_radio('send_errormail', '2')); ?><br />
109
+<?php echo wrap_label('error + warning + information', form_radio('send_errormail', '1')); ?><br />
110
+<?php echo parseText($_lang['mutate_settings.dynamic.php8'], array('emailsender'=>$modx->config['emailsender'])); ?></td>
111 111
 </tr>
112 112
    <tr>
113 113
     <td colspan="2"><div class="split"></div></td>
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 <tr>
116 116
 <th><?php echo $_lang['enable_bindings_title'] ?><br><small>[(enable_bindings)]</small></th>
117 117
 <td>
118
-<?php echo wrap_label($_lang['yes'],form_radio('enable_bindings','1'));?><br />
119
-<?php echo wrap_label($_lang['no'], form_radio('enable_bindings','0'));?>
118
+<?php echo wrap_label($_lang['yes'], form_radio('enable_bindings', '1')); ?><br />
119
+<?php echo wrap_label($_lang['no'], form_radio('enable_bindings', '0')); ?>
120 120
 
121 121
 </td>
122 122
 </tr>
@@ -157,20 +157,20 @@  discard block
 block discarded – undo
157 157
 <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th>
158 158
 <td>
159 159
 <?php
160
-if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1;
161
-$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1;
162
-$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1;
163
-$phm['e']['SHA512']     = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1;
164
-$phm['e']['SHA256']     = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0:1;
165
-$phm['e']['MD5']        = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0:1;
166
-$phm['e']['UNCRYPT']    = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0:1;
160
+if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1;
161
+$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1;
162
+$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1;
163
+$phm['e']['SHA512']     = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0 : 1;
164
+$phm['e']['SHA256']     = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0 : 1;
165
+$phm['e']['MD5']        = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0 : 1;
166
+$phm['e']['UNCRYPT']    = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0 : 1;
167 167
 ?>
168
-<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt &amp; stretch)',form_radio('pwd_hash_algo','BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y']));?><br />
169
-<?php echo wrap_label('CRYPT_BLOWFISH_A (salt &amp; stretch)',form_radio('pwd_hash_algo','BLOWFISH_A', '', $phm['e']['BLOWFISH_A']));?><br />
170
-<?php echo wrap_label('CRYPT_SHA512 (salt &amp; stretch)'    ,form_radio('pwd_hash_algo','SHA512'    , '', $phm['e']['SHA512']));?><br />
171
-<?php echo wrap_label('CRYPT_SHA256 (salt &amp; stretch)'    ,form_radio('pwd_hash_algo','SHA256'    , '', $phm['e']['SHA256']));?><br />
172
-<?php echo wrap_label('CRYPT_MD5 (salt &amp; stretch)'       ,form_radio('pwd_hash_algo','MD5'       , '', $phm['e']['MD5']));?><br />
173
-<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)'  ,form_radio('pwd_hash_algo','UNCRYPT'  , '', $phm['e']['UNCRYPT']));?>
168
+<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt &amp; stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y'])); ?><br />
169
+<?php echo wrap_label('CRYPT_BLOWFISH_A (salt &amp; stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_A', '', $phm['e']['BLOWFISH_A'])); ?><br />
170
+<?php echo wrap_label('CRYPT_SHA512 (salt &amp; stretch)', form_radio('pwd_hash_algo', 'SHA512', '', $phm['e']['SHA512'])); ?><br />
171
+<?php echo wrap_label('CRYPT_SHA256 (salt &amp; stretch)', form_radio('pwd_hash_algo', 'SHA256', '', $phm['e']['SHA256'])); ?><br />
172
+<?php echo wrap_label('CRYPT_MD5 (salt &amp; stretch)', form_radio('pwd_hash_algo', 'MD5', '', $phm['e']['MD5'])); ?><br />
173
+<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)', form_radio('pwd_hash_algo', 'UNCRYPT', '', $phm['e']['UNCRYPT'])); ?>
174 174
 </td>
175 175
 </tr>
176 176
 <tr>
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
   ?>
187 187
 <?php
188 188
 $gdAvailable = extension_loaded('gd');
189
-if(!$gdAvailable) $use_captcha = 0;
189
+if (!$gdAvailable) $use_captcha = 0;
190 190
 ?>
191 191
   <tr>
192 192
     <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td>
193
-    <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha==1) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> />
193
+    <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha == 1) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> />
194 194
       <?php echo $_lang['yes']?></label><br />
195
-      <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha==0) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> />
195
+      <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha == 0) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> />
196 196
       <?php echo $_lang['no']?></label> </td>
197 197
   </tr>
198 198
   <tr>
@@ -202,23 +202,23 @@  discard block
 block discarded – undo
202 202
   <tr>
203 203
     <td colspan="2"><div class="split"></div></td>
204 204
   </tr>
205
-  <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>>
205
+  <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>>
206 206
     <td nowrap class="warning"><?php echo $_lang['captcha_words_title'] ?><br><small>[(captcha_words)]</small>
207 207
       <br />
208 208
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
209 209
       <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');">
210
-<?php echo get_lang_options('captcha_words_default');?>
210
+<?php echo get_lang_options('captcha_words_default'); ?>
211 211
       </select>
212 212
     </td>
213 213
     <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo $captcha_words; ?>" />
214
-        <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']);?>" />
214
+        <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']); ?>" />
215 215
     </td>
216 216
   </tr>
217
-  <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>>
217
+  <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>>
218 218
     <td width="200">&nbsp;</td>
219 219
     <td class="comment"><?php echo $_lang['captcha_words_message'] ?></td>
220 220
   </tr>
221
-  <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>>
221
+  <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>>
222 222
     <td colspan="2"><div class="split"></div></td>
223 223
   </tr>
224 224
   <tr>
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         <?php
227 227
             // invoke OnMiscSettingsRender event
228 228
             $evtOut = $modx->invokeEvent('OnSecuritySettingsRender');
229
-            if(is_array($evtOut)) echo implode("",$evtOut);
229
+            if (is_array($evtOut)) echo implode("", $evtOut);
230 230
         ?>
231 231
     </td>
232 232
   </tr>
Please login to merge, or discard this patch.
manager/actions/modules.static.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 
27 27
 // context menu
28
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
28
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
29 29
 $cm = new ContextMenu("cntxm", 150);
30 30
 $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0));
31 31
 if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
@@ -108,24 +108,24 @@  discard block
 block discarded – undo
108 108
     <div class="table-responsive">
109 109
         <?php
110 110
         if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
111
-            $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
112
-				FROM ' . $modx->getFullTableName('site_modules') . ' AS sm
113
-				LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
114
-				LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
115
-                WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1
111
+            $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"'.$_lang['yes'].'","-") as disabled, IF(sm.icon<>"",sm.icon,"'.$_style['icons_modules'].'") as icon
112
+				FROM ' . $modx->getFullTableName('site_modules').' AS sm
113
+				LEFT JOIN ' . $modx->getFullTableName('site_module_access').' AS sma ON sma.module = sm.id
114
+				LEFT JOIN ' . $modx->getFullTableName('member_groups').' AS mg ON sma.usergroup = mg.user_group
115
+                WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID().') AND sm.disabled != 1 AND sm.locked != 1
116 116
                 ORDER BY sm.name');
117 117
             if ($modx->hasPermission('edit_module')) {
118
-                $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
118
+                $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
119 119
             } else if ($modx->hasPermission('exec_module')) {
120
-                $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
120
+                $title = "<a href='index.php?a=112&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
121 121
             } else {
122 122
                 $title = '[+value+]';
123 123
             }
124 124
         } else {
125 125
             $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
126
-            $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
126
+            $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
127 127
         }
128
-        include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
128
+        include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
129 129
         $grd = new DataGrid('', $rs, $number_of_results); // set page size to 0 t show all items
130 130
         $grd->noRecordMsg = $_lang["no_records_found"];
131 131
         $grd->cssClass = "table data";
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
         $grd->itemClass = "tableItem";
134 134
         $grd->altItemClass = "tableAltItem";
135 135
         $grd->fields = "icon,name,description,locked,disabled";
136
-        $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["description"] . " ," . $_lang["locked"] . " ," . $_lang["disabled"];
136
+        $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["description"]." ,".$_lang["locked"]." ,".$_lang["disabled"];
137 137
         $grd->colWidths = "34,,,60,60";
138 138
         $grd->colAligns = "center,,,center,center";
139
-        $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title;
139
+        $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='[+value+]'></i></a>||template:".$title;
140 140
         if ($listmode == '1') {
141 141
             $grd->pageSize = 0;
142 142
         }
Please login to merge, or discard this patch.
manager/actions/eventlog.dynamic.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
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('view_eventlog')) {
5
+if (!$modx->hasPermission('view_eventlog')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 $modx->getManagerApi()->initPageViewState();
16 16
 
17 17
 // get and save search string
18
-if($_REQUEST['op'] == 'reset') {
18
+if ($_REQUEST['op'] == 'reset') {
19 19
 	$sqlQuery = $query = '';
20 20
 	$_PAGE['vs']['search'] = '';
21 21
 } else {
22 22
 	$sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
23
-	if(!is_numeric($sqlQuery)) {
23
+	if (!is_numeric($sqlQuery)) {
24 24
 		$sqlQuery = $modx->getDatabase()->escape($query);
25 25
 	}
26 26
 	$_PAGE['vs']['search'] = $query;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $_PAGE['vs']['lm'] = $listmode;
32 32
 
33 33
 // context menu
34
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
34
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
35 35
 $cm = new ContextMenu("cntxm", 150);
36 36
 $cm->addItem($_lang['view_log'], "js:menuAction(1)", $_style['actions_preview']);
37 37
 $cm->addSeparator();
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 					<?php
128 128
 					$ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el 
129 129
 			LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0
130
-			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
130
+			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
+					include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
132 132
 					$grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
133 133
 					$grd->pagerClass = '';
134 134
 					$grd->pageClass = 'page-item';
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 					$grd->itemClass = "tableItem";
140 140
 					$grd->altItemClass = "tableAltItem";
141 141
 					$grd->fields = "type,source,createdon,eventid,username";
142
-					$grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid'];
142
+					$grd->columns = $_lang['type']." ,".$_lang['source']." ,".$_lang['date']." ,".$_lang['event_id']." ,".$_lang['sysinfo_userid'];
143 143
 					$grd->colWidths = "1%,,1%,1%,1%";
144 144
 					$grd->colAligns = "center,,,center,center";
145
-					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
146
-					if($listmode == '1') {
145
+					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang['click_to_context']."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".$_lang['click_to_view_details']."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p';
146
+					if ($listmode == '1') {
147 147
 						$grd->pageSize = 0;
148 148
 					}
149
-					if($_REQUEST['op'] == 'reset') {
149
+					if ($_REQUEST['op'] == 'reset') {
150 150
 						$grd->pageNumber = 1;
151 151
 					}
152 152
 					// render grid
Please login to merge, or discard this patch.
manager/actions/mutate_htmlsnippet.dynamic.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21
-$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
21
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
22 22
 
23 23
 // Get table names (alphabetical)
24 24
 $tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $content['name'] = $_REQUEST['itemname'];
48 48
 } else {
49 49
     $_SESSION['itemname'] = $_lang["new_htmlsnippet"];
50
-    $content['category'] = (int)$_REQUEST['catid'];
50
+    $content['category'] = (int) $_REQUEST['catid'];
51 51
 }
52 52
 
53 53
 if ($modx->getManagerApi()->hasFormValues()) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 // Add lock-element JS-Script
66 66
 $lockElementId = $id;
67 67
 $lockElementType = 3;
68
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
68
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
69 69
 
70 70
 // Print RTE Javascript function
71 71
 ?>
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         <input type="hidden" name="mode" value="<?= $modx->getManagerApi()->action ?>" />
137 137
 
138 138
         <h1>
139
-            <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i>
139
+            <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i>
140 140
         </h1>
141 141
 
142 142
         <?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                             <div class="form-control-name clearfix">
161 161
                                 <input name="name" type="text" maxlength="100" value="<?= $modx->getPhpCompat()->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
162 162
                                 <?php if ($modx->hasPermission('save_role')): ?>
163
-                                    <label class="custom-control" title="<?= $_lang['lock_htmlsnippet'] . "\n" . $_lang['lock_htmlsnippet_msg'] ?>" tooltip>
163
+                                    <label class="custom-control" title="<?= $_lang['lock_htmlsnippet']."\n".$_lang['lock_htmlsnippet_msg'] ?>" tooltip>
164 164
                                         <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 || $content['locked'] == 'on' ? ' checked="checked"' : '') ?> />
165 165
                                         <i class="fa fa-lock"></i>
166 166
                                     </label>
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
                             <select name="categoryid" class="form-control" onchange="documentDirty=true;">
185 185
                                 <option>&nbsp;</option>
186 186
                                 <?php
187
-                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
187
+                                include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
188 188
                                 foreach (getCategories() as $n => $v) {
189
-                                    echo "\t\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '') . '>' . $modx->getPhpCompat()->htmlspecialchars($v['category']) . "</option>\n";
189
+                                    echo "\t\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '').'>'.$modx->getPhpCompat()->htmlspecialchars($v['category'])."</option>\n";
190 190
                                 }
191 191
                                 ?>
192 192
                             </select>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                     </div>
201 201
                     <?php if ($_SESSION['mgrRole'] == 1): ?>
202 202
                         <div class="form-row">
203
-                            <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['disabled'] . "</span>" : $_lang['disabled']) ?></label>
203
+                            <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['disabled']."</span>" : $_lang['disabled']) ?></label>
204 204
                         </div>
205 205
                     <?php endif; ?>
206 206
                 </div>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                             $evtOut = $modx->invokeEvent('OnRichTextEditorRegister');
217 217
                             if (is_array($evtOut)) {
218 218
                                 foreach ($evtOut as $i => $editor) {
219
-                                    echo "\t" . '<option value="' . $editor . '"' . ($which_editor == $editor ? ' selected="selected"' : '') . '>' . $editor . "</option>\n";
219
+                                    echo "\t".'<option value="'.$editor.'"'.($which_editor == $editor ? ' selected="selected"' : '').'>'.$editor."</option>\n";
220 220
                                 }
221 221
                             }
222 222
                             ?>
Please login to merge, or discard this patch.
manager/processors/empty_table.processor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
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('settings')) {
5
+if (!$modx->hasPermission('settings')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $modx->getDatabase()->truncate($modx->getFullTableName('manager_log'));
10 10
 
11
-$header="Location: index.php?a=13";
11
+$header = "Location: index.php?a=13";
12 12
 header($header);
Please login to merge, or discard this patch.
manager/processors/execute_module.processor.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
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('exec_module')) {
5
+if (!$modx->hasPermission('exec_module')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // check if user has access permission, except admins
15
-if($_SESSION['mgrRole']!=1){
15
+if ($_SESSION['mgrRole'] != 1) {
16 16
 	$rs = $modx->getDatabase()->select(
17 17
 		'sma.usergroup,mg.member',
18 18
 		$modx->getFullTableName("site_module_access")." sma
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 	$permissionAccessInt = -1;
25 25
 
26 26
 	while ($row = $modx->getDatabase()->getRow($rs)) {
27
-		if($row["usergroup"] && $row["member"]) {
27
+		if ($row["usergroup"] && $row["member"]) {
28 28
 			//if there are permissions and this member has permission, ofcourse
29 29
 			//this is granted
30 30
 			$permissionAccessInt = 1;
31
-		} elseif ($permissionAccessInt==-1) {
31
+		} elseif ($permissionAccessInt == -1) {
32 32
 			//if there are permissions but this member has no permission and the
33 33
 			//variable was still in init state we set permission to 0; no permissions
34 34
 			$permissionAccessInt = 0;
35 35
 		}
36 36
 	}
37 37
 
38
-	if($permissionAccessInt==0) {
38
+	if ($permissionAccessInt == 0) {
39 39
 		$modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40 40
 	}
41 41
 }
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 // get module data
44 44
 $rs = $modx->getDatabase()->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'");
45 45
 $content = $modx->getDatabase()->getRow($rs);
46
-if(!$content) {
46
+if (!$content) {
47 47
 	$modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
48 48
 }
49
-if($content['disabled']) {
49
+if ($content['disabled']) {
50 50
 	$modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
51 51
 }
52 52
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 $_SESSION['itemname'] = $content['name'];
61 61
 
62 62
 
63
-$output = evalModule($content["modulecode"],$parameter);
64
-if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) {
63
+$output = evalModule($content["modulecode"], $parameter);
64
+if (strpos(trim($output), '<') === 0 && strpos(trim($output), '<?xml') !== 0) {
65 65
 	echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
66 66
 }
67 67
 echo $output;
Please login to merge, or discard this patch.
manager/processors/remove_locks.processor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
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(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+if (!isset($_GET['id'])) {
7
+	if (!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 
9 9
 	// Remove all locks
10 10
 	$modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks'));
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	header($header);
14 14
 } else {
15 15
 	// Remove single locks via AJAX / window.onbeforeunload
16
-	$type = (int)$_GET['type'];
17
-	$id = (int)$_GET['id'];
16
+	$type = (int) $_GET['type'];
17
+	$id = (int) $_GET['id'];
18 18
 	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
-	if($type && $id) {
19
+	if ($type && $id) {
20 20
 		$modx->unlockElement($type, $id, $includeAllUsers);
21 21
 		echo '1';
22 22
 		exit;
Please login to merge, or discard this patch.