Completed
Push — develop ( b2c942...8bfc17 )
by Serg
05:46
created
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->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";
@@ -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->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 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/includes/extenders/modxmailer.class.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 use PHPMailer\PHPMailer\PHPMailer;
12 12
 use PHPMailer\PHPMailer\Exception as PHPMailerException;
13 13
 
14
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/Exception.php';
15
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/PHPMailer.php';
16
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/SMTP.php';
14
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/Exception.php';
15
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/PHPMailer.php';
16
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/SMTP.php';
17 17
 
18 18
 /**
19 19
  * Class MODxMailer
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function init(DocumentParser $modx)
47 47
     {
48 48
         $this->modx = $modx;
49
-        $this->PluginDir = MODX_MANAGER_PATH . 'includes/controls/phpmailer/';
49
+        $this->PluginDir = MODX_MANAGER_PATH.'includes/controls/phpmailer/';
50 50
 
51 51
         switch ($modx->config['email_method']) {
52 52
             case 'smtp':
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             mb_language($this->mb_language);
113 113
             mb_internal_encoding($modx->config['modx_charset']);
114 114
         }
115
-        $exconf = MODX_MANAGER_PATH . 'includes/controls/phpmailer/config.inc.php';
115
+        $exconf = MODX_MANAGER_PATH.'includes/controls/phpmailer/config.inc.php';
116 116
         if (is_file($exconf)) {
117 117
             include($exconf);
118 118
         }
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
         }
181 181
 
182 182
         if ($this->modx->debug) {
183
-            $debug_info = 'CharSet = ' . $this->CharSet . "\n";
184
-            $debug_info .= 'Encoding = ' . $this->Encoding . "\n";
185
-            $debug_info .= 'mb_language = ' . $this->mb_language . "\n";
186
-            $debug_info .= 'encode_header_method = ' . $this->encode_header_method . "\n";
183
+            $debug_info = 'CharSet = '.$this->CharSet."\n";
184
+            $debug_info .= 'Encoding = '.$this->Encoding."\n";
185
+            $debug_info .= 'mb_language = '.$this->mb_language."\n";
186
+            $debug_info .= 'encode_header_method = '.$this->encode_header_method."\n";
187 187
             $debug_info .= "send_mode = {$mode}\n";
188
-            $debug_info .= 'Subject = ' . $this->Subject . "\n";
188
+            $debug_info .= 'Subject = '.$this->Subject."\n";
189 189
             $log = "<pre>{$debug_info}\n{$header}\n{$org_body}</pre>";
190 190
             $this->modx->logEvent(1, 1, $log, 'MODxMailer debug information');
191 191
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             ini_set('sendmail_from', $old_from);
252 252
         }
253 253
         if (!$rt) {
254
-            $msg = $this->Lang('instantiate') . "<br />\n";
254
+            $msg = $this->Lang('instantiate')."<br />\n";
255 255
             $msg .= "{$this->Subject}<br />\n";
256 256
             $msg .= "{$this->FromName}&lt;{$this->From}&gt;<br />\n";
257 257
             $msg .= mb_convert_encoding($body, $this->modx->config['modx_charset'], $this->CharSet);
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
         $classDump = call_user_func('get_object_vars', $this);
274 274
         unset($classDump['modx']);
275 275
         $this->modx->config['send_errormail'] = '0';
276
-        $this->modx->logEvent(0, 3, $msg . '<pre>' . print_r($classDump, true) . '</pre>', 'phpmailer');
276
+        $this->modx->logEvent(0, 3, $msg.'<pre>'.print_r($classDump, true).'</pre>', 'phpmailer');
277 277
 
278 278
         return parent::SetError($msg);
279 279
     }
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab3_user_settings.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
   <tr>
7 7
     <td nowrap class="warning"><?php echo $_lang['udperms_title'] ?><br><small>[(use_udperms)]</small></td>
8 8
     <td>
9
-        <?php echo wrap_label($_lang['yes'],form_radio('use_udperms', 1, 'id="udPermsOn"'));?><br />
10
-        <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"'));?>
9
+        <?php echo wrap_label($_lang['yes'], form_radio('use_udperms', 1, 'id="udPermsOn"')); ?><br />
10
+        <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"')); ?>
11 11
     </td>
12 12
   </tr>
13 13
   <tr>
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
   <tr>
18 18
     <td colspan="2"><div class="split"></div></td>
19 19
   </tr>
20
-  <tr class="udPerms" <?php echo showHide($use_udperms==1);?>>
20
+  <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>>
21 21
     <td nowrap class="warning"><?php echo $_lang['udperms_allowroot_title'] ?><br><small>[(udperms_allowroot)]</small></td>
22 22
     <td>
23
-      <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot=='1' ? 'checked="checked"' : "" ; ?> />
23
+      <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot == '1' ? 'checked="checked"' : ""; ?> />
24 24
       <?php echo $_lang['yes']?></label><br />
25
-      <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot=='0' ? 'checked="checked"' : "" ; ?> />
25
+      <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot == '0' ? 'checked="checked"' : ""; ?> />
26 26
       <?php echo $_lang['no']?></label>
27 27
     </td>
28 28
   </tr>
29
-  <tr class="udPerms" <?php echo showHide($use_udperms==1);?>>
29
+  <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>>
30 30
     <td width="200">&nbsp;</td>
31 31
     <td class="comment"><?php echo $_lang['udperms_allowroot_message'] ?></td>
32 32
   </tr>
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
   <tr>
38 38
     <td nowrap class="warning"><?php echo $_lang['email_sender_method'] ?><br><small>[(email_sender_method)]</small></td>
39 39
     <td>
40
-      <label><input type="radio" name="email_sender_method" value="1" <?php echo $email_sender_method=='1' ? 'checked="checked"' : "" ; ?> />
40
+      <label><input type="radio" name="email_sender_method" value="1" <?php echo $email_sender_method == '1' ? 'checked="checked"' : ""; ?> />
41 41
       <?php echo $_lang['auto']?></label><br />
42
-      <label><input type="radio" name="email_sender_method" value="0" <?php echo $email_sender_method=='0' ? 'checked="checked"' : "" ; ?> />
42
+      <label><input type="radio" name="email_sender_method" value="0" <?php echo $email_sender_method == '0' ? 'checked="checked"' : ""; ?> />
43 43
       <?php echo $_lang['use_emailsender']?></label>
44 44
     </td>
45 45
   </tr>
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
   <tr>
56 56
     <td nowrap class="warning"><?php echo $_lang['email_method_title'] ?><br><small>[(email_method)]</small></td>
57 57
     <td>
58
-        <?php echo wrap_label($_lang['email_method_mail'],form_radio('email_method','mail','id="useMail"'));?><br />
59
-        <?php echo wrap_label($_lang['email_method_smtp'],form_radio('email_method','smtp','id="useSmtp"'));?>
60
-        <div class="smtpRow" <?php echo showHide($email_method=='smtp');?>>
61
-            <?php include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/snippet_smtp.inc.php'); ?>
58
+        <?php echo wrap_label($_lang['email_method_mail'], form_radio('email_method', 'mail', 'id="useMail"')); ?><br />
59
+        <?php echo wrap_label($_lang['email_method_smtp'], form_radio('email_method', 'smtp', 'id="useSmtp"')); ?>
60
+        <div class="smtpRow" <?php echo showHide($email_method == 'smtp'); ?>>
61
+            <?php include_once(MODX_MANAGER_PATH.'actions/mutate_settings/snippet_smtp.inc.php'); ?>
62 62
         </div>
63 63
     </td>
64 64
   </tr>
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
       <br />
71 71
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
72 72
       <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');">
73
-<?php echo get_lang_options('emailsubject_default');?>
73
+<?php echo get_lang_options('emailsubject_default'); ?>
74 74
       </select>
75 75
     </td>
76 76
     <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" value="<?php echo $emailsubject; ?>" />
77
-        <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" />
77
+        <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']); ?>" />
78 78
     </td>
79 79
   </tr>
80 80
   <tr>
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
       <br />
90 90
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
91 91
       <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');">
92
-<?php echo get_lang_options('system_email_signup');?>
92
+<?php echo get_lang_options('system_email_signup'); ?>
93 93
       </select>
94 94
     </td>
95 95
     <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo $signupemail_message; ?></textarea>
96
-        <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" />
96
+        <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']); ?>" />
97 97
     </td>
98 98
   </tr>
99 99
   <tr>
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
       <br />
109 109
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
110 110
       <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');">
111
-<?php echo get_lang_options('system_email_websignup');?>
111
+<?php echo get_lang_options('system_email_websignup'); ?>
112 112
       </select>
113 113
     </td>
114 114
     <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo $websignupemail_message; ?></textarea>
115
-        <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" />
115
+        <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']); ?>" />
116 116
     </td>
117 117
   </tr>
118 118
   <tr>
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
       <br />
128 128
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
129 129
       <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');">
130
-<?php echo get_lang_options('system_email_webreminder');?>
130
+<?php echo get_lang_options('system_email_webreminder'); ?>
131 131
       </select>
132 132
     </td>
133 133
     <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo $webpwdreminder_message; ?></textarea>
134
-        <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" />
134
+        <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']); ?>" />
135 135
     </td>
136 136
   </tr>
137 137
   <tr>
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
   <tr>
145 145
     <td nowrap class="warning" valign="top"><?php echo $_lang['allow_multiple_emails_title'] ?><br><small>[(allow_multiple_emails)]</small></td>
146 146
     <td>
147
-      <?php echo wrap_label($_lang['yes'],form_radio('allow_multiple_emails','1'));?><br />
148
-      <?php echo wrap_label($_lang['no'], form_radio('allow_multiple_emails','0'));?>
147
+      <?php echo wrap_label($_lang['yes'], form_radio('allow_multiple_emails', '1')); ?><br />
148
+      <?php echo wrap_label($_lang['no'], form_radio('allow_multiple_emails', '0')); ?>
149 149
     </td>
150 150
   </tr>
151 151
   <tr>
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         <?php
158 158
             // invoke OnUserSettingsRender event
159 159
             $evtOut = $modx->invokeEvent('OnUserSettingsRender');
160
-            if(is_array($evtOut)) echo implode("",$evtOut);
160
+            if (is_array($evtOut)) echo implode("", $evtOut);
161 161
         ?>
162 162
     </td>
163 163
   </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->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0:1;
162
-$phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0:1;
163
-$phm['e']['SHA512']     = $modx->manager->checkHashAlgorithm('SHA512') ? 0:1;
164
-$phm['e']['SHA256']     = $modx->manager->checkHashAlgorithm('SHA256') ? 0:1;
165
-$phm['e']['MD5']        = $modx->manager->checkHashAlgorithm('MD5') ? 0:1;
166
-$phm['e']['UNCRYPT']    = $modx->manager->checkHashAlgorithm('UNCRYPT') ? 0:1;
160
+if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1;
161
+$phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1;
162
+$phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1;
163
+$phm['e']['SHA512']     = $modx->manager->checkHashAlgorithm('SHA512') ? 0 : 1;
164
+$phm['e']['SHA256']     = $modx->manager->checkHashAlgorithm('SHA256') ? 0 : 1;
165
+$phm['e']['MD5']        = $modx->manager->checkHashAlgorithm('MD5') ? 0 : 1;
166
+$phm['e']['UNCRYPT']    = $modx->manager->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/mutate_settings/tab6_filemanager_settings.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
         <?php
114 114
             // invoke OnMiscSettingsRender event
115 115
             $evtOut = $modx->invokeEvent('OnFileManagerSettingsRender');
116
-            if(is_array($evtOut)) echo implode("",$evtOut);
116
+            if (is_array($evtOut)) echo implode("", $evtOut);
117 117
         ?>
118 118
     </td>
119 119
   </tr>
Please login to merge, or discard this patch.
manager/processors/save_settings.processor.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,46 +1,46 @@  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('settings')) {
5
+if (!$modx->hasPermission('settings')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 $data = $_POST;
9 9
 // lose the POST now, gets rid of quirky issue with Safari 3 - see FS#972
10 10
 unset($_POST);
11 11
 
12
-if($data['friendly_urls']==='1' && strpos($_SERVER['SERVER_SOFTWARE'],'IIS')===false)
12
+if ($data['friendly_urls'] === '1' && strpos($_SERVER['SERVER_SOFTWARE'], 'IIS') === false)
13 13
 {
14
-	$htaccess        = $modx->config['base_path'] . '.htaccess';
15
-	$sample_htaccess = $modx->config['base_path'] . 'ht.access';
16
-	$dir = '/' . trim($modx->config['base_url'],'/');
17
-	if(is_file($htaccess))
14
+	$htaccess        = $modx->config['base_path'].'.htaccess';
15
+	$sample_htaccess = $modx->config['base_path'].'ht.access';
16
+	$dir = '/'.trim($modx->config['base_url'], '/');
17
+	if (is_file($htaccess))
18 18
 	{
19 19
 		$_ = file_get_contents($htaccess);
20
-		if(strpos($_,'RewriteBase')===false)
20
+		if (strpos($_, 'RewriteBase') === false)
21 21
 		{
22 22
 			$warnings[] = $_lang["settings_friendlyurls_alert2"];
23 23
 		}
24
-		elseif(is_writable($htaccess))
24
+		elseif (is_writable($htaccess))
25 25
 		{
26
-			$_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_);
27
-			if(!@file_put_contents($htaccess,$_))
26
+			$_ = preg_replace('@RewriteBase.+@', "RewriteBase {$dir}", $_);
27
+			if (!@file_put_contents($htaccess, $_))
28 28
 			{
29 29
 				$warnings[] = $_lang["settings_friendlyurls_alert2"];
30 30
 			}
31 31
 		}
32 32
 	}
33
-	elseif(is_file($sample_htaccess))
33
+	elseif (is_file($sample_htaccess))
34 34
 	{
35
-		if(!@rename($sample_htaccess,$htaccess))
35
+		if (!@rename($sample_htaccess, $htaccess))
36 36
         {
37 37
         	$warnings[] = $_lang["settings_friendlyurls_alert"];
38 38
 		}
39
-		elseif($modx->config['base_url']!=='/')
39
+		elseif ($modx->config['base_url'] !== '/')
40 40
 		{
41 41
 			$_ = file_get_contents($htaccess);
42
-			$_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_);
43
-			if(!@file_put_contents($htaccess,$_))
42
+			$_ = preg_replace('@RewriteBase.+@', "RewriteBase {$dir}", $_);
43
+			if (!@file_put_contents($htaccess, $_))
44 44
 			{
45 45
 				$warnings[] = $_lang["settings_friendlyurls_alert2"];
46 46
 			}
@@ -48,17 +48,17 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 }
50 50
 
51
-if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
52
-    unlink(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css');
51
+if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
52
+    unlink(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css');
53 53
 }
54 54
 
55
-$data['filemanager_path'] = str_replace('[(base_path)]',MODX_BASE_PATH,$data['filemanager_path']);
56
-$data['rb_base_dir']      = str_replace('[(base_path)]',MODX_BASE_PATH,$data['rb_base_dir']);
55
+$data['filemanager_path'] = str_replace('[(base_path)]', MODX_BASE_PATH, $data['filemanager_path']);
56
+$data['rb_base_dir']      = str_replace('[(base_path)]', MODX_BASE_PATH, $data['rb_base_dir']);
57 57
 
58 58
 if (isset($data) && count($data) > 0) {
59
-	if(isset($data['manager_language'])) {
60
-		$lang_path = MODX_MANAGER_PATH . 'includes/lang/' . $data['manager_language'] . '.inc.php';
61
-		if(is_file($lang_path)) {
59
+	if (isset($data['manager_language'])) {
60
+		$lang_path = MODX_MANAGER_PATH.'includes/lang/'.$data['manager_language'].'.inc.php';
61
+		if (is_file($lang_path)) {
62 62
 			include($lang_path);
63 63
             global $modx_lang_attribute;
64 64
             $data['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute;
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 	$savethese = array();
68 68
 	$data['sys_files_checksum'] = $modx->manager->getSystemChecksum($data['check_files_onlogin']);
69
-	$data['mail_check_timeperiod'] = (int)$data['mail_check_timeperiod'] < 60 ? 60 : $data['mail_check_timeperiod']; // updateMail() in mainMenu no faster than every minute
69
+	$data['mail_check_timeperiod'] = (int) $data['mail_check_timeperiod'] < 60 ? 60 : $data['mail_check_timeperiod']; // updateMail() in mainMenu no faster than every minute
70 70
 	foreach ($data as $k => $v) {
71 71
 		switch ($k) {
72 72
 			case 'site_name':
73 73
 				$v = htmlspecialchars($v);
74 74
 				break;
75 75
             case 'settings_version':{
76
-                if($modx->getVersionData('version')!=$data['settings_version']){
77
-                    $modx->logEvent(17,2,'<pre>'.var_export($data['settings_version'],true).'</pre>','fake settings_version');
76
+                if ($modx->getVersionData('version') != $data['settings_version']) {
77
+                    $modx->logEvent(17, 2, '<pre>'.var_export($data['settings_version'], true).'</pre>', 'fake settings_version');
78 78
                     $v = $modx->getVersionData('version');
79 79
                 }
80 80
                 break;
@@ -95,21 +95,21 @@  discard block
 block discarded – undo
95 95
 			case 'rb_base_url':
96 96
 			case 'filemanager_path':
97 97
 				$v = trim($v);
98
-				$v = rtrim($v,'/') . '/';
98
+				$v = rtrim($v, '/').'/';
99 99
 				break;
100 100
             case 'manager_language':
101
-                $langDir = realpath(MODX_MANAGER_PATH . 'includes/lang');
102
-                $langFile = realpath(MODX_MANAGER_PATH . 'includes/lang/' . $v . '.inc.php');
101
+                $langDir = realpath(MODX_MANAGER_PATH.'includes/lang');
102
+                $langFile = realpath(MODX_MANAGER_PATH.'includes/lang/'.$v.'.inc.php');
103 103
                 $langFileDir = dirname($langFile);
104
-                if($langDir !== $langFileDir || !file_exists($langFile)) {
104
+                if ($langDir !== $langFileDir || !file_exists($langFile)) {
105 105
                     $v = 'english';
106 106
                 }
107 107
 				break;
108 108
 			case 'smtppw':
109 109
 				if ($v !== '********************' && $v !== '') {
110 110
 					$v = trim($v);
111
-					$v = base64_encode($v) . substr(str_shuffle('abcdefghjkmnpqrstuvxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'), 0, 7);
112
-					$v = str_replace('=','%',$v);
111
+					$v = base64_encode($v).substr(str_shuffle('abcdefghjkmnpqrstuvxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'), 0, 7);
112
+					$v = str_replace('=', '%', $v);
113 113
 				} elseif ($v === '********************') {
114 114
 					$k = '';
115 115
 				}
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
 				$v = str_replace(array(' ,', ', '), ',', $v);
119 119
 				if ($v !== ',') {
120 120
 					$v = ($v != 'MODX_SITE_HOSTNAMES') ? $v : '';
121
-					$configString = '<?php' . "\n" . 'define(\'MODX_SITE_HOSTNAMES\', \'' . $v . '\');' . "\n";
122
-					@file_put_contents(MODX_BASE_PATH . 'assets/cache/siteHostnames.php', $configString);
121
+					$configString = '<?php'."\n".'define(\'MODX_SITE_HOSTNAMES\', \''.$v.'\');'."\n";
122
+					@file_put_contents(MODX_BASE_PATH.'assets/cache/siteHostnames.php', $configString);
123 123
 				}
124 124
 				$k = '';
125 125
 				break;
126 126
 			case 'session_timeout':
127 127
 				$mail_check_timeperiod = $data['mail_check_timeperiod'];
128
-				$v = (int)$v < ($data['mail_check_timeperiod']/60+1) ? ($data['mail_check_timeperiod']/60+1) : $v; // updateMail() in mainMenu pings as per mail_check_timeperiod, so +1min is minimum
128
+				$v = (int) $v < ($data['mail_check_timeperiod'] / 60 + 1) ? ($data['mail_check_timeperiod'] / 60 + 1) : $v; // updateMail() in mainMenu pings as per mail_check_timeperiod, so +1min is minimum
129 129
 				break;
130 130
 			default:
131 131
 			break;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$modx->config[$k] = $v;
136 136
 
137
-		if(!empty($k)) $savethese[] = '(\''.$modx->db->escape($k).'\', \''.$modx->db->escape($v).'\')';
137
+		if (!empty($k)) $savethese[] = '(\''.$modx->db->escape($k).'\', \''.$modx->db->escape($v).'\')';
138 138
 	}
139 139
 
140 140
 	// Run a single query to save all the values
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
 
145 145
 	// Reset Template Pages
146 146
 	if (isset($data['reset_template'])) {
147
-		$newtemplate = (int)$data['default_template'];
148
-		$oldtemplate = (int)$data['old_template'];
147
+		$newtemplate = (int) $data['default_template'];
148
+		$oldtemplate = (int) $data['old_template'];
149 149
 		$tbl = $modx->getFullTableName('site_content');
150 150
 		$reset = $data['reset_template'];
151
-		if($reset==1) $modx->db->update(array('template' => $newtemplate), $tbl, "type='document'");
152
-		else if($reset==2) $modx->db->update(array('template' => $newtemplate), $tbl, "template='{$oldtemplate}'");
151
+		if ($reset == 1) $modx->db->update(array('template' => $newtemplate), $tbl, "type='document'");
152
+		else if ($reset == 2) $modx->db->update(array('template' => $newtemplate), $tbl, "template='{$oldtemplate}'");
153 153
 	}
154 154
 
155 155
 	// empty cache
156 156
 	$modx->clearCache('full');
157 157
 }
158
-$header="Location: index.php?a=7&r=10";
158
+$header = "Location: index.php?a=7&r=10";
159 159
 header($header);
Please login to merge, or discard this patch.
manager/actions/mutate_user.dynamic.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  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
-switch($modx->manager->action) {
6
+switch ($modx->manager->action) {
7 7
 	case 12:
8
-		if(!$modx->hasPermission('edit_user')) {
8
+		if (!$modx->hasPermission('edit_user')) {
9 9
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10 10
 		}
11 11
 		break;
12 12
 	case 11:
13
-		if(!$modx->hasPermission('new_user')) {
13
+		if (!$modx->hasPermission('new_user')) {
14 14
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15 15
 		}
16 16
 		break;
@@ -18,20 +18,20 @@  discard block
 block discarded – undo
18 18
 		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21
-$user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
21
+$user = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
22 22
 
23 23
 // check to see the snippet editor isn't locked
24
-$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=12 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
25
-if($username = $modx->db->getValue($rs)) {
24
+$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=12 AND id='{$user}' AND internalKey!='".$modx->getLoginUserID()."'");
25
+if ($username = $modx->db->getValue($rs)) {
26 26
 	$modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "user"));
27 27
 }
28 28
 // end check for lock
29 29
 
30
-if($modx->manager->action == '12') {
30
+if ($modx->manager->action == '12') {
31 31
 	// get user attribute
32 32
 	$rs = $modx->db->select('*', $modx->getFullTableName('user_attributes'), "internalKey = '{$user}'");
33 33
 	$userdata = $modx->db->getRow($rs);
34
-	if(!$userdata) {
34
+	if (!$userdata) {
35 35
 		$modx->webAlertAndQuit("No user returned!");
36 36
 	}
37 37
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 	// get user settings
40 40
 	$rs = $modx->db->select('*', $modx->getFullTableName('user_settings'), "user = '{$user}'");
41 41
 	$usersettings = array();
42
-	while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
42
+	while ($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
43 43
 	// manually extract so that user display settings are not overwritten
44
-	foreach($usersettings as $k => $v) {
45
-		if($k != 'manager_language' && $k != 'manager_theme') {
44
+	foreach ($usersettings as $k => $v) {
45
+		if ($k != 'manager_language' && $k != 'manager_theme') {
46 46
 			${$k} = $v;
47 47
 		}
48 48
 	}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	// get user name
51 51
 	$rs = $modx->db->select('*', $modx->getFullTableName('manager_users'), "id = '{$user}'");
52 52
 	$usernamedata = $modx->db->getRow($rs);
53
-	if(!$usernamedata) {
53
+	if (!$usernamedata) {
54 54
 		$modx->webAlertAndQuit("No user returned while getting username!");
55 55
 	}
56 56
 	$_SESSION['itemname'] = $usernamedata['username'];
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 }
63 63
 
64 64
 // avoid doubling htmlspecialchars (already encoded in DB)
65
-foreach($userdata as $key => $val) {
65
+foreach ($userdata as $key => $val) {
66 66
 	$userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']);
67 67
 };
68 68
 $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']);
69 69
 
70 70
 // restore saved form
71 71
 $formRestored = false;
72
-if($modx->manager->hasFormValues()) {
72
+if ($modx->manager->hasFormValues()) {
73 73
 	$modx->manager->loadFormValues();
74 74
 	// restore post values
75 75
 	$userdata = array_merge($userdata, $_POST);
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 // include the country list language file
85 85
 $_country_lang = array();
86 86
 include_once "lang/country/english_country.inc.php";
87
-if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
88
-	include_once "lang/country/" . $manager_language . "_country.inc.php";
87
+if ($manager_language != "english" && file_exists($modx->config['site_manager_path']."includes/lang/country/".$manager_language."_country.inc.php")) {
88
+	include_once "lang/country/".$manager_language."_country.inc.php";
89 89
 }
90 90
 asort($_country_lang);
91 91
 
92 92
 $displayStyle = ($_SESSION['browser'] === 'modern') ? 'table-row' : 'block';
93
-if($which_browser == 'default') {
93
+if ($which_browser == 'default') {
94 94
 	$which_browser = $modx->configGlobal['which_browser'] ? $modx->configGlobal['which_browser'] : $modx->config['which_browser'];
95 95
 }
96 96
 ?>
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 			document.userform.save.click();
183 183
 		},
184 184
 		delete: function() {
185
-			<?php if($_GET['id'] == $modx->getLoginUserID()) { ?>
185
+			<?php if ($_GET['id'] == $modx->getLoginUserID()) { ?>
186 186
 			alert("<?php echo $_lang['alert_delete_self']; ?>");
187 187
 			<?php } else { ?>
188 188
 			if(confirm("<?php echo $_lang['confirm_delete_user']; ?>") === true) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	$evtOut = $modx->invokeEvent("OnUserFormPrerender", array(
206 206
 		"id" => $user
207 207
 	));
208
-	if(is_array($evtOut)) {
208
+	if (is_array($evtOut)) {
209 209
 		echo implode("", $evtOut);
210 210
 	}
211 211
 	?>
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	<input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" />
215 215
 
216 216
 	<h1>
217
-        <i class="fa fa fa-user"></i><?= ($usernamedata['username'] ? $usernamedata['username'] . '<small>(' . $usernamedata['id'] . ')</small>' : $_lang['user_title']) ?>
217
+        <i class="fa fa fa-user"></i><?= ($usernamedata['username'] ? $usernamedata['username'].'<small>('.$usernamedata['id'].')</small>' : $_lang['user_title']) ?>
218 218
     </h1>
219 219
 
220 220
 	<?php echo $_style['actionbuttons']['dynamic']['user'] ?>
@@ -232,13 +232,13 @@  discard block
 block discarded – undo
232 232
 				<table border="0" cellspacing="0" cellpadding="3" class="table table--edit table--editUser">
233 233
 					<tr>
234 234
 						<td colspan="3"><span id="blocked" class="warning">
235
-							<?php if($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || $userdata['failedlogins'] > 3) { ?>
235
+							<?php if ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || $userdata['failedlogins'] > 3) { ?>
236 236
 								<?php echo $_lang['user_is_blocked']; ?>
237 237
 							<?php } ?>
238 238
 							</span>
239 239
 							<br /></td>
240 240
 					</tr>
241
-					<?php if(!empty($userdata['id'])) { ?>
241
+					<?php if (!empty($userdata['id'])) { ?>
242 242
 						<tr id="showname" style="display: <?php echo ($modx->manager->action == '12' && (!isset($usernamedata['oldusername']) || $usernamedata['oldusername'] == $usernamedata['username'])) ? $displayStyle : 'none'; ?> ">
243 243
 							<td colspan="3"><i class="<?php echo $_style["icons_user"] ?>"></i>&nbsp;<b><?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?></b> - <span class="comment"><a href="javascript:;" onClick="changeName();return false;"><?php echo $_lang["change_name"]; ?></a></span>
244 244
 								<input type="hidden" name="oldusername" value="<?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?>" />
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 						<td><input type="text" name="newusername" class="inputBox" value="<?php echo $modx->htmlspecialchars($usernamedata['username']); ?>" onChange='documentDirty=true;' maxlength="100" /></td>
252 252
 					</tr>
253 253
 					<tr>
254
-						<th><?php echo $modx->manager->action == '11' ? $_lang['password'] . ":" : $_lang['change_password_new'] . ":"; ?></th>
254
+						<th><?php echo $modx->manager->action == '11' ? $_lang['password'].":" : $_lang['change_password_new'].":"; ?></th>
255 255
 						<td>&nbsp;</td>
256 256
 						<td><input name="newpasswordcheck" type="checkbox" onClick="changestate(document.userform.newpassword);changePasswordState(document.userform.newpassword);"<?php echo $modx->manager->action == "11" ? " checked disabled" : ""; ?>>
257 257
 							<input type="hidden" name="newpassword" value="<?php echo $modx->manager->action == "11" ? 1 : 0; ?>" onChange="documentDirty=true;" />
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
 							?>
306 306
 							<select name="role" class="inputBox" onChange='documentDirty=true;' style="width:300px">
307 307
 								<?php
308
-								while($row = $modx->db->getRow($rs)) {
309
-									if($modx->manager->action == '11') {
308
+								while ($row = $modx->db->getRow($rs)) {
309
+									if ($modx->manager->action == '11') {
310 310
 										$selectedtext = $row['id'] == '1' ? ' selected="selected"' : '';
311 311
 									} else {
312 312
 										$selectedtext = $row['id'] == $userdata['role'] ? "selected='selected'" : '';
@@ -360,8 +360,8 @@  discard block
 block discarded – undo
360 360
 								<?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?>
361 361
 								<option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> >&nbsp;</option>
362 362
 								<?php
363
-								foreach($_country_lang as $key => $country) {
364
-									echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>";
363
+								foreach ($_country_lang as $key => $country) {
364
+									echo "<option value=\"$key\"".(isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '').">$country</option>";
365 365
 								}
366 366
 								?>
367 367
 							</select></td>
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 						<td>&nbsp;</td>
388 388
 						<td><textarea type="text" name="comment" class="inputBox" rows="5" onChange="documentDirty=true;"><?php echo $modx->htmlspecialchars($userdata['comment']); ?></textarea></td>
389 389
 					</tr>
390
-					<?php if($modx->manager->action == '12') { ?>
390
+					<?php if ($modx->manager->action == '12') { ?>
391 391
 						<tr>
392 392
 							<th><?php echo $_lang['user_logincount']; ?>:</th>
393 393
 							<td>&nbsp;</td>
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 						</tr>
425 425
 					<?php } ?>
426 426
 				</table>
427
-				<?php if($_GET['id'] == $modx->getLoginUserID()) { ?>
427
+				<?php if ($_GET['id'] == $modx->getLoginUserID()) { ?>
428 428
 					<p><?php echo $_lang['user_edit_self_msg']; ?></p>
429 429
 				<?php } ?>
430 430
 			</div>
@@ -441,8 +441,8 @@  discard block
 block discarded – undo
441 441
 								<?php
442 442
 								$activelang = !empty($usersettings['manager_language']) ? $usersettings['manager_language'] : '';
443 443
 								$dir = dir("includes/lang");
444
-								while($file = $dir->read()) {
445
-									if(strpos($file, ".inc.php") > 0) {
444
+								while ($file = $dir->read()) {
445
+									if (strpos($file, ".inc.php") > 0) {
446 446
 										$endpos = strpos($file, ".");
447 447
 										$languagename = substr($file, 0, $endpos);
448 448
 										$selectedtext = $languagename == $activelang ? "selected='selected'" : "";
@@ -529,17 +529,17 @@  discard block
 block discarded – undo
529 529
 								<option value=""></option>
530 530
 								<?php
531 531
 								$dir = dir("media/style/");
532
-								while($file = $dir->read()) {
533
-									if($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') {
532
+								while ($file = $dir->read()) {
533
+									if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') {
534 534
 										$themename = $file;
535
-										if($themename === 'common') {
535
+										if ($themename === 'common') {
536 536
 											continue;
537 537
 										}
538
-										$attr = 'value="' . $themename . '" ';
539
-										if(isset($usersettings['manager_theme']) && $themename == $usersettings['manager_theme']) {
538
+										$attr = 'value="'.$themename.'" ';
539
+										if (isset($usersettings['manager_theme']) && $themename == $usersettings['manager_theme']) {
540 540
 											$attr .= 'selected="selected" ';
541 541
 										}
542
-										echo "\t\t<option " . rtrim($attr) . '>' . ucwords(str_replace("_", " ", $themename)) . "</option>\n";
542
+										echo "\t\t<option ".rtrim($attr).'>'.ucwords(str_replace("_", " ", $themename))."</option>\n";
543 543
 									}
544 544
 								}
545 545
 								$dir->close();
@@ -580,12 +580,12 @@  discard block
 block discarded – undo
580 580
 						<td><select name="which_browser" class="inputBox" onChange="documentDirty=true;">
581 581
 								<?php
582 582
 								$selected = 'default' == $usersettings['which_browser'] || !$usersettings['which_browser'] ? ' selected="selected"' : '';
583
-								echo '<option value="default"' . $selected . '>' . $_lang['option_default'] . "</option>\n";
584
-								foreach(glob("media/browser/*", GLOB_ONLYDIR) as $dir) {
583
+								echo '<option value="default"'.$selected.'>'.$_lang['option_default']."</option>\n";
584
+								foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) {
585 585
 									$dir = str_replace('\\', '/', $dir);
586 586
 									$browser_name = substr($dir, strrpos($dir, '/') + 1);
587 587
 									$selected = $browser_name == $usersettings['which_browser'] ? ' selected="selected"' : '';
588
-									echo '<option value="' . $browser_name . '"' . $selected . '>' . "{$browser_name}</option>\n";
588
+									echo '<option value="'.$browser_name.'"'.$selected.'>'."{$browser_name}</option>\n";
589 589
 								}
590 590
 								?>
591 591
 							</select></td>
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 					</tr>
613 613
 					<tr>
614 614
 						<td>&nbsp;</td>
615
-						<td class='comment'><?php echo $_lang["uploadable_images_message"] . $_lang["user_upload_message"] ?></td>
615
+						<td class='comment'><?php echo $_lang["uploadable_images_message"].$_lang["user_upload_message"] ?></td>
616 616
 					</tr>
617 617
 					<tr>
618 618
 						<th><?php echo $_lang["uploadable_media_title"] ?></th>
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 					</tr>
625 625
 					<tr>
626 626
 						<td>&nbsp;</td>
627
-						<td class='comment'><?php echo $_lang["uploadable_media_message"] . $_lang["user_upload_message"] ?></td>
627
+						<td class='comment'><?php echo $_lang["uploadable_media_message"].$_lang["user_upload_message"] ?></td>
628 628
 					</tr>
629 629
 					<tr>
630 630
 						<th><?php echo $_lang["uploadable_flash_title"] ?></th>
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 					</tr>
637 637
 					<tr>
638 638
 						<td>&nbsp;</td>
639
-						<td class='comment'><?php echo $_lang["uploadable_flash_message"] . $_lang["user_upload_message"] ?></td>
639
+						<td class='comment'><?php echo $_lang["uploadable_flash_message"].$_lang["user_upload_message"] ?></td>
640 640
 					</tr>
641 641
 					<tr>
642 642
 						<th><?php echo $_lang["uploadable_files_title"] ?></th>
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 					</tr>
649 649
 					<tr>
650 650
 						<td>&nbsp;</td>
651
-						<td class='comment'><?php echo $_lang["uploadable_files_message"] . $_lang["user_upload_message"] ?></td>
651
+						<td class='comment'><?php echo $_lang["uploadable_files_message"].$_lang["user_upload_message"] ?></td>
652 652
 					</tr>
653 653
 					<tr class='row2'>
654 654
 						<th><?php echo $_lang["upload_maxsize_title"] ?></th>
@@ -667,11 +667,11 @@  discard block
 block discarded – undo
667 667
 								$edt = isset ($usersettings["which_editor"]) ? $usersettings["which_editor"] : '';
668 668
 								// invoke OnRichTextEditorRegister event
669 669
 								$evtOut = $modx->invokeEvent("OnRichTextEditorRegister");
670
-								echo "<option value='none'" . ($edt == 'none' ? " selected='selected'" : "") . ">" . $_lang["none"] . "</option>\n";
671
-								if(is_array($evtOut)) {
672
-									for($i = 0; $i < count($evtOut); $i++) {
670
+								echo "<option value='none'".($edt == 'none' ? " selected='selected'" : "").">".$_lang["none"]."</option>\n";
671
+								if (is_array($evtOut)) {
672
+									for ($i = 0; $i < count($evtOut); $i++) {
673 673
 										$editor = $evtOut[$i];
674
-										echo "<option value='$editor'" . ($edt == $editor ? " selected='selected'" : "") . ">$editor</option>\n";
674
+										echo "<option value='$editor'".($edt == $editor ? " selected='selected'" : "").">$editor</option>\n";
675 675
 									}
676 676
 								}
677 677
 								?>
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 				<?php
710 710
 				// invoke OnInterfaceSettingsRender event
711 711
 				$evtOut = $modx->invokeEvent("OnInterfaceSettingsRender");
712
-				if(is_array($evtOut)) {
712
+				if (is_array($evtOut)) {
713 713
 					echo implode("", $evtOut);
714 714
 				}
715 715
 				?>
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
 					function BrowseServer() {
737 737
 						var w = screen.width * 0.7;
738 738
 						var h = screen.height * 0.7;
739
-						OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h);
739
+						OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h);
740 740
 					}
741 741
 
742 742
 					function SetUrl(url, width, height, alt) {
@@ -759,17 +759,17 @@  discard block
 block discarded – undo
759 759
 					</tr>
760 760
 				</table>
761 761
 			</div>
762
-			<?php if($use_udperms == 1) {
762
+			<?php if ($use_udperms == 1) {
763 763
 
764 764
 			$groupsarray = array();
765 765
 
766
-			if($modx->manager->action == '12') { // only do this bit if the user is being edited
766
+			if ($modx->manager->action == '12') { // only do this bit if the user is being edited
767 767
 				$rs = $modx->db->select('user_group', $modx->getFullTableName('member_groups'), "member='{$user}'");
768 768
 				$groupsarray = $modx->db->getColumn('user_group', $rs);
769 769
 			}
770 770
 			// retain selected doc groups between post
771
-			if(is_array($_POST['user_groups'])) {
772
-				foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
771
+			if (is_array($_POST['user_groups'])) {
772
+				foreach ($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
773 773
 			}
774 774
 			?>
775 775
 			<div class="tab-page" id="tabAccess">
@@ -778,8 +778,8 @@  discard block
 block discarded – undo
778 778
 				<p><?php echo $_lang['access_permissions_user_message'] ?></p>
779 779
 				<?php
780 780
 				$rs = $modx->db->select('name, id', $modx->getFullTableName('membergroup_names'), '', 'name');
781
-				while($row = $modx->db->getRow($rs)) {
782
-					echo "<label><input type='checkbox' name='user_groups[]' value='" . $row['id'] . "'" . (in_array($row['id'], $groupsarray) ? " checked='checked'" : "") . " />" . $row['name'] . "</label><br />";
781
+				while ($row = $modx->db->getRow($rs)) {
782
+					echo "<label><input type='checkbox' name='user_groups[]' value='".$row['id']."'".(in_array($row['id'], $groupsarray) ? " checked='checked'" : "")." />".$row['name']."</label><br />";
783 783
 				}
784 784
 				}
785 785
 				?>
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 	$evtOut = $modx->invokeEvent("OnUserFormRender", array(
793 793
 		"id" => $user
794 794
 	));
795
-	if(is_array($evtOut)) {
795
+	if (is_array($evtOut)) {
796 796
 		echo implode("", $evtOut);
797 797
 	}
798 798
 	?>
Please login to merge, or discard this patch.
manager/includes/header.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,28 +20,28 @@  discard block
 block discarded – undo
20 20
 $body_class = '';
21 21
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
22 22
 if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
23
-    $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
23
+    $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']];
24 24
 } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
25
-    $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
25
+    $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']];
26 26
 }
27 27
 
28
-$css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
28
+$css = 'media/style/'.$modx->config['manager_theme'].'/style.css?v='.$lastInstallTime;
29 29
 
30 30
 if ($modx->config['manager_theme'] == 'default') {
31
-    if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
32
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
31
+    if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')
32
+        && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) {
33 33
         $files = array(
34
-            'bootstrap' => MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css',
35
-            'font-awesome' => MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css',
36
-            'fonts' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css',
37
-            'forms' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css',
38
-            'mainmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css',
39
-            'tree' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css',
40
-            'custom' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css',
41
-            'tabpane' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css',
42
-            'contextmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css',
43
-            'index' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css',
44
-            'main' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css'
34
+            'bootstrap' => MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css',
35
+            'font-awesome' => MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css',
36
+            'fonts' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css',
37
+            'forms' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css',
38
+            'mainmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css',
39
+            'tree' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css',
40
+            'custom' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css',
41
+            'tabpane' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css',
42
+            'contextmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css',
43
+            'index' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css',
44
+            'main' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css'
45 45
         );
46 46
         $evtOut = $modx->invokeEvent('OnBeforeMinifyCss', array(
47 47
             'files' => $files,
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
             default:
59 59
                 $modx->webAlertAndQuit(sprintf($_lang['invalid_event_response'], 'OnBeforeMinifyManagerCss'));
60 60
         }
61
-        require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
61
+        require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php';
62 62
         $minifier = new Formatter\CSSMinify($files);
63 63
         $css = $minifier->minify();
64 64
         file_put_contents(
65
-            MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css',
65
+            MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css',
66 66
             $css
67 67
         );
68 68
     }
69
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
70
-        $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
69
+    if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
70
+        $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime;
71 71
     }
72 72
 }
73 73
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
83 83
     <link rel="stylesheet" type="text/css" href="<?= $css ?>"/>
84 84
     <script type="text/javascript" src="media/script/tabpane.js"></script>
85
-    <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
85
+    <?= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $modx->config['mgr_jquery_path']) ?>
86 86
     <?php if ($modx->config['show_picker'] != "0") { ?>
87 87
         <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js"
88 88
                 type="text/javascript"></script>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     <?php } ?>
96 96
 
97 97
     <!-- OnManagerMainFrameHeaderHTMLBlock -->
98
-    <?= $onManagerMainFrameHeaderHTMLBlock . "\n" ?>
98
+    <?= $onManagerMainFrameHeaderHTMLBlock."\n" ?>
99 99
 
100 100
     <script type="text/javascript">
101 101
       if (!evo) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     <script>
126 126
         <?php
127 127
         if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
128
-            echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
128
+            echo 'doRefresh('.$_REQUEST['r'].");\n";
129 129
         }
130 130
         ?>
131 131
     </script>
Please login to merge, or discard this patch.
install/actions/action_options.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$installMode = isset($_POST['installmode']) ? (int)$_POST['installmode'] : 0;
2
+$installMode = isset($_POST['installmode']) ? (int) $_POST['installmode'] : 0;
3 3
 
4
-if( ! function_exists('getTemplates')) {
4
+if (!function_exists('getTemplates')) {
5 5
     /**
6 6
      * @param array $presets
7 7
      * @return string
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
             $_[] = parse($tpl, $ph);
26 26
             $i++;
27 27
         }
28
-        return (0 < count($_)) ? '<h3>[%templates%]</h3>' . implode("\n", $_) : '';
28
+        return (0 < count($_)) ? '<h3>[%templates%]</h3>'.implode("\n", $_) : '';
29 29
     }
30 30
 }
31 31
 
32
-if( ! function_exists('getTVs')) {
32
+if (!function_exists('getTVs')) {
33 33
     /**
34 34
      * @param array $presets
35 35
      * @return string
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
             $_[] = parse($tpl, $ph);
55 55
             $i++;
56 56
         }
57
-        return (0 < count($_)) ? '<h3>[%tvs%]</h3>' . implode("\n", $_) : '';
57
+        return (0 < count($_)) ? '<h3>[%tvs%]</h3>'.implode("\n", $_) : '';
58 58
     }
59 59
 }
60 60
 
61
-if( ! function_exists('getChunks')) {
61
+if (!function_exists('getChunks')) {
62 62
     /**
63 63
      * display chunks
64 64
      *
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
             $_[] = parse($tpl, $ph);
85 85
             $i++;
86 86
         }
87
-        return (0 < count($_)) ? '<h3>[%chunks%]</h3>' . implode("\n", $_) : '';
87
+        return (0 < count($_)) ? '<h3>[%chunks%]</h3>'.implode("\n", $_) : '';
88 88
     }
89 89
 }
90 90
 
91
-if( ! function_exists('getModules')) {
91
+if (!function_exists('getModules')) {
92 92
     /**
93 93
      * display modules
94 94
      *
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
             $_[] = parse($tpl, $ph);
115 115
             $i++;
116 116
         }
117
-        return (0 < count($_)) ? '<h3>[%modules%]</h3>' . implode("\n", $_) : '';
117
+        return (0 < count($_)) ? '<h3>[%modules%]</h3>'.implode("\n", $_) : '';
118 118
     }
119 119
 }
120 120
 
121
-if( ! function_exists('getPlugins')) {
121
+if (!function_exists('getPlugins')) {
122 122
     /**
123 123
      * display plugins
124 124
      *
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
             $_[] = parse($tpl, $ph);
149 149
             $i++;
150 150
         }
151
-        return (0 < count($_)) ? '<h3>[%plugins%]</h3>' . implode("\n", $_) : '';
151
+        return (0 < count($_)) ? '<h3>[%plugins%]</h3>'.implode("\n", $_) : '';
152 152
     }
153 153
 }
154 154
 
155
-if( ! function_exists('getSnippets')) {
155
+if (!function_exists('getSnippets')) {
156 156
     /**
157 157
      * display snippets
158 158
      *
@@ -178,23 +178,23 @@  discard block
 block discarded – undo
178 178
             $_[] = parse($tpl, $ph);
179 179
             $i++;
180 180
         }
181
-        return (0 < count($_)) ? '<h3>[%snippets%]</h3>' . implode("\n", $_) : '';
181
+        return (0 < count($_)) ? '<h3>[%snippets%]</h3>'.implode("\n", $_) : '';
182 182
     }
183 183
 }
184 184
 
185
-switch($installMode){
185
+switch ($installMode) {
186 186
     case 0:
187 187
     case 2:
188 188
         $database_collation = isset($_POST['database_collation']) ? $_POST['database_collation'] : 'utf8_general_ci';
189 189
         $database_charset = substr($database_collation, 0, strpos($database_collation, '_'));
190 190
         $_POST['database_connection_charset'] = $database_charset;
191
-        if(!empty($_POST['databaseloginpassword']))
191
+        if (!empty($_POST['databaseloginpassword']))
192 192
             $_SESSION['databaseloginpassword'] = $_POST['databaseloginpassword'];
193
-        if(!empty($_POST['databaseloginname']))
193
+        if (!empty($_POST['databaseloginname']))
194 194
             $_SESSION['databaseloginname'] = $_POST['databaseloginname'];
195 195
         break;
196 196
     case 1:
197
-        include $base_path . MGR_DIR . '/includes/config.inc.php';
197
+        include $base_path.MGR_DIR.'/includes/config.inc.php';
198 198
         if (@ $conn = mysqli_connect($database_server, $database_user, $database_password)) {
199 199
             if (@ mysqli_query($conn, "USE {$dbase}")) {
200 200
                 if (!$rs = mysqli_query($conn, "show session variables like 'collation_database'")) {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 $ph['checked'] = isset ($_POST['installdata']) && $_POST['installdata'] == "1" ? 'checked' : '';
250 250
 
251 251
 # load setup information file
252
-include($base_path . 'install/setup.info.php');
252
+include($base_path.'install/setup.info.php');
253 253
 $ph['templates'] = getTemplates($moduleTemplates);
254 254
 $ph['tvs']       = getTVs($moduleTVs);
255 255
 $ph['chunks']    = getChunks($moduleChunks);
@@ -259,6 +259,6 @@  discard block
 block discarded – undo
259 259
 
260 260
 $ph['action'] = ($installMode == 1) ? 'mode' : 'connection';
261 261
 
262
-$tpl = file_get_contents($base_path . 'install/actions/tpl_options.html');
263
-$content = parse($tpl,$ph);
264
-echo parse($content,$_lang,'[%','%]');
262
+$tpl = file_get_contents($base_path.'install/actions/tpl_options.html');
263
+$content = parse($tpl, $ph);
264
+echo parse($content, $_lang, '[%', '%]');
Please login to merge, or discard this patch.