From 9e21a5713ffb888ccb3fcc3aa72f9970d4f4a372 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 5 May 2007 12:07:38 +0100 Subject: [PATCH] handle missing update schema diff in update.php --- tt-rss.css | 2 +- update.php | 20 +++++++++++++++----- utility.css | 11 ++++++++++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/tt-rss.css b/tt-rss.css index a12736b7..57627aa5 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -600,7 +600,7 @@ div.warning { } -div.warning img, div.notice img { +div.warning img, div.notice img, div.error img { vertical-align : middle; padding : 5px; } diff --git a/update.php b/update.php index e3a25f47..8daacc96 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 "

".__("Tiny Tiny RSS database is up to date.")."

"; - print "
- -
"; + + if ($version != SCHEMA_VERSION) { + print_error(__("Could not update database")); + + print "

" . + __("Could not find necessary schema file, need version:") . + " " . SCHEMA_VERSION . __(", found: ") . $latest_version . "

"; + + } else { + print "

".__("Tiny Tiny RSS database is up to date.")."

"; + print "
+ +
"; + } return; } diff --git a/utility.css b/utility.css index f51182a7..8a254afc 100644 --- a/utility.css +++ b/utility.css @@ -47,8 +47,17 @@ div.warning { } -div.warning img, div.notice img { +div.warning img, div.notice img, div.error img { vertical-align : middle; padding : 5px; } +div.error { + border : 1px solid #ff0000; + background : #ffcccc; + padding : 5px; + margin : 0px 0px 5px 0px; + font-size : 9pt; + width : 50%; +} + -- 2.39.2