Change plugin to addon

change the use of plugin to addon where appropriate.
This commit is contained in:
Adam Magness 2018-01-17 14:22:38 -05:00
parent 3bad83f24e
commit b86b04a81a
25 changed files with 164 additions and 164 deletions

View file

@ -85,21 +85,21 @@ function update_1191() {
Config::set('system', 'maintenance', 1);
if (Addon::isEnabled('forumlist')) {
$plugin = 'forumlist';
$plugins = Config::get('system','addon');
$plugins_arr = [];
$addon = 'forumlist';
$addons = Config::get('system', 'addon');
$addons_arr = [];
if ($plugins) {
$plugins_arr = explode(",",str_replace(" ", "",$plugins));
if ($addons) {
$addons_arr = explode(",",str_replace(" ", "", $addons));
$idx = array_search($plugin, $plugins_arr);
$idx = array_search($addon, $addons_arr);
if ($idx !== false){
unset($plugins_arr[$idx]);
unset($addons_arr[$idx]);
//delete forumlist manually from addon and hook table
// since Addon::uninstall() don't work here
q("DELETE FROM `addon` WHERE `name` = 'forumlist' ");
q("DELETE FROM `hook` WHERE `file` = 'addon/forumlist/forumlist.php' ");
Config::set('system','addon', implode(", ",$plugins_arr));
Config::set('system','addon', implode(", ", $addons_arr));
}
}
}