From e5400ea6429e683bab588fc09c34e50e25b5038d Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 11 Feb 2024 19:12:57 +0700 Subject: [PATCH] Update demo_mode.php --- library/includes/cron/jobs/demo_mode.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/includes/cron/jobs/demo_mode.php b/library/includes/cron/jobs/demo_mode.php index 52545cb8c..b8bb59a78 100644 --- a/library/includes/cron/jobs/demo_mode.php +++ b/library/includes/cron/jobs/demo_mode.php @@ -11,6 +11,9 @@ if (!defined('BB_ROOT')) { die(basename(__FILE__)); } +ini_set('memory_limit', '-1'); +set_time_limit(600); + global $cron_runtime_log; $dump_path = BB_ROOT . 'install/sql/mysql.sql'; @@ -26,6 +29,11 @@ if (!DB()->query("DROP DATABASE " . DB()->selected_db)) { return; } +// Create database +if (!DB()->query("CREATE DATABASE " . DB()->selected_db)) { + return; +} + // Import sql dump from file if (!DB()->multi_query($sql_dump)) { return;