]> git.wh0rd.org - tt-rss.git/blobdiff - update.php
handle missing update schema diff in update.php
[tt-rss.git] / update.php
index e3a25f47cf68504dbb53f140d0418fbef9a8ad82..8daacc969a85be14c517b1e8dcb93ecfc00f08bd 100644 (file)
@@ -82,12 +82,22 @@ function confirmOP() {
        ksort($update_versions, SORT_NUMERIC);
        
        $latest_version = max(array_keys($update_versions));
-       
+
        if ($version == $latest_version) {
-               print "<p>".__("Tiny Tiny RSS database is up to date.")."</p>";
-               print "<form method=\"GET\" action=\"tt-rss.php\">
-                       <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
-                       </form>";
+
+               if ($version != SCHEMA_VERSION) {
+                       print_error(__("Could not update database"));
+
+                       print "<p>" . 
+                               __("Could not find necessary schema file, need version:") .
+                               " " . SCHEMA_VERSION . __(", found: ") . $latest_version . "</p>";
+
+               } else {
+                       print "<p>".__("Tiny Tiny RSS database is up to date.")."</p>";
+                       print "<form method=\"GET\" action=\"tt-rss.php\">
+                               <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
+                               </form>";
+               }
 
                return;
        }