Completed
Push — develop ( 75b835...a38a21 )
by Maxim
09:33 queued 04:23
created
manager/actions/mutate_settings/tab3_user_settings.inc.php 2 patches
Spacing   +19 added lines, -19 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>
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
   <tr>
40 40
     <td nowrap class="warning"><?php echo $_lang['email_method_title'] ?><br><small>[(email_method)]</small></td>
41 41
     <td>
42
-        <?php echo wrap_label($_lang['email_method_mail'],form_radio('email_method','mail','id="useMail"'));?><br />
43
-        <?php echo wrap_label($_lang['email_method_smtp'],form_radio('email_method','smtp','id="useSmtp"'));?>
44
-        <div class="smtpRow" <?php echo showHide($email_method=='smtp');?>>
45
-            <?php include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/snippet_smtp.inc.php'); ?>
42
+        <?php echo wrap_label($_lang['email_method_mail'], form_radio('email_method', 'mail', 'id="useMail"')); ?><br />
43
+        <?php echo wrap_label($_lang['email_method_smtp'], form_radio('email_method', 'smtp', 'id="useSmtp"')); ?>
44
+        <div class="smtpRow" <?php echo showHide($email_method == 'smtp'); ?>>
45
+            <?php include_once(MODX_MANAGER_PATH.'actions/mutate_settings/snippet_smtp.inc.php'); ?>
46 46
         </div>
47 47
     </td>
48 48
   </tr>
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
       <br />
55 55
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
56 56
       <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');">
57
-<?php echo get_lang_options('emailsubject_default');?>
57
+<?php echo get_lang_options('emailsubject_default'); ?>
58 58
       </select>
59 59
     </td>
60 60
     <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" value="<?php echo $emailsubject; ?>" />
61
-        <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" />
61
+        <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']); ?>" />
62 62
     </td>
63 63
   </tr>
64 64
   <tr>
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
       <br />
74 74
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
75 75
       <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');">
76
-<?php echo get_lang_options('system_email_signup');?>
76
+<?php echo get_lang_options('system_email_signup'); ?>
77 77
       </select>
78 78
     </td>
79 79
     <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo $signupemail_message; ?></textarea>
80
-        <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" />
80
+        <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']); ?>" />
81 81
     </td>
82 82
   </tr>
83 83
   <tr>
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
       <br />
93 93
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
94 94
       <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');">
95
-<?php echo get_lang_options('system_email_websignup');?>
95
+<?php echo get_lang_options('system_email_websignup'); ?>
96 96
       </select>
97 97
     </td>
98 98
     <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo $websignupemail_message; ?></textarea>
99
-        <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" />
99
+        <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']); ?>" />
100 100
     </td>
101 101
   </tr>
102 102
   <tr>
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
       <br />
112 112
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
113 113
       <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');">
114
-<?php echo get_lang_options('system_email_webreminder');?>
114
+<?php echo get_lang_options('system_email_webreminder'); ?>
115 115
       </select>
116 116
     </td>
117 117
     <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo $webpwdreminder_message; ?></textarea>
118
-        <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" />
118
+        <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']); ?>" />
119 119
     </td>
120 120
   </tr>
121 121
   <tr>
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         <?php
128 128
             // invoke OnUserSettingsRender event
129 129
             $evtOut = $modx->invokeEvent('OnUserSettingsRender');
130
-            if(is_array($evtOut)) echo implode("",$evtOut);
130
+            if (is_array($evtOut)) echo implode("", $evtOut);
131 131
         ?>
132 132
     </td>
133 133
   </tr>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,9 @@
 block discarded – undo
127 127
         <?php
128 128
             // invoke OnUserSettingsRender event
129 129
             $evtOut = $modx->invokeEvent('OnUserSettingsRender');
130
-            if(is_array($evtOut)) echo implode("",$evtOut);
130
+            if(is_array($evtOut)) {
131
+                echo implode("",$evtOut);
132
+            }
131 133
         ?>
132 134
     </td>
133 135
   </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab7_filebrowser_settings.inc.php 2 patches
Spacing   +58 added lines, -58 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['rb_title']?><br><small>[(use_browser)]</small></td>
8 8
     <td>
9
-        <?php echo wrap_label($_lang['yes'],form_radio('use_browser', 1, 'id="rbRowOn"'));?><br />
10
-        <?php echo wrap_label($_lang['no'], form_radio('use_browser', 0, 'id="rbRowOff"'));?>
9
+        <?php echo wrap_label($_lang['yes'], form_radio('use_browser', 1, 'id="rbRowOn"')); ?><br />
10
+        <?php echo wrap_label($_lang['no'], form_radio('use_browser', 0, 'id="rbRowOff"')); ?>
11 11
     </td>
12 12
   </tr>
13 13
   <tr>
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     <td colspan="2"><div class="split"></div></td>
19 19
   </tr>
20 20
   
21
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
21
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
22 22
     <td nowrap class="warning"><?php echo $_lang['which_browser_default_title']?><br><small>[(which_browser)]</small></td>
23 23
     <td>
24 24
         <select name="which_browser" size="1" class="inputBox" onchange="documentDirty=true;">
@@ -27,206 +27,206 @@  discard block
 block discarded – undo
27 27
                 $dir = str_replace('\\', '/', $dir);
28 28
                 $browser_name = substr($dir, strrpos($dir, '/') + 1);
29 29
                 $selected = $browser_name == $which_browser ? ' selected="selected"' : '';
30
-                echo '<option value="' . $browser_name . '"' . $selected . '>' . "{$browser_name}</option>\n";
30
+                echo '<option value="'.$browser_name.'"'.$selected.'>'."{$browser_name}</option>\n";
31 31
             }
