Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

file postgres7.php was added on branch MOODLE_15_STABLE on 2005-12-02…

… 11:45:36 +0000
  • Loading branch information...
commit 647d7ca7c09c9348b2b702497159da472d9898b4 1 parent 061e5eb
ethem authored
Showing with 0 additions and 42 deletions.
  1. +0 −42 enrol/authorize/db/postgres7.php
View
42 enrol/authorize/db/postgres7.php
@@ -1,42 +0,0 @@
-<?PHP //$Id$
-
-// PostgreSQL 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/postgres7.sql");
- }
-
- if ($oldversion < 2005080200) {
- // Be sure, only last 4 digit is inserted.
- table_column('enrol_authorize', 'cclastfour', 'cclastfour', 'integer', '4', 'unsigned', '0', 'not null');
- 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);");
- }
-
- if ($oldversion < 2005112100) {
- include_once("$CFG->dirroot/enrol/authorize/enrol.php");
-
- table_column('enrol_authorize', '', 'authcode', 'varchar', '6', '', '', '', 'avscode'); // CAPTURE_ONLY
- table_column('enrol_authorize', '', 'status', 'integer', '10', 'unsigned', '0', 'not null', 'transid');
- table_column('enrol_authorize', '', 'timecreated', 'integer', '10', 'unsigned', '0', 'not null', 'status');
- table_column('enrol_authorize', '', 'timeupdated', 'integer', '10', 'unsigned', '0', 'not null', 'timecreated');
- // status index for speed.
- modify_database('',"CREATE INDEX prefix_enrol_authorize_status_idx ON prefix_enrol_authorize (status);");
- // 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);
- }
-
- return $result;
-}
-
-?>
Please sign in to comment.
Something went wrong with that request. Please try again.