From: ethem Date: Wed, 26 Apr 2006 15:23:01 +0000 (+0000) Subject: Penny made it this way on purpose, apparently, to make it work properly on Postgresql... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e66012b56302ecd7ef6d2ac6f9260b16e7ac3420;p=moodle.git Penny made it this way on purpose, apparently, to make it work properly on Postgresql, so it reverted. --- diff --git a/enrol/authorize/db/postgres7.php b/enrol/authorize/db/postgres7.php index 8ab86ca166..56afca7381 100644 --- a/enrol/authorize/db/postgres7.php +++ b/enrol/authorize/db/postgres7.php @@ -8,12 +8,13 @@ function enrol_authorize_upgrade($oldversion=0) { $result = true; - if ($oldversion == 0) { - $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'))) { + 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. + return $result; // RETURN, sql file contains last upgrades. } // Authorize module was installed before. Upgrades must be applied to SQL file.