mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Penny made it this way on purpose, apparently, to make it work properly on Postgresql, so it reverted.
This commit is contained in:
parent
8c75d90f8d
commit
e66012b563
@ -8,12 +8,13 @@ function enrol_authorize_upgrade($oldversion=0) {
|
||||
|
||||
$result = true;
|
||||
|
||||
if ($oldversion == 0) {
|
||||
if (!$tables = $db->MetaColumns($CFG->prefix . 'enrol_authorize')) {
|
||||
$installfirst = true;
|
||||
}
|
||||
|
||||
if ($oldversion == 0 || !empty($installfirst)) { // First time install
|
||||
$result = modify_database("$CFG->dirroot/enrol/authorize/db/postgres7.sql");
|
||||
return $result; // SQL file contains all upgrades.
|
||||
} else if (!in_array($CFG->prefix . 'enrol_authorize', $db->MetaTables('TABLES'))) {
|
||||
$result = modify_database("$CFG->dirroot/enrol/authorize/db/postgres7.sql");
|
||||
return $result; // SQL file contains all upgrades.
|
||||
return $result; // RETURN, sql file contains last upgrades.
|
||||
}
|
||||
|
||||
// Authorize module was installed before. Upgrades must be applied to SQL file.
|
||||
|
Loading…
x
Reference in New Issue
Block a user