Skip to content

Commit

Permalink
MDL-59848 auth: Remove config for old plugins
Browse files Browse the repository at this point in the history
Note: ([email protected]) Amended slightly from original to update versions.
  • Loading branch information
andrewnicols authored and stronk7 committed Aug 22, 2017
1 parent 4508e14 commit 1bf96e2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2308,5 +2308,19 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2017080700.01);
}

if ($oldversion < 2017082200.00) {
$plugins = ['radius', 'fc', 'nntp', 'pam', 'pop3', 'imap'];

foreach ($plugins as $plugin) {
// Check to see if the plugin exists on disk.
// If it does not, remove the config for it.
if (!file_exists($CFG->dirroot . "/auth/{$plugin}/auth.php")) {
// Clean config.
unset_all_config_for_plugin("auth_{$plugin}");
}
}
upgrade_main_savepoint(true, 2017082200.00);
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

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

$version = 2017081700.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2017082200.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.

Expand Down

0 comments on commit 1bf96e2

Please sign in to comment.