Merge pull request #8410 from annando/acessible-pictures
[friendica.git/.git] / update.php
index 314b166..82b184c 100644 (file)
@@ -92,23 +92,7 @@ function update_1191()
        DI::config()->set('system', 'maintenance', 1);
 
        if (Addon::isEnabled('forumlist')) {
-               $addon = 'forumlist';
-               $addons = DI::config()->get('system', 'addon');
-               $addons_arr = [];
-
-               if ($addons) {
-                       $addons_arr = explode(",", str_replace(" ", "", $addons));
-
-                       $idx = array_search($addon, $addons_arr);
-                       if ($idx !== false) {
-                               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' ");
-                               DI::config()->set('system', 'addon', implode(", ", $addons_arr));
-                       }
-               }
+               Addon::uninstall('forumlist');
        }
 
        // select old formlist addon entries