]> git.wh0rd.org - tt-rss.git/blobdiff - update.php
another take on inclusion of errorhandler in CLI scripts
[tt-rss.git] / update.php
index e1afb6bd6e927e71d6667cab611daed9d45a1f36..d8b956942dd92459c28ff89681b02212ae396b44 100755 (executable)
                return;
        }
 
+       if (!isset($options['daemon'])) {
+               require_once "errorhandler.php";
+       }
+
+       if (!isset($options['update-schema'])) {
+               $schema_version = get_schema_version($link);
+
+               if ($schema_version != SCHEMA_VERSION) {
+                       die("Schema version is wrong, please upgrade the database.\n");
+               }
+       }
+
        define('QUIET', isset($options['quiet']));
 
        if (isset($options["log"])) {
 
        if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))
                unlink(LOCK_DIRECTORY . "/$lock_filename");
-g?>
+?>