]> git.wh0rd.org - tt-rss.git/blobdiff - update.php
modify include path order (closes #514)
[tt-rss.git] / update.php
index 6e23892e29b084b080ceddaa17b95beecdae14f4..8a5512efbbf3840e476b00e85ea4860aeb0761d5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
-       set_include_path(get_include_path() . PATH_SEPARATOR .
-               dirname(__FILE__) . "/include");
+       set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+               get_include_path());
 
        define('DISABLE_SESSIONS', true);
 
@@ -52,6 +52,7 @@
                print "  -quiet              - don't show messages\n";
                print "  -indexes            - recreate missing schema indexes\n";
                print "  -convert-filters    - convert type1 filters to type2\n";
+               print "  -force-update       - force update of all feeds\n";
                print "  -help               - show this help\n";
                return;
        }
 
        }
 
+       if (in_array("-force-update", $op)) {
+               _debug("marking all feeds as needing update...");
+
+               db_query($link, "UPDATE ttrss_feeds SET last_update_started = '1970-01-01',
+                               last_updated = '1970-01-01'");
+       }
+
        db_close($link);
 
        if ($lock_handle != false) {