]> git.wh0rd.org - tt-rss.git/blobdiff - update.php
fix pluginhost created without dbh
[tt-rss.git] / update.php
index fcce26d5c864ff950b8b1ad7e3091632b8d3d5c2..1e653311d2b20b0296dfb1818fbce5b67476fbfa 100755 (executable)
@@ -14,7 +14,6 @@
        require_once "sanity_check.php";
        require_once "db.php";
        require_once "db-prefs.php";
-       require_once "errorhandler.php";
 
        if (!defined('PHP_EXECUTABLE'))
                define('PHP_EXECUTABLE', '/usr/bin/php');
                return;
        }
 
+       if (!isset($options['daemon'])) {
+               require_once "errorhandler.php";
+       }
+
        if (!isset($options['update-schema'])) {
                $schema_version = get_schema_version();
 
        }
 
        if (isset($options["list-plugins"])) {
-               $tmppluginhost = new PluginHost();
+               $tmppluginhost = new PluginHost(Db::get());
                $tmppluginhost->load_all($tmppluginhost::KIND_ALL);
                $enabled = array_map("trim", explode(",", PLUGINS));