32 32
             ?>
33 33
         </select>
34 34
     </td>
35 35
   </tr>
36
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
36
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
37 37
     <td width="200">&nbsp;</td>
38 38
     <td class="comment"><?php echo $_lang['which_browser_default_msg']?></td>
39 39
   </tr>
40 40
   <tr>
41 41
     <td colspan="2"><div class="split"></div></td>
42 42
   </tr>
43
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
43
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
44 44
     <td nowrap class="warning"><?php echo $_lang['rb_webuser_title']?><br><small>[(rb_webuser)]</small></td>
45 45
     <td>
46
-      <label><input type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser=='1' ? 'checked="checked"' : "" ; ?> />
46
+      <label><input type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser == '1' ? 'checked="checked"' : ""; ?> />
47 47
       <?php echo $_lang['yes']?></label><br />
48
-      <label><input type="radio" name="rb_webuser" value="0" <?php echo $rb_webuser=='0' ? 'checked="checked"' : "" ; ?> />
48
+      <label><input type="radio" name="rb_webuser" value="0" <?php echo $rb_webuser == '0' ? 'checked="checked"' : ""; ?> />
49 49
       <?php echo $_lang['no']?></label>
50 50
     </td>
51 51
   </tr>
52
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
52
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
53 53
     <td width="200">&nbsp;</td>
54 54
     <td class="comment"><?php echo $_lang['rb_webuser_message']?></td>
55 55
   </tr>
56
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
56
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
57 57
     <td colspan="2"><div class="split"></div></td>
58 58
   </tr>
59
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
59
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
60 60
     <td nowrap class="warning"><?php echo $_lang['rb_base_dir_title']?><br><small>[(rb_base_dir)]</small></td>
61 61
     <td>
62 62
         <?php echo $_lang['default']; ?> <span id="default_rb_base_dir">[(base_path)]assets/</span><br />
63 63
         <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="rb_base_dir" id="rb_base_dir" value="<?php echo $rb_base_dir; ?>" /> <input type="button" onclick="reset_path('rb_base_dir');" value="<?php echo $_lang['reset']; ?>" name="reset_rb_base_dir">
64 64
     </td>
65 65
   </tr>
66
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
66
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
67 67
     <td width="200">&nbsp;</td>
68 68
     <td class="comment"><?php echo $_lang['rb_base_dir_message']?></td>
69 69
   </tr>
70
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
70
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
71 71
     <td colspan="2"><div class="split"></div></td>
72 72
   </tr>
73
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
73
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
74 74
     <td nowrap class="warning"><?php echo $_lang['rb_base_url_title']?><br><small>[(rb_base_url)]</small></td>
75 75
     <td>
76 76
       <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="rb_base_url" value="<?php echo $rb_base_url; ?>" />
77 77
       </td>
78 78
   </tr>
79
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
79
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
80 80
     <td width="200">&nbsp;</td>
81 81
     <td class="comment"><?php echo $_lang['rb_base_url_message']?></td>
82 82
   </tr>
83
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
83
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
84 84
     <td colspan="2"><div class="split"></div></td>
85 85
   </tr>
86
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
86
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
87 87
       <td nowrap class="warning"><?php echo $_lang['clean_uploaded_filename']?><br><small>[(clean_uploaded_filename)]</small></td>
88 88
       <td>
89
-        <label><input type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename=='1' ? 'checked="checked"' : "" ; ?> />
89
+        <label><input type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename == '1' ? 'checked="checked"' : ""; ?> />
90 90
         <?php echo $_lang['yes']?></label><br />
91
-        <label><input type="radio" name="clean_uploaded_filename" value="0" <?php echo $clean_uploaded_filename=='0' ? 'checked="checked"' : "" ; ?> />
91
+        <label><input type="radio" name="clean_uploaded_filename" value="0" <?php echo $clean_uploaded_filename == '0' ? 'checked="checked"' : ""; ?> />
92 92
         <?php echo $_lang['no']?></label>
93 93
       </td>
94 94
   </tr>
95
-    <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
95
+    <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
96 96
       <td width="200">&nbsp;</td>
97
-      <td class="comment"><?php echo $_lang['clean_uploaded_filename_message'];?></td>
97
+      <td class="comment"><?php echo $_lang['clean_uploaded_filename_message']; ?></td>
98 98
     </tr>
99
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
99
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
100 100
   <td colspan="2"><div class="split"></div></td>
101 101
   </tr>
102
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
102
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
103 103
     <td nowrap class="warning"><?php echo $_lang['settings_strip_image_paths_title']?><br><small>[(strip_image_paths)]</small></td>
104 104
     <td>
105
-      <label><input type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths=='1' ? 'checked="checked"' : "" ; ?> />
105
+      <label><input type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths == '1' ? 'checked="checked"' : ""; ?> />
106 106
       <?php echo $_lang['yes']?></label><br />
107
-      <label><input type="radio" name="strip_image_paths" value="0" <?php echo $strip_image_paths=='0' ? 'checked="checked"' : "" ; ?> />
107
+      <label><input type="radio" name="strip_image_paths" value="0" <?php echo $strip_image_paths == '0' ? 'checked="checked"' : ""; ?> />
108 108
       <?php echo $_lang['no']?></label>
109 109
     </td>
110 110
   </tr>
111
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
111
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
112 112
     <td width="200">&nbsp;</td>
113 113
     <td class="comment"><?php echo $_lang['settings_strip_image_paths_message']?></td>
114 114
   </tr>
