Commit 5780e905 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Revert 8a538f10 & fc8d64fd which prevent new installs from working

parent 9ebb0be6
......@@ -39,7 +39,6 @@ if (empty($upgrades['disablelogin'])) {
auth_setup();
}
unset($upgrades['disablelogin']);
set_config('disablelogin', null);
if (!$upgrades) {
die_info(get_string('noupgrades', 'admin'));
......
......@@ -76,7 +76,9 @@ if (empty($CFG->directorypermissions)) {
require('mahara.php');
ensure_sanity();
require('dml.php');
require('ddl.php');
require('web.php');
require('activity.php');
require('user.php');
// Database access functions
......@@ -90,6 +92,7 @@ try {
ob_start();
$db = &ADONewConnection($CFG->dbtype);
$dbgenerator = null;
if (empty($CFG->dbhost)) {
$CFG->dbhost = '';
}
......
......@@ -43,7 +43,6 @@
*/
// Mahara hacks
global $CFG;
$CFG->libdir = get_config('libroot');
$CFG->prefix = (isset($CFG->dbprefix)) ? $CFG->dbprefix : '';
if (is_postgres()) {
......
......@@ -1409,6 +1409,10 @@ function db_format_tsfield($field, $as = null) {
*/
function configure_dbconnection() {
global $db;
global $dbgenerator;
$classname = 'XMLDB' . get_config('dbtype');
$dbgenerator = new $classname();
increment_perf_db_writes();
$db->Execute("SET NAMES 'utf8'");
......
......@@ -855,8 +855,10 @@ function safe_require($plugintype, $pluginname, $filename='lib.php', $function='
$fullpath = get_config('docroot') . 'artefact/' . $bits[0] . '/blocktype/' . $bits[1] . '/' . $filename;
}
else {
if ($artefactplugin = get_field('blocktype_installed', 'artefactplugin', 'name', $pluginname)) {
$fullpath = get_config('docroot') . 'artefact/' . $artefactplugin . '/blocktype/' . $pluginname . '/'. $filename;
if (table_exists(new XMLDBTable('blocktype_installed'))) {
if ($artefactplugin = get_field('blocktype_installed', 'artefactplugin', 'name', $pluginname)) {
$fullpath = get_config('docroot') . 'artefact/' . $artefactplugin . '/blocktype/' . $pluginname . '/'. $filename;
}
}
}
}
......
......@@ -31,7 +31,6 @@ defined('INTERNAL') || die();
*/
class InstallationException extends SystemException {}
require_once('ddl.php');
/**
* This function checks core and plugins for which need to be upgraded/installed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment