]> git.wh0rd.org - tt-rss.git/blobdiff - update.php
Merge pull request #47 from xaberus/master
[tt-rss.git] / update.php
index 7bf6807ffb4b2145a59a32d3c92125e8d96f4b46..ba4cadbcba9d70527d3f7ad2e404302831376e91 100755 (executable)
@@ -9,8 +9,8 @@
 
        require_once "functions.php";
        require_once "rssfuncs.php";
-       require_once "sanity_check.php";
        require_once "config.php";
+       require_once "sanity_check.php";
        require_once "db.php";
        require_once "db-prefs.php";
 
 
        if (in_array("-list-plugins", $op)) {
                $tmppluginhost = new PluginHost($link);
-               $tmppluginhost->load_all();
+               $tmppluginhost->load_all($tmppluginhost::KIND_ALL);
+               $enabled = array_map("trim", explode(",", PLUGINS));
+
+               echo "List of all available plugins:\n";
+
                foreach ($tmppluginhost->get_plugins() as $name => $plugin) {
-                       $about = $plugin->_about();
+                       $about = $plugin->about();
 
-                       printf("%-60s - v%.2f (by %s)\n%s\n\n",
-                               $name, $about[0], $about[2], $about[1]);
+                       $status = $about[3] ? "system" : "user";
+
+                       if (in_array($name, $enabled)) $name .= "*";
+
+                       printf("%-50s %-10s v%.2f (by %s)\n%s\n\n",
+                               $name, $status, $about[0], $about[2], $about[1]);
                }
+
+               echo "Plugins marked by * are currently enabled for all users.\n";
+
        }
 
        $pluginhost->run_commands($op);