Skip to content
Permalink
Browse files
Merge branch 'MDL-62588-34' of git://github.com/rezaies/moodle into M…
…OODLE_34_STABLE
  • Loading branch information
David Monllao committed Jun 19, 2018
2 parents 7090d80 + 5dcdf1d commit f601f8fa3f8551a904ebd90b4d336194c2517559
Showing with 20 additions and 2 deletions.
  1. +19 −1 enrol/paypal/db/upgrade.php
  2. +1 −1 enrol/paypal/version.php
@@ -43,7 +43,9 @@
defined('MOODLE_INTERNAL') || die();

function xmldb_enrol_paypal_upgrade($oldversion) {
global $CFG;
global $DB;

$dbman = $DB->get_manager();

// Moodle v3.1.0 release upgrade line.
// Put any upgrade step following this.
@@ -57,5 +59,21 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2017111301) {

// Define field instanceid to be added to enrol_paypal.
// For some reason, some Moodle instances that are upgraded from old versions do not have this field.
$table = new xmldb_table('enrol_paypal');
$field = new xmldb_field('instanceid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'userid');

// Conditionally launch add field instanceid.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}

// Paypal savepoint reached.
upgrade_plugin_savepoint(true, 2017111301, 'enrol', 'paypal');
}

return true;
}
@@ -25,7 +25,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2017111301; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'enrol_paypal'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 60;

0 comments on commit f601f8f

Please sign in to comment.