function globalUpdateFeeds()
 {
     include "rssfuncs.php";
     // Update all feeds needing a update.
     update_daemon_common(0, true, false);
     housekeeping_common(false);
     PluginHost::getInstance()->run_hooks(PluginHost::HOOK_UPDATE_TASK, "hook_update_task", $op);
 }
}
if (isset($options["daemon"])) {
    while (true) {
        $quiet = isset($options["quiet"]) ? "--quiet" : "";
        passthru(PHP_EXECUTABLE . " " . $argv[0] . " --daemon-loop {$quiet}");
        _debug("Sleeping for " . DAEMON_SLEEP_INTERVAL . " seconds...");
        sleep(DAEMON_SLEEP_INTERVAL);
    }
}
if (isset($options["daemon-loop"])) {
    if (!make_stampfile('update_daemon.stamp')) {
        _debug("warning: unable to create stampfile\n");
    }
    update_daemon_common(isset($options["pidlock"]) ? 50 : DAEMON_FEED_LIMIT);
    if (!isset($options["pidlock"]) || $options["task"] == 0) {
        housekeeping_common(true);
    }
    PluginHost::getInstance()->run_hooks(PluginHost::HOOK_UPDATE_TASK, "hook_update_task", $op);
}
if (isset($options["cleanup-tags"])) {
    $rc = cleanup_tags(14, 50000);
    _debug("{$rc} tags deleted.\n");
}
if (isset($options["indexes"])) {
    _debug("PLEASE BACKUP YOUR DATABASE BEFORE PROCEEDING!");
    _debug("Type 'yes' to continue.");
    if (read_stdin() != 'yes') {
        exit;
    }
    _debug("clearing existing indexes...");
    if (DB_TYPE == "pgsql") {