115
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
115
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
116 116
     <td colspan="2"><div class="split"></div></td>
117 117
   </tr>
118
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
118
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
119 119
     <td nowrap class="warning"><?php echo $_lang['maxImageWidth']?><br><small>[(maxImageWidth)]</small></td>
120 120
     <td>
121 121
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="maxImageWidth" value="<?php echo $maxImageWidth; ?>" />
122 122
     </td>
123 123
   </tr>
124
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
124
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
125 125
     <td width="200">&nbsp;</td>
126 126
     <td class="comment"><?php echo $_lang['maxImageWidth_message']?></td>
127 127
   </tr>
128
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
128
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
129 129
     <td colspan="2"><div class="split"></div></td>
130 130
   </tr>
131
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
131
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
132 132
     <td nowrap class="warning"><?php echo $_lang['maxImageHeight']?><br><small>[(maxImageHeight)]</small></td>
133 133
     <td>
134 134
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="maxImageHeight" value="<?php echo $maxImageHeight; ?>" />
135 135
     </td>
136 136
   </tr>
137
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
137
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
138 138
     <td width="200">&nbsp;</td>
139 139
     <td class="comment"><?php echo $_lang['maxImageHeight_message']?></td>
140 140
   </tr>
141
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
141
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
142 142
     <td colspan="2"><div class="split"></div></td>
143 143
   </tr>
144
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
144
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
145 145
     <td nowrap class="warning"><?php echo $_lang['thumbWidth']?><br><small>[(thumbWidth)]</small></td>
146 146
     <td>
147 147
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbWidth" value="<?php echo $thumbWidth; ?>" />
148 148
     </td>
149 149
   </tr>
150
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
150
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
151 151
     <td width="200">&nbsp;</td>
152 152
     <td class="comment"><?php echo $_lang['thumbWidth_message']?></td>
153 153
   </tr>
154
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
154
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
155 155
     <td colspan="2"><div class="split"></div></td>
156 156
   </tr>
157
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
157
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
158 158
     <td nowrap class="warning"><?php echo $_lang['thumbHeight']?><br><small>[(thumbHeight)]</small></td>
159 159
     <td>
160 160
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbHeight" value="<?php echo $thumbHeight; ?>" />
161 161
     </td>
162 162
   </tr>
163
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
163
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
164 164
     <td width="200">&nbsp;</td>
165 165
     <td class="comment"><?php echo $_lang['thumbHeight_message']?></td>
166 166
   </tr>
167
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
167
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
168 168
     <td colspan="2"><div class="split"></div></td>
169 169
   </tr>
170
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
170
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
171 171
     <td nowrap class="warning"><?php echo $_lang['thumbsDir']?><br><small>[(thumbsDir)]</small></td>
172 172
     <td>
173 173
       <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="thumbsDir" value="<?php echo $thumbsDir; ?>" />
174 174
     </td>
175 175
   </tr>
176
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
176
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
177 177
     <td width="200">&nbsp;</td>
178 178
     <td class="comment"><?php echo $_lang['thumbsDir_message']?></td>
179 179
   </tr>
180
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
180
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
181 181
     <td colspan="2"><div class="split"></div></td>
182 182
   </tr>
183
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
183
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
184 184
     <td nowrap class="warning"><?php echo $_lang['jpegQuality']?><br><small>[(jpegQuality)]</small></td>
185 185
     <td>
186 186
       <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="jpegQuality" value="<?php echo $jpegQuality; ?>" />
187 187
     </td>
188 188
   </tr>
189
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
189
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
190 190
     <td width="200">&nbsp;</td>
191 191
     <td class="comment"><?php echo $_lang['jpegQuality_message']?></td>
192 192
   </tr>
193
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
193
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
194 194
     <td colspan="2"><div class="split"></div></td>
195 195
   </tr>
196
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
196
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
197 197
        <td nowrap class="warning"><?php echo $_lang['denyZipDownload'] ?><br><small>[(denyZipDownload)]</small></td>
198 198
         <td>
199
-          <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload=='0' ? 'checked="checked"' : ""; ?> />
199
+          <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload == '0' ? 'checked="checked"' : ""; ?> />
200 200
           <?php echo $_lang['no']?></label><br />
201
-          <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload=='1' ? 'checked="checked"' : ""; ?> />
201
+          <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload == '1' ? 'checked="checked"' : ""; ?> />
202 202
           <?php echo $_lang['yes']?></label>
203 203
         </td>
204 204
   </tr>
205
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
205
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
206 206
     <td colspan="2"><div class="split"></div></td>
207 207
   </tr>
208
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
208
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
209 209
         <td nowrap class="warning"><?php echo $_lang['denyExtensionRename'] ?><br><small>[(denyExtensionRename)]</small></td>
210 210
         <td>
211
-           <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename=='0' ? 'checked="checked"' : ""; ?> />
211
+           <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename == '0' ? 'checked="checked"' : ""; ?> />
212 212
            <?php echo $_lang['no']?></label><br />
213
-           <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename=='1' ? 'checked="checked"' : ""; ?> />
213
+           <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename == '1' ? 'checked="checked"' : ""; ?> />
214 214
            <?php echo $_lang['yes']?></label>
215 215
         </td>
216 216
   </tr>
217
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
217
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
218 218
     <td colspan="2"><div class="split"></div></td>
219 219
   </tr>
220
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
220
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
221 221
        <td nowrap class="warning"><?php echo $_lang['showHiddenFiles'] ?><br><small>[(showHiddenFiles)]</small></td>
222 222
        <td>
