summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-05-05 12:07:38 +0100
committerAndrew Dolgov <[email protected]>2007-05-05 12:07:38 +0100
commit9e21a5713ffb888ccb3fcc3aa72f9970d4f4a372 (patch)
tree901d623e73a0a696d98d41cfb89fd12b529ecae3 /update.php
parente98bb2430823760279579da2ffd1ed1360f71e6a (diff)
handle missing update schema diff in update.php
Diffstat (limited to 'update.php')
-rw-r--r--update.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/update.php b/update.php
index e3a25f47c..8daacc969 100644
--- a/update.php
+++ b/update.php
@@ -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;
}