@@ -222,13 +222,19 @@ discard block |
||
222 | 222 | |
223 | 223 | // Its either local or global cookies |
224 | 224 | if (!empty($this->_req->post->localCookies) && !empty($this->_req->post->globalCookies)) |
225 | - unset($this->_req->post->globalCookies); |
|
225 | + { |
|
226 | + unset($this->_req->post->globalCookies); |
|
227 | + } |
|
226 | 228 | |
227 | 229 | if (!empty($this->_req->post->globalCookiesDomain) && strpos($boardurl, $this->_req->post->globalCookiesDomain) === false) |
228 | - throw new Elk_Exception('invalid_cookie_domain', false); |
|
230 | + { |
|
231 | + throw new Elk_Exception('invalid_cookie_domain', false); |
|
232 | + } |
|
229 | 233 | |
230 | 234 | if ($this->_req->getPost('cookiename', 'trim', '') === '') |
231 | - $this->_req->post->cookiename = $cookiename; |
|
235 | + { |
|
236 | + $this->_req->post->cookiename = $cookiename; |
|
237 | + } |
|
232 | 238 | |
233 | 239 | $settingsForm->setConfigValues((array) $this->_req->post); |
234 | 240 | $settingsForm->save(); |
@@ -353,13 +359,21 @@ discard block |
||
353 | 359 | foreach ($this->_req->post as $key => $value) |
354 | 360 | { |
355 | 361 | if (strpos($key, 'loadavg') === 0 || $key === 'loadavg_enable') |
356 | - continue; |
|
362 | + { |
|
363 | + continue; |
|
364 | + } |
|
357 | 365 | elseif ($key === 'loadavg_auto_opt' && $value <= 1) |
358 | - $this->_req->post->loadavg_auto_opt = '1.0'; |
|
366 | + { |
|
367 | + $this->_req->post->loadavg_auto_opt = '1.0'; |
|
368 | + } |
|
359 | 369 | elseif ($key === 'loadavg_forum' && $value < 10) |
360 | - $this->_req->post->loadavg_forum = '10.0'; |
|
370 | + { |
|
371 | + $this->_req->post->loadavg_forum = '10.0'; |
|
372 | + } |
|
361 | 373 | elseif ($value < 2) |
362 | - $this->_req->{$key} = '2.0'; |
|
374 | + { |
|
375 | + $this->_req->{$key} = '2.0'; |
|
376 | + } |
|
363 | 377 | } |
364 | 378 | |
365 | 379 | call_integration_hook('integrate_save_loadavg_settings'); |
@@ -407,17 +421,25 @@ discard block |
||
407 | 421 | foreach ($info_lines as $line) |
408 | 422 | { |
409 | 423 | if (preg_match('~(' . $remove . ')~', $line)) |
410 | - continue; |
|
424 | + { |
|
425 | + continue; |
|
426 | + } |
|
411 | 427 | |
412 | 428 | // New category? |
413 | 429 | if (strpos($line, '<h2>') !== false) |
414 | - $category = preg_match('~<h2>(.*)</h2>~', $line, $title) ? $category = $title[1] : $category; |
|
430 | + { |
|
431 | + $category = preg_match('~<h2>(.*)</h2>~', $line, $title) ? $category = $title[1] : $category; |
|
432 | + } |
|
415 | 433 | |
416 | 434 | // Load it as setting => value or the old setting local master |
417 | 435 | if (preg_match('~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~', $line, $val)) |
418 | - $pinfo[$category][$val[1]] = $val[2]; |
|
436 | + { |
|
437 | + $pinfo[$category][$val[1]] = $val[2]; |
|
438 | + } |
|
419 | 439 | elseif (preg_match('~<tr><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td><td[^>]+>([^<]*)</td></tr>~', $line, $val)) |
420 | - $pinfo[$category][$val[1]] = array($txt['phpinfo_localsettings'] => $val[2], $txt['phpinfo_defaultsettings'] => $val[3]); |
|
440 | + { |
|
441 | + $pinfo[$category][$val[1]] = array($txt['phpinfo_localsettings'] => $val[2], $txt['phpinfo_defaultsettings'] => $val[3]); |
|
442 | + } |
|
421 | 443 | } |
422 | 444 | |
423 | 445 | // Load it in to context and display it |
@@ -570,7 +592,9 @@ discard block |
||
570 | 592 | $supported = $value->isAvailable(); |
571 | 593 | |
572 | 594 | if (!empty($supported)) |
573 | - $detected_supported[$key] = $value->title(); |
|
595 | + { |
|
596 | + $detected_supported[$key] = $value->title(); |
|
597 | + } |
|
574 | 598 | } |
575 | 599 | |
576 | 600 | $txt['caching_information'] = str_replace('{supported_accelerators}', '<i>' . implode(', ', $detected_names) . '</i><br />', $txt['caching_information']); |
@@ -624,7 +648,9 @@ discard block |
||
624 | 648 | |
625 | 649 | // Don't say you're using that win-thing, no cookies for you :P |
626 | 650 | if (stripos(PHP_OS, 'win') === 0) |
627 | - $context['settings_message'] = $txt['loadavg_disabled_windows']; |
|
651 | + { |
|
652 | + $context['settings_message'] = $txt['loadavg_disabled_windows']; |
|
653 | + } |
|
628 | 654 | else |
629 | 655 | { |
630 | 656 | require_once(SUBSDIR . '/Server.subs.php'); |