Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some indexes were added in 15_STABLE. So, don't show an error message…

… again if indexes are already exist.
  • Loading branch information...
commit 023c3f0ee29d9717a2e279ee87a5aa7ea372c84d 1 parent 3f5e294
ethem authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 enrol/authorize/db/postgres7.php
View
6 enrol/authorize/db/postgres7.php
@@ -30,8 +30,8 @@ function enrol_authorize_upgrade($oldversion=0) {
table_column('enrol_authorize', 'courseid', 'courseid', 'integer', '10', 'unsigned', '0', 'not null');
table_column('enrol_authorize', 'userid', 'userid', 'integer', '10', 'unsigned', '0', 'not null');
// Add some indexes for speed.
- modify_database('',"CREATE INDEX prefix_enrol_authorize_courseid_idx ON prefix_enrol_authorize (courseid);");
- modify_database('',"CREATE INDEX prefix_enrol_authorize_userid_idx ON prefix_enrol_authorize (userid);");
+ execute_sql("CREATE INDEX {$CFG->prefix}enrol_authorize_courseid_idx ON {$CFG->prefix}enrol_authorize (courseid);", false);
+ execute_sql("CREATE INDEX {$CFG->prefix}enrol_authorize_userid_idx ON {$CFG->prefix}enrol_authorize (userid);", false);
}
if ($oldversion < 2005112100) {
@@ -44,7 +44,7 @@ function enrol_authorize_upgrade($oldversion=0) {
// defaults.
$timenow = time();
$status = AN_STATUS_AUTH | AN_STATUS_CAPTURE;
- execute_sql(" UPDATE {$CFG->prefix}enrol_authorize SET timecreated='$timenow', timeupdated='$timenow', status='$status' ", false);
+ execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET timecreated='$timenow', timeupdated='$timenow', status='$status'", false);
}
if ($oldversion < 2005121200) {
Please sign in to comment.
Something went wrong with that request. Please try again.