From 460ebd6c311b72901c1d75b723d0d6a754f6b2e0 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Mon, 26 Jul 2010 20:17:36 +0000 Subject: [PATCH] MDL-21249 fixed recent installer regression, sorry --- admin/cli/install.php | 3 +++ install.php | 3 +++ lib/installlib.php | 2 ++ lib/setup.php | 4 +--- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/admin/cli/install.php b/admin/cli/install.php index eb6afe742b559..b4d42d542f19a 100644 --- a/admin/cli/install.php +++ b/admin/cli/install.php @@ -98,6 +98,9 @@ // we need a lot of memory @ini_set('memory_limit', '128M'); +/** Used by library scripts to check they are being called by Moodle */ +define('MOODLE_INTERNAL', true); + // Check that PHP is of a sufficient version if (version_compare(phpversion(), "5.2.8") < 0) { $phpversion = phpversion(); diff --git a/install.php b/install.php index 920ba8c43c679..387e958ce9eb8 100644 --- a/install.php +++ b/install.php @@ -73,6 +73,9 @@ // sudden increases of memory needs ;-) @ini_set('memory_limit', $minrequiredmemory); +/** Used by library scripts to check they are being called by Moodle */ +define('MOODLE_INTERNAL', true); + require dirname(__FILE__).'/lib/installlib.php'; // TODO: add lang detection here if empty $_REQUEST['lang'] diff --git a/lib/installlib.php b/lib/installlib.php index 3f7e787d9cbe4..d6efe04b33b09 100644 --- a/lib/installlib.php +++ b/lib/installlib.php @@ -24,6 +24,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die(); + /** INSTALL_WELCOME = 0 */ define('INSTALL_WELCOME', 0); /** INSTALL_ENVIRONMENT = 1 */ diff --git a/lib/setup.php b/lib/setup.php index 81118021b6d2e..6d641dd8f193f 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -150,9 +150,7 @@ } } -/** - * Used by some scripts to check they are being called by Moodle - */ +/** Used by library scripts to check they are being called by Moodle */ define('MOODLE_INTERNAL', true); /**