From 77ded00c686642e7195e9d868edd9210627afbd9 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 3 Oct 2023 19:54:38 +0700 Subject: [PATCH] Update common.php --- common.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/common.php b/common.php index 1b39cee3..9ec04066 100644 --- a/common.php +++ b/common.php @@ -20,14 +20,26 @@ header('X-Frame-Options: SAMEORIGIN'); header('X-Powered-By: TorrentPier LTS'); // Cloudflare -if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; +if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) +{ + $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; +} // Get initial config -if (file_exists(BB_ROOT . 'library/config.local.php')) require(BB_ROOT . 'library/config.local.php'); -else require(BB_ROOT . 'library/config.php'); +if (file_exists(BB_ROOT . 'library/config.local.php')) +{ + require(BB_ROOT . 'library/config.local.php'); +} +elseif (file_exists(BB_ROOT . 'library/config.php')) +{ + require(BB_ROOT . 'library/config.php'); +} // Get mods config -if (file_exists(BB_ROOT . 'library/config.mods.php')) require(BB_ROOT . 'library/config.mods.php'); +if (file_exists(BB_ROOT . 'library/config.mods.php')) +{ + require(BB_ROOT . 'library/config.mods.php'); +} // Load Zend Framework use Zend\Loader\StandardAutoloader;