]> git.wh0rd.org - tt-rss.git/commitdiff
handle missing update schema diff in update.php
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 5 May 2007 11:07:38 +0000 (12:07 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 5 May 2007 11:07:38 +0000 (12:07 +0100)
tt-rss.css
update.php
utility.css

index a12736b7d5ae7b8a7816a07819ed5200fcf61956..57627aa583fefb218eb214058c94bf9f2251ee60 100644 (file)
@@ -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;
 }
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;
        }
index f51182a7a5fa7cb5853a99bf02e20cf6cc7005e8..8a254afc1576dca4181824807c415831967cf93e 100644 (file)
@@ -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%;
+}
+