223
-         <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles=='0' ? 'checked="checked"' : ""; ?> />
223
+         <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles == '0' ? 'checked="checked"' : ""; ?> />
224 224
          <?php echo $_lang['no']?></label><br />
225
-         <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles=='1' ? 'checked="checked"' : ""; ?> />
225
+         <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles == '1' ? 'checked="checked"' : ""; ?> />
226 226
          <?php echo $_lang['yes']?></label>
227 227
         </td>
228 228
   </tr>
229
-  <tr class="rbRow" <?php echo showHide($use_browser==1);?>>
229
+  <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>>
230 230
     <td colspan="2"><div class="split"></div></td>
231 231
   </tr>
232 232
   
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         <?php
236 236
             // invoke OnMiscSettingsRender event
237 237
             $evtOut = $modx->invokeEvent('OnMiscSettingsRender');
238
-            if(is_array($evtOut)) echo implode("",$evtOut);
238
+            if (is_array($evtOut)) echo implode("", $evtOut);
239 239
         ?>
240 240
     </td>
241 241
   </tr>
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     <td>
24 24
         <select name="which_browser" size="1" class="inputBox" onchange="documentDirty=true;">
25 25
             <?php
26
-            foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) {
26
+            foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) {
27 27
                 $dir = str_replace('\\', '/', $dir);
28 28
                 $browser_name = substr($dir, strrpos($dir, '/') + 1);
29 29
                 $selected = $browser_name == $which_browser ? ' selected="selected"' : '';
@@ -235,7 +235,9 @@  discard block
 block discarded – undo
235 235
         <?php
236 236
             // invoke OnMiscSettingsRender event
237 237
             $evtOut = $modx->invokeEvent('OnMiscSettingsRender');
238
-            if(is_array($evtOut)) echo implode("",$evtOut);
238
+            if(is_array($evtOut)) {
239
+                echo implode("",$evtOut);
240
+            }
239 241
         ?>
240 242
     </td>
241 243
   </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab4_manager_settings.inc.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                             }
57 57
                             $themename = $file;
58 58
                             $selectedtext = $themename == $manager_theme ? "selected='selected'" : "";
59
-                            echo "<option value='$themename' $selectedtext>" . ucwords(str_replace("_", " ", $themename)) . "</option>";
59
+                            echo "<option value='$themename' $selectedtext>".ucwords(str_replace("_", " ", $themename))."</option>";
60 60
                         }
61 61
                     }
62 62
                     $dir->close();
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             <td>
207 207
                 <select name="group_tvs" size="1" class="form-control">
208 208
                     <?php
209
-                    $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n";
209
+                    $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>'."\n";
210 210
                     $option = explode(',', $_lang['settings_group_tv_options']);
211 211
                     $output = array();
