@@ -243,6 +243,9 @@ discard block |
||
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
246 | +/** |
|
247 | + * @param integer $lvl |
|
248 | + */ |
|
246 | 249 | function debug ($debugmsg, $lvl=E_USER_NOTICE) { |
247 | 250 | trigger_error("MagpieRSS [debug] $debugmsg", $lvl); |
248 | 251 | } |
@@ -289,6 +292,9 @@ discard block |
||
289 | 292 | Input: an HTTP response object (see Snoopy) |
290 | 293 | Output: parsed RSS object (see rss_parse) |
291 | 294 | \*=======================================================================*/ |
295 | +/** |
|
296 | + * @param Snoopy $resp |
|
297 | + */ |
|
292 | 298 | function _response_to_rss ($resp) { |
293 | 299 | $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); |
294 | 300 |
@@ -166,7 +166,7 @@ |
||
166 | 166 | $resp = _fetch_remote_file( $url, $request_headers ); |
167 | 167 | |
168 | 168 | if (isset($resp) and $resp) { |
169 | - if ($resp->status == '304' ) { |
|
169 | + if ($resp->status == '304' ) { |
|
170 | 170 | // we have the most current copy |
171 | 171 | if ( MAGPIE_DEBUG > 1) { |
172 | 172 | debug("Got 304 for $url"); |
@@ -24,19 +24,19 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | if (!defined('MAGPIE_DIR')) { |
27 | - define('MAGPIE_DIR', dirname(__FILE__) . DIR_SEP); |
|
27 | + define('MAGPIE_DIR', dirname(__FILE__).DIR_SEP); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | if (!defined('MAGPIE_CACHE_DIR')) { |
31 | - define('MAGPIE_CACHE_DIR', MODX_BASE_PATH . 'assets/cache/rss'); |
|
31 | + define('MAGPIE_CACHE_DIR', MODX_BASE_PATH.'assets/cache/rss'); |
|
32 | 32 | } |
33 | 33 | |
34 | -require_once( MAGPIE_DIR . 'rss_parse.inc' ); |
|
35 | -require_once( MAGPIE_DIR . 'rss_cache.inc' ); |
|
34 | +require_once(MAGPIE_DIR.'rss_parse.inc'); |
|
35 | +require_once(MAGPIE_DIR.'rss_cache.inc'); |
|
36 | 36 | |
37 | 37 | // for including 3rd party libraries |
38 | -define('MAGPIE_EXTLIB', MAGPIE_DIR . 'extlib' . DIR_SEP); |
|
39 | -require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc'); |
|
38 | +define('MAGPIE_EXTLIB', MAGPIE_DIR.'extlib'.DIR_SEP); |
|
39 | +require_once(MAGPIE_EXTLIB.'Snoopy.class.inc'); |
|
40 | 40 | |
41 | 41 | |
42 | 42 | /* |
@@ -89,21 +89,21 @@ discard block |
||
89 | 89 | |
90 | 90 | $MAGPIE_ERROR = ""; |
91 | 91 | |
92 | -function fetch_rss ($url) { |
|
92 | +function fetch_rss($url){ |
|
93 | 93 | // initialize constants |
94 | 94 | init(); |
95 | 95 | |
96 | - if ( !isset($url) ) { |
|
96 | + if (!isset($url)) { |
|
97 | 97 | error("fetch_rss called without a url"); |
98 | 98 | return false; |
99 | 99 | } |
100 | 100 | |
101 | 101 | // if cache is disabled |
102 | - if ( !MAGPIE_CACHE_ON ) { |
|
102 | + if (!MAGPIE_CACHE_ON) { |
|
103 | 103 | // fetch file, and parse it |
104 | - $resp = _fetch_remote_file( $url ); |
|
105 | - if ( is_success( $resp->status ) ) { |
|
106 | - return _response_to_rss( $resp ); |
|
104 | + $resp = _fetch_remote_file($url); |
|
105 | + if (is_success($resp->status)) { |
|
106 | + return _response_to_rss($resp); |
|
107 | 107 | } |
108 | 108 | else { |
109 | 109 | error("Failed to fetch $url and cache is off"); |
@@ -118,34 +118,34 @@ discard block |
||
118 | 118 | // 3. if cached obj fails freshness check, fetch remote |
119 | 119 | // 4. if remote fails, return stale object, or error |
120 | 120 | |
121 | - $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE ); |
|
121 | + $cache = new RSSCache(MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE); |
|
122 | 122 | |
123 | 123 | if (MAGPIE_DEBUG and $cache->ERROR) { |
124 | 124 | debug($cache->ERROR, E_USER_WARNING); |
125 | 125 | } |
126 | 126 | |
127 | 127 | |
128 | - $cache_status = 0; // response of check_cache |
|
128 | + $cache_status = 0; // response of check_cache |
|
129 | 129 | $request_headers = array(); // HTTP headers to send with fetch |
130 | - $rss = 0; // parsed RSS object |
|
131 | - $errormsg = 0; // errors, if any |
|
130 | + $rss = 0; // parsed RSS object |
|
131 | + $errormsg = 0; // errors, if any |
|
132 | 132 | |
133 | 133 | // store parsed XML by desired output encoding |
134 | 134 | // as character munging happens at parse time |
135 | - $cache_key = $url . MAGPIE_OUTPUT_ENCODING; |
|
135 | + $cache_key = $url.MAGPIE_OUTPUT_ENCODING; |
|
136 | 136 | |
137 | 137 | if (!$cache->ERROR) { |
138 | 138 | // return cache HIT, MISS, or STALE |
139 | - $cache_status = $cache->check_cache( $cache_key); |
|
139 | + $cache_status = $cache->check_cache($cache_key); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | // if object cached, and cache is fresh, return cached obj |
143 | - if ( $cache_status == 'HIT' ) { |
|
144 | - $rss = $cache->get( $cache_key ); |
|
145 | - if ( isset($rss) and $rss ) { |
|
143 | + if ($cache_status == 'HIT') { |
|
144 | + $rss = $cache->get($cache_key); |
|
145 | + if (isset($rss) and $rss) { |
|
146 | 146 | // should be cache age |
147 | 147 | $rss->from_cache = 1; |
148 | - if ( MAGPIE_DEBUG > 1) { |
|
148 | + if (MAGPIE_DEBUG > 1) { |
|
149 | 149 | debug("MagpieRSS: Cache HIT", E_USER_NOTICE); |
150 | 150 | } |
151 | 151 | return $rss; |
@@ -155,50 +155,50 @@ discard block |
||
155 | 155 | // else attempt a conditional get |
156 | 156 | |
157 | 157 | // setup headers |
158 | - if ( $cache_status == 'STALE' ) { |
|
159 | - $rss = $cache->get( $cache_key ); |
|
160 | - if ( $rss and $rss->etag and $rss->last_modified ) { |
|
158 | + if ($cache_status == 'STALE') { |
|
159 | + $rss = $cache->get($cache_key); |
|
160 | + if ($rss and $rss->etag and $rss->last_modified) { |
|
161 | 161 | $request_headers['If-None-Match'] = $rss->etag; |
162 | 162 | $request_headers['If-Last-Modified'] = $rss->last_modified; |
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
166 | - $resp = _fetch_remote_file( $url, $request_headers ); |
|
166 | + $resp = _fetch_remote_file($url, $request_headers); |
|
167 | 167 | |
168 | 168 | if (isset($resp) and $resp) { |
169 | - if ($resp->status == '304' ) { |
|
169 | + if ($resp->status == '304') { |
|
170 | 170 | // we have the most current copy |
171 | - if ( MAGPIE_DEBUG > 1) { |
|
171 | + if (MAGPIE_DEBUG > 1) { |
|
172 | 172 | debug("Got 304 for $url"); |
173 | 173 | } |
174 | 174 | // reset cache on 304 (at minutillo insistent prodding) |
175 | 175 | $cache->set($cache_key, $rss); |
176 | 176 | return $rss; |
177 | 177 | } |
178 | - elseif ( is_success( $resp->status ) ) { |
|
179 | - $rss = _response_to_rss( $resp ); |
|
180 | - if ( $rss ) { |
|
178 | + elseif (is_success($resp->status)) { |
|
179 | + $rss = _response_to_rss($resp); |
|
180 | + if ($rss) { |
|
181 | 181 | if (MAGPIE_DEBUG > 1) { |
182 | 182 | debug("Fetch successful"); |
183 | 183 | } |
184 | 184 | // add object to cache |
185 | - $cache->set( $cache_key, $rss ); |
|
185 | + $cache->set($cache_key, $rss); |
|
186 | 186 | return $rss; |
187 | 187 | } |
188 | 188 | } |
189 | 189 | else { |
190 | 190 | $errormsg = "Failed to fetch $url "; |
191 | - if ( $resp->status == '-100' ) { |
|
192 | - $errormsg .= "(Request timed out after " . MAGPIE_FETCH_TIME_OUT . " seconds)"; |
|
191 | + if ($resp->status == '-100') { |
|
192 | + $errormsg .= "(Request timed out after ".MAGPIE_FETCH_TIME_OUT." seconds)"; |
|
193 | 193 | } |
194 | - elseif ( $resp->error ) { |
|
194 | + elseif ($resp->error) { |
|
195 | 195 | # compensate for Snoopy's annoying habbit to tacking |
196 | 196 | # on '\n' |
197 | 197 | $http_error = substr($resp->error, 0, -2); |
198 | 198 | $errormsg .= "(HTTP Error: $http_error)"; |
199 | 199 | } |
200 | 200 | else { |
201 | - $errormsg .= "(HTTP Response: " . $resp->response_code .')'; |
|
201 | + $errormsg .= "(HTTP Response: ".$resp->response_code.')'; |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | } |
@@ -210,14 +210,14 @@ discard block |
||
210 | 210 | |
211 | 211 | // attempt to return cached object |
212 | 212 | if ($rss) { |
213 | - if ( MAGPIE_DEBUG ) { |
|
213 | + if (MAGPIE_DEBUG) { |
|
214 | 214 | debug("Returning STALE object for $url"); |
215 | 215 | } |
216 | 216 | return $rss; |
217 | 217 | } |
218 | 218 | |
219 | 219 | // else we totally failed |
220 | - error( $errormsg ); |
|
220 | + error($errormsg); |
|
221 | 221 | |
222 | 222 | return false; |
223 | 223 | |
@@ -229,21 +229,21 @@ discard block |
||
229 | 229 | Purpose: set MAGPIE_ERROR, and trigger error |
230 | 230 | \*=======================================================================*/ |
231 | 231 | |
232 | -function error ($errormsg, $lvl=E_USER_WARNING) { |
|
232 | +function error($errormsg, $lvl = E_USER_WARNING){ |
|
233 | 233 | global $MAGPIE_ERROR; |
234 | 234 | |
235 | 235 | // append PHP's error message if track_errors enabled |
236 | - if ( isset($php_errormsg) ) { |
|
236 | + if (isset($php_errormsg)) { |
|
237 | 237 | $errormsg .= " ($php_errormsg)"; |
238 | 238 | } |
239 | - if ( $errormsg ) { |
|
239 | + if ($errormsg) { |
|
240 | 240 | $errormsg = "MagpieRSS: $errormsg"; |
241 | 241 | $MAGPIE_ERROR = $errormsg; |
242 | - trigger_error( $errormsg, $lvl); |
|
242 | + trigger_error($errormsg, $lvl); |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
246 | -function debug ($debugmsg, $lvl=E_USER_NOTICE) { |
|
246 | +function debug($debugmsg, $lvl = E_USER_NOTICE){ |
|
247 | 247 | trigger_error("MagpieRSS [debug] $debugmsg", $lvl); |
248 | 248 | } |
249 | 249 | |
@@ -251,10 +251,10 @@ discard block |
||
251 | 251 | Function: magpie_error |
252 | 252 | Purpose: accessor for the magpie error variable |
253 | 253 | \*=======================================================================*/ |
254 | -function magpie_error ($errormsg="") { |
|
254 | +function magpie_error($errormsg = ""){ |
|
255 | 255 | global $MAGPIE_ERROR; |
256 | 256 | |
257 | - if ( isset($errormsg) and $errormsg ) { |
|
257 | + if (isset($errormsg) and $errormsg) { |
|
258 | 258 | $MAGPIE_ERROR = $errormsg; |
259 | 259 | } |
260 | 260 | |
@@ -268,13 +268,13 @@ discard block |
||
268 | 268 | headers to send along with the request (optional) |
269 | 269 | Output: an HTTP response object (see Snoopy.class.inc) |
270 | 270 | \*=======================================================================*/ |
271 | -function _fetch_remote_file ($url, $headers = "" ) { |
|
271 | +function _fetch_remote_file($url, $headers = ""){ |
|
272 | 272 | // Snoopy is an HTTP client in PHP |
273 | 273 | $client = new Snoopy(); |
274 | 274 | $client->agent = MAGPIE_USER_AGENT; |
275 | 275 | $client->read_timeout = MAGPIE_FETCH_TIME_OUT; |
276 | 276 | $client->use_gzip = MAGPIE_USE_GZIP; |
277 | - if (is_array($headers) ) { |
|
277 | + if (is_array($headers)) { |
|
278 | 278 | $client->rawheaders = $headers; |
279 | 279 | } |
280 | 280 | |
@@ -289,14 +289,14 @@ discard block |
||
289 | 289 | Input: an HTTP response object (see Snoopy) |
290 | 290 | Output: parsed RSS object (see rss_parse) |
291 | 291 | \*=======================================================================*/ |
292 | -function _response_to_rss ($resp) { |
|
293 | - $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); |
|
292 | +function _response_to_rss($resp){ |
|
293 | + $rss = new MagpieRSS($resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING); |
|
294 | 294 | |
295 | 295 | // if RSS parsed successfully |
296 | - if ( $rss and !$rss->ERROR) { |
|
296 | + if ($rss and !$rss->ERROR) { |
|
297 | 297 | |
298 | 298 | // find Etag, and Last-Modified |
299 | - foreach($resp->headers as $h) { |
|
299 | + foreach ($resp->headers as $h) { |
|
300 | 300 | // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1" |
301 | 301 | if (strpos($h, ": ")) { |
302 | 302 | list($field, $val) = explode(": ", $h, 2); |
@@ -306,11 +306,11 @@ discard block |
||
306 | 306 | $val = ""; |
307 | 307 | } |
308 | 308 | |
309 | - if ( $field == 'ETag' ) { |
|
309 | + if ($field == 'ETag') { |
|
310 | 310 | $rss->etag = $val; |
311 | 311 | } |
312 | 312 | |
313 | - if ( $field == 'Last-Modified' ) { |
|
313 | + if ($field == 'Last-Modified') { |
|
314 | 314 | $rss->last_modified = $val; |
315 | 315 | } |
316 | 316 | } |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $errormsg = "Failed to parse RSS file."; |
322 | 322 | |
323 | 323 | if ($rss) { |
324 | - $errormsg .= " (" . $rss->ERROR . ")"; |
|
324 | + $errormsg .= " (".$rss->ERROR.")"; |
|
325 | 325 | } |
326 | 326 | error($errormsg); |
327 | 327 | |
@@ -334,67 +334,67 @@ discard block |
||
334 | 334 | Purpose: setup constants with default values |
335 | 335 | check for user overrides |
336 | 336 | \*=======================================================================*/ |
337 | -function init () { |
|
338 | - if ( defined('MAGPIE_INITALIZED') ) { |
|
337 | +function init(){ |
|
338 | + if (defined('MAGPIE_INITALIZED')) { |
|
339 | 339 | return; |
340 | 340 | } |
341 | 341 | else { |
342 | 342 | define('MAGPIE_INITALIZED', true); |
343 | 343 | } |
344 | 344 | |
345 | - if ( !defined('MAGPIE_CACHE_ON') ) { |
|
345 | + if (!defined('MAGPIE_CACHE_ON')) { |
|
346 | 346 | define('MAGPIE_CACHE_ON', true); |
347 | 347 | } |
348 | 348 | |
349 | - if ( !defined('MAGPIE_CACHE_DIR') ) { |
|
349 | + if (!defined('MAGPIE_CACHE_DIR')) { |
|
350 | 350 | define('MAGPIE_CACHE_DIR', './cache'); |
351 | 351 | } |
352 | 352 | |
353 | - if ( !defined('MAGPIE_CACHE_AGE') ) { |
|
354 | - define('MAGPIE_CACHE_AGE', 60*60); // one hour |
|
353 | + if (!defined('MAGPIE_CACHE_AGE')) { |
|
354 | + define('MAGPIE_CACHE_AGE', 60 * 60); // one hour |
|
355 | 355 | } |
356 | 356 | |
357 | - if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) { |
|
357 | + if (!defined('MAGPIE_CACHE_FRESH_ONLY')) { |
|
358 | 358 | define('MAGPIE_CACHE_FRESH_ONLY', false); |
359 | 359 | } |
360 | 360 | |
361 | - if ( !defined('MAGPIE_OUTPUT_ENCODING') ) { |
|
361 | + if (!defined('MAGPIE_OUTPUT_ENCODING')) { |
|
362 | 362 | global $modx_manager_charset; |
363 | - if(empty($modx_manager_charset)) $modx_manager_charset = 'ISO-8859-1'; |
|
363 | + if (empty($modx_manager_charset)) $modx_manager_charset = 'ISO-8859-1'; |
|
364 | 364 | define('MAGPIE_OUTPUT_ENCODING', $modx_manager_charset); |
365 | 365 | } |
366 | 366 | |
367 | - if ( !defined('MAGPIE_INPUT_ENCODING') ) { |
|
367 | + if (!defined('MAGPIE_INPUT_ENCODING')) { |
|
368 | 368 | define('MAGPIE_INPUT_ENCODING', null); |
369 | 369 | } |
370 | 370 | |
371 | - if ( !defined('MAGPIE_DETECT_ENCODING') ) { |
|
371 | + if (!defined('MAGPIE_DETECT_ENCODING')) { |
|
372 | 372 | define('MAGPIE_DETECT_ENCODING', true); |
373 | 373 | } |
374 | 374 | |
375 | - if ( !defined('MAGPIE_DEBUG') ) { |
|
375 | + if (!defined('MAGPIE_DEBUG')) { |
|
376 | 376 | define('MAGPIE_DEBUG', 0); |
377 | 377 | } |
378 | 378 | |
379 | - if ( !defined('MAGPIE_USER_AGENT') ) { |
|
380 | - $ua = 'MagpieRSS/'. MAGPIE_VERSION . ' (+http://magpierss.sf.net'; |
|
379 | + if (!defined('MAGPIE_USER_AGENT')) { |
|
380 | + $ua = 'MagpieRSS/'.MAGPIE_VERSION.' (+http://magpierss.sf.net'; |
|
381 | 381 | |
382 | - if ( MAGPIE_CACHE_ON ) { |
|
383 | - $ua = $ua . ')'; |
|
382 | + if (MAGPIE_CACHE_ON) { |
|
383 | + $ua = $ua.')'; |
|
384 | 384 | } |
385 | 385 | else { |
386 | - $ua = $ua . '; No cache)'; |
|
386 | + $ua = $ua.'; No cache)'; |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | define('MAGPIE_USER_AGENT', $ua); |
390 | 390 | } |
391 | 391 | |
392 | - if ( !defined('MAGPIE_FETCH_TIME_OUT') ) { |
|
392 | + if (!defined('MAGPIE_FETCH_TIME_OUT')) { |
|
393 | 393 | define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout |
394 | 394 | } |
395 | 395 | |
396 | 396 | // use gzip encoding to fetch rss files if supported? |
397 | - if ( !defined('MAGPIE_USE_GZIP') ) { |
|
397 | + if (!defined('MAGPIE_USE_GZIP')) { |
|
398 | 398 | define('MAGPIE_USE_GZIP', true); |
399 | 399 | } |
400 | 400 | } |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | Function: is_info |
418 | 418 | Purpose: return true if Informational status code |
419 | 419 | \*=======================================================================*/ |
420 | -function is_info ($sc) { |
|
420 | +function is_info($sc){ |
|
421 | 421 | return $sc >= 100 && $sc < 200; |
422 | 422 | } |
423 | 423 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | Function: is_success |
426 | 426 | Purpose: return true if Successful status code |
427 | 427 | \*=======================================================================*/ |
428 | -function is_success ($sc) { |
|
428 | +function is_success($sc){ |
|
429 | 429 | return $sc >= 200 && $sc < 300; |
430 | 430 | } |
431 | 431 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | Function: is_redirect |
434 | 434 | Purpose: return true if Redirection status code |
435 | 435 | \*=======================================================================*/ |
436 | -function is_redirect ($sc) { |
|
436 | +function is_redirect($sc){ |
|
437 | 437 | return $sc >= 300 && $sc < 400; |
438 | 438 | } |
439 | 439 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | Function: is_error |
442 | 442 | Purpose: return true if Error status code |
443 | 443 | \*=======================================================================*/ |
444 | -function is_error ($sc) { |
|
444 | +function is_error($sc){ |
|
445 | 445 | return $sc >= 400 && $sc < 600; |
446 | 446 | } |
447 | 447 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | Function: is_client_error |
450 | 450 | Purpose: return true if Error status code, and its a client error |
451 | 451 | \*=======================================================================*/ |
452 | -function is_client_error ($sc) { |
|
452 | +function is_client_error($sc){ |
|
453 | 453 | return $sc >= 400 && $sc < 500; |
454 | 454 | } |
455 | 455 | |
@@ -457,6 +457,6 @@ discard block |
||
457 | 457 | Function: is_client_error |
458 | 458 | Purpose: return true if Error status code, and its a server error |
459 | 459 | \*=======================================================================*/ |
460 | -function is_server_error ($sc) { |
|
460 | +function is_server_error($sc){ |
|
461 | 461 | return $sc >= 500 && $sc < 600; |
462 | 462 | } |
@@ -89,7 +89,8 @@ discard block |
||
89 | 89 | |
90 | 90 | $MAGPIE_ERROR = ""; |
91 | 91 | |
92 | -function fetch_rss ($url) { |
|
92 | +function fetch_rss ($url) |
|
93 | +{ |
|
93 | 94 | // initialize constants |
94 | 95 | init(); |
95 | 96 | |
@@ -104,8 +105,7 @@ discard block |
||
104 | 105 | $resp = _fetch_remote_file( $url ); |
105 | 106 | if ( is_success( $resp->status ) ) { |
106 | 107 | return _response_to_rss( $resp ); |
107 | - } |
|
108 | - else { |
|
108 | + } else { |
|
109 | 109 | error("Failed to fetch $url and cache is off"); |
110 | 110 | return false; |
111 | 111 | } |
@@ -174,8 +174,7 @@ discard block |
||
174 | 174 | // reset cache on 304 (at minutillo insistent prodding) |
175 | 175 | $cache->set($cache_key, $rss); |
176 | 176 | return $rss; |
177 | - } |
|
178 | - elseif ( is_success( $resp->status ) ) { |
|
177 | + } elseif ( is_success( $resp->status ) ) { |
|
179 | 178 | $rss = _response_to_rss( $resp ); |
180 | 179 | if ( $rss ) { |
181 | 180 | if (MAGPIE_DEBUG > 1) { |
@@ -185,24 +184,20 @@ discard block |
||
185 | 184 | $cache->set( $cache_key, $rss ); |
186 | 185 | return $rss; |
187 | 186 | } |
188 | - } |
|
189 | - else { |
|
187 | + } else { |
|
190 | 188 | $errormsg = "Failed to fetch $url "; |
191 | 189 | if ( $resp->status == '-100' ) { |
192 | 190 | $errormsg .= "(Request timed out after " . MAGPIE_FETCH_TIME_OUT . " seconds)"; |
193 | - } |
|
194 | - elseif ( $resp->error ) { |
|
191 | + } elseif ( $resp->error ) { |
|
195 | 192 | # compensate for Snoopy's annoying habbit to tacking |
196 | 193 | # on '\n' |
197 | 194 | $http_error = substr($resp->error, 0, -2); |
198 | 195 | $errormsg .= "(HTTP Error: $http_error)"; |
199 | - } |
|
200 | - else { |
|
196 | + } else { |
|
201 | 197 | $errormsg .= "(HTTP Response: " . $resp->response_code .')'; |
202 | 198 | } |
203 | 199 | } |
204 | - } |
|
205 | - else { |
|
200 | + } else { |
|
206 | 201 | $errormsg = "Unable to retrieve RSS file for unknown reasons."; |
207 | 202 | } |
208 | 203 | |
@@ -229,7 +224,8 @@ discard block |
||
229 | 224 | Purpose: set MAGPIE_ERROR, and trigger error |
230 | 225 | \*=======================================================================*/ |
231 | 226 | |
232 | -function error ($errormsg, $lvl=E_USER_WARNING) { |
|
227 | +function error ($errormsg, $lvl=E_USER_WARNING) |
|
228 | +{ |
|
233 | 229 | global $MAGPIE_ERROR; |
234 | 230 | |
235 | 231 | // append PHP's error message if track_errors enabled |
@@ -243,7 +239,8 @@ discard block |
||
243 | 239 | } |
244 | 240 | } |
245 | 241 | |
246 | -function debug ($debugmsg, $lvl=E_USER_NOTICE) { |
|
242 | +function debug ($debugmsg, $lvl=E_USER_NOTICE) |
|
243 | +{ |
|
247 | 244 | trigger_error("MagpieRSS [debug] $debugmsg", $lvl); |
248 | 245 | } |
249 | 246 | |
@@ -251,7 +248,8 @@ discard block |
||
251 | 248 | Function: magpie_error |
252 | 249 | Purpose: accessor for the magpie error variable |
253 | 250 | \*=======================================================================*/ |
254 | -function magpie_error ($errormsg="") { |
|
251 | +function magpie_error ($errormsg="") |
|
252 | +{ |
|
255 | 253 | global $MAGPIE_ERROR; |
256 | 254 | |
257 | 255 | if ( isset($errormsg) and $errormsg ) { |
@@ -268,7 +266,8 @@ discard block |
||
268 | 266 | headers to send along with the request (optional) |
269 | 267 | Output: an HTTP response object (see Snoopy.class.inc) |
270 | 268 | \*=======================================================================*/ |
271 | -function _fetch_remote_file ($url, $headers = "" ) { |
|
269 | +function _fetch_remote_file ($url, $headers = "" ) |
|
270 | +{ |
|
272 | 271 | // Snoopy is an HTTP client in PHP |
273 | 272 | $client = new Snoopy(); |
274 | 273 | $client->agent = MAGPIE_USER_AGENT; |
@@ -289,7 +288,8 @@ discard block |
||
289 | 288 | Input: an HTTP response object (see Snoopy) |
290 | 289 | Output: parsed RSS object (see rss_parse) |
291 | 290 | \*=======================================================================*/ |
292 | -function _response_to_rss ($resp) { |
|
291 | +function _response_to_rss ($resp) |
|
292 | +{ |
|
293 | 293 | $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING ); |
294 | 294 | |
295 | 295 | // if RSS parsed successfully |
@@ -300,8 +300,7 @@ discard block |
||
300 | 300 | // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1" |
301 | 301 | if (strpos($h, ": ")) { |
302 | 302 | list($field, $val) = explode(": ", $h, 2); |
303 | - } |
|
304 | - else { |
|
303 | + } else { |
|
305 | 304 | $field = $h; |
306 | 305 | $val = ""; |
307 | 306 | } |
@@ -334,11 +333,11 @@ discard block |
||
334 | 333 | Purpose: setup constants with default values |
335 | 334 | check for user overrides |
336 | 335 | \*=======================================================================*/ |
337 | -function init () { |
|
336 | +function init () |
|
337 | +{ |
|
338 | 338 | if ( defined('MAGPIE_INITALIZED') ) { |
339 | 339 | return; |
340 | - } |
|
341 | - else { |
|
340 | + } else { |
|
342 | 341 | define('MAGPIE_INITALIZED', true); |
343 | 342 | } |
344 | 343 | |
@@ -360,7 +359,9 @@ discard block |
||
360 | 359 | |
361 | 360 | if ( !defined('MAGPIE_OUTPUT_ENCODING') ) { |
362 | 361 | global $modx_manager_charset; |
363 | - if(empty($modx_manager_charset)) $modx_manager_charset = 'ISO-8859-1'; |
|
362 | + if(empty($modx_manager_charset)) { |
|
363 | + $modx_manager_charset = 'ISO-8859-1'; |
|
364 | + } |
|
364 | 365 | define('MAGPIE_OUTPUT_ENCODING', $modx_manager_charset); |
365 | 366 | } |
366 | 367 | |
@@ -381,8 +382,7 @@ discard block |
||
381 | 382 | |
382 | 383 | if ( MAGPIE_CACHE_ON ) { |
383 | 384 | $ua = $ua . ')'; |
384 | - } |
|
385 | - else { |
|
385 | + } else { |
|
386 | 386 | $ua = $ua . '; No cache)'; |
387 | 387 | } |
388 | 388 | |
@@ -417,7 +417,8 @@ discard block |
||
417 | 417 | Function: is_info |
418 | 418 | Purpose: return true if Informational status code |
419 | 419 | \*=======================================================================*/ |
420 | -function is_info ($sc) { |
|
420 | +function is_info ($sc) |
|
421 | +{ |
|
421 | 422 | return $sc >= 100 && $sc < 200; |
422 | 423 | } |
423 | 424 | |
@@ -425,7 +426,8 @@ discard block |
||
425 | 426 | Function: is_success |
426 | 427 | Purpose: return true if Successful status code |
427 | 428 | \*=======================================================================*/ |
428 | -function is_success ($sc) { |
|
429 | +function is_success ($sc) |
|
430 | +{ |
|
429 | 431 | return $sc >= 200 && $sc < 300; |
430 | 432 | } |
431 | 433 | |
@@ -433,7 +435,8 @@ discard block |
||
433 | 435 | Function: is_redirect |
434 | 436 | Purpose: return true if Redirection status code |
435 | 437 | \*=======================================================================*/ |
436 | -function is_redirect ($sc) { |
|
438 | +function is_redirect ($sc) |
|
439 | +{ |
|
437 | 440 | return $sc >= 300 && $sc < 400; |
438 | 441 | } |
439 | 442 | |
@@ -441,7 +444,8 @@ discard block |
||
441 | 444 | Function: is_error |
442 | 445 | Purpose: return true if Error status code |
443 | 446 | \*=======================================================================*/ |
444 | -function is_error ($sc) { |
|
447 | +function is_error ($sc) |
|
448 | +{ |
|
445 | 449 | return $sc >= 400 && $sc < 600; |
446 | 450 | } |
447 | 451 | |
@@ -449,7 +453,8 @@ discard block |
||
449 | 453 | Function: is_client_error |
450 | 454 | Purpose: return true if Error status code, and its a client error |
451 | 455 | \*=======================================================================*/ |
452 | -function is_client_error ($sc) { |
|
456 | +function is_client_error ($sc) |
|
457 | +{ |
|
453 | 458 | return $sc >= 400 && $sc < 500; |
454 | 459 | } |
455 | 460 | |
@@ -457,6 +462,7 @@ discard block |
||
457 | 462 | Function: is_client_error |
458 | 463 | Purpose: return true if Error status code, and its a server error |
459 | 464 | \*=======================================================================*/ |
460 | -function is_server_error ($sc) { |
|
465 | +function is_server_error ($sc) |
|
466 | +{ |
|
461 | 467 | return $sc >= 500 && $sc < 600; |
462 | 468 | } |
@@ -28,7 +28,9 @@ discard block |
||
28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
30 | 30 | ); |
31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
31 | +foreach($unlockTranslations as $key => $value) { |
|
32 | + $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
33 | +} |
|
32 | 34 | |
33 | 35 | // Prepare lang-strings for mgrResAction() |
34 | 36 | $mraTranslations = array( |
@@ -44,7 +46,9 @@ discard block |
||
44 | 46 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
45 | 47 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
46 | 48 | ); |
47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
49 | +foreach($mraTranslations as $key => $value) { |
|
50 | + $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
51 | +} |
|
48 | 52 | ?> |
49 | 53 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
50 | 54 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -1,48 +1,48 @@ 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 | |
6 | 6 | if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { |
7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
7 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
8 | 8 | } else { |
9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
9 | + include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
10 | 10 | } |
11 | 11 | if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { |
12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
12 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
13 | 13 | } else { |
14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
14 | + include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $resources = new mgrResources(); |
18 | 18 | |
19 | 19 | // Prepare lang-strings for "Lock Elements" |
20 | 20 | $unlockTranslations = array( |
21 | - 'msg' => $_lang["unlock_element_id_warning"], |
|
22 | - 'type1' => $_lang["lock_element_type_1"], |
|
23 | - 'type2' => $_lang["lock_element_type_2"], |
|
24 | - 'type3' => $_lang["lock_element_type_3"], |
|
25 | - 'type4' => $_lang["lock_element_type_4"], |
|
26 | - 'type5' => $_lang["lock_element_type_5"], |
|
27 | - 'type6' => $_lang["lock_element_type_6"], |
|
28 | - 'type7' => $_lang["lock_element_type_7"], |
|
29 | - 'type8' => $_lang["lock_element_type_8"] |
|
21 | + 'msg' => $_lang["unlock_element_id_warning"], |
|
22 | + 'type1' => $_lang["lock_element_type_1"], |
|
23 | + 'type2' => $_lang["lock_element_type_2"], |
|
24 | + 'type3' => $_lang["lock_element_type_3"], |
|
25 | + 'type4' => $_lang["lock_element_type_4"], |
|
26 | + 'type5' => $_lang["lock_element_type_5"], |
|
27 | + 'type6' => $_lang["lock_element_type_6"], |
|
28 | + 'type7' => $_lang["lock_element_type_7"], |
|
29 | + 'type8' => $_lang["lock_element_type_8"] |
|
30 | 30 | ); |
31 | 31 | foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
32 | 32 | |
33 | 33 | // Prepare lang-strings for mgrResAction() |
34 | 34 | $mraTranslations = array( |
35 | - 'create_new' => $_lang["create_new"], |
|
36 | - 'edit' => $_lang["edit"], |
|
37 | - 'duplicate' => $_lang["duplicate"], |
|
38 | - 'remove' => $_lang["remove"], |
|
39 | - 'confirm_duplicate_record' => $_lang["confirm_duplicate_record"], |
|
40 | - 'confirm_delete_template' => $_lang["confirm_delete_template"], |
|
41 | - 'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"], |
|
42 | - 'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"], |
|
43 | - 'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"], |
|
44 | - 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
|
45 | - 'confirm_delete_module' => $_lang["confirm_delete_module"], |
|
35 | + 'create_new' => $_lang["create_new"], |
|
36 | + 'edit' => $_lang["edit"], |
|
37 | + 'duplicate' => $_lang["duplicate"], |
|
38 | + 'remove' => $_lang["remove"], |
|
39 | + 'confirm_duplicate_record' => $_lang["confirm_duplicate_record"], |
|
40 | + 'confirm_delete_template' => $_lang["confirm_delete_template"], |
|
41 | + 'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"], |
|
42 | + 'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"], |
|
43 | + 'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"], |
|
44 | + 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
|
45 | + 'confirm_delete_module' => $_lang["confirm_delete_module"], |
|
46 | 46 | ); |
47 | 47 | foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
48 | 48 | ?> |
@@ -65,46 +65,46 @@ discard block |
||
65 | 65 | </script> |
66 | 66 | |
67 | 67 | <?php |
68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
70 | - } else { |
|
71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
72 | - } |
|
68 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
69 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
70 | + } else { |
|
71 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
72 | + } |
|
73 | 73 | |
74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
76 | - } else { |
|
77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
78 | - } |
|
74 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
76 | + } else { |
|
77 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
78 | + } |
|
79 | 79 | |
80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
82 | - } else { |
|
83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
84 | - } |
|
80 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
81 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
82 | + } else { |
|
83 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
84 | + } |
|
85 | 85 | |
86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
88 | - } else { |
|
89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
90 | - } |
|
86 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
87 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
88 | + } else { |
|
89 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
90 | + } |
|
91 | 91 | |
92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
94 | - } else { |
|
95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
96 | - } |
|
92 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
93 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
94 | + } else { |
|
95 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
96 | + } |
|
97 | 97 | |
98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
100 | - } else { |
|
101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
102 | - } |
|
98 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
100 | + } else { |
|
101 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
102 | + } |
|
103 | 103 | |
104 | 104 | |
105 | - if(is_numeric($_GET['tab'])) { |
|
106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
107 | - } |
|
108 | - ?> |
|
105 | + if(is_numeric($_GET['tab'])) { |
|
106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
107 | + } |
|
108 | + ?> |
|
109 | 109 | </div> |
110 | 110 | </div> |
@@ -1,17 +1,17 @@ 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(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { |
|
7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
6 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php')) { |
|
7 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php'); |
|
8 | 8 | } else { |
9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
9 | + include_once(MODX_MANAGER_PATH.'actions/resources/functions.inc.php'); |
|
10 | 10 | } |
11 | -if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { |
|
12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
11 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php')) { |
|
12 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php'); |
|
13 | 13 | } else { |
14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
14 | + include_once(MODX_MANAGER_PATH.'actions/resources/mgrResources.class.php'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $resources = new mgrResources(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
30 | 30 | ); |
31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
31 | +foreach ($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
32 | 32 | |
33 | 33 | // Prepare lang-strings for mgrResAction() |
34 | 34 | $mraTranslations = array( |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
45 | 45 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
46 | 46 | ); |
47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
47 | +foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
48 | 48 | ?> |
49 | 49 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
50 | 50 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -65,45 +65,45 @@ discard block |
||
65 | 65 | </script> |
66 | 66 | |
67 | 67 | <?php |
68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
68 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) { |
|
69 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php'); |
|
70 | 70 | } else { |
71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
71 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php'); |
|
72 | 72 | } |
73 | 73 | |
74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
74 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php'); |
|
76 | 76 | } else { |
77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
77 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php'); |
|
78 | 78 | } |
79 | 79 | |
80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
80 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) { |
|
81 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php'); |
|
82 | 82 | } else { |
83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
83 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php'); |
|
84 | 84 | } |
85 | 85 | |
86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
86 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) { |
|
87 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php'); |
|
88 | 88 | } else { |
89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
89 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php'); |
|
90 | 90 | } |
91 | 91 | |
92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
92 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) { |
|
93 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php'); |
|
94 | 94 | } else { |
95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
95 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php'); |
|
96 | 96 | } |
97 | 97 | |
98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
98 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php'); |
|
100 | 100 | } else { |
101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
101 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
105 | - if(is_numeric($_GET['tab'])) { |
|
106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
105 | + if (is_numeric($_GET['tab'])) { |
|
106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
107 | 107 | } |
108 | 108 | ?> |
109 | 109 | </div> |
@@ -177,9 +177,9 @@ |
||
177 | 177 | <td colspan="2"><div class="split"></div></td> |
178 | 178 | </tr> |
179 | 179 | <?php |
180 | - // Check for GD before allowing captcha to be enabled |
|
181 | - $gdAvailable = extension_loaded('gd'); |
|
182 | - ?> |
|
180 | + // Check for GD before allowing captcha to be enabled |
|
181 | + $gdAvailable = extension_loaded('gd'); |
|
182 | + ?> |
|
183 | 183 | <?php |
184 | 184 | $gdAvailable = extension_loaded('gd'); |
185 | 185 | if(!$gdAvailable) $use_captcha = 0; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
3 | + if (empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
4 | 4 | $valid_hostnames = $_SERVER['HTTP_HOST']; |
5 | 5 | } else { |
6 | 6 | $valid_hostnames = $MODX_SITE_HOSTNAMES; |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | <tr> |
16 | 16 | <th><?php echo $_lang['allow_eval_title']; ?><br><small>[(allow_eval)]</small></th> |
17 | 17 | <td> |
18 | -<?php echo wrap_label($_lang['allow_eval_with_scan'] , form_radio('allow_eval','with_scan'));?><br /> |
|
19 | -<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'] , form_radio('allow_eval','with_scan_at_post'));?><br /> |
|
20 | -<?php echo wrap_label($_lang['allow_eval_everytime_eval'] , form_radio('allow_eval','everytime_eval'));?><br /> |
|
21 | -<?php echo wrap_label($_lang['allow_eval_dont_eval'] , form_radio('allow_eval','dont_eval'));?> |
|
18 | +<?php echo wrap_label($_lang['allow_eval_with_scan'], form_radio('allow_eval', 'with_scan')); ?><br /> |
|
19 | +<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'], form_radio('allow_eval', 'with_scan_at_post')); ?><br /> |
|
20 | +<?php echo wrap_label($_lang['allow_eval_everytime_eval'], form_radio('allow_eval', 'everytime_eval')); ?><br /> |
|
21 | +<?php echo wrap_label($_lang['allow_eval_dont_eval'], form_radio('allow_eval', 'dont_eval')); ?> |
|
22 | 22 | <div class="comment"> |
23 | 23 | <?php echo $_lang['allow_eval_msg'] ?> |
24 | 24 | </div> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <tr> |
44 | 44 | <th><?php echo $_lang['check_files_onlogin_title'] ?><br><small>[(check_files_onlogin)]</small></th> |
45 | 45 | <td> |
46 | - <textarea name="check_files_onlogin"><?php echo $check_files_onlogin;?></textarea><br /> |
|
46 | + <textarea name="check_files_onlogin"><?php echo $check_files_onlogin; ?></textarea><br /> |
|
47 | 47 | |
48 | 48 | </td> |
49 | 49 | </tr> |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | <tr> |
54 | 54 | <td nowrap class="warning"><?php echo $_lang['validate_referer_title'] ?><br><small>[(validate_referer)]</small></td> |
55 | 55 | <td> |
56 | - <?php echo wrap_label($_lang['yes'],form_radio('validate_referer', 1));?><br /> |
|
57 | - <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0));?> |
|
56 | + <?php echo wrap_label($_lang['yes'], form_radio('validate_referer', 1)); ?><br /> |
|
57 | + <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0)); ?> |
|
58 | 58 | </td> |
59 | 59 | </tr> |
60 | 60 | <tr> |
@@ -89,25 +89,25 @@ discard block |
||
89 | 89 | <tr> |
90 | 90 | <th><?php echo $_lang['a17_error_reporting_title']; ?><br><small>[(error_reporting)]</small></th> |
91 | 91 | <td> |
92 | -<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting','0'));?><br /> |
|
93 | -<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting','1'));?><br /> |
|
94 | -<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting','2'));?><br /> |
|
95 | -<?php echo wrap_label($_lang['a17_error_reporting_opt99'],form_radio('error_reporting','99'));?> |
|
92 | +<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting', '0')); ?><br /> |
|
93 | +<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting', '1')); ?><br /> |
|
94 | +<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting', '2')); ?><br /> |
|
95 | +<?php echo wrap_label($_lang['a17_error_reporting_opt99'], form_radio('error_reporting', '99')); ?> |
|
96 | 96 | </td> |
97 | 97 | </tr> |
98 | 98 | <tr> |
99 | 99 | <td width="200"> </td> |
100 | - <td class="comment"> <?php echo $_lang['a17_error_reporting_msg'];?></td> |
|
100 | + <td class="comment"> <?php echo $_lang['a17_error_reporting_msg']; ?></td> |
|
101 | 101 | </tr> |
102 | 102 | <tr><td colspan="2"><div class="split"></div></td></tr> |
103 | 103 | <tr> |
104 | 104 | <th><?php echo $_lang['mutate_settings.dynamic.php6']; ?><br><small>[(send_errormail)]</small></th> |
105 | 105 | <td> |
106 | -<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'],form_radio('send_errormail','0'));?><br /> |
|
107 | -<?php echo wrap_label('error',form_radio('send_errormail','3'));?><br /> |
|
108 | -<?php echo wrap_label('error + warning',form_radio('send_errormail','2'));?><br /> |
|
109 | -<?php echo wrap_label('error + warning + information',form_radio('send_errormail','1'));?><br /> |
|
110 | -<?php echo parseText($_lang['mutate_settings.dynamic.php8'],array('emailsender'=>$modx->config['emailsender']));?></td> |
|
106 | +<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'], form_radio('send_errormail', '0')); ?><br /> |
|
107 | +<?php echo wrap_label('error', form_radio('send_errormail', '3')); ?><br /> |
|
108 | +<?php echo wrap_label('error + warning', form_radio('send_errormail', '2')); ?><br /> |
|
109 | +<?php echo wrap_label('error + warning + information', form_radio('send_errormail', '1')); ?><br /> |
|
110 | +<?php echo parseText($_lang['mutate_settings.dynamic.php8'], array('emailsender'=>$modx->config['emailsender'])); ?></td> |
|
111 | 111 | </tr> |
112 | 112 | <tr> |
113 | 113 | <td colspan="2"><div class="split"></div></td> |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | <tr> |
116 | 116 | <th><?php echo $_lang['enable_bindings_title'] ?><br><small>[(enable_bindings)]</small></th> |
117 | 117 | <td> |
118 | -<?php echo wrap_label($_lang['yes'],form_radio('enable_bindings','1'));?><br /> |
|
119 | -<?php echo wrap_label($_lang['no'], form_radio('enable_bindings','0'));?> |
|
118 | +<?php echo wrap_label($_lang['yes'], form_radio('enable_bindings', '1')); ?><br /> |
|
119 | +<?php echo wrap_label($_lang['no'], form_radio('enable_bindings', '0')); ?> |
|
120 | 120 | |
121 | 121 | </td> |
122 | 122 | </tr> |
@@ -157,20 +157,20 @@ discard block |
||
157 | 157 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
158 | 158 | <td> |
159 | 159 | <?php |
160 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
161 | -$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1; |
|
162 | -$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1; |
|
163 | -$phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1; |
|
164 | -$phm['e']['SHA256'] = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0:1; |
|
165 | -$phm['e']['MD5'] = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0:1; |
|
166 | -$phm['e']['UNCRYPT'] = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0:1; |
|
160 | +if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
161 | +$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1; |
|
162 | +$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1; |
|
163 | +$phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0 : 1; |
|
164 | +$phm['e']['SHA256'] = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0 : 1; |
|
165 | +$phm['e']['MD5'] = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0 : 1; |
|
166 | +$phm['e']['UNCRYPT'] = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0 : 1; |
|
167 | 167 | ?> |
168 | -<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y']));?><br /> |
|
169 | -<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_A', '', $phm['e']['BLOWFISH_A']));?><br /> |
|
170 | -<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA512' , '', $phm['e']['SHA512']));?><br /> |
|
171 | -<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA256' , '', $phm['e']['SHA256']));?><br /> |
|
172 | -<?php echo wrap_label('CRYPT_MD5 (salt & stretch)' ,form_radio('pwd_hash_algo','MD5' , '', $phm['e']['MD5']));?><br /> |
|
173 | -<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)' ,form_radio('pwd_hash_algo','UNCRYPT' , '', $phm['e']['UNCRYPT']));?> |
|
168 | +<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y'])); ?><br /> |
|
169 | +<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_A', '', $phm['e']['BLOWFISH_A'])); ?><br /> |
|
170 | +<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA512', '', $phm['e']['SHA512'])); ?><br /> |
|
171 | +<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA256', '', $phm['e']['SHA256'])); ?><br /> |
|
172 | +<?php echo wrap_label('CRYPT_MD5 (salt & stretch)', form_radio('pwd_hash_algo', 'MD5', '', $phm['e']['MD5'])); ?><br /> |
|
173 | +<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)', form_radio('pwd_hash_algo', 'UNCRYPT', '', $phm['e']['UNCRYPT'])); ?> |
|
174 | 174 | </td> |
175 | 175 | </tr> |
176 | 176 | <tr> |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | ?> |
187 | 187 | <?php |
188 | 188 | $gdAvailable = extension_loaded('gd'); |
189 | -if(!$gdAvailable) $use_captcha = 0; |
|
189 | +if (!$gdAvailable) $use_captcha = 0; |
|
190 | 190 | ?> |
191 | 191 | <tr> |
192 | 192 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
193 | - <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha==1) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> /> |
|
193 | + <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha == 1) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
194 | 194 | <?php echo $_lang['yes']?></label><br /> |
195 | - <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha==0) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> /> |
|
195 | + <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha == 0) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
196 | 196 | <?php echo $_lang['no']?></label> </td> |
197 | 197 | </tr> |
198 | 198 | <tr> |
@@ -202,23 +202,23 @@ discard block |
||
202 | 202 | <tr> |
203 | 203 | <td colspan="2"><div class="split"></div></td> |
204 | 204 | </tr> |
205 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
205 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
206 | 206 | <td nowrap class="warning"><?php echo $_lang['captcha_words_title'] ?><br><small>[(captcha_words)]</small> |
207 | 207 | <br /> |
208 | 208 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
209 | 209 | <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');"> |
210 | -<?php echo get_lang_options('captcha_words_default');?> |
|
210 | +<?php echo get_lang_options('captcha_words_default'); ?> |
|
211 | 211 | </select> |
212 | 212 | </td> |
213 | 213 | <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo $captcha_words; ?>" /> |
214 | - <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']);?>" /> |
|
214 | + <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']); ?>" /> |
|
215 | 215 | </td> |
216 | 216 | </tr> |
217 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
217 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
218 | 218 | <td width="200"> </td> |
219 | 219 | <td class="comment"><?php echo $_lang['captcha_words_message'] ?></td> |
220 | 220 | </tr> |
221 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
221 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
222 | 222 | <td colspan="2"><div class="split"></div></td> |
223 | 223 | </tr> |
224 | 224 | <tr> |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | <?php |
227 | 227 | // invoke OnMiscSettingsRender event |
228 | 228 | $evtOut = $modx->invokeEvent('OnSecuritySettingsRender'); |
229 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
229 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
230 | 230 | ?> |
231 | 231 | </td> |
232 | 232 | </tr> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
3 | + if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
4 | 4 | $valid_hostnames = $_SERVER['HTTP_HOST']; |
5 | - } else { |
|
5 | + } else { |
|
6 | 6 | $valid_hostnames = $MODX_SITE_HOSTNAMES; |
7 | 7 | } |
8 | 8 | ?> |
@@ -157,7 +157,9 @@ discard block |
||
157 | 157 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
158 | 158 | <td> |
159 | 159 | <?php |
160 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
160 | +if(empty($pwd_hash_algo)) { |
|
161 | + $phm['sel']['UNCRYPT'] = 1; |
|
162 | +} |
|
161 | 163 | $phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1; |
162 | 164 | $phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1; |
163 | 165 | $phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1; |
@@ -186,7 +188,9 @@ discard block |
||
186 | 188 | ?> |
187 | 189 | <?php |
188 | 190 | $gdAvailable = extension_loaded('gd'); |
189 | -if(!$gdAvailable) $use_captcha = 0; |
|
191 | +if(!$gdAvailable) { |
|
192 | + $use_captcha = 0; |
|
193 | +} |
|
190 | 194 | ?> |
191 | 195 | <tr> |
192 | 196 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
@@ -226,7 +230,9 @@ discard block |
||
226 | 230 | <?php |
227 | 231 | // invoke OnMiscSettingsRender event |
228 | 232 | $evtOut = $modx->invokeEvent('OnSecuritySettingsRender'); |
229 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
233 | + if(is_array($evtOut)) { |
|
234 | + echo implode("",$evtOut); |
|
235 | + } |
|
230 | 236 | ?> |
231 | 237 | </td> |
232 | 238 | </tr> |
@@ -127,7 +127,9 @@ |
||
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> |
@@ -6,8 +6,8 @@ discard block |
||
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 |
||
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"> </td> |
31 | 31 | <td class="comment"><?php echo $_lang['udperms_allowroot_message'] ?></td> |
32 | 32 | </tr> |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | <tr> |
38 | 38 | <td nowrap class="warning"><?php echo $_lang['email_sender_method'] ?><br><small>[(email_sender_method)]</small></td> |
39 | 39 | <td> |
40 | - <label><input type="radio" name="email_sender_method" value="1" <?php echo $email_sender_method=='1' ? 'checked="checked"' : "" ; ?> /> |
|
40 | + <label><input type="radio" name="email_sender_method" value="1" <?php echo $email_sender_method == '1' ? 'checked="checked"' : ""; ?> /> |
|
41 | 41 | <?php echo $_lang['auto']?></label><br /> |
42 | - <label><input type="radio" name="email_sender_method" value="0" <?php echo $email_sender_method=='0' ? 'checked="checked"' : "" ; ?> /> |
|
42 | + <label><input type="radio" name="email_sender_method" value="0" <?php echo $email_sender_method == '0' ? 'checked="checked"' : ""; ?> /> |
|
43 | 43 | <?php echo $_lang['use_emailsender']?></label> |
44 | 44 | </td> |
45 | 45 | </tr> |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | <tr> |
56 | 56 | <td nowrap class="warning"><?php echo $_lang['email_method_title'] ?><br><small>[(email_method)]</small></td> |
57 | 57 | <td> |
58 | - <?php echo wrap_label($_lang['email_method_mail'],form_radio('email_method','mail','id="useMail"'));?><br /> |
|
59 | - <?php echo wrap_label($_lang['email_method_smtp'],form_radio('email_method','smtp','id="useSmtp"'));?> |
|
60 | - <div class="smtpRow" <?php echo showHide($email_method=='smtp');?>> |
|
61 | - <?php include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/snippet_smtp.inc.php'); ?> |
|
58 | + <?php echo wrap_label($_lang['email_method_mail'], form_radio('email_method', 'mail', 'id="useMail"')); ?><br /> |
|
59 | + <?php echo wrap_label($_lang['email_method_smtp'], form_radio('email_method', 'smtp', 'id="useSmtp"')); ?> |
|
60 | + <div class="smtpRow" <?php echo showHide($email_method == 'smtp'); ?>> |
|
61 | + <?php include_once(MODX_MANAGER_PATH.'actions/mutate_settings/snippet_smtp.inc.php'); ?> |
|
62 | 62 | </div> |
63 | 63 | </td> |
64 | 64 | </tr> |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | <br /> |
71 | 71 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
72 | 72 | <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');"> |
73 | -<?php echo get_lang_options('emailsubject_default');?> |
|
73 | +<?php echo get_lang_options('emailsubject_default'); ?> |
|
74 | 74 | </select> |
75 | 75 | </td> |
76 | 76 | <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" value="<?php echo $emailsubject; ?>" /> |
77 | - <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" /> |
|
77 | + <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']); ?>" /> |
|
78 | 78 | </td> |
79 | 79 | </tr> |
80 | 80 | <tr> |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | <br /> |
90 | 90 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
91 | 91 | <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');"> |
92 | -<?php echo get_lang_options('system_email_signup');?> |
|
92 | +<?php echo get_lang_options('system_email_signup'); ?> |
|
93 | 93 | </select> |
94 | 94 | </td> |
95 | 95 | <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo $signupemail_message; ?></textarea> |
96 | - <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" /> |
|
96 | + <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']); ?>" /> |
|
97 | 97 | </td> |
98 | 98 | </tr> |
99 | 99 | <tr> |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | <br /> |
109 | 109 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
110 | 110 | <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');"> |
111 | -<?php echo get_lang_options('system_email_websignup');?> |
|
111 | +<?php echo get_lang_options('system_email_websignup'); ?> |
|
112 | 112 | </select> |
113 | 113 | </td> |
114 | 114 | <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo $websignupemail_message; ?></textarea> |
115 | - <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" /> |
|
115 | + <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']); ?>" /> |
|
116 | 116 | </td> |
117 | 117 | </tr> |
118 | 118 | <tr> |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | <br /> |
128 | 128 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
129 | 129 | <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');"> |
130 | -<?php echo get_lang_options('system_email_webreminder');?> |
|
130 | +<?php echo get_lang_options('system_email_webreminder'); ?> |
|
131 | 131 | </select> |
132 | 132 | </td> |
133 | 133 | <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo $webpwdreminder_message; ?></textarea> |
134 | - <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" /> |
|
134 | + <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']); ?>" /> |
|
135 | 135 | </td> |
136 | 136 | </tr> |
137 | 137 | <tr> |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | <tr> |
145 | 145 | <td nowrap class="warning" valign="top"><?php echo $_lang['allow_multiple_emails_title'] ?><br><small>[(allow_multiple_emails)]</small></td> |
146 | 146 | <td> |
147 | - <?php echo wrap_label($_lang['yes'],form_radio('allow_multiple_emails','1'));?><br /> |
|
148 | - <?php echo wrap_label($_lang['no'], form_radio('allow_multiple_emails','0'));?> |
|
147 | + <?php echo wrap_label($_lang['yes'], form_radio('allow_multiple_emails', '1')); ?><br /> |
|
148 | + <?php echo wrap_label($_lang['no'], form_radio('allow_multiple_emails', '0')); ?> |
|
149 | 149 | </td> |
150 | 150 | </tr> |
151 | 151 | <tr> |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | <?php |
158 | 158 | // invoke OnUserSettingsRender event |
159 | 159 | $evtOut = $modx->invokeEvent('OnUserSettingsRender'); |
160 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
160 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
161 | 161 | ?> |
162 | 162 | </td> |
163 | 163 | </tr> |
@@ -23,7 +23,7 @@ discard block |
||
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 |
||
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> |
@@ -6,8 +6,8 @@ discard block |
||
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 |
||
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,125 +27,125 @@ discard block |
||
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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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['clientResize']?><br><small>[(clientResize)]</small></td> |
146 | 146 | <td> |
147 | - <?php echo wrap_label($_lang['yes'],form_radio('clientResize', 1, ''));?><br /> |
|
148 | - <?php echo wrap_label($_lang['no'], form_radio('clientResize', 0, ''));?> |
|
147 | + <?php echo wrap_label($_lang['yes'], form_radio('clientResize', 1, '')); ?><br /> |
|
148 | + <?php echo wrap_label($_lang['no'], form_radio('clientResize', 0, '')); ?> |
|
149 | 149 | </td> |
150 | 150 | </tr> |
151 | 151 | <tr> |
@@ -155,11 +155,11 @@ discard block |
||
155 | 155 | <tr> |
156 | 156 | <td colspan="2"><div class="split"></div></td> |
157 | 157 | </tr> |
158 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
158 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
159 | 159 | <td nowrap class="warning"><?php echo $_lang['noThumbnailsRecreation']?><br><small>[(noThumbnailsRecreation)]</small></td> |
160 | 160 | <td> |
161 | - <?php echo wrap_label($_lang['yes'],form_radio('noThumbnailsRecreation', 1, ''));?><br /> |
|
162 | - <?php echo wrap_label($_lang['no'], form_radio('noThumbnailsRecreation', 0, ''));?> |
|
161 | + <?php echo wrap_label($_lang['yes'], form_radio('noThumbnailsRecreation', 1, '')); ?><br /> |
|
162 | + <?php echo wrap_label($_lang['no'], form_radio('noThumbnailsRecreation', 0, '')); ?> |
|
163 | 163 | </td> |
164 | 164 | </tr> |
165 | 165 | <tr> |
@@ -170,92 +170,92 @@ discard block |
||
170 | 170 | <td colspan="2"><div class="split"></div></td> |
171 | 171 | </tr> |
172 | 172 | |
173 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
173 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
174 | 174 | <td nowrap class="warning"><?php echo $_lang['thumbWidth']?><br><small>[(thumbWidth)]</small></td> |
175 | 175 | <td> |
176 | 176 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbWidth" value="<?php echo $thumbWidth; ?>" /> |
177 | 177 | </td> |
178 | 178 | </tr> |
179 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
179 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
180 | 180 | <td width="200"> </td> |
181 | 181 | <td class="comment"><?php echo $_lang['thumbWidth_message']?></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 colspan="2"><div class="split"></div></td> |
185 | 185 | </tr> |
186 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
186 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
187 | 187 | <td nowrap class="warning"><?php echo $_lang['thumbHeight']?><br><small>[(thumbHeight)]</small></td> |
188 | 188 | <td> |
189 | 189 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbHeight" value="<?php echo $thumbHeight; ?>" /> |
190 | 190 | </td> |
191 | 191 | </tr> |
192 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
192 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
193 | 193 | <td width="200"> </td> |
194 | 194 | <td class="comment"><?php echo $_lang['thumbHeight_message']?></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 colspan="2"><div class="split"></div></td> |
198 | 198 | </tr> |
199 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
199 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
200 | 200 | <td nowrap class="warning"><?php echo $_lang['thumbsDir']?><br><small>[(thumbsDir)]</small></td> |
201 | 201 | <td> |
202 | 202 | <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="thumbsDir" value="<?php echo $thumbsDir; ?>" /> |
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 width="200"> </td> |
207 | 207 | <td class="comment"><?php echo $_lang['thumbsDir_message']?></td> |
208 | 208 | </tr> |
209 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
209 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
210 | 210 | <td colspan="2"><div class="split"></div></td> |
211 | 211 | </tr> |
212 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
212 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
213 | 213 | <td nowrap class="warning"><?php echo $_lang['jpegQuality']?><br><small>[(jpegQuality)]</small></td> |
214 | 214 | <td> |
215 | 215 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="jpegQuality" value="<?php echo $jpegQuality; ?>" /> |
216 | 216 | </td> |
217 | 217 | </tr> |
218 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
218 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
219 | 219 | <td width="200"> </td> |
220 | 220 | <td class="comment"><?php echo $_lang['jpegQuality_message']?></td> |
221 | 221 | </tr> |
222 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
222 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
223 | 223 | <td colspan="2"><div class="split"></div></td> |
224 | 224 | </tr> |
225 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
225 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
226 | 226 | <td nowrap class="warning"><?php echo $_lang['denyZipDownload'] ?><br><small>[(denyZipDownload)]</small></td> |
227 | 227 | <td> |
228 | - <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload=='0' ? 'checked="checked"' : ""; ?> /> |
|
228 | + <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload == '0' ? 'checked="checked"' : ""; ?> /> |
|
229 | 229 | <?php echo $_lang['no']?></label><br /> |
230 | - <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload=='1' ? 'checked="checked"' : ""; ?> /> |
|
230 | + <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload == '1' ? 'checked="checked"' : ""; ?> /> |
|
231 | 231 | <?php echo $_lang['yes']?></label> |
232 | 232 | </td> |
233 | 233 | </tr> |
234 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
234 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
235 | 235 | <td colspan="2"><div class="split"></div></td> |
236 | 236 | </tr> |
237 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
237 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
238 | 238 | <td nowrap class="warning"><?php echo $_lang['denyExtensionRename'] ?><br><small>[(denyExtensionRename)]</small></td> |
239 | 239 | <td> |
240 | - <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename=='0' ? 'checked="checked"' : ""; ?> /> |
|
240 | + <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename == '0' ? 'checked="checked"' : ""; ?> /> |
|
241 | 241 | <?php echo $_lang['no']?></label><br /> |
242 | - <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename=='1' ? 'checked="checked"' : ""; ?> /> |
|
242 | + <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename == '1' ? 'checked="checked"' : ""; ?> /> |
|
243 | 243 | <?php echo $_lang['yes']?></label> |
244 | 244 | </td> |
245 | 245 | </tr> |
246 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
246 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
247 | 247 | <td colspan="2"><div class="split"></div></td> |
248 | 248 | </tr> |
249 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
249 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
250 | 250 | <td nowrap class="warning"><?php echo $_lang['showHiddenFiles'] ?><br><small>[(showHiddenFiles)]</small></td> |
251 | 251 | <td> |
252 | - <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles=='0' ? 'checked="checked"' : ""; ?> /> |
|
252 | + <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles == '0' ? 'checked="checked"' : ""; ?> /> |
|
253 | 253 | <?php echo $_lang['no']?></label><br /> |
254 | - <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles=='1' ? 'checked="checked"' : ""; ?> /> |
|
254 | + <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles == '1' ? 'checked="checked"' : ""; ?> /> |
|
255 | 255 | <?php echo $_lang['yes']?></label> |
256 | 256 | </td> |
257 | 257 | </tr> |
258 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
258 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
259 | 259 | <td colspan="2"><div class="split"></div></td> |
260 | 260 | </tr> |
261 | 261 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | <?php |
265 | 265 | // invoke OnMiscSettingsRender event |
266 | 266 | $evtOut = $modx->invokeEvent('OnMiscSettingsRender'); |
267 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
267 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
268 | 268 | ?> |
269 | 269 | </td> |
270 | 270 | </tr> |
@@ -49,9 +49,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ?> |
@@ -56,7 +56,7 @@ discard block |
||
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(); |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | <tr> |
131 | 131 | <th><?php echo $_lang['login_form_position_title'] ?><br><small>[(login_form_position)]</small></th> |
132 | 132 | <td> |
133 | - <?php echo wrap_label($_lang['login_form_position_left'],form_radio('login_form_position', 'left'));?><br /> |
|
134 | - <?php echo wrap_label($_lang['login_form_position_center'], form_radio('login_form_position', 'center'));?><br /> |
|
135 | - <?php echo wrap_label($_lang['login_form_position_right'], form_radio('login_form_position', 'right'));?> |
|
133 | + <?php echo wrap_label($_lang['login_form_position_left'], form_radio('login_form_position', 'left')); ?><br /> |
|
134 | + <?php echo wrap_label($_lang['login_form_position_center'], form_radio('login_form_position', 'center')); ?><br /> |
|
135 | + <?php echo wrap_label($_lang['login_form_position_right'], form_radio('login_form_position', 'right')); ?> |
|
136 | 136 | </td> |
137 | 137 | </tr> |
138 | 138 | <tr> |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | <tr> |
145 | 145 | <th><?php echo $_lang['manager_menu_position_title'] ?><br><small>[(manager_menu_position)]</small></th> |
146 | 146 | <td> |
147 | - <?php echo wrap_label($_lang['manager_menu_position_top'],form_radio('manager_menu_position', 'top'));?><br /> |
|
148 | - <?php echo wrap_label($_lang['manager_menu_position_left'], form_radio('manager_menu_position', 'left'));?><br /> |
|
147 | + <?php echo wrap_label($_lang['manager_menu_position_top'], form_radio('manager_menu_position', 'top')); ?><br /> |
|
148 | + <?php echo wrap_label($_lang['manager_menu_position_left'], form_radio('manager_menu_position', 'left')); ?><br /> |
|
149 | 149 | </td> |
150 | 150 | </tr> |
151 | 151 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | <td> |
288 | 288 | <select name="group_tvs" size="1" class="form-control"> |
289 | 289 | <?php |
290 | - $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n"; |
|
290 | + $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>'."\n"; |
|
291 | 291 | $option = explode(',', $_lang['settings_group_tv_options']); |
292 | 292 | $output = array(); |
293 | 293 | foreach ($option as $k => $v) { |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | <td> |
361 | 361 | <select name="resource_tree_node_name" size="1" class="inputBox"> |
362 | 362 | <?php |
363 | - $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n"; |
|
363 | + $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>'."\n"; |
|
364 | 364 | $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon'); |
365 | 365 | $output = array(); |
366 | 366 | foreach ($option as $v) { |
@@ -446,8 +446,8 @@ discard block |
||
446 | 446 | $str = ''; |
447 | 447 | foreach ($datetime_format_list as $value) { |
448 | 448 | $selectedtext = ($datetime_format == $value) ? ' selected' : ''; |
449 | - $str .= '<option value="' . $value . '"' . $selectedtext . '>'; |
|
450 | - $str .= $value . '</option>' . PHP_EOL; |
|
449 | + $str .= '<option value="'.$value.'"'.$selectedtext.'>'; |
|
450 | + $str .= $value.'</option>'.PHP_EOL; |
|
451 | 451 | } |
452 | 452 | echo $str; |
453 | 453 | ?> |
@@ -557,10 +557,10 @@ discard block |
||
557 | 557 | <select name="which_editor" onChange="documentDirty=true;"> |
558 | 558 | <?php |
559 | 559 | // invoke OnRichTextEditorRegister event |
560 | - echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n"; |
|
560 | + echo "<option value='none'".($which_editor == 'none' ? " selected='selected'" : "").">".$_lang['none']."</option>\n"; |
|
561 | 561 | if (is_array($evtOut)) { |
562 | 562 | foreach ($evtOut as $editor) { |
563 | - echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n"; |
|
563 | + echo "<option value='$editor'".($which_editor == $editor ? " selected='selected'" : "").">$editor</option>\n"; |
|
564 | 564 | } |
565 | 565 | } |
566 | 566 | ?> |
@@ -644,14 +644,14 @@ discard block |
||
644 | 644 | lastImageCtrl = ctrl; |
645 | 645 | var w = screen.width * 0.7; |
646 | 646 | var h = screen.height * 0.7; |
647 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h); |
|
647 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h); |
|
648 | 648 | } |
649 | 649 | |
650 | 650 | function BrowseFileServer(ctrl) { |
651 | 651 | lastFileCtrl = ctrl; |
652 | 652 | var w = screen.width * 0.7; |
653 | 653 | var h = screen.height * 0.7; |
654 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser;?>/browser.php?Type=files", w, h); |
|
654 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=files", w, h); |
|
655 | 655 | } |
656 | 656 | |
657 | 657 | function SetUrlChange(el) { |
@@ -2,8 +2,8 @@ discard block |
||
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 |
||
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> |
@@ -15,8 +15,14 @@ |
||
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> |
@@ -6,8 +6,8 @@ discard block |
||
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 |
||
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 |
||
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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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> |
@@ -159,7 +159,9 @@ |
||
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> |
@@ -29,10 +29,12 @@ |
||
29 | 29 | |
30 | 30 | <div class="tab-page"> |
31 | 31 | <div class="container container-body"> |
32 | - <?php if($num_rows_pub) printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
|
32 | + <?php if($num_rows_pub) { |
|
33 | + printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
|
33 | 34 | <?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?> |
34 | 35 | <?php |
35 | 36 | $modx->clearCache('full', true); |
37 | +} |
|
36 | 38 | // invoke OnSiteRefresh event |
37 | 39 | $modx->invokeEvent("OnSiteRefresh"); |
38 | 40 | ?> |
@@ -1,6 +1,6 @@ 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 | |
6 | 6 | // (un)publishing of documents, version 2! |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | <?php if($num_rows_pub) printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
33 | 33 | <?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?> |
34 | 34 | <?php |
35 | - $modx->clearCache('full', true); |
|
36 | - // invoke OnSiteRefresh event |
|
37 | - $modx->invokeEvent("OnSiteRefresh"); |
|
38 | - ?> |
|
35 | + $modx->clearCache('full', true); |
|
36 | + // invoke OnSiteRefresh event |
|
37 | + $modx->invokeEvent("OnSiteRefresh"); |
|
38 | + ?> |
|
39 | 39 | </div> |
40 | 40 | </div> |
@@ -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 | |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | |
30 | 30 | <div class="tab-page"> |
31 | 31 | <div class="container container-body"> |
32 | - <?php if($num_rows_pub) printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
|
33 | - <?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?> |
|
32 | + <?php if ($num_rows_pub) printf('<p>'.$_lang["refresh_published"].'</p>', $num_rows_pub) ?> |
|
33 | + <?php if ($num_rows_unpub) printf('<p>'.$_lang["refresh_unpublished"].'</p>', $num_rows_unpub) ?> |
|
34 | 34 | <?php |
35 | 35 | $modx->clearCache('full', true); |
36 | 36 | // invoke OnSiteRefresh event |