* remove whitespaces (IDE formatting)

This commit is contained in:
slawkens 2018-05-29 20:18:19 +02:00
parent bd19b8665a
commit 668e4688c4

View File

@ -46,7 +46,7 @@ define('URI', $uri);
if(preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) { if(preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) {
$tmp = explode('.', $uri); $tmp = explode('.', $uri);
$_REQUEST['name'] = urldecode($tmp[0]); $_REQUEST['name'] = urldecode($tmp[0]);
chdir(TOOLS . 'signature'); chdir(TOOLS . 'signature');
include(TOOLS . 'signature/index.php'); include(TOOLS . 'signature/index.php');
exit(); exit();
@ -121,20 +121,20 @@ else {
'/^spells\/[A-Za-z0-9-_%]+\/[A-Za-z0-9-_]+\/?$/' => array('subtopic' => 'spells', 'vocation' => '$1', 'order' => '$2'), '/^spells\/[A-Za-z0-9-_%]+\/[A-Za-z0-9-_]+\/?$/' => array('subtopic' => 'spells', 'vocation' => '$1', 'order' => '$2'),
'/^gifts\/history\/?$/' => array('subtopic' => 'gifts', 'action' => 'show_history'), '/^gifts\/history\/?$/' => array('subtopic' => 'gifts', 'action' => 'show_history'),
); );
foreach($rules as $rule => $redirect) { foreach($rules as $rule => $redirect) {
if (preg_match($rule, $uri)) { if (preg_match($rule, $uri)) {
$tmp = explode('/', $uri); $tmp = explode('/', $uri);
foreach($redirect as $key => $value) { foreach($redirect as $key => $value) {
if(strpos($value, '$') !== false) { if(strpos($value, '$') !== false) {
$value = str_replace('$' . $value[1], $tmp[$value[1]], $value); $value = str_replace('$' . $value[1], $tmp[$value[1]], $value);
} }
$_REQUEST[$key] = $value; $_REQUEST[$key] = $value;
$_GET[$key] = $value; $_GET[$key] = $value;
} }
$found = true; $found = true;
break; break;
} }
@ -200,7 +200,7 @@ $hooks->trigger(HOOK_STARTUP);
if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_statistics']) { if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_statistics']) {
$report_time = 30 * 24 * 60 * 60; // report one time per 30 days $report_time = 30 * 24 * 60 * 60; // report one time per 30 days
$should_report = true; $should_report = true;
$value = ''; $value = '';
if($cache->enabled() && $cache->fetch('last_usage_report', $value)) { if($cache->enabled() && $cache->fetch('last_usage_report', $value)) {
$should_report = time() > (int)$value + $report_time; $should_report = time() > (int)$value + $report_time;
@ -218,11 +218,11 @@ if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_stat
$should_report = false; $should_report = false;
} }
} }
if($should_report) { if($should_report) {
require_once(LIBS . 'usage_statistics.php'); require_once(LIBS . 'usage_statistics.php');
Usage_Statistics::report(); Usage_Statistics::report();
updateDatabaseConfig('last_usage_report', time()); updateDatabaseConfig('last_usage_report', time());
if($cache->enabled()) { if($cache->enabled()) {
$cache->set('last_usage_report', time()); $cache->set('last_usage_report', time());
@ -278,7 +278,7 @@ if($config['backward_support']) {
$tickers_content = ''; $tickers_content = '';
$subtopic = PAGE; $subtopic = PAGE;
$main_content = ''; $main_content = '';
$config['access_admin_panel'] = 2; $config['access_admin_panel'] = 2;
$group_id_of_acc_logged = 0; $group_id_of_acc_logged = 0;
if($logged && $account_logged) if($logged && $account_logged)
@ -298,7 +298,7 @@ if($config['backward_support']) {
$config['site']['download_page'] = true; $config['site']['download_page'] = true;
$config['site']['serverinfo_page'] = true; $config['site']['serverinfo_page'] = true;
$config['site']['screenshot_page'] = true; $config['site']['screenshot_page'] = true;
if($config['forum'] != '') if($config['forum'] != '')
$config['forum_link'] = (strtolower($config['forum']) == 'site' ? getLink('forum') : $config['forum']); $config['forum_link'] = (strtolower($config['forum']) == 'site' ? getLink('forum') : $config['forum']);
@ -363,7 +363,7 @@ if($load_it)
} }
else else
$content .= $query['body']; // plain html $content .= $query['body']; // plain html
if(hasFlag(FLAG_CONTENT_PAGES) || superAdmin()) { if(hasFlag(FLAG_CONTENT_PAGES) || superAdmin()) {
$content = $twig->render('admin.pages.links.html.twig', array( $content = $twig->render('admin.pages.links.html.twig', array(
'page' => array('id' => $query['id'], 'hidden' => $query['hidden']) 'page' => array('id' => $query['id'], 'hidden' => $query['hidden'])