Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 enrol/authorize/db/postgres7.php
6 enrol/authorize/db/postgres7.php
@@ -30,8 +30,8 @@ function enrol_authorize_upgrade($oldversion=0) {
30 30 table_column('enrol_authorize', 'courseid', 'courseid', 'integer', '10', 'unsigned', '0', 'not null');
31 31 table_column('enrol_authorize', 'userid', 'userid', 'integer', '10', 'unsigned', '0', 'not null');
32 32 // Add some indexes for speed.
33   - modify_database('',"CREATE INDEX prefix_enrol_authorize_courseid_idx ON prefix_enrol_authorize (courseid);");
34   - modify_database('',"CREATE INDEX prefix_enrol_authorize_userid_idx ON prefix_enrol_authorize (userid);");
  33 + execute_sql("CREATE INDEX {$CFG->prefix}enrol_authorize_courseid_idx ON {$CFG->prefix}enrol_authorize (courseid);", false);
  34 + execute_sql("CREATE INDEX {$CFG->prefix}enrol_authorize_userid_idx ON {$CFG->prefix}enrol_authorize (userid);", false);
35 35 }
36 36
37 37 if ($oldversion < 2005112100) {
@@ -44,7 +44,7 @@ function enrol_authorize_upgrade($oldversion=0) {
44 44 // defaults.
45 45 $timenow = time();
46 46 $status = AN_STATUS_AUTH | AN_STATUS_CAPTURE;
47   - execute_sql(" UPDATE {$CFG->prefix}enrol_authorize SET timecreated='$timenow', timeupdated='$timenow', status='$status' ", false);
  47 + execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET timecreated='$timenow', timeupdated='$timenow', status='$status'", false);
48 48 }
49 49
50 50 if ($oldversion < 2005121200) {

0 comments on commit 023c3f0

Please sign in to comment.
Something went wrong with that request. Please try again.