From 22c7cab0cd90ddb0614c56df4e4345623940c351 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 27 Jan 2020 19:52:54 +0000 Subject: [PATCH] Merge AUTO_DB_UPGRADE into SPEED_HAX --- core/sys_config.php | 1 - index.php | 2 +- tests/bootstrap.php | 4 +--- tests/defines.php | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/sys_config.php b/core/sys_config.php index 323d1aa5..f55b5328 100644 --- a/core/sys_config.php +++ b/core/sys_config.php @@ -36,7 +36,6 @@ _d("MIN_PHP_VERSION", '7.3');// string minimum supported PHP version _d("TRACE_FILE", null); // string file to log performance data into _d("TRACE_THRESHOLD", 0.0); // float log pages which take more time than this many seconds _d("ENABLED_MODS", "imageboard"); -_d("AUTO_DB_UPGRADE", true); // bool whether or not to automatically run DB schema updates /* * Calculated settings - you should never need to change these diff --git a/index.php b/index.php index 97d65540..11b41c9a 100644 --- a/index.php +++ b/index.php @@ -119,7 +119,7 @@ $_tracer->end(); //$_tracer->mark(@$_SERVER["REQUEST_URI"]); $_tracer->begin($_SERVER["REQUEST_URI"] ?? "No Request"); -if (AUTO_DB_UPGRADE) { +if (!SPEED_HAX) { send_event(new DatabaseUpgradeEvent()); } send_event(new InitExtEvent()); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index d1de5021..203ae810 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -24,9 +24,7 @@ _load_theme_files(); $page = new Page(); _load_event_listeners(); -if (AUTO_DB_UPGRADE) { - send_event(new DatabaseUpgradeEvent()); -} +send_event(new DatabaseUpgradeEvent()); send_event(new InitExtEvent()); abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase diff --git a/tests/defines.php b/tests/defines.php index bd0d016c..a43aec15 100644 --- a/tests/defines.php +++ b/tests/defines.php @@ -19,7 +19,6 @@ define("TRACE_FILE", null); define("TRACE_THRESHOLD", 0.0); define("ENABLED_MODS", "imageboard"); define("SCORE_VERSION", 'develop/'.VERSION); -define("AUTO_DB_UPGRADE", true); define("TIMEZONE", 'UTC'); define("BASE_HREF", "/"); define("CLI_LOG_LEVEL", 50);