MDL-83424 install: Fix install scripts
This commit is contained in:
@@ -103,7 +103,7 @@ if (file_exists($distrolibfile)) {
|
||||
}
|
||||
|
||||
// Nothing to do if config.php exists
|
||||
$configfile = __DIR__.'/../../config.php';
|
||||
$configfile = dirname(__DIR__, 3).'/config.php';
|
||||
if (file_exists($configfile)) {
|
||||
require($configfile);
|
||||
require_once($CFG->libdir.'/clilib.php');
|
||||
@@ -158,6 +158,7 @@ global $CFG;
|
||||
$CFG = new stdClass();
|
||||
$CFG->lang = 'en';
|
||||
$CFG->dirroot = dirname(dirname(__DIR__));
|
||||
$CFG->root = dirname(__DIR__, 3);
|
||||
$CFG->libdir = "$CFG->dirroot/lib";
|
||||
$CFG->wwwroot = "http://localhost";
|
||||
$CFG->httpswwwroot = $CFG->wwwroot;
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_REQUEST['admin'])) {
|
||||
}
|
||||
|
||||
// If config.php exists we just created config.php and need to redirect to continue installation
|
||||
$configfile = '../config.php';
|
||||
$configfile = dirname(__DIR__) . '/config.php';
|
||||
if (file_exists($configfile)) {
|
||||
header("Location: $admin/index.php?lang=$lang");
|
||||
die;
|
||||
@@ -163,6 +163,7 @@ global $CFG;
|
||||
$CFG = new stdClass();
|
||||
$CFG->lang = $config->lang;
|
||||
$CFG->dirroot = __DIR__;
|
||||
$CFG->root = dirname(__DIR__);
|
||||
$CFG->libdir = "$CFG->dirroot/lib";
|
||||
$CFG->wwwroot = install_guess_wwwroot(); // can not be changed - ppl must use the real address when installing
|
||||
$CFG->httpswwwroot = $CFG->wwwroot;
|
||||
@@ -22,7 +22,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
|
||||
*/
|
||||
|
||||
require_once(__DIR__ . '/../../../config.php'); //included from messagelib (how to fix?)
|
||||
require_once(__DIR__ . '/../../../../config.php'); //included from messagelib (how to fix?)
|
||||
require_once($CFG->dirroot.'/message/output/lib.php');
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user