Completed
Push — develop ( 923a1c...1e9876 )
by Maxim
47s queued 29s
created
manager/actions/mutate_settings/tab1_site_settings.inc.php 1 patch
Spacing   +48 added lines, -48 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>
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         <?php
297 297
             // invoke OnSiteSettingsRender event
298 298
             $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
299
-            if(is_array($evtOut)) echo implode("",$evtOut);
299
+            if (is_array($evtOut)) echo implode("", $evtOut);
300 300
         ?>
301 301
     </td>
302 302
   </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/functions.inc.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@  discard block
 block discarded – undo
4 4
  * 
5 5
  * @return array of keys from a language file
6 6
  */
7
-function get_lang_keys($filename) {
8
-    $file = MODX_MANAGER_PATH.'includes/lang' . DIRECTORY_SEPARATOR . $filename;
9
-    if(is_file($file) && is_readable($file)) {
7
+function get_lang_keys($filename){
8
+    $file = MODX_MANAGER_PATH.'includes/lang'.DIRECTORY_SEPARATOR.$filename;
9
+    if (is_file($file) && is_readable($file)) {
10 10
         include($file);
11 11
         return array_keys($_lang);
12 12
     } else {
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
  * 
19 19
  * @return array of languages that define the key in their file
20 20
  */
21
-function get_langs_by_key($key) {
21
+function get_langs_by_key($key){
22 22
     global $lang_keys;
23 23
     $lang_return = array();
24
-    foreach($lang_keys as $lang=>$keys) {
25
-        if(in_array($key, $keys)) {
24
+    foreach ($lang_keys as $lang=>$keys) {
25
+        if (in_array($key, $keys)) {
26 26
             $lang_return[] = $lang;
27 27
         }
28 28
     }
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
  * @param string $selected_lang specify language to select in option list, default none
39 39
  * @return html option list
40 40
  */
41
-function get_lang_options($key=null, $selected_lang=null) {
41
+function get_lang_options($key = null, $selected_lang = null){
42 42
     global $lang_keys, $_lang;
43 43
     $lang_options = '';
44
-    if($key) {
44
+    if ($key) {
45 45
         $languages = get_langs_by_key($key);
46 46
         sort($languages);
47 47
         $lang_options .= '<option value="">'.$_lang['language_title'].'</option>';
48 48
 
49
-        foreach($languages as $language_name) {
49
+        foreach ($languages as $language_name) {
50 50
             $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
51 51
             $lang_options .= '<option value="'.$language_name.'">'.$uclanguage_name.'</option>';
52 52
         }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     } else {
55 55
         $languages = array_keys($lang_keys);
56 56
         sort($languages);
57
-        foreach($languages as $language_name) {
57
+        foreach ($languages as $language_name) {
58 58
             $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
59 59
             $sel = $language_name == $selected_lang ? ' selected="selected"' : '';
60 60
             $lang_options .= '<option value="'.$language_name.'" '.$sel.'>'.$uclanguage_name.'</option>';
@@ -63,23 +63,23 @@  discard block
 block discarded – undo
63 63
     }
64 64
 }
65 65
 
66
-function form_radio($name,$value,$add='',$disabled=false) {
66
+function form_radio($name, $value, $add = '', $disabled = false){
67 67
     global ${$name};
68 68
     $var = ${$name};
69
-    $checked  = ($var==$value) ? ' checked="checked"' : '';
70
-    if($disabled) $disabled = ' disabled'; else $disabled = '';
71
-  if($add)     $add = ' ' . $add;
69
+    $checked = ($var == $value) ? ' checked="checked"' : '';
70
+    if ($disabled) $disabled = ' disabled'; else $disabled = '';
71
+  if ($add)     $add = ' '.$add;
72 72
   return sprintf('<input onchange="documentDirty=true;" type="radio" name="%s" value="%s" %s %s %s />', $name, $value, $checked, $disabled, $add);
73 73
 }
74 74
 
75
-function wrap_label($str='',$object) {
75
+function wrap_label($str = '', $object){
76 76
   return "<label>{$object}\n{$str}</label>";
77 77
 }
78 78
 
79
-function parseText($tpl='', $ph=array()) {
80
-    if(empty($ph) || empty($tpl)) return $tpl;
79
+function parseText($tpl = '', $ph = array()){
80
+    if (empty($ph) || empty($tpl)) return $tpl;
81 81
     
82
-    foreach($ph as $k=>$v)
82
+    foreach ($ph as $k=>$v)
83 83
     {
84 84
         $k = "[+{$k}+]";
85 85
         $tpl = str_replace($k, $v, $tpl);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     return $tpl;
88 88
 }
89 89
 
90
-function showHide($cond=true) {
90
+function showHide($cond = true){
91 91
     global $displayStyle;
92 92
     $showHide = $cond ? $displayStyle : 'none';
93 93
     return sprintf('style="display:%s"', $showHide);
Please login to merge, or discard this patch.
manager/actions/mutate_settings/snippet_smtp.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
   <tr>
3 3
     <td><?php echo $_lang['smtp_auth_title'] ?></td>
4 4
     <td>
5
-        <?php echo wrap_label($_lang['yes'],form_radio('smtp_auth','1' ));?><br />
6
-        <?php echo wrap_label($_lang['no'],form_radio('smtp_auth','0' ));?>
5
+        <?php echo wrap_label($_lang['yes'], form_radio('smtp_auth', '1')); ?><br />
6
+        <?php echo wrap_label($_lang['no'], form_radio('smtp_auth', '0')); ?>
7 7
     </td>
8 8
   </tr>
9 9
   <tr>
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
     <td >
16 16
      <select name="smtp_secure" size="1" class="inputBox">
17 17
   <option value="none" ><?php echo $_lang['no'] ?></option>
18
-   <option value="ssl" <?php if($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option>
19
-  <option value="tls" <?php if($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option>
18
+   <option value="ssl" <?php if ($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option>
19
+  <option value="tls" <?php if ($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option>
20 20
  </select>
21 21
  <br />
22 22
   </td>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab2_furl_settings.inc.php 1 patch
Spacing   +47 added lines, -47 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" valign="top"><?php echo $_lang['friendlyurls_title'] ?><br><small>[(friendly_urls)]</small></td>
8 8
 <td>
9
-    <?php echo wrap_label($_lang['yes'],form_radio('friendly_urls', 1, 'id="furlRowOn"'));?><br />
10
-    <?php echo wrap_label($_lang['no'], form_radio('friendly_urls', 0, 'id="furlRowOff"'));?>
9
+    <?php echo wrap_label($_lang['yes'], form_radio('friendly_urls', 1, 'id="furlRowOn"')); ?><br />
10
+    <?php echo wrap_label($_lang['no'], form_radio('friendly_urls', 0, 'id="furlRowOff"')); ?>
11 11
 </td>
12 12
 </tr>
13 13
 <tr>
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 <tr>
21 21
     <td nowrap class="warning"><?php echo $_lang['xhtml_urls_title'] ?><br><small>[(xhtml_urls)]</small></td>
22 22
     <td>
23
-        <?php echo wrap_label($_lang['yes'],form_radio('xhtml_urls', 1));?><br />
24
-        <?php echo wrap_label($_lang['no'], form_radio('xhtml_urls', 0));?>
23
+        <?php echo wrap_label($_lang['yes'], form_radio('xhtml_urls', 1)); ?><br />
24
+        <?php echo wrap_label($_lang['no'], form_radio('xhtml_urls', 0)); ?>
25 25
     </td>
26 26
 </tr>
27 27
 <tr>
@@ -31,135 +31,135 @@  discard block
 block discarded – undo
31 31
 <tr>
32 32
 <td colspan="2"><div class="split"></div></td>
33 33
 </tr>
34
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
34
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
35 35
 <td nowrap class="warning" valign="top"><?php echo $_lang['friendlyurlsprefix_title'] ?><br><small>[(friendly_url_prefix)]</small></td>
36 36
 <td><input onchange="documentDirty=true;" type="text" maxlength="50" style="width: 200px;" name="friendly_url_prefix" value="<?php echo $friendly_url_prefix; ?>" /></td>
37 37
 </tr>
38
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
38
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
39 39
 <td width="200">&nbsp;</td>
40 40
 <td class="comment"><?php echo $_lang['friendlyurlsprefix_message'] ?></td>
41 41
 </tr>
42
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
42
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
43 43
 <td colspan="2"><div class="split"></div></td>
44 44
 </tr>
45
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
45
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
46 46
 <td nowrap class="warning" valign="top"><?php echo $_lang['friendlyurlsuffix_title'] ?><br><small>[(friendly_url_suffix)]</small></td>
47 47
 <td><input onchange="documentDirty=true;" type="text" maxlength="50" style="width: 200px;" name="friendly_url_suffix" value="<?php echo $friendly_url_suffix; ?>" /></td>
48 48
 </tr>
49
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
49
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
50 50
 <td width="200">&nbsp;</td>
51 51
 <td class="comment"><?php echo $_lang['friendlyurlsuffix_message'] ?></td>
52 52
 </tr>
53
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
53
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
54 54
 <td colspan="2"><div class="split"></div></td>
55 55
 </tr>
56
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
56
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
57 57
 <th><?php echo $_lang['make_folders_title'] ?><br><small>[(make_folders)]</small></th>
58 58
 <td>
59
-  <?php echo wrap_label($_lang['yes'],form_radio('make_folders','1'));?><br />
60
-  <?php echo wrap_label($_lang['no'],form_radio('make_folders','0'));?>
59
+  <?php echo wrap_label($_lang['yes'], form_radio('make_folders', '1')); ?><br />
60
+  <?php echo wrap_label($_lang['no'], form_radio('make_folders', '0')); ?>
61 61
 </td>
62 62
 </tr>
63
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
63
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
64 64
         <td width="200">&nbsp;</td>
65 65
         <td class="comment"><?php echo $_lang['make_folders_message'] ?></td>
66 66
       </tr>
67
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
67
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
68 68
 <td colspan="2"><div class="split"></div></td>
69 69
 </tr>
70 70
   
71
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
71
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
72 72
 <th><?php echo $_lang['seostrict_title'] ?><br><small>[(seostrict)]</small></th>
73 73
 <td>
74
-  <?php echo wrap_label($_lang['yes'],form_radio('seostrict','1'));?><br />
75
-  <?php echo wrap_label($_lang['no'],form_radio('seostrict','0'));?>
74
+  <?php echo wrap_label($_lang['yes'], form_radio('seostrict', '1')); ?><br />
75
+  <?php echo wrap_label($_lang['no'], form_radio('seostrict', '0')); ?>
76 76
  </td>
77 77
 </tr>
78
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
78
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
79 79
         <td width="200">&nbsp;</td>
80 80
         <td class="comment"><?php echo $_lang['seostrict_message'] ?></td>
81 81
 </tr>
82
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
82
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
83 83
 <td colspan="2"><div class="split"></div></td>
84 84
 </tr>
85 85
 
86
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
86
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
87 87
   <th><?php echo $_lang['aliaslistingfolder_title'] ?><br><small>[(aliaslistingfolder)]</small></th>
88 88
   <td>
89
-      <?php echo wrap_label($_lang['yes'],form_radio('aliaslistingfolder','1'));?><br />
90
-      <?php echo wrap_label($_lang['no'],form_radio('aliaslistingfolder','0'));?>
89
+      <?php echo wrap_label($_lang['yes'], form_radio('aliaslistingfolder', '1')); ?><br />
90
+      <?php echo wrap_label($_lang['no'], form_radio('aliaslistingfolder', '0')); ?>
91 91
   </td>
92 92
 </tr>
93
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
93
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
94 94
   <td width="200">&nbsp;</td>
95 95
   <td class="comment"><?php echo $_lang['aliaslistingfolder_message'] ?></td>
96 96
 </tr>
97
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
97
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
98 98
   <td colspan="2"><div class="split"></div></td>
99 99
 </tr>
100 100
 
101
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
101
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
102 102
 <td nowrap class="warning" valign="top"><?php echo $_lang['friendly_alias_title'] ?><br><small>[(friendly_alias_urls)]</small></td>
103 103
 <td>
104
-  <?php echo wrap_label($_lang['yes'],form_radio('friendly_alias_urls','1'));?><br />
105
-  <?php echo wrap_label($_lang['no'],form_radio('friendly_alias_urls','0'));?>
104
+  <?php echo wrap_label($_lang['yes'], form_radio('friendly_alias_urls', '1')); ?><br />
105
+  <?php echo wrap_label($_lang['no'], form_radio('friendly_alias_urls', '0')); ?>
106 106
 </td>
107 107
 </tr>
108
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
108
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
109 109
 <td width="200">&nbsp;</td>
110 110
 <td class="comment"><?php echo $_lang['friendly_alias_message'] ?></td>
111 111
 </tr>
112
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
112
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
113 113
 <td colspan="2"><div class="split"></div></td>
114 114
 </tr>
115
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
115
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
116 116
 <td nowrap class="warning" valign="top"><?php echo $_lang['use_alias_path_title'] ?><br><small>[(use_alias_path)]</small></td>
117 117
 <td>
118
-  <?php echo wrap_label($_lang['yes'],form_radio('use_alias_path','1'));?><br />
119
-  <?php echo wrap_label($_lang['no'],form_radio('use_alias_path','0'));?>
118
+  <?php echo wrap_label($_lang['yes'], form_radio('use_alias_path', '1')); ?><br />
119
+  <?php echo wrap_label($_lang['no'], form_radio('use_alias_path', '0')); ?>
120 120
 </td>
121 121
 </tr>
122
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
122
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
123 123
 <td width="200">&nbsp;</td>
124 124
 <td class="comment"><?php echo $_lang['use_alias_path_message'] ?></td>
125 125
 </tr>
126
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
126
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
127 127
 <td colspan="2"><div class="split"></div></td>
128 128
 </tr>
129
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
129
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
130 130
 <td nowrap class="warning" valign="top"><?php echo $_lang['duplicate_alias_title'] ?><br><small>[(allow_duplicate_alias)]</small></td>
131 131
 <td>
132
-  <?php echo wrap_label($_lang['yes'],form_radio('allow_duplicate_alias','1'));?><br />
133
-  <?php echo wrap_label($_lang['no'],form_radio('allow_duplicate_alias','0'));?>
132
+  <?php echo wrap_label($_lang['yes'], form_radio('allow_duplicate_alias', '1')); ?><br />
133
+  <?php echo wrap_label($_lang['no'], form_radio('allow_duplicate_alias', '0')); ?>
134 134
 </td>
135 135
 </tr>
136
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
136
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
137 137
 <td width="200">&nbsp;</td>
138 138
 <td class="comment"><?php echo $_lang['duplicate_alias_message'] ?></td>
139 139
 </tr>
140
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
140
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
141 141
 <td colspan="2"><div class="split"></div></td>
142 142
 </tr>
143
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
143
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
144 144
 <td nowrap class="warning" valign="top"><?php echo $_lang['automatic_alias_title'] ?><br><small>[(automatic_alias)]</small></td>
145 145
 <td>
146
-  <?php echo wrap_label($_lang['yes'],form_radio('automatic_alias','1'));?><br />
147
-  <?php echo wrap_label($_lang['no'],form_radio('automatic_alias','0'));?>
146
+  <?php echo wrap_label($_lang['yes'], form_radio('automatic_alias', '1')); ?><br />
147
+  <?php echo wrap_label($_lang['no'], form_radio('automatic_alias', '0')); ?>
148 148
 </td>
149 149
 </tr>
150
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
150
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
151 151
 <td width="200">&nbsp;</td>
152 152
 <td class="comment"><?php echo $_lang['automatic_alias_message'] ?></td>
153 153
 </tr>
154
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
154
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
155 155
 <td colspan="2"><div class="split"></div></td>
156 156
 </tr>
157
-<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>>
157
+<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>>
158 158
 <td colspan="2">
159 159
     <?php
160 160
         // invoke OnFriendlyURLSettingsRender event
161 161
         $evtOut = $modx->invokeEvent('OnFriendlyURLSettingsRender');
162
-        if(is_array($evtOut)) echo implode("",$evtOut);
162
+        if (is_array($evtOut)) echo implode("", $evtOut);
163 163
     ?>
164 164
 </td>
165 165
 </tr>
Please login to merge, or discard this patch.
manager/actions/move_document.dynamic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 }
14 14
 
15 15
 // check permissions on the document
16
-include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php";
16
+include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php";
17 17
 $udperms = new udperms();
18 18
 $udperms->user = $modx->getLoginUserID();
19 19
 $udperms->document = $id;
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     },
40 40
     cancel: function() {
41 41
       documentDirty = false;
42
-        <?= ($id == 0 ? 'document.location.href="index.php?a=2";' : 'document.location.href="index.php?a=3&id=' . $id . '";') ?>
42
+        <?= ($id == 0 ? 'document.location.href="index.php?a=2";' : 'document.location.href="index.php?a=3&id='.$id.'";') ?>
43 43
     }
44 44
   };
45 45
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 </script>
81 81
 
82 82
 <h1>
83
-    <i class="fa fa-arrows"></i><?= ($pagetitle ? $pagetitle . '<small>(' . $id . ')</small>' : $_lang['move_resource_title']) ?>
83
+    <i class="fa fa-arrows"></i><?= ($pagetitle ? $pagetitle.'<small>('.$id.')</small>' : $_lang['move_resource_title']) ?>
84 84
 </h1>
85 85
 
86 86
 <?= $_style['actionbuttons']['dynamic']['save'] ?>
Please login to merge, or discard this patch.
manager/actions/mutate_htmlsnippet.dynamic.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -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->manager->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->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->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->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/actions/help.static.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (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
 $helpBasePath = "actions/help/";
6 6
 ?>
7 7
 
8 8
 <h1>
9
-	<?php echo $_style['page_help'];  echo $_lang['help']; ?>
9
+	<?php echo $_style['page_help']; echo $_lang['help']; ?>
10 10
 </h1>
11 11
 
12 12
 <div class="sectionBody">
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 		</script>
17 17
 
18 18
 		<?php
19
-		if($handle = opendir('actions/help')) {
20
-			while(false !== ($file = readdir($handle))) {
21
-				if($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath . $file)) {
19
+		if ($handle = opendir('actions/help')) {
20
+			while (false !== ($file = readdir($handle))) {
21
+				if ($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath.$file)) {
22 22
 					$help[] = $file;
23 23
 				}
24 24
 			}
@@ -27,22 +27,22 @@  discard block
 block discarded – undo
27 27
 
28 28
 		natcasesort($help);
29 29
 
30
-		foreach($help as $k => $v) {
30
+		foreach ($help as $k => $v) {
31 31
 
32 32
 			$helpname = substr($v, 0, strrpos($v, '.'));
33 33
 
34 34
 			$prefix = substr($helpname, 0, 2);
35
-			if(is_numeric($prefix)) {
35
+			if (is_numeric($prefix)) {
36 36
 				$helpname = substr($helpname, 2, strlen($helpname) - 1);
37 37
 			}
38 38
 
39 39
 			$hnLower = strtolower($helpname);
40 40
 			$helpname = isset($_lang[$hnLower]) ? $_lang[$hnLower] : str_replace('_', ' ', $helpname);
41 41
 
42
-			echo '<div class="tab-page" id="tab' . $k . 'Help">';
43
-			echo '<h2 class="tab">' . $helpname . '</h2>';
44
-			echo '<script type="text/javascript">tp.addTabPage( document.getElementById( "tab' . $k . 'Help" ) );</script>';
45
-			include_once($helpBasePath . "{$v}");
42
+			echo '<div class="tab-page" id="tab'.$k.'Help">';
43
+			echo '<h2 class="tab">'.$helpname.'</h2>';
44
+			echo '<script type="text/javascript">tp.addTabPage( document.getElementById( "tab'.$k.'Help" ) );</script>';
45
+			include_once($helpBasePath."{$v}");
46 46
 			echo '</div>';
47 47
 		}
48 48
 		?>
Please login to merge, or discard this patch.
manager/actions/files.dynamic.php 1 patch
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@  discard block
 block discarded – undo
9 9
 $newToken = makeToken();
10 10
 
11 11
 // settings
12
-$theme_image_path = $modx->config['site_manager_url'] . 'media/style/' . $modx->config['manager_theme'] . '/images/';
12
+$theme_image_path = $modx->config['site_manager_url'].'media/style/'.$modx->config['manager_theme'].'/images/';
13 13
 $excludes = array(
14 14
     '.',
15 15
     '..',
16 16
     '.svn'
17 17
 );
18
-$alias_suffix = (!empty($friendly_url_suffix)) ? ',' . ltrim($friendly_url_suffix, '.') : '';
19
-$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json' . $alias_suffix);
20
-$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json' . $alias_suffix);
18
+$alias_suffix = (!empty($friendly_url_suffix)) ? ','.ltrim($friendly_url_suffix, '.') : '';
19
+$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json'.$alias_suffix);
20
+$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json'.$alias_suffix);
21 21
 $viewablefiles = explode(',', 'jpg,gif,png,ico');
22 22
 
23 23
 $editablefiles = add_dot($editablefiles);
@@ -30,31 +30,31 @@  discard block
 block discarded – undo
30 30
 {
31 31
 */
32 32
 $protected_path[] = $modx->config['site_manager_path'];
33
-$protected_path[] = $modx->config['base_path'] . 'temp/backup';
34
-$protected_path[] = $modx->config['base_path'] . 'assets/backup';
33
+$protected_path[] = $modx->config['base_path'].'temp/backup';
34
+$protected_path[] = $modx->config['base_path'].'assets/backup';
35 35
 
36 36
 if (!$modx->hasPermission('save_plugin')) {
37
-    $protected_path[] = $modx->config['base_path'] . 'assets/plugins';
37
+    $protected_path[] = $modx->config['base_path'].'assets/plugins';
38 38
 }
39 39
 if (!$modx->hasPermission('save_snippet')) {
40
-    $protected_path[] = $modx->config['base_path'] . 'assets/snippets';
40
+    $protected_path[] = $modx->config['base_path'].'assets/snippets';
41 41
 }
42 42
 if (!$modx->hasPermission('save_template')) {
43
-    $protected_path[] = $modx->config['base_path'] . 'assets/templates';
43
+    $protected_path[] = $modx->config['base_path'].'assets/templates';
44 44
 }
45 45
 if (!$modx->hasPermission('save_module')) {
46
-    $protected_path[] = $modx->config['base_path'] . 'assets/modules';
46
+    $protected_path[] = $modx->config['base_path'].'assets/modules';
47 47
 }
48 48
 if (!$modx->hasPermission('empty_cache')) {
49
-    $protected_path[] = $modx->config['base_path'] . 'assets/cache';
49
+    $protected_path[] = $modx->config['base_path'].'assets/cache';
50 50
 }
51 51
 if (!$modx->hasPermission('import_static')) {
52
-    $protected_path[] = $modx->config['base_path'] . 'temp/import';
53
-    $protected_path[] = $modx->config['base_path'] . 'assets/import';
52
+    $protected_path[] = $modx->config['base_path'].'temp/import';
53
+    $protected_path[] = $modx->config['base_path'].'assets/import';
54 54
 }
55 55
 if (!$modx->hasPermission('export_static')) {
56
-    $protected_path[] = $modx->config['base_path'] . 'temp/export';
57
-    $protected_path[] = $modx->config['base_path'] . 'assets/export';
56
+    $protected_path[] = $modx->config['base_path'].'temp/export';
57
+    $protected_path[] = $modx->config['base_path'].'assets/export';
58 58
 }
59 59
 /*
60 60
 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 {
80 80
     $count = count($array);
81 81
     for ($i = 0; $i < $count; $i++) {
82
-        $array[$i] = '.' . strtolower(trim($array[$i])); // add a dot :)
82
+        $array[$i] = '.'.strtolower(trim($array[$i])); // add a dot :)
83 83
     }
84 84
     return $array;
85 85
 }
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
 $rw = realpath('../');
105 105
 $webstart_path = str_replace('\\', '/', str_replace($rw, '', $rf));
106 106
 if (substr($webstart_path, 0, 1) == '/') {
107
-    $webstart_path = '..' . $webstart_path;
107
+    $webstart_path = '..'.$webstart_path;
108 108
 } else {
109
-    $webstart_path = '../' . $webstart_path;
109
+    $webstart_path = '../'.$webstart_path;
110 110
 }
111 111
 
112 112
 ?>
113 113
     <script type="text/javascript">
114 114
 
115
-        var current_path = '<?= $startpath;?>';
115
+        var current_path = '<?= $startpath; ?>';
116 116
 
117 117
         function viewfile (url)
118 118
         {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         function unzipFile (file)
149 149
         {
150 150
             if (confirmUnzip()) {
151
-                window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken;?>";
151
+                window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken; ?>";
152 152
                 return false;
153 153
             }
154 154
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         function deleteFolder (folder, status)
171 171
         {
172 172
             if (confirmDeleteFolder(status)) {
173
-                window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken;?>";
173
+                window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken; ?>";
174 174
                 return false;
175 175
             }
176 176
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         function deleteFile (file)
179 179
         {
180 180
             if (confirmDelete()) {
181
-                window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken;?>";
181
+                window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken; ?>";
182 182
                 return false;
183 183
             }
184 184
         }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         {
188 188
             var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file);
189 189
             if (newFilename !== null && newFilename !== file) {
190
-                window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>";
190
+                window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>";
191 191
             }
192 192
         }
193 193
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         {
196 196
             var newDirname = prompt("<?= $_lang["files_dynamic_new_folder_name"] ?>", dir);
197 197
             if (newDirname !== null && newDirname !== dir) {
198
-                window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken;?>";
198
+                window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken; ?>";
199 199
             }
200 200
         }
201 201
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         {
204 204
             var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file);
205 205
             if (newFilename !== null && newFilename !== file) {
206
-                window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>";
206
+                window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>";
207 207
             }
208 208
         }
209 209
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             <?php endif ?>
223 223
             <?php
224 224
             if (isset($_GET['mode']) && $_GET['mode'] !== 'drill') {
225
-                $href = 'a=31&path=' . urlencode($_REQUEST['path']);
225
+                $href = 'a=31&path='.urlencode($_REQUEST['path']);
226 226
             } else {
227 227
                 $href = 'a=2';
228 228
             }
@@ -232,12 +232,12 @@  discard block
 block discarded – undo
232 232
                 $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFolderName(this);"><i class="[+image+]"></i><span>[+subject+]</span></a>';
233 233
                 $ph['image'] = $_style['files_folder-open'];
234 234
                 $ph['subject'] = $_lang['add_folder'];
235
-                $ph['href'] = 'index.php?a=31&mode=newfolder&path=' . urlencode($startpath) . '&name=';
235
+                $ph['href'] = 'index.php?a=31&mode=newfolder&path='.urlencode($startpath).'&name=';
236 236
                 $_ = parsePlaceholder($tpl, $ph);
237 237
 
238
-                $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>' . $_lang['files.dynamic.php1'] . '</span></a>';
238
+                $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>'.$_lang['files.dynamic.php1'].'</span></a>';
239 239
                 $ph['image'] = $_style['files_page_html'];
240
-                $ph['href'] = 'index.php?a=31&mode=newfile&path=' . urlencode($startpath) . '&name=';
240
+                $ph['href'] = 'index.php?a=31&mode=newfile&path='.urlencode($startpath).'&name=';
241 241
                 $_ .= parsePlaceholder($tpl, $ph);
242 242
                 echo $_;
243 243
             }
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
             $ph = array();
268 268
             $ph['style_path'] = $theme_image_path;
269 269
             // To Top Level with folder icon to the left
270
-            if ($startpath == $filemanager_path || $startpath . '/' == $filemanager_path) {
271
-                $ph['image'] = '' . $_style['files_top'] . '';
270
+            if ($startpath == $filemanager_path || $startpath.'/' == $filemanager_path) {
271
+                $ph['image'] = ''.$_style['files_top'].'';
272 272
                 $ph['subject'] = '<span>Top</span>';
273 273
             } else {
274
-                $ph['image'] = '' . $_style['files_top'] . '';
275
-                $ph['subject'] = '<a href="index.php?a=31&mode=drill&path=' . $filemanager_path . '">Top</a>/';
274
+                $ph['image'] = ''.$_style['files_top'].'';
275
+                $ph['subject'] = '<a href="index.php?a=31&mode=drill&path='.$filemanager_path.'">Top</a>/';
276 276
             }
277 277
 
278 278
             echo parsePlaceholder($tpl, $ph);
@@ -289,12 +289,12 @@  discard block
 block discarded – undo
289 289
                     if (empty($v)) {
290 290
                         continue;
291 291
                     }
292
-                    $path .= rtrim($v, '/') . '/';
292
+                    $path .= rtrim($v, '/').'/';
293 293
                     if (1 < $count) {
294
-                        $href = 'index.php?a=31&mode=drill&path=' . urlencode($filemanager_path . $path);
295
-                        $pieces[$i] = '<a href="' . $href . '">' . trim($v, '/') . '</a>';
294
+                        $href = 'index.php?a=31&mode=drill&path='.urlencode($filemanager_path.$path);
295
+                        $pieces[$i] = '<a href="'.$href.'">'.trim($v, '/').'</a>';
296 296
                     } else {
297
-                        $pieces[$i] = '<span>' . trim($v, '/') . '</span>';
297
+                        $pieces[$i] = '<span>'.trim($v, '/').'</span>';
298 298
                     }
299 299
                     $count--;
300 300
                 }
@@ -307,16 +307,16 @@  discard block
 block discarded – undo
307 307
         </div>
308 308
         <?php
309 309
         // check to see user isn't trying to move below the document_root
310
-        if (substr(strtolower(str_replace('//', '/', $startpath . "/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path . '/'))) {
310
+        if (substr(strtolower(str_replace('//', '/', $startpath."/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path.'/'))) {
311 311
             $modx->webAlertAndQuit($_lang["files_access_denied"]);
312 312
         }
313 313
 
314 314
         // Unzip .zip files - by Raymond
315 315
         if ($enablefileunzip && $_REQUEST['mode'] == 'unzip' && is_writable($startpath)) {
316
-            if (!$err = unzip(realpath("{$startpath}/" . $_REQUEST['file']), realpath($startpath))) {
317
-                echo '<span class="warning"><b>' . $_lang['file_unzip_fail'] . ($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '') . '</b></span><br /><br />';
316
+            if (!$err = unzip(realpath("{$startpath}/".$_REQUEST['file']), realpath($startpath))) {
317
+                echo '<span class="warning"><b>'.$_lang['file_unzip_fail'].($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '').'</b></span><br /><br />';
318 318
             } else {
319
-                echo '<span class="success"><b>' . $_lang['file_unzip'] . '</b></span><br /><br />';
319
+                echo '<span class="success"><b>'.$_lang['file_unzip'].'</b></span><br /><br />';
320 320
             }
321 321
         }
322 322
         // End Unzip - Raymond
@@ -328,9 +328,9 @@  discard block
 block discarded – undo
328 328
             if ($_REQUEST['mode'] == 'deletefolder') {
329 329
                 $folder = $_REQUEST['folderpath'];
330 330
                 if (!$token_check || !@rrmdir($folder)) {
331
-                    echo '<span class="warning"><b>' . $_lang['file_folder_not_deleted'] . '</b></span><br /><br />';
331
+                    echo '<span class="warning"><b>'.$_lang['file_folder_not_deleted'].'</b></span><br /><br />';
332 332
                 } else {
333
-                    echo '<span class="success"><b>' . $_lang['file_folder_deleted'] . '</b></span><br /><br />';
333
+                    echo '<span class="success"><b>'.$_lang['file_folder_deleted'].'</b></span><br /><br />';
334 334
                 }
335 335
             }
336 336
 
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
                 if (!mkdirs("{$startpath}/{$foldername}", 0777)) {
342 342
                     echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />';
343 343
                 } else {
344
-                    if (!@chmod($startpath . '/' . $foldername, $newfolderaccessmode)) {
345
-                        echo '<span class="warning"><b>' . $_lang['file_folder_chmod_error'] . '</b></span><br /><br />';
344
+                    if (!@chmod($startpath.'/'.$foldername, $newfolderaccessmode)) {
345
+                        echo '<span class="warning"><b>'.$_lang['file_folder_chmod_error'].'</b></span><br /><br />';
346 346
                     } else {
347
-                        echo '<span class="success"><b>' . $_lang['file_folder_created'] . '</b></span><br /><br />';
347
+                        echo '<span class="success"><b>'.$_lang['file_folder_created'].'</b></span><br /><br />';
348 348
                     }
349 349
                 }
350 350
                 umask($old_umask);
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
                 $filename = $modx->db->escape($filename);
357 357
 
358 358
                 if (!checkExtension($filename)) {
359
-                    echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />';
359
+                    echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />';
360 360
                 } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $filename) !== 0) {
361 361
                     echo $_lang['files.dynamic.php3'];
362 362
                 } else {
@@ -378,11 +378,11 @@  discard block
 block discarded – undo
378 378
                 $newFilename = $modx->db->escape($newFilename);
379 379
 
380 380
                 if (!checkExtension($newFilename)) {
381
-                    echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />';
381
+                    echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />';
382 382
                 } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) {
383 383
                     echo $_lang['files.dynamic.php3'];
384 384
                 } else {
385
-                    if (!copy($filename, MODX_BASE_PATH . $newFilename)) {
385
+                    if (!copy($filename, MODX_BASE_PATH.$newFilename)) {
386 386
                         echo $_lang['files.dynamic.php5'];
387 387
                     }
388 388
                     umask($old_umask);
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             // Rename folder here
392 392
             if ($_REQUEST['mode'] == 'renameFolder') {
393 393
                 $old_umask = umask(0);
394
-                $dirname = $_REQUEST['path'] . '/' . $_REQUEST['dirname'];
394
+                $dirname = $_REQUEST['path'].'/'.$_REQUEST['dirname'];
395 395
                 $dirname = $modx->db->escape($dirname);
396 396
                 $newDirname = str_replace(array(
397 397
                     '..\\',
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
                 if (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newDirname) !== 0) {
405 405
                     echo $_lang['files.dynamic.php3'];
406
-                } else if (!rename($dirname, $_REQUEST['path'] . '/' . $newDirname)) {
406
+                } else if (!rename($dirname, $_REQUEST['path'].'/'.$newDirname)) {
407 407
                     echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />';
408 408
                 }
409 409
                 umask($old_umask);
@@ -423,11 +423,11 @@  discard block
 block discarded – undo
423 423
                 $newFilename = $modx->db->escape($newFilename);
424 424
 
425 425
                 if (!checkExtension($newFilename)) {
426
-                    echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />';
426
+                    echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />';
427 427
                 } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) {
428 428
                     echo $_lang['files.dynamic.php3'];
429 429
                 } else {
430
-                    if (!rename($filename, $path . '/' . $newFilename)) {
430
+                    if (!rename($filename, $path.'/'.$newFilename)) {
431 431
                         echo $_lang['files.dynamic.php5'];
432 432
                     }
433 433
                     umask($old_umask);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                 ls($startpath);
461 461
                 echo "\n\n\n";
462 462
                 if ($folders == 0 && $files == 0) {
463
-                    echo '<tr><td colspan="4"><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> ' . $_lang['files_directory_is_empty'] . ' </span></td></tr>';
463
+                    echo '<tr><td colspan="4"><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> '.$_lang['files_directory_is_empty'].' </span></td></tr>';
464 464
                 }
465 465
                 ?>
466 466
             </table>
@@ -469,10 +469,10 @@  discard block
 block discarded – undo
469 469
         <div class="container">
470 470
             <p>
471 471
                 <?php
472
-                echo $_lang['files_directories'] . ': <b>' . $folders . '</b> ';
473
-                echo $_lang['files_files'] . ': <b>' . $files . '</b> ';
474
-                echo $_lang['files_data'] . ': <b><span dir="ltr">' . $modx->nicesize($filesizes) . '</span></b> ';
475
-                echo $_lang['files_dirwritable'] . ' <b>' . (is_writable($startpath) == 1 ? $_lang['yes'] . '.' : $_lang['no']) . '.</b>'
472
+                echo $_lang['files_directories'].': <b>'.$folders.'</b> ';
473
+                echo $_lang['files_files'].': <b>'.$files.'</b> ';
474
+                echo $_lang['files_data'].': <b><span dir="ltr">'.$modx->nicesize($filesizes).'</span></b> ';
475
+                echo $_lang['files_dirwritable'].' <b>'.(is_writable($startpath) == 1 ? $_lang['yes'].'.' : $_lang['no']).'.</b>'
476 476
                 ?>
477 477
             </p>
478 478
 
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
                 </form>
498 498
                 <?php
499 499
             } else {
500
-                echo "<p>" . $_lang['files_upload_inhibited_msg'] . "</p>";
500
+                echo "<p>".$_lang['files_upload_inhibited_msg']."</p>";
501 501
             }
502 502
             ?>
503 503
             <div id="imageviewer"></div>
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     if ($file == $selFile) {
577 577
         $icon = isset($icons[$mode]) ? $icons[$mode] : $icons['default'];
578 578
     }
579
-    return '<i class="' . $icon . ' FilesPage"></i>';
579
+    return '<i class="'.$icon.' FilesPage"></i>';
580 580
 }
581 581
 
582 582
 function markRow($file, $selFile, $mode)
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
     );
589 589
     if ($file == $selFile) {
590 590
         $class = isset($classNames[$mode]) ? $classNames[$mode] : $classNames['default'];
591
-        return ' class="' . $class . '"';
591
+        return ' class="'.$class.'"';
592 592
     }
593 593
     return '';
594 594
 }
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     global $excludes, $protected_path, $editablefiles, $inlineviewablefiles, $viewablefiles, $enablefileunzip, $enablefiledownload, $uploadablefiles, $folders, $files, $filesizes, $len, $dirs_array, $files_array, $webstart_path, $modx;
600 600
     $dircounter = 0;
601 601
     $filecounter = 0;
602
-    $curpath = str_replace('//', '/', $curpath . '/');
602
+    $curpath = str_replace('//', '/', $curpath.'/');
603 603
 
604 604
     if (!is_dir($curpath)) {
605 605
         echo 'Invalid path "', $curpath, '"<br />';
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 
610 610
     // first, get info
611 611
     foreach ($dir as $file) {
612
-        $newpath = $curpath . $file;
612
+        $newpath = $curpath.$file;
613 613
         if ($file === '..' || $file === '.') {
614 614
             continue;
615 615
         }
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
             if ($file === '..' || $file === '.') {
620 620
                 continue;
621 621
             } elseif (!in_array($file, $excludes) && !in_array($newpath, $protected_path)) {
622
-                $dirs_array[$dircounter]['text'] = '<i class="' . $_style['files_folder'] . ' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path=' . urlencode($newpath) . '"><b>' . $file . '</b></a>';
622
+                $dirs_array[$dircounter]['text'] = '<i class="'.$_style['files_folder'].' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path='.urlencode($newpath).'"><b>'.$file.'</b></a>';
623 623
 
624 624
                 $dfiles = scandir($newpath);
625 625
                 foreach ($dfiles as $i => $infile) {
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
                 }
633 633
                 $file_exists = (0 < count($dfiles)) ? 'file_exists' : '';
634 634
 
635
-                $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\'' . urlencode($file) . '\',\'' . $file_exists . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></a>' : '';
635
+                $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\''.urlencode($file).'\',\''.$file_exists.'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></a>' : '';
636 636
             } else {
637
-                $dirs_array[$dircounter]['text'] = '<span><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> ' . $file . '</span>';
638
-                $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></span>' : '';
637
+                $dirs_array[$dircounter]['text'] = '<span><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> '.$file.'</span>';
638
+                $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></span>' : '';
639 639
             }
640 640
 
641
-            $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" title="' . $_lang['rename'] . '"></i></a> ' : '';
641
+            $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" title="'.$_lang['rename'].'"></i></a> ' : '';
642 642
 
643 643
             // increment the counter
644 644
             $dircounter++;
@@ -646,14 +646,14 @@  discard block
 block discarded – undo
646 646
             $type = getExtension($newpath);
647 647
             $files_array[$filecounter]['file'] = $newpath;
648 648
             $files_array[$filecounter]['stats'] = lstat($newpath);
649
-            $files_array[$filecounter]['text'] = determineIcon($newpath, $_REQUEST['path'], $_REQUEST['mode']) . ' ' . $file;
650
-            $files_array[$filecounter]['view'] = (in_array($type, $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\'' . $webstart_path . substr($newpath, $len, strlen($newpath)) . '\');"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : (($enablefiledownload && in_array($type, $uploadablefiles)) ? '<a href="' . $webstart_path . implode('/', array_map('rawurlencode', explode('/', substr($newpath, $len, strlen($newpath))))) . '" style="cursor:pointer;"><i class="' . $_style['files_download'] . '" title="' . $_lang['file_download_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></span>');
651
-            $files_array[$filecounter]['view'] = (in_array($type, $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path=' . urlencode($newpath) . '"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : $files_array[$filecounter]['view'];
652
-            $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_unzip'] . '" title="' . $_lang['file_download_unzip'] . '"></i></a>' : '';
653
-            $files_array[$filecounter]['edit'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path=' . urlencode($newpath) . '#file_editfile"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></span>';
654
-            $files_array[$filecounter]['duplicate'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_duplicate'] . '" title="' . $_lang['duplicate'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_duplicate'] . '" align="absmiddle" title="' . $_lang['duplicate'] . '"></i></span>';
655
-            $files_array[$filecounter]['rename'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></span>';
656
-            $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></span>';
649
+            $files_array[$filecounter]['text'] = determineIcon($newpath, $_REQUEST['path'], $_REQUEST['mode']).' '.$file;
650
+            $files_array[$filecounter]['view'] = (in_array($type, $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\''.$webstart_path.substr($newpath, $len, strlen($newpath)).'\');"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : (($enablefiledownload && in_array($type, $uploadablefiles)) ? '<a href="'.$webstart_path.implode('/', array_map('rawurlencode', explode('/', substr($newpath, $len, strlen($newpath))))).'" style="cursor:pointer;"><i class="'.$_style['files_download'].'" title="'.$_lang['file_download_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></span>');
651
+            $files_array[$filecounter]['view'] = (in_array($type, $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path='.urlencode($newpath).'"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : $files_array[$filecounter]['view'];
652
+            $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\''.urlencode($file).'\');"><i class="'.$_style['files_unzip'].'" title="'.$_lang['file_download_unzip'].'"></i></a>' : '';
653
+            $files_array[$filecounter]['edit'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path='.urlencode($newpath).'#file_editfile"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></span>';
654
+            $files_array[$filecounter]['duplicate'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\''.urlencode($file).'\');"><i class="'.$_style['files_duplicate'].'" title="'.$_lang['duplicate'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_duplicate'].'" align="absmiddle" title="'.$_lang['duplicate'].'"></i></span>';
655
+            $files_array[$filecounter]['rename'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></span>';
656
+            $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\''.urlencode($file).'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></span>';
657 657
 
658 658
             // increment the counter
659 659
             $filecounter++;
@@ -666,9 +666,9 @@  discard block
 block discarded – undo
666 666
     for ($i = 0; $i < $folders; $i++) {
667 667
         $filesizes += $dirs_array[$i]['stats']['7'];
668 668
         echo '<tr>';
669
-        echo '<td>' . $dirs_array[$i]['text'] . '</td>';
670
-        echo '<td class="text-nowrap">' . $modx->toDateFormat($dirs_array[$i]['stats']['9']) . '</td>';
671
-        echo '<td class="text-right">' . $modx->nicesize($dirs_array[$i]['stats']['7']) . '</td>';
669
+        echo '<td>'.$dirs_array[$i]['text'].'</td>';
670
+        echo '<td class="text-nowrap">'.$modx->toDateFormat($dirs_array[$i]['stats']['9']).'</td>';
671
+        echo '<td class="text-right">'.$modx->nicesize($dirs_array[$i]['stats']['7']).'</td>';
672 672
         echo '<td class="actions text-right">';
673 673
         echo $dirs_array[$i]['rename'];
674 674
         echo $dirs_array[$i]['delete'];
@@ -681,10 +681,10 @@  discard block
 block discarded – undo
681 681
     sort($files_array); // sorting the array alphabetically (Thanks pxl8r!)
682 682
     for ($i = 0; $i < $files; $i++) {
683 683
         $filesizes += $files_array[$i]['stats']['7'];
684
-        echo '<tr ' . markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']) . '>';
685
-        echo '<td>' . $files_array[$i]['text'] . '</td>';
686
-        echo '<td class="text-nowrap">' . $modx->toDateFormat($files_array[$i]['stats']['9']) . '</td>';
687
-        echo '<td class="text-right">' . $modx->nicesize($files_array[$i]['stats']['7']) . '</td>';
684
+        echo '<tr '.markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']).'>';
685
+        echo '<td>'.$files_array[$i]['text'].'</td>';
686
+        echo '<td class="text-nowrap">'.$modx->toDateFormat($files_array[$i]['stats']['9']).'</td>';
687
+        echo '<td class="text-right">'.$modx->nicesize($files_array[$i]['stats']['7']).'</td>';
688 688
         echo '<td class="actions text-right">';
689 689
         echo $files_array[$i]['unzip'];
690 690
         echo $files_array[$i]['view'];
@@ -792,17 +792,17 @@  discard block
 block discarded – undo
792 792
     $zip = zip_open($file);
793 793
     if ($zip) {
794 794
         $old_umask = umask(0);
795
-        $path = rtrim($path, '/') . '/';
795
+        $path = rtrim($path, '/').'/';
796 796
         while ($zip_entry = zip_read($zip)) {
797 797
             if (zip_entry_filesize($zip_entry) > 0) {
798 798
                 // str_replace must be used under windows to convert "/" into "\"
799 799
                 $zip_entry_name = zip_entry_name($zip_entry);
800
-                $complete_path = $path . str_replace('\\', '/', dirname($zip_entry_name));
801
-                $complete_name = $path . str_replace('\\', '/', $zip_entry_name);
800
+                $complete_path = $path.str_replace('\\', '/', dirname($zip_entry_name));
801
+                $complete_name = $path.str_replace('\\', '/', $zip_entry_name);
802 802
                 if (!file_exists($complete_path)) {
803 803
                     $tmp = '';
804 804
                     foreach (explode('/', $complete_path) AS $k) {
805
-                        $tmp .= $k . '/';
805
+                        $tmp .= $k.'/';
806 806
                         if (!is_dir($tmp)) {
807 807
                             mkdir($tmp, 0777);
808 808
                         }
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 
824 824
 function rrmdir($dir)
825 825
 {
826
-    foreach (glob($dir . '/*') as $file) {
826
+    foreach (glob($dir.'/*') as $file) {
827 827
         if (is_dir($file)) {
828 828
             rrmdir($file);
829 829
         } else {
@@ -855,12 +855,12 @@  discard block
 block discarded – undo
855 855
             $userfile['type'] = $_FILES['userfile']['type'][$i];
856 856
 
857 857
             // this seems to be an upload action.
858
-            $path = $modx->config['site_url'] . substr($startpath, strlen($filemanager_path), strlen($startpath));
859
-            $path = rtrim($path, '/') . '/' . $userfile['name'];
858
+            $path = $modx->config['site_url'].substr($startpath, strlen($filemanager_path), strlen($startpath));
859
+            $path = rtrim($path, '/').'/'.$userfile['name'];
860 860
             $msg .= $path;
861 861
             if ($userfile['error'] == 0) {
862
-                $img = (strpos($userfile['type'], 'image') !== false) ? '<br /><img src="' . $path . '" height="75" />' : '';
863
-                $msg .= "<p>" . $_lang['files_file_type'] . $userfile['type'] . ", " . $modx->nicesize(filesize($userfile['tmp_name'])) . $img . '</p>';
862
+                $img = (strpos($userfile['type'], 'image') !== false) ? '<br /><img src="'.$path.'" height="75" />' : '';
863
+                $msg .= "<p>".$_lang['files_file_type'].$userfile['type'].", ".$modx->nicesize(filesize($userfile['tmp_name'])).$img.'</p>';
864 864
             }
865 865
 
866 866
             $userfilename = $userfile['tmp_name'];
@@ -868,15 +868,15 @@  discard block
 block discarded – undo
868 868
             if (is_uploaded_file($userfilename)) {
869 869
                 // file is uploaded file, process it!
870 870
                 if (!checkExtension($userfile['name'])) {
871
-                    $msg .= '<p><span class="warning">' . $_lang['files_filetype_notok'] . '</span></p>';
871
+                    $msg .= '<p><span class="warning">'.$_lang['files_filetype_notok'].'</span></p>';
872 872
                 } else {
873
-                    if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'] . '/' . $userfile['name'])) {
873
+                    if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'].'/'.$userfile['name'])) {
874 874
                         // Ryan: Repair broken permissions issue with file manager
875 875
                         if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
876
-                            @chmod($_POST['path'] . "/" . $userfile['name'], $new_file_permissions);
876
+                            @chmod($_POST['path']."/".$userfile['name'], $new_file_permissions);
877 877
                         }
878 878
                         // Ryan: End
879
-                        $msg .= '<p><span class="success">' . $_lang['files_upload_ok'] . '</span></p><hr/>';
879
+                        $msg .= '<p><span class="success">'.$_lang['files_upload_ok'].'</span></p><hr/>';
880 880
 
881 881
                         // invoke OnFileManagerUpload event
882 882
                         $modx->invokeEvent('OnFileManagerUpload', array(
@@ -884,13 +884,13 @@  discard block
 block discarded – undo
884 884
                             'filename' => $userfile['name']
885 885
                         ));
886 886
                         // Log the change
887
-                        logFileChange('upload', $_POST['path'] . '/' . $userfile['name']);
887
+                        logFileChange('upload', $_POST['path'].'/'.$userfile['name']);
888 888
                     } else {
889
-                        $msg .= '<p><span class="warning">' . $_lang['files_upload_copyfailed'] . '</span> ' . $_lang["files_upload_permissions_error"] . '</p>';
889
+                        $msg .= '<p><span class="warning">'.$_lang['files_upload_copyfailed'].'</span> '.$_lang["files_upload_permissions_error"].'</p>';
890 890
                     }
891 891
                 }
892 892
             } else {
893
-                $msg .= '<br /><span class="warning"><b>' . $_lang['files_upload_error'] . ':</b>';
893
+                $msg .= '<br /><span class="warning"><b>'.$_lang['files_upload_error'].':</b>';
894 894
                 switch ($userfile['error']) {
895 895
                     case 0: //no error; possible file attack!
896 896
                         $msg .= $_lang['files_upload_error0'];
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
             }
916 916
         }
917 917
     }
918
-    return $msg . '<br/>';
918
+    return $msg.'<br/>';
919 919
 }
920 920
 
921 921
 function textsave()
@@ -928,9 +928,9 @@  discard block
 block discarded – undo
928 928
 
929 929
     // Write $content to our opened file.
930 930
     if (file_put_contents($filename, $content) === false) {
931
-        $msg .= '<span class="warning"><b>' . $_lang['file_not_saved'] . '</b></span><br /><br />';
931
+        $msg .= '<span class="warning"><b>'.$_lang['file_not_saved'].'</b></span><br /><br />';
932 932
     } else {
933
-        $msg .= '<span class="success"><b>' . $_lang['file_saved'] . '</b></span><br /><br />';
933
+        $msg .= '<span class="success"><b>'.$_lang['file_saved'].'</b></span><br /><br />';
934 934
         $_REQUEST['mode'] = 'edit';
935 935
     }
936 936
     // Log the change
@@ -946,9 +946,9 @@  discard block
 block discarded – undo
946 946
 
947 947
     $file = $_REQUEST['path'];
948 948
     if (!$token_check || !@unlink($file)) {
949
-        $msg .= '<span class="warning"><b>' . $_lang['file_not_deleted'] . '</b></span><br /><br />';
949
+        $msg .= '<span class="warning"><b>'.$_lang['file_not_deleted'].'</b></span><br /><br />';
950 950
     } else {
951
-        $msg .= '<span class="success"><b>' . $_lang['file_deleted'] . '</b></span><br /><br />';
951
+        $msg .= '<span class="success"><b>'.$_lang['file_deleted'].'</b></span><br /><br />';
952 952
     }
953 953
 
954 954
     // Log the change
Please login to merge, or discard this patch.
manager/actions/help/04Changelog.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 <div class="sectionHeader">Changelog</div>
6 6
 <div class="sectionBody">
7 7
 <?php
8
-	$changeLog = MODX_BASE_PATH . 'assets/docs/changelog.txt';
9
-	if(is_readable($changeLog))
10
-		echo str_replace("\n",'<br>',file_get_contents($changeLog));
8
+	$changeLog = MODX_BASE_PATH.'assets/docs/changelog.txt';
9
+	if (is_readable($changeLog))
10
+		echo str_replace("\n", '<br>', file_get_contents($changeLog));
11 11
 ?>
12 12
 </div>
13 13
\ No newline at end of file
Please login to merge, or discard this patch.