First time install detection.

This commit is contained in:
ethem
2006-03-27 09:50:39 +00:00
parent 6682f3a231
commit 9e3e2938fc
+19 -16
View File
@@ -1,15 +1,18 @@
<?PHP //$Id$
// MySQL commands for upgrading this enrolment module
function authorize_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
if ($oldversion == 0) {
modify_database("$CFG->dirroot/enrol/authorize/db/mysql.sql");
<?PHP //$Id$
// MySQL commands for upgrading this enrolment module
function authorize_upgrade($oldversion=0) {
global $CFG, $THEME, $db;
$result = true;
if (!$tables = $db->MetaColumns($CFG->prefix . 'enrol_authorize')) {
$installfirst = true;
}
if ($oldversion == 0 || !empty($installfirst)) {
modify_database("$CFG->dirroot/enrol/authorize/db/mysql.sql");
}
if ($oldversion < 2005071601) {
@@ -27,7 +30,7 @@ function authorize_upgrade($oldversion=0) {
handling, please ensure that you have turned loginhttps ON in Admin >> Variables >> Security.");
}
return $result;
}
?>
return $result;
}
?>