MDL-83424 core: Move admin/cli scripts to root directory
Note: Plugin-specific CLI directories cannot be moved.
This commit is contained in:
committed by
Huong Nguyen
parent
5eb64075f4
commit
ba80ee68fb
@@ -103,7 +103,7 @@ if (file_exists($distrolibfile)) {
|
||||
}
|
||||
|
||||
// Nothing to do if config.php exists
|
||||
$configfile = dirname(__DIR__, 3).'/config.php';
|
||||
$configfile = dirname(__DIR__, 2).'/config.php';
|
||||
if (file_exists($configfile)) {
|
||||
require($configfile);
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
@@ -150,15 +150,15 @@ define('PHPUNIT_TEST', false);
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
// Check that PHP is of a sufficient version as soon as possible.
|
||||
require_once(__DIR__.'/../../lib/phpminimumversionlib.php');
|
||||
require_once(dirname(__DIR__, 2) . '/public/lib/phpminimumversionlib.php');
|
||||
moodle_require_minimum_php_version();
|
||||
|
||||
// set up configuration
|
||||
global $CFG;
|
||||
$CFG = new stdClass();
|
||||
$CFG->lang = 'en';
|
||||
$CFG->dirroot = dirname(dirname(__DIR__));
|
||||
$CFG->root = dirname(__DIR__, 3);
|
||||
$CFG->root = dirname(__DIR__, 2);
|
||||
$CFG->dirroot = $CFG->root . '/public';
|
||||
$CFG->libdir = "$CFG->dirroot/lib";
|
||||
$CFG->wwwroot = "http://localhost";
|
||||
$CFG->httpswwwroot = $CFG->wwwroot;
|
||||
@@ -65,7 +65,7 @@ Example:
|
||||
";
|
||||
|
||||
// Check that PHP is of a sufficient version as soon as possible.
|
||||
require_once(__DIR__.'/../../lib/phpminimumversionlib.php');
|
||||
require_once(dirname(__DIR__, 2) . '/public/lib/phpminimumversionlib.php');
|
||||
moodle_require_minimum_php_version();
|
||||
|
||||
// Nothing to do if config.php does not exist
|
||||
Reference in New Issue
Block a user