From e32b20464caf03f8ee4f48aff09d8c89076af590 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 11 Aug 2023 14:17:23 +0700 Subject: [PATCH] Minor improvements (#218) --- CHANGELOG.md | 2 +- common.php | 8 +++++++- library/config.php | 8 -------- library/includes/init_bb.php | 1 - 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b880432..405200e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ **Merged pull requests:** - Release v2.1.5-2023.08 🎉 -- Minor improvements [\#215](https://github.com/torrentpier/torrentpier-lts/pull/215), [\#216](https://github.com/torrentpier/torrentpier-lts/pull/216), [\#217](https://github.com/torrentpier/torrentpier-lts/pull/217) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#215](https://github.com/torrentpier/torrentpier-lts/pull/215), [\#216](https://github.com/torrentpier/torrentpier-lts/pull/216), [\#217](https://github.com/torrentpier/torrentpier-lts/pull/217), [\#218](https://github.com/torrentpier/torrentpier-lts/pull/218) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.07](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.07) (2023-08-04) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.06...v2.1.5-2023.07) diff --git a/common.php b/common.php index f3f0e8d5..7937fe31 100644 --- a/common.php +++ b/common.php @@ -26,7 +26,13 @@ if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) } // Get initial config -require(BB_ROOT . 'library/config.php'); +require_once(BB_ROOT . 'library/config.php'); + +// Local config +if (is_file(BB_ROOT . '/library/config.local.php')) +{ + require_once(BB_ROOT . '/library/config.local.php'); +} // Load Zend Framework use Zend\Loader\StandardAutoloader; diff --git a/library/config.php b/library/config.php index 53b844d2..b9161a51 100644 --- a/library/config.php +++ b/library/config.php @@ -578,11 +578,3 @@ $bb_cfg['nofollow'] = array( 'disabled' => false, 'allowed_url' => array($domain_name), // 'allowed.site', 'www.allowed.site' ); - -// Local config -if (file_exists(BB_ROOT. '/library/config.local.php')) -{ - include_once(BB_ROOT. '/library/config.local.php'); -} - -define('BB_CFG_LOADED', true); diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index 220ef3de..be4a2bff 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -2,7 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); if (!(PHP_VERSION_ID >= 50303)) die('TorrentPier II requires PHP version 5.3.3+. Your PHP version '. PHP_VERSION); -if (!defined('BB_CFG_LOADED')) trigger_error('File config.php not loaded', E_USER_ERROR); // Define some basic configuration arrays unset($stopwords, $synonyms_match, $synonyms_replace);