Merge branch 'MDL-52210-master-2' of git://github.com/cameron1729/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 13 Jan 2016 08:57:04 +0000 (08:57 +0000)
committerDan Poltawski <dan@moodle.com>
Wed, 13 Jan 2016 08:58:18 +0000 (08:58 +0000)
1  2 
lib/db/upgrade.php

@@@ -4806,5 -4795,17 +4795,17 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2016011100.15);
      }
  
 -    if ($oldversion < 2016011100.16) {
++    if ($oldversion < 2016011200.00) {
+         // Force uninstall of deleted tool.
+         if (!file_exists("$CFG->dirroot/webservice/amf")) {
+             // Remove capabilities.
+             capabilities_cleanup('webservice_amf');
+             // Remove all other associated config.
+             unset_all_config_for_plugin('webservice_amf');
+         }
+         upgrade_main_savepoint(true, 2016011100.16);
+     }
      return true;
  }