@@ -1,5 +1,5 @@ discard block |
||
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 |
||
135 | 135 | <?php |
136 | 136 | // Check if PHX is enabled |
137 | 137 | $count = $modx->getDatabase()->getRecordCount( |
138 | - $modx->getDatabase()->select('id', '[+prefix+]site_plugins', |
|
139 | - "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
|
138 | + $modx->getDatabase()->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 |
||
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> |
@@ -13,8 +13,8 @@ discard block |
||
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 |
||
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 |
||
78 | 78 | 'c.category, t.templatename ASC' |
79 | 79 | ); |
80 | 80 | ?> |
81 | - <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template;?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px"> |
|
81 | + <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template; ?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px"> |
|
82 | 82 | <?php |
83 | 83 | |
84 | 84 | $currentCategory = ''; |
85 | 85 | while ($row = $modx->getDatabase()->getRow($rs)) { |
86 | 86 | $thisCategory = $row['category']; |
87 | - if($thisCategory == null) { |
|
87 | + if ($thisCategory == null) { |
|
88 | 88 | $thisCategory = $_lang['no_category']; |
89 | 89 | } |
90 | - if($thisCategory != $currentCategory) { |
|
91 | - if($closeOptGroup) { |
|
90 | + if ($thisCategory != $currentCategory) { |
|
91 | + if ($closeOptGroup) { |
|
92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
93 | 93 | } |
94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
@@ -106,7 +106,7 @@ discard block |
||
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 |
||
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 |
||
138 | 138 | $modx->getDatabase()->select('id', '[+prefix+]site_plugins', |
139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
140 | 140 | ); |
141 | - if($count) { |
|
141 | + if ($count) { |
|
142 | 142 | $disabledFilters = 1; |
143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
144 | 144 | } |
145 | 145 | else $disabledFilters = false; |
146 | 146 | ?> |
147 | - <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br /> |
|
148 | - <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?> |
|
147 | + <?php echo wrap_label($_lang['yes'], form_radio('enable_filter', 1, '', $disabledFilters)); ?><br /> |
|
148 | + <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters)); ?> |
|
149 | 149 | <div class="comment"><?php echo $_lang['enable_filter_message']; ?></div> |
150 | 150 | </td> |
151 | 151 | </tr> |
152 | 152 | <tr> |
153 | 153 | <th><?php echo $_lang['enable_at_syntax_title'] ?><br><small>[(enable_at_syntax)]</small></th> |
154 | 154 | <td > |
155 | - <?php echo wrap_label($_lang['yes'],form_radio('enable_at_syntax', 1));?><br /> |
|
156 | - <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0));?> |
|
155 | + <?php echo wrap_label($_lang['yes'], form_radio('enable_at_syntax', 1)); ?><br /> |
|
156 | + <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0)); ?> |
|
157 | 157 | <div class="comment"> |
158 | 158 | <?php echo $_lang['enable_at_syntax_message']; ?> |
159 | 159 | <ul> |
@@ -167,8 +167,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
259 | 259 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
260 | 260 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
261 | 261 | <?php |
262 | - for($i=-24; $i<25; $i++) { |
|
263 | - $seconds = $i*60*60; |
|
264 | - $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
|
262 | + for ($i = -24; $i < 25; $i++) { |
|
263 | + $seconds = $i * 60 * 60; |
|
264 | + $selectedtext = $seconds == $server_offset_time ? "selected='selected'" : ""; |
|
265 | 265 | ?> |
266 | 266 | <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option> |
267 | 267 | <?php |
268 | 268 | } |
269 | 269 | ?> |
270 | 270 | </select> |
271 | - <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></div> |
|
271 | + <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time() + $server_offset_time)); ?></div> |
|
272 | 272 | </td> |
273 | 273 | </tr> |
274 | 274 | <tr> |
275 | 275 | <th><?php echo $_lang['server_protocol_title'] ?><br><small>[(server_protocol)]</small></th> |
276 | 276 | <td> |
277 | - <?php echo wrap_label($_lang['server_protocol_http'],form_radio('server_protocol', 'http'));?><br /> |
|
278 | - <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https'));?> |
|
277 | + <?php echo wrap_label($_lang['server_protocol_http'], form_radio('server_protocol', 'http')); ?><br /> |
|
278 | + <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https')); ?> |
|
279 | 279 | <div class="comment"><?php echo $_lang['server_protocol_message'] ?></div> |
280 | 280 | </td> |
281 | 281 | </tr> |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | <tr> |
289 | 289 | <th><?php echo $_lang['track_visitors_title'] ?><br><small>[(track_visitors)]</small></th> |
290 | 290 | <td> |
291 | - <?php echo wrap_label($_lang['yes'],form_radio('track_visitors', 1));?><br /> |
|
292 | - <?php echo wrap_label($_lang['no'],form_radio('track_visitors', 0));?> |
|
291 | + <?php echo wrap_label($_lang['yes'], form_radio('track_visitors', 1)); ?><br /> |
|
292 | + <?php echo wrap_label($_lang['no'], form_radio('track_visitors', 0)); ?> |
|
293 | 293 | <div class="comment"><?php echo $_lang['track_visitors_message'] ?></div> |
294 | 294 | </td> |
295 | 295 | </tr> |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | <?php |
302 | 302 | // invoke OnSiteSettingsRender event |
303 | 303 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender'); |
304 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
304 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
305 | 305 | ?> |
306 | 306 | </td> |
307 | 307 | </tr> |
@@ -82,23 +82,23 @@ discard block |
||
82 | 82 | <?php |
83 | 83 | |
84 | 84 | $currentCategory = ''; |
85 | - while ($row = $modx->getDatabase()->getRow($rs)) { |
|
85 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
86 | 86 | $thisCategory = $row['category']; |
87 | - if($thisCategory == null) { |
|
87 | + if($thisCategory == null) { |
|
88 | 88 | $thisCategory = $_lang['no_category']; |
89 | 89 | } |
90 | - if($thisCategory != $currentCategory) { |
|
91 | - if($closeOptGroup) { |
|
90 | + if($thisCategory != $currentCategory) { |
|
91 | + if($closeOptGroup) { |
|
92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
93 | 93 | } |
94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
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 |
||
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 |
||
138 | 138 | $modx->getDatabase()->select('id', '[+prefix+]site_plugins', |
139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
140 | 140 | ); |
141 | - if($count) { |
|
141 | + if($count) { |
|
142 | 142 | $disabledFilters = 1; |
143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
144 | - } |
|
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 |
||
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 |
||
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 | ?> |
@@ -301,7 +302,9 @@ discard block |
||
301 | 302 | <?php |
302 | 303 | // invoke OnSiteSettingsRender event |
303 | 304 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender'); |
304 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
305 | + if(is_array($evtOut)) { |
|
306 | + echo implode("",$evtOut); |
|
307 | + } |
|
305 | 308 | ?> |
306 | 309 | </td> |
307 | 310 | </tr> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('view_eventlog')) { |
|
5 | +if(!$modx->hasPermission('view_eventlog')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $modx->getManagerApi()->initPageViewState(); |
16 | 16 | |
17 | 17 | // get and save search string |
18 | -if($_REQUEST['op'] == 'reset') { |
|
18 | +if($_REQUEST['op'] == 'reset') { |
|
19 | 19 | $sqlQuery = $query = ''; |
20 | 20 | $_PAGE['vs']['search'] = ''; |
21 | -} else { |
|
21 | +} else { |
|
22 | 22 | $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
23 | - if(!is_numeric($sqlQuery)) { |
|
23 | + if(!is_numeric($sqlQuery)) { |
|
24 | 24 | $sqlQuery = $modx->getDatabase()->escape($query); |
25 | 25 | } |
26 | 26 | $_PAGE['vs']['search'] = $query; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | $grd->colWidths = "1%,,1%,1%,1%"; |
144 | 144 | $grd->colAligns = "center,,,center,center"; |
145 | 145 | $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
146 | - if($listmode == '1') { |
|
146 | + if($listmode == '1') { |
|
147 | 147 | $grd->pageSize = 0; |
148 | 148 | } |
149 | - if($_REQUEST['op'] == 'reset') { |
|
149 | + if($_REQUEST['op'] == 'reset') { |
|
150 | 150 | $grd->pageNumber = 1; |
151 | 151 | } |
152 | 152 | // render grid |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('view_eventlog')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | // Get table Names (alphabetical) |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | |
17 | 17 | // get and save search string |
18 | 18 | if($_REQUEST['op'] == 'reset') { |
19 | - $sqlQuery = $query = ''; |
|
20 | - $_PAGE['vs']['search'] = ''; |
|
19 | + $sqlQuery = $query = ''; |
|
20 | + $_PAGE['vs']['search'] = ''; |
|
21 | 21 | } else { |
22 | - $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
|
23 | - if(!is_numeric($sqlQuery)) { |
|
24 | - $sqlQuery = $modx->getDatabase()->escape($query); |
|
25 | - } |
|
26 | - $_PAGE['vs']['search'] = $query; |
|
22 | + $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
|
23 | + if(!is_numeric($sqlQuery)) { |
|
24 | + $sqlQuery = $modx->getDatabase()->escape($query); |
|
25 | + } |
|
26 | + $_PAGE['vs']['search'] = $query; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | // get & save listmode |
@@ -124,32 +124,32 @@ discard block |
||
124 | 124 | <div class="row"> |
125 | 125 | <div class="table-responsive"> |
126 | 126 | <?php |
127 | - $ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el |
|
127 | + $ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el |
|
128 | 128 | LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0 |
129 | 129 | LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
130 | - $grd = new \EvolutionCMS\Support\DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
|
131 | - $grd->pagerClass = ''; |
|
132 | - $grd->pageClass = 'page-item'; |
|
133 | - $grd->selPageClass = 'page-item active'; |
|
134 | - $grd->noRecordMsg = $_lang['no_records_found']; |
|
135 | - $grd->cssClass = "table data nowrap"; |
|
136 | - $grd->columnHeaderClass = "tableHeader"; |
|
137 | - $grd->itemClass = "tableItem"; |
|
138 | - $grd->altItemClass = "tableAltItem"; |
|
139 | - $grd->fields = "type,source,createdon,eventid,username"; |
|
140 | - $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
141 | - $grd->colWidths = "1%,,1%,1%,1%"; |
|
142 | - $grd->colAligns = "center,,,center,center"; |
|
143 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
144 | - if($listmode == '1') { |
|
145 | - $grd->pageSize = 0; |
|
146 | - } |
|
147 | - if($_REQUEST['op'] == 'reset') { |
|
148 | - $grd->pageNumber = 1; |
|
149 | - } |
|
150 | - // render grid |
|
151 | - echo $grd->render(); |
|
152 | - ?> |
|
130 | + $grd = new \EvolutionCMS\Support\DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
|
131 | + $grd->pagerClass = ''; |
|
132 | + $grd->pageClass = 'page-item'; |
|
133 | + $grd->selPageClass = 'page-item active'; |
|
134 | + $grd->noRecordMsg = $_lang['no_records_found']; |
|
135 | + $grd->cssClass = "table data nowrap"; |
|
136 | + $grd->columnHeaderClass = "tableHeader"; |
|
137 | + $grd->itemClass = "tableItem"; |
|
138 | + $grd->altItemClass = "tableAltItem"; |
|
139 | + $grd->fields = "type,source,createdon,eventid,username"; |
|
140 | + $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
141 | + $grd->colWidths = "1%,,1%,1%,1%"; |
|
142 | + $grd->colAligns = "center,,,center,center"; |
|
143 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
144 | + if($listmode == '1') { |
|
145 | + $grd->pageSize = 0; |
|
146 | + } |
|
147 | + if($_REQUEST['op'] == 'reset') { |
|
148 | + $grd->pageNumber = 1; |
|
149 | + } |
|
150 | + // render grid |
|
151 | + echo $grd->render(); |
|
152 | + ?> |
|
153 | 153 | </div> |
154 | 154 | </div> |
155 | 155 | </div> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('view_eventlog')) { |
|
5 | +if (!$modx->hasPermission('view_eventlog')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $modx->getManagerApi()->initPageViewState(); |
16 | 16 | |
17 | 17 | // get and save search string |
18 | -if($_REQUEST['op'] == 'reset') { |
|
18 | +if ($_REQUEST['op'] == 'reset') { |
|
19 | 19 | $sqlQuery = $query = ''; |
20 | 20 | $_PAGE['vs']['search'] = ''; |
21 | 21 | } else { |
22 | 22 | $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
23 | - if(!is_numeric($sqlQuery)) { |
|
23 | + if (!is_numeric($sqlQuery)) { |
|
24 | 24 | $sqlQuery = $modx->getDatabase()->escape($query); |
25 | 25 | } |
26 | 26 | $_PAGE['vs']['search'] = $query; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | <?php |
127 | 127 | $ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el |
128 | 128 | LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0 |
129 | - LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
|
129 | + LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
|
130 | 130 | $grd = new \EvolutionCMS\Support\DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
131 | 131 | $grd->pagerClass = ''; |
132 | 132 | $grd->pageClass = 'page-item'; |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | $grd->itemClass = "tableItem"; |
138 | 138 | $grd->altItemClass = "tableAltItem"; |
139 | 139 | $grd->fields = "type,source,createdon,eventid,username"; |
140 | - $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
140 | + $grd->columns = $_lang['type']." ,".$_lang['source']." ,".$_lang['date']." ,".$_lang['event_id']." ,".$_lang['sysinfo_userid']; |
|
141 | 141 | $grd->colWidths = "1%,,1%,1%,1%"; |
142 | 142 | $grd->colAligns = "center,,,center,center"; |
143 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
144 | - if($listmode == '1') { |
|
143 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang['click_to_context']."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".$_lang['click_to_view_details']."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p'; |
|
144 | + if ($listmode == '1') { |
|
145 | 145 | $grd->pageSize = 0; |
146 | 146 | } |
147 | - if($_REQUEST['op'] == 'reset') { |
|
147 | + if ($_REQUEST['op'] == 'reset') { |
|
148 | 148 | $grd->pageNumber = 1; |
149 | 149 | } |
150 | 150 | // render grid |
@@ -4,18 +4,18 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | switch ($modx->getManagerApi()->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']) ? (int)$_REQUEST['id'] : 0; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | // Get table names (alphabetical) |
24 | 24 | $tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets'); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $content['name'] = $_REQUEST['itemname']; |
48 | 48 | } else { |
49 | 49 | $_SESSION['itemname'] = $_lang["new_htmlsnippet"]; |
50 | - $content['category'] = (int)$_REQUEST['catid']; |
|
50 | + $content['category'] = (int) $_REQUEST['catid']; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if ($modx->getManagerApi()->hasFormValues()) { |
@@ -65,7 +65,7 @@ discard block |
||
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 |
||
136 | 136 | <input type="hidden" name="mode" value="<?= $modx->getManagerApi()->action ?>" /> |
137 | 137 | |
138 | 138 | <h1> |
139 | - <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i> |
|
139 | + <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i> |
|
140 | 140 | </h1> |
141 | 141 | |
142 | 142 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <div class="form-control-name clearfix"> |
161 | 161 | <input name="name" type="text" maxlength="100" value="<?= $modx->getPhpCompat()->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
162 | 162 | <?php if ($modx->hasPermission('save_role')): ?> |
163 | - <label class="custom-control" title="<?= $_lang['lock_htmlsnippet'] . "\n" . $_lang['lock_htmlsnippet_msg'] ?>" tooltip> |
|
163 | + <label class="custom-control" title="<?= $_lang['lock_htmlsnippet']."\n".$_lang['lock_htmlsnippet_msg'] ?>" tooltip> |
|
164 | 164 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 || $content['locked'] == 'on' ? ' checked="checked"' : '') ?> /> |
165 | 165 | <i class="fa fa-lock"></i> |
166 | 166 | </label> |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
185 | 185 | <option> </option> |
186 | 186 | <?php |
187 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
187 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
188 | 188 | foreach (getCategories() as $n => $v) { |
189 | - echo "\t\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '') . '>' . $modx->getPhpCompat()->htmlspecialchars($v['category']) . "</option>\n"; |
|
189 | + echo "\t\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '').'>'.$modx->getPhpCompat()->htmlspecialchars($v['category'])."</option>\n"; |
|
190 | 190 | } |
191 | 191 | ?> |
192 | 192 | </select> |
@@ -200,7 +200,7 @@ discard block |
||
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 |
||
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 | ?> |
@@ -3,7 +3,7 @@ |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('settings')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $modx->getDatabase()->truncate($modx->getFullTableName('manager_log')); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('settings')) { |
|
5 | +if (!$modx->hasPermission('settings')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | 9 | $modx->getDatabase()->truncate($modx->getFullTableName('manager_log')); |
10 | 10 | |
11 | -$header="Location: index.php?a=13"; |
|
11 | +$header = "Location: index.php?a=13"; |
|
12 | 12 | header($header); |
@@ -3,51 +3,51 @@ discard block |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('exec_module')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
10 | 10 | if($id==0) { |
11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | 15 | if($_SESSION['mgrRole']!=1){ |
16 | - $rs = $modx->getDatabase()->select( |
|
17 | - 'sma.usergroup,mg.member', |
|
18 | - $modx->getFullTableName("site_module_access")." sma |
|
16 | + $rs = $modx->getDatabase()->select( |
|
17 | + 'sma.usergroup,mg.member', |
|
18 | + $modx->getFullTableName("site_module_access")." sma |
|
19 | 19 | LEFT JOIN ".$modx->getFullTableName("member_groups")." mg ON mg.user_group = sma.usergroup AND member='".$modx->getLoginUserID()."'", |
20 | - "sma.module = '{$id}'" |
|
21 | - ); |
|
22 | - //initialize permission to -1, if it stays -1 no permissions |
|
23 | - //attached so permission granted |
|
24 | - $permissionAccessInt = -1; |
|
20 | + "sma.module = '{$id}'" |
|
21 | + ); |
|
22 | + //initialize permission to -1, if it stays -1 no permissions |
|
23 | + //attached so permission granted |
|
24 | + $permissionAccessInt = -1; |
|
25 | 25 | |
26 | - while ($row = $modx->getDatabase()->getRow($rs)) { |
|
27 | - if($row["usergroup"] && $row["member"]) { |
|
28 | - //if there are permissions and this member has permission, ofcourse |
|
29 | - //this is granted |
|
30 | - $permissionAccessInt = 1; |
|
31 | - } elseif ($permissionAccessInt==-1) { |
|
32 | - //if there are permissions but this member has no permission and the |
|
33 | - //variable was still in init state we set permission to 0; no permissions |
|
34 | - $permissionAccessInt = 0; |
|
35 | - } |
|
36 | - } |
|
26 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
27 | + if($row["usergroup"] && $row["member"]) { |
|
28 | + //if there are permissions and this member has permission, ofcourse |
|
29 | + //this is granted |
|
30 | + $permissionAccessInt = 1; |
|
31 | + } elseif ($permissionAccessInt==-1) { |
|
32 | + //if there are permissions but this member has no permission and the |
|
33 | + //variable was still in init state we set permission to 0; no permissions |
|
34 | + $permissionAccessInt = 0; |
|
35 | + } |
|
36 | + } |
|
37 | 37 | |
38 | - if($permissionAccessInt==0) { |
|
39 | - $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106"); |
|
40 | - } |
|
38 | + if($permissionAccessInt==0) { |
|
39 | + $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106"); |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // get module data |
44 | 44 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'"); |
45 | 45 | $content = $modx->getDatabase()->getRow($rs); |
46 | 46 | if(!$content) { |
47 | - $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106"); |
|
47 | + $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106"); |
|
48 | 48 | } |
49 | 49 | if($content['disabled']) { |
50 | - $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106"); |
|
50 | + $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106"); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | // Set the item name for logger |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $output = evalModule($content["modulecode"],$parameter); |
64 | 64 | if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) { |
65 | - echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller |
|
65 | + echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller |
|
66 | 66 | } |
67 | 67 | echo $output; |
68 | 68 | include MODX_MANAGER_PATH."includes/sysalert.display.inc.php"; |
@@ -1,18 +1,18 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('exec_module')) { |
|
5 | +if (!$modx->hasPermission('exec_module')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
10 | -if($id==0) { |
|
9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | -if($_SESSION['mgrRole']!=1){ |
|
15 | +if ($_SESSION['mgrRole'] != 1) { |
|
16 | 16 | $rs = $modx->getDatabase()->select( |
17 | 17 | 'sma.usergroup,mg.member', |
18 | 18 | $modx->getFullTableName("site_module_access")." sma |
@@ -24,18 +24,18 @@ discard block |
||
24 | 24 | $permissionAccessInt = -1; |
25 | 25 | |
26 | 26 | while ($row = $modx->getDatabase()->getRow($rs)) { |
27 | - if($row["usergroup"] && $row["member"]) { |
|
27 | + if ($row["usergroup"] && $row["member"]) { |
|
28 | 28 | //if there are permissions and this member has permission, ofcourse |
29 | 29 | //this is granted |
30 | 30 | $permissionAccessInt = 1; |
31 | - } elseif ($permissionAccessInt==-1) { |
|
31 | + } elseif ($permissionAccessInt == -1) { |
|
32 | 32 | //if there are permissions but this member has no permission and the |
33 | 33 | //variable was still in init state we set permission to 0; no permissions |
34 | 34 | $permissionAccessInt = 0; |
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | - if($permissionAccessInt==0) { |
|
38 | + if ($permissionAccessInt == 0) { |
|
39 | 39 | $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106"); |
40 | 40 | } |
41 | 41 | } |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | // get module data |
44 | 44 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'"); |
45 | 45 | $content = $modx->getDatabase()->getRow($rs); |
46 | -if(!$content) { |
|
46 | +if (!$content) { |
|
47 | 47 | $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106"); |
48 | 48 | } |
49 | -if($content['disabled']) { |
|
49 | +if ($content['disabled']) { |
|
50 | 50 | $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106"); |
51 | 51 | } |
52 | 52 | |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | $_SESSION['itemname'] = $content['name']; |
61 | 61 | |
62 | 62 | |
63 | -$output = evalModule($content["modulecode"],$parameter); |
|
64 | -if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) { |
|
63 | +$output = evalModule($content["modulecode"], $parameter); |
|
64 | +if (strpos(trim($output), '<') === 0 && strpos(trim($output), '<?xml') !== 0) { |
|
65 | 65 | echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller |
66 | 66 | } |
67 | 67 | echo $output; |
@@ -12,7 +12,7 @@ |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | -if($_SESSION['mgrRole']!=1){ |
|
15 | +if($_SESSION['mgrRole']!=1) { |
|
16 | 16 | $rs = $modx->getDatabase()->select( |
17 | 17 | 'sma.usergroup,mg.member', |
18 | 18 | $modx->getFullTableName("site_module_access")." sma |
@@ -4,23 +4,23 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | if(!isset($_GET['id'])) { |
7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | + if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
8 | 8 | |
9 | - // Remove all locks |
|
10 | - $modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks')); |
|
9 | + // Remove all locks |
|
10 | + $modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks')); |
|
11 | 11 | |
12 | - $header = "Location: index.php?a=2"; |
|
13 | - header($header); |
|
12 | + $header = "Location: index.php?a=2"; |
|
13 | + header($header); |
|
14 | 14 | } else { |
15 | - // Remove single locks via AJAX / window.onbeforeunload |
|
16 | - $type = (int)$_GET['type']; |
|
17 | - $id = (int)$_GET['id']; |
|
18 | - $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button |
|
19 | - if($type && $id) { |
|
20 | - $modx->unlockElement($type, $id, $includeAllUsers); |
|
21 | - echo '1'; |
|
22 | - exit; |
|
23 | - } else { |
|
24 | - echo 'No type or id sent with request.'; |
|
25 | - } |
|
15 | + // Remove single locks via AJAX / window.onbeforeunload |
|
16 | + $type = (int)$_GET['type']; |
|
17 | + $id = (int)$_GET['id']; |
|
18 | + $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button |
|
19 | + if($type && $id) { |
|
20 | + $modx->unlockElement($type, $id, $includeAllUsers); |
|
21 | + echo '1'; |
|
22 | + exit; |
|
23 | + } else { |
|
24 | + echo 'No type or id sent with request.'; |
|
25 | + } |
|
26 | 26 | } |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
6 | -if(!isset($_GET['id'])) { |
|
7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | +if (!isset($_GET['id'])) { |
|
7 | + if (!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
8 | 8 | |
9 | 9 | // Remove all locks |
10 | 10 | $modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks')); |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | header($header); |
14 | 14 | } else { |
15 | 15 | // Remove single locks via AJAX / window.onbeforeunload |
16 | - $type = (int)$_GET['type']; |
|
17 | - $id = (int)$_GET['id']; |
|
16 | + $type = (int) $_GET['type']; |
|
17 | + $id = (int) $_GET['id']; |
|
18 | 18 | $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button |
19 | - if($type && $id) { |
|
19 | + if ($type && $id) { |
|
20 | 20 | $modx->unlockElement($type, $id, $includeAllUsers); |
21 | 21 | echo '1'; |
22 | 22 | exit; |
@@ -4,7 +4,9 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | if(!isset($_GET['id'])) { |
7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | + if(!$modx->hasPermission('remove_locks')) { |
|
8 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | + } |
|
8 | 10 | |
9 | 11 | // Remove all locks |
10 | 12 | $modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks')); |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.'); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('save_plugin')) { |
6 | 6 | $modx->webAlertAndQuit($_lang['error_no_privileges']); |
7 | 7 | } |
8 | 8 | |
9 | -$id = (int)$_POST['id']; |
|
9 | +$id = (int) $_POST['id']; |
|
10 | 10 | $name = $modx->getDatabase()->escape(trim($_POST['name'])); |
11 | 11 | $description = $modx->getDatabase()->escape($_POST['description']); |
12 | 12 | $locked = $_POST['locked'] == 'on' ? '1' : '0'; |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | |
21 | 21 | //Kyle Jaebker - added category support |
22 | 22 | if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) { |
23 | - $categoryid = (int)$_POST['categoryid']; |
|
23 | + $categoryid = (int) $_POST['categoryid']; |
|
24 | 24 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
25 | 25 | $categoryid = 0; |
26 | 26 | } else { |
27 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
27 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
28 | 28 | $categoryid = getCategory($_POST['newcategory']); |
29 | 29 | } |
30 | 30 | |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | $moduleguid = isset($parsed['guid']) ? $parsed['guid'] : $moduleguid; |
41 | 41 | |
42 | 42 | $description = isset($parsed['description']) ? $parsed['description'] : $description; |
43 | - $version = isset($parsed['version']) ? '<b>' . $parsed['version'] . '</b> ' : ''; |
|
43 | + $version = isset($parsed['version']) ? '<b>'.$parsed['version'].'</b> ' : ''; |
|
44 | 44 | if ($version) { |
45 | - $description = $version . trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
45 | + $description = $version.trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
46 | 46 | } |
47 | 47 | if (isset($parsed['modx_category'])) { |
48 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
48 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
49 | 49 | $categoryid = getCategory($parsed['modx_category']); |
50 | 50 | } |
51 | 51 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // finished emptying cache - redirect |
104 | 104 | if ($_POST['stay'] != '') { |
105 | 105 | $a = ($_POST['stay'] == '2') ? "102&id=$newid" : '101'; |
106 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
106 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
107 | 107 | header($header); |
108 | 108 | } else { |
109 | 109 | $header = 'Location: index.php?a=76&r=2'; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // finished emptying cache - redirect |
159 | 159 | if ($_POST['stay'] != '') { |
160 | 160 | $a = ($_POST['stay'] == '2') ? "102&id=$id" : '101'; |
161 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
161 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
162 | 162 | header($header); |
163 | 163 | } else { |
164 | 164 | $modx->unlockElement(5, $id); |
@@ -3,22 +3,22 @@ |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('delete_role')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
10 | 10 | if($id==0) { |
11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | if($id==1){ |
15 | - $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
|
15 | + $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $rs = $modx->getDatabase()->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'"); |
19 | 19 | $count=$modx->getDatabase()->getValue($rs); |
20 | 20 | if($count>0){ |
21 | - $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
|
21 | + $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | // Set the item name for logger |
@@ -1,23 +1,23 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('delete_role')) { |
|
5 | +if (!$modx->hasPermission('delete_role')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
10 | -if($id==0) { |
|
9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | -if($id==1){ |
|
14 | +if ($id == 1) { |
|
15 | 15 | $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
16 | 16 | } |
17 | 17 | |
18 | 18 | $rs = $modx->getDatabase()->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'"); |
19 | -$count=$modx->getDatabase()->getValue($rs); |
|
20 | -if($count>0){ |
|
19 | +$count = $modx->getDatabase()->getValue($rs); |
|
20 | +if ($count > 0) { |
|
21 | 21 | $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
22 | 22 | } |
23 | 23 | |
@@ -28,5 +28,5 @@ discard block |
||
28 | 28 | // delete the attributes |
29 | 29 | $modx->getDatabase()->delete($modx->getFullTableName('user_roles'), "id='{$id}'"); |
30 | 30 | |
31 | -$header="Location: index.php?a=86"; |
|
31 | +$header = "Location: index.php?a=86"; |
|
32 | 32 | header($header); |
@@ -11,13 +11,13 @@ |
||
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | -if($id==1){ |
|
14 | +if($id==1) { |
|
15 | 15 | $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
16 | 16 | } |
17 | 17 | |
18 | 18 | $rs = $modx->getDatabase()->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'"); |
19 | 19 | $count=$modx->getDatabase()->getValue($rs); |
20 | -if($count>0){ |
|
20 | +if($count>0) { |
|
21 | 21 | $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
22 | 22 | } |
23 | 23 |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('save_document')||!$modx->hasPermission('publish_document')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_REQUEST['id'])? (int)$_REQUEST['id'] : 0; |
10 | 10 | if($id==0) { |
11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | /************webber ********/ |
@@ -32,20 +32,20 @@ discard block |
||
32 | 32 | $udperms->role = $_SESSION['mgrRole']; |
33 | 33 | |
34 | 34 | if(!$udperms->checkPermissions()) { |
35 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
35 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // update the document |
39 | 39 | $modx->getDatabase()->update( |
40 | - array( |
|
41 | - 'published' => 1, |
|
42 | - 'pub_date' => 0, |
|
43 | - 'unpub_date' => 0, |
|
44 | - 'editedby' => $modx->getLoginUserID(), |
|
45 | - 'editedon' => time(), |
|
46 | - 'publishedby' => $modx->getLoginUserID(), |
|
47 | - 'publishedon' => time(), |
|
48 | - ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
40 | + array( |
|
41 | + 'published' => 1, |
|
42 | + 'pub_date' => 0, |
|
43 | + 'unpub_date' => 0, |
|
44 | + 'editedby' => $modx->getLoginUserID(), |
|
45 | + 'editedon' => time(), |
|
46 | + 'publishedby' => $modx->getLoginUserID(), |
|
47 | + 'publishedon' => time(), |
|
48 | + ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
49 | 49 | |
50 | 50 | // invoke OnDocPublished event |
51 | 51 | $modx->invokeEvent("OnDocPublished",array("docid"=>$id)); |
@@ -1,25 +1,25 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('save_document')||!$modx->hasPermission('publish_document')) { |
|
5 | +if (!$modx->hasPermission('save_document') || !$modx->hasPermission('publish_document')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_REQUEST['id'])? (int)$_REQUEST['id'] : 0; |
|
10 | -if($id==0) { |
|
9 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | 14 | /************webber ********/ |
15 | -$content=$modx->getDatabase()->getRow($modx->getDatabase()->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'")); |
|
16 | -$pid=($content['parent']==0?$id:$content['parent']); |
|
15 | +$content = $modx->getDatabase()->getRow($modx->getDatabase()->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'")); |
|
16 | +$pid = ($content['parent'] == 0 ? $id : $content['parent']); |
|
17 | 17 | |
18 | 18 | /************** webber *************/ |
19 | -$sd=isset($_REQUEST['dir'])?'&dir='.$_REQUEST['dir']:'&dir=DESC'; |
|
20 | -$sb=isset($_REQUEST['sort'])?'&sort='.$_REQUEST['sort']:'&sort=createdon'; |
|
21 | -$pg=isset($_REQUEST['page'])?'&page='.(int)$_REQUEST['page']:''; |
|
22 | -$add_path=$sd.$sb.$pg; |
|
19 | +$sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC'; |
|
20 | +$sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon'; |
|
21 | +$pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : ''; |
|
22 | +$add_path = $sd.$sb.$pg; |
|
23 | 23 | |
24 | 24 | /***********************************/ |
25 | 25 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $udperms->document = $id; |
32 | 32 | $udperms->role = $_SESSION['mgrRole']; |
33 | 33 | |
34 | -if(!$udperms->checkPermissions()) { |
|
34 | +if (!$udperms->checkPermissions()) { |
|
35 | 35 | $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
36 | 36 | } |
37 | 37 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
49 | 49 | |
50 | 50 | // invoke OnDocPublished event |
51 | -$modx->invokeEvent("OnDocPublished",array("docid"=>$id)); |
|
51 | +$modx->invokeEvent("OnDocPublished", array("docid"=>$id)); |
|
52 | 52 | |
53 | 53 | // Set the item name for logger |
54 | 54 | $_SESSION['itemname'] = $content['pagetitle']; |
@@ -56,6 +56,6 @@ discard block |
||
56 | 56 | // empty cache |
57 | 57 | $modx->clearCache('full'); |
58 | 58 | |
59 | -$header="Location: index.php?a=3&id=$pid&r=1".$add_path; |
|
59 | +$header = "Location: index.php?a=3&id=$pid&r=1".$add_path; |
|
60 | 60 | |
61 | 61 | header($header); |