212 212
                     foreach ($option as $k => $v) {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             <td>
280 280
                 <select name="resource_tree_node_name" size="1" class="inputBox">
281 281
                     <?php
282
-                    $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n";
282
+                    $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>'."\n";
283 283
                     $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon');
284 284
                     $output = array();
285 285
                     foreach ($option as $v) {
@@ -365,8 +365,8 @@  discard block
 block discarded – undo
365 365
                     $str = '';
366 366
                     foreach ($datetime_format_list as $value) {
367 367
                         $selectedtext = ($datetime_format == $value) ? ' selected' : '';
368
-                        $str .= '<option value="' . $value . '"' . $selectedtext . '>';
369
-                        $str .= $value . '</option>' . PHP_EOL;
368
+                        $str .= '<option value="'.$value.'"'.$selectedtext.'>';
369
+                        $str .= $value.'</option>'.PHP_EOL;
370 370
                     }
371 371
                     echo $str;
372 372
                     ?>
@@ -476,10 +476,10 @@  discard block
 block discarded – undo
476 476
                 <select name="which_editor" onChange="documentDirty=true;">
477 477
                     <?php
478 478
                     // invoke OnRichTextEditorRegister event
479
-                    echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n";
479
+                    echo "<option value='none'".($which_editor == 'none' ? " selected='selected'" : "").">".$_lang['none']."</option>\n";
480 480
                     if (is_array($evtOut)) {
481 481
                         foreach ($evtOut as $editor) {
482
-                            echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n";
482
+                            echo "<option value='$editor'".($which_editor == $editor ? " selected='selected'" : "").">$editor</option>\n";
483 483
                         }
484 484
                     }
485 485
                     ?>
Please login to merge, or discard this patch.
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
                 <select name="manager_theme" size="1" class="inputBox" onChange="documentDirty=true; document.forms['settings'].theme_refresher.value = Date.parse(new Date());">
50 50
                     <?php
51 51
                     $dir = dir("media/style/");
52
-                    while ($file = $dir->read()) {
53
-                        if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') {
54
-                            if ($file === 'common') {
52
+                    while ($file = $dir->read()) {
53
+                        if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') {
54
+                            if ($file === 'common') {
55 55
                                 continue;
56 56
                             }
57 57
                             $themename = $file;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                     $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n";
210 210
                     $option = explode(',', $_lang['settings_group_tv_options']);
211 211
                     $output = array();
212
-                    foreach ($option as $k => $v) {
212
+                    foreach ($option as $k => $v) {
213 213
                         $selected = ($k == $group_tvs) ? 'selected' : '';
214 214
                         $s = array('[+value+]', '[+selected+]', '[+title+]');
215 215
                         $r = array($k, $selected, $v);
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                     $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n";
283 283
                     $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon');
284 284
                     $output = array();
285
-                    foreach ($option as $v) {
285
+                    foreach ($option as $v) {
286 286
                         $selected = ($v == $resource_tree_node_name) ? 'selected' : '';
287 287
                         $s = array('[+value+]', '[+selected+]');
288 288
                         $r = array($v, $selected);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                     <?php
364 364
                     $datetime_format_list = array('dd-mm-YYYY', 'mm/dd/YYYY', 'YYYY/mm/dd');
365 365
                     $str = '';
366
-                    foreach ($datetime_format_list as $value) {
366
+                    foreach ($datetime_format_list as $value) {
367 367
                         $selectedtext = ($datetime_format == $value) ? ' selected' : '';
368 368
                         $str .= '<option value="' . $value . '"' . $selectedtext . '>';
369 369
                         $str .= $value . '</option>' . PHP_EOL;
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         <?php
446 446
         // invoke OnRichTextEditorRegister event
447 447
         $evtOut = $modx->invokeEvent('OnRichTextEditorRegister');
448
-        if (!is_array($evtOut)) {
448
+        if (!is_array($evtOut)) {
449 449
             $evtOut = array();
450 450
             $use_editor = 0;
451 451
         }
@@ -477,8 +477,8 @@  discard block
 block discarded – undo
477 477
                     <?php
478 478
                     // invoke OnRichTextEditorRegister event
479 479
                     echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n";
480
-                    if (is_array($evtOut)) {
481
-                        foreach ($evtOut as $editor) {
480
+                    if (is_array($evtOut)) {
481
+                        foreach ($evtOut as $editor) {
482 482
                             echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n";
483 483
                         }
484 484
                     }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
                 <?php
535 535
                 // invoke OnInterfaceSettingsRender event
536 536
                 $evtOut = $modx->invokeEvent('OnInterfaceSettingsRender');
537
-                if (is_array($evtOut)) {
537
+                if (is_array($evtOut)) {
538 538
                     echo implode("", $evtOut);
539 539
                 }
540 540
                 ?>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab1_site_settings.inc.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	$site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default'];
2
+    $site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default'];
3 3
 ?>
4 4
 <style>
5 5
 table.sysSettings > tbody td, table.sysSettings > tbody th {border-bottom:1px dotted #ccc;padding:10px;}
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
         <?php
136 136
             // Check if PHX is enabled
137 137
             $count = $modx->db->getRecordCount(
138
-              $modx->db->select('id', '[+prefix+]site_plugins', 
139
-              "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1")
138
+                $modx->db->select('id', '[+prefix+]site_plugins', 
139
+                "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1")
140 140
             );
141 141
             if($count) {
142 142
                 $disabledFilters = 1;
@@ -259,14 +259,14 @@  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'" : "" ;
265
-      ?>
262
+        for($i=-24; $i<25; $i++) {
263
+            $seconds = $i*60*60;
264
+            $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ;
265
+        ?>
266 266
           <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option>
267 267
           <?php
268
-      }
269
-      ?>
268
+        }
269
+        ?>
270 270
         </select>
271 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>
Please login to merge, or discard this 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.
Braces   +16 added lines, -13 removed lines patch added patch discarded remove patch
@@ -82,23 +82,23 @@  discard block
 block discarded – undo
82 82
         <?php
83 83
         
84 84
         $currentCategory = '';
85
-                        while ($row = $modx->db->getRow($rs)) {
85
+                        while ($row = $modx->db->getRow($rs)) {
86 86
             $thisCategory = $row['category'];
87
-            if($thisCategory == null) {
87
+            if($thisCategory == null) {
88 88
                 $thisCategory = $_lang['no_category'];
89 89
             }
90
-            if($thisCategory != $currentCategory) {
91
-                if($closeOptGroup) {
90
+            if($thisCategory != $currentCategory) {
91
+                if($closeOptGroup) {
92 92
                     echo "\t\t\t\t\t</optgroup>\n";
93 93
                 }
94 94
                 echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n";
95 95
                 $closeOptGroup = true;
96
-            } else {
96
+            } else {
97 97
                 $closeOptGroup = false;
98 98
             }
99 99
             
100 100
             $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : '';
101
-            if ($selectedtext) {
101
+            if ($selectedtext) {
102 102
                 $oldTmpId = $row['id'];
103 103
                 $oldTmpName = $row['templatename'];
104 104
             }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n";
107 107
             $currentCategory = $thisCategory;
108 108
         }
109
-        if($thisCategory != '') {
109
+        if($thisCategory != '') {
110 110
             echo "\t\t\t\t\t</optgroup>\n";
111 111
         }
112 112
 ?>
@@ -138,11 +138,12 @@  discard block
 block discarded – undo
138 138
               $modx->db->select('id', '[+prefix+]site_plugins', 
139 139
               "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1")
140 140
             );
141
-            if($count) {
141
+            if($count) {
142 142
                 $disabledFilters = 1;
143 143
                 echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>';
144
-            }
145
-            else $disabledFilters = false;
144
+            } else {
145
+                $disabledFilters = false;
146
+            }
146 147
         ?>
147 148
         <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br />
148 149
         <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?>
@@ -204,7 +205,7 @@  discard block
 block discarded – undo
204 205
     <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5">
205 206
     <?php
206 207
         $ct = explode(",",$custom_contenttype);
207
-        for($i=0;$i<count($ct);$i++) {
208
+        for($i=0;$i<count($ct);$i++) {
208 209
             echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>";
209 210
         }
210 211
     ?>
@@ -259,7 +260,7 @@  discard block
 block discarded – undo
259 260
       <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th>
260 261
       <td> <select name="server_offset_time" size="1" class="inputBox">
261 262
           <?php
262
-      for($i=-24; $i<25; $i++) {
263
+      for($i=-24; $i<25; $i++) {
263 264
           $seconds = $i*60*60;
264 265
           $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ;
265 266
       ?>
@@ -296,7 +297,9 @@  discard block
 block discarded – undo
296 297
         <?php
297 298
             // invoke OnSiteSettingsRender event
298 299
             $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
299
-            if(is_array($evtOut)) echo implode("",$evtOut);
300
+            if(is_array($evtOut)) {
301
+                echo implode("",$evtOut);
302
+            }
300 303
         ?>
301 304
     </td>
302 305
   </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/functions.inc.php 4 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,12 +68,12 @@
 block discarded – undo
68 68
     $var = ${$name};
69 69
     $checked  = ($var==$value) ? ' checked="checked"' : '';
70 70
     if($disabled) $disabled = ' disabled'; else $disabled = '';
71
-  if($add)     $add = ' ' . $add;
72
-  return sprintf('<input onchange="documentDirty=true;" type="radio" name="%s" value="%s" %s %s %s />', $name, $value, $checked, $disabled, $add);
71
+    if($add)     $add = ' ' . $add;
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 75
 function wrap_label($str='',$object) {
76
-  return "<label>{$object}\n{$str}</label>";
76
+    return "<label>{$object}\n{$str}</label>";
77 77
 }
78 78
 
79 79
 function parseText($tpl='', $ph=array()) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -18,6 +18,7 @@
 block discarded – undo
18 18
 /**
19 19
  * get_langs_by_key
20 20
  *
21
+ * @param string $key
21 22
  * @return array of languages that define the key in their file
22 23
  */
23 24
 function get_langs_by_key($key) {
Please login to merge, or discard this 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
         $out = isset($_lang) ? array_keys($_lang) : array();
12 12
     } else {
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @return array of languages that define the key in their file
22 22
  */
23
-function get_langs_by_key($key) {
23
+function get_langs_by_key($key){
24 24
     global $lang_keys;
25 25
     $lang_return = array();
26
-    foreach($lang_keys as $lang=>$keys) {
27
-        if(in_array($key, $keys)) {
26
+    foreach ($lang_keys as $lang=>$keys) {
27
+        if (in_array($key, $keys)) {
28 28
             $lang_return[] = $lang;
29 29
         }
30 30
     }
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
  * @param string $selected_lang specify language to select in option list, default none
41 41
  * @return string html option list
42 42
  */
43
-function get_lang_options($key = '', $selected_lang=null) {
43
+function get_lang_options($key = '', $selected_lang = null){
44 44
     global $lang_keys, $_lang;
45 45
     $lang_options = '';
46
-    if( ! empty($key)) {
46
+    if (!empty($key)) {
47 47
         $languages = get_langs_by_key($key);
48 48
         sort($languages);
49 49
         $lang_options .= '<option value="">'.$_lang['language_title'].'</option>';
50 50
 
51
-        foreach($languages as $language_name) {
51
+        foreach ($languages as $language_name) {
52 52
             $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
53 53
             $lang_options .= '<option value="'.$language_name.'">'.$uclanguage_name.'</option>';
54 54
         }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     } else {
57 57
         $languages = array_keys($lang_keys);
58 58
         sort($languages);
59
-        foreach($languages as $language_name) {
59
+        foreach ($languages as $language_name) {
60 60
             $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
61 61
             $sel = $language_name == $selected_lang ? ' selected="selected"' : '';
62 62
             $lang_options .= '<option value="'.$language_name.'" '.$sel.'>'.$uclanguage_name.'</option>';
@@ -65,23 +65,23 @@  discard block
 block discarded – undo
65 65
     }
66 66
 }
67 67
 
68
-function form_radio($name,$value,$add='',$disabled=false) {
68
+function form_radio($name, $value, $add = '', $disabled = false){
69 69
     global ${$name};
70 70
     $var = ${$name};
71
-    $checked  = ($var==$value) ? ' checked="checked"' : '';
72
-    if($disabled) $disabled = ' disabled'; else $disabled = '';
73
-  if($add)     $add = ' ' . $add;
71
+    $checked = ($var == $value) ? ' checked="checked"' : '';
72
+    if ($disabled) $disabled = ' disabled'; else $disabled = '';
73
+  if ($add)     $add = ' '.$add;
74 74
   return sprintf('<input onchange="documentDirty=true;" type="radio" name="%s" value="%s" %s %s %s />', $name, $value, $checked, $disabled, $add);
75 75
 }
76 76
 
77
-function wrap_label($str='',$object) {
77
+function wrap_label($str = '', $object){
78 78
   return "<label>{$object}\n{$str}</label>";
79 79
 }
80 80
 
81
-function parseText($tpl='', $ph=array()) {
82
-    if(empty($ph) || empty($tpl)) return $tpl;
81
+function parseText($tpl = '', $ph = array()){
82
+    if (empty($ph) || empty($tpl)) return $tpl;
83 83
 
84
-    foreach($ph as $k=>$v)
84
+    foreach ($ph as $k=>$v)
85 85
     {
86 86
         $k = "[+{$k}+]";
87 87
         $tpl = str_replace($k, $v, $tpl);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     return $tpl;
90 90
 }
91 91
 
92
-function showHide($cond=true) {
92
+function showHide($cond = true){
93 93
     global $displayStyle;
94 94
     $showHide = $cond ? $displayStyle : 'none';
95 95
     return sprintf('style="display:%s"', $showHide);
Please login to merge, or discard this patch.
Braces   +34 added lines, -20 removed lines patch added patch discarded remove patch
@@ -4,12 +4,13 @@  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) {
7
+function get_lang_keys($filename)
8
+{
8 9
     $file = MODX_MANAGER_PATH.'includes/lang' . DIRECTORY_SEPARATOR . $filename;
9
-    if(is_file($file) && is_readable($file)) {
10
+    if(is_file($file) && is_readable($file)) {
10 11
         include($file);
11 12
         $out = isset($_lang) ? array_keys($_lang) : array();
12
-    } else {
13
+    } else {
13 14
         $out = array();
14 15
     }
15 16
 
@@ -20,11 +21,12 @@  discard block
 block discarded – undo
20 21
  *
21 22
  * @return array of languages that define the key in their file
22 23
  */
23
-function get_langs_by_key($key) {
24
+function get_langs_by_key($key)
25
+{
24 26
     global $lang_keys;
25 27
     $lang_return = array();
26
-    foreach($lang_keys as $lang=>$keys) {
27
-        if(in_array($key, $keys)) {
28
+    foreach($lang_keys as $lang=>$keys) {
29
+        if(in_array($key, $keys)) {
28 30
             $lang_return[] = $lang;
29 31
         }
30 32
     }
@@ -40,23 +42,24 @@  discard block
 block discarded – undo
40 42
  * @param string $selected_lang specify language to select in option list, default none
41 43
  * @return string html option list
42 44
  */
43
-function get_lang_options($key = '', $selected_lang=null) {
45
+function get_lang_options($key = '', $selected_lang=null)
46
+{
44 47
     global $lang_keys, $_lang;
45 48
     $lang_options = '';
46
-    if( ! empty($key)) {
49
+    if( ! empty($key)) {
47 50
         $languages = get_langs_by_key($key);
48 51
         sort($languages);
49 52
         $lang_options .= '<option value="">'.$_lang['language_title'].'</option>';
50 53
 
51
-        foreach($languages as $language_name) {
54
+        foreach($languages as $language_name) {
52 55
             $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
53 56
             $lang_options .= '<option value="'.$language_name.'">'.$uclanguage_name.'</option>';
54 57
         }
55 58
         return $lang_options;
56
-    } else {
59
+    } else {
57 60
         $languages = array_keys($lang_keys);
58 61
         sort($languages);
59
-        foreach($languages as $language_name) {
62
+        foreach($languages as $language_name) {
60 63
             $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
61 64
             $sel = $language_name == $selected_lang ? ' selected="selected"' : '';
62 65
             $lang_options .= '<option value="'.$language_name.'" '.$sel.'>'.$uclanguage_name.'</option>';
@@ -65,31 +68,42 @@  discard block
 block discarded – undo
65 68
     }
66 69
 }
67 70
 
68
-function form_radio($name,$value,$add='',$disabled=false) {
71
+function form_radio($name,$value,$add='',$disabled=false)
72
+{
69 73
     global ${$name};
70 74
     $var = ${$name};
71 75
     $checked  = ($var==$value) ? ' checked="checked"' : '';
72
-    if($disabled) $disabled = ' disabled'; else $disabled = '';
73
-  if($add)     $add = ' ' . $add;
76
+    if($disabled) {
77
+        $disabled = ' disabled';
78
+    } else {
79
+        $disabled = '';
80
+    }
81
+  if($add) {
82
+      $add = ' ' . $add;
83
+  }
74 84
   return sprintf('<input onchange="documentDirty=true;" type="radio" name="%s" value="%s" %s %s %s />', $name, $value, $checked, $disabled, $add);
75 85
 }
76 86
 
77
-function wrap_label($str='',$object) {
87
+function wrap_label($str='',$object)
88
+{
78 89
   return "<label>{$object}\n{$str}</label>";
79 90
 }
80 91
 
81
-function parseText($tpl='', $ph=array()) {
82
-    if(empty($ph) || empty($tpl)) return $tpl;
92
+function parseText($tpl='', $ph=array())
93
+{
94
+    if(empty($ph) || empty($tpl)) {
95
+        return $tpl;
96
+    }
83 97
 
84
-    foreach($ph as $k=>$v)
85
-    {
98
+    foreach($ph as $k=>$v) {
86 99
         $k = "[+{$k}+]";
87 100
         $tpl = str_replace($k, $v, $tpl);
88 101
     }
89 102
     return $tpl;
90 103
 }
91 104
 
92
-function showHide($cond=true) {
105
+function showHide($cond=true)
106
+{
93 107
     global $displayStyle;
94 108
     $showHide = $cond ? $displayStyle : 'none';
95 109
     return sprintf('style="display:%s"', $showHide);
Please login to merge, or discard this patch.
manager/actions/mutate_settings/snippet_smtp.inc.php 2 patches
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.
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,14 @@
 block discarded – undo
15 15
     <td >
16 16
      <select name="smtp_secure" size="1" class="inputBox">
17 17
   <option value="none" ><?php echo $_lang['no'] ?></option>
18
-   <option value="ssl" <?php if($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option>
19
-  <option value="tls" <?php if($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option>
18
+   <option value="ssl" <?php if($smtp_secure == 'ssl') {
19
+    echo "selected='selected'";
20
+}
21
+?> >SSL</option>
22
+  <option value="tls" <?php if($smtp_secure == 'tls') {
23
+    echo "selected='selected'";
24
+}
25
+?> >TLS</option>
20 26
  </select>
21 27
  <br />
22 28
   </td>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab2_furl_settings.inc.php 2 patches
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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,9 @@
 block discarded – undo
159 159
     <?php
160 160
         // invoke OnFriendlyURLSettingsRender event
161 161
         $evtOut = $modx->invokeEvent('OnFriendlyURLSettingsRender');
162
-        if(is_array($evtOut)) echo implode("",$evtOut);
162
+        if(is_array($evtOut)) {
163
+            echo implode("",$evtOut);
164
+        }
163 165
     ?>
164 166
 </td>
165 167
 </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_htmlsnippet.dynamic.php 2 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch ($modx->manager->action) {
7
-    case 78:
8
-        if (!$modx->hasPermission('edit_chunk')) {
9
-            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-        }
11
-        break;
12
-    case 77:
13
-        if (!$modx->hasPermission('new_chunk')) {
7
+        case 78:
8
+            if (!$modx->hasPermission('edit_chunk')) {
9
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+            }
11
+            break;
12
+        case 77:
13
+            if (!$modx->hasPermission('new_chunk')) {
14
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+            }
16
+            break;
17
+        default:
14 18
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-        }
16
-        break;
17
-    default:
18
-        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -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/mutate_snippet.dynamic.php 2 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch ($modx->manager->action) {
7
-    case 22:
8
-        if (!$modx->hasPermission('edit_snippet')) {
9
-            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-        }
11
-        break;
12
-    case 23:
13
-        if (!$modx->hasPermission('new_snippet')) {
7
+        case 22:
8
+            if (!$modx->hasPermission('edit_snippet')) {
9
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+            }
11
+            break;
12
+        case 23:
13
+            if (!$modx->hasPermission('new_snippet')) {
14
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+            }
16
+            break;
17
+        default:
14 18
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-        }
16
-        break;
17
-    default:
18
-        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     $rs = $modx->db->select('*', $tbl_site_snippets, "id='{$id}'");
40 40
     $content = $modx->db->getRow($rs);
41 41
     if (!$content) {
42
-        header("Location: " . MODX_SITE_URL . "index.php?id=" . $site_start);
42
+        header("Location: ".MODX_SITE_URL."index.php?id=".$site_start);
43 43
     }
44 44
     $_SESSION['itemname'] = $content['name'];
45 45
     if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 // Add lock-element JS-Script
63 63
 $lockElementId = $id;
64 64
 $lockElementType = 4;
65
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
65
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
66 66
 ?>
67 67
 <script type="text/javascript">
68 68
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
     <input type="hidden" name="mode" value="<?= $modx->manager->action ?>">
432 432
 
433 433
     <h1 class="pagetitle">
434
-        <i class="fa fa-code"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_snippet']) ?><i class="fa fa-question-circle help"></i>
434
+        <i class="fa fa-code"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_snippet']) ?><i class="fa fa-question-circle help"></i>
435 435
     </h1>
436 436
 
437 437
     <?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
                             <div class="form-control-name clearfix">
458 458
                                 <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
459 459
                                 <?php if ($modx->hasPermission('save_role')): ?>
460
-                                    <label class="custom-control" title="<?= $_lang['lock_snippet'] . "\n" . $_lang['lock_snippet_msg'] ?>" tooltip>
460
+                                    <label class="custom-control" title="<?= $_lang['lock_snippet']."\n".$_lang['lock_snippet_msg'] ?>" tooltip>
461 461
                                         <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> />
462 462
                                         <i class="fa fa-lock"></i>
463 463
                                     </label>
@@ -481,9 +481,9 @@  discard block
 block discarded – undo
481 481
                             <select name="categoryid" class="form-control" onchange="documentDirty=true;">
482 482
                                 <option>&nbsp;</option>
483 483
                                 <?php
484
-                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
484
+                                include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
485 485
                                 foreach (getCategories() as $n => $v) {
486
-                                    echo '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . '</option>';
486
+                                    echo '<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category']).'</option>';
487 487
                                 }
488 488
                                 ?>
489 489
                             </select>
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                     <div class="form-group">
501 501
                         <?php if ($_SESSION['mgrRole'] == 1): ?>
502 502
                             <div class="form-row">
503
-                                <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>
503
+                                <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>
504 504
                             </div>
505 505
                         <?php endif; ?>
506 506
                         <div class="form-row">
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                 <span><?= $_lang['snippet_code'] ?></span>
518 518
             </div>
519 519
             <div class="section-editor clearfix">
520
-                <textarea dir="ltr" name="post" class="phptextarea" rows="20" wrap="soft" onchange="documentDirty=true;"><?= (isset($content['post']) ? trim($modx->htmlspecialchars($content['post'])) : "<?php" . "\n" . trim($modx->htmlspecialchars($content['snippet'])) . "\n") ?></textarea>
520
+                <textarea dir="ltr" name="post" class="phptextarea" rows="20" wrap="soft" onchange="documentDirty=true;"><?= (isset($content['post']) ? trim($modx->htmlspecialchars($content['post'])) : "<?php"."\n".trim($modx->htmlspecialchars($content['snippet']))."\n") ?></textarea>
521 521
             </div>
522 522
             <!-- PHP text editor end -->
523 523
         </div>
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 								INNER JOIN {$tbl_site_module_depobj} AS smd ON smd.module=sm.id AND smd.type=40 
553 553
 								INNER JOIN {$tbl_site_snippets} AS ss ON ss.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams=1", 'sm.name');
554 554
                                 while ($row = $modx->db->getRow($ds)) {
555
-                                    echo "<option value='" . $row['guid'] . "'" . ($content['moduleguid'] == $row['guid'] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row['name']) . "</option>";
555
+                                    echo "<option value='".$row['guid']."'".($content['moduleguid'] == $row['guid'] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row['name'])."</option>";
556 556
                                 }
557 557
                                 ?>
558 558
                             </select>
Please login to merge, or discard this patch.