]> git.wh0rd.org Git - tt-rss.git/commitdiff
db-updater: properly handle situation of newer active schema; utility scripts: fix...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Apr 2011 07:52:17 +0000 (11:52 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Apr 2011 07:52:17 +0000 (11:52 +0400)
db-updater.php
opml.php
register.php

index 8590ee82a01a70874dcfc3f3a8fa1e66fd885586..edee3bc83341369fc5cb2af7ab01c6567ddc8c26 100644 (file)
@@ -36,7 +36,7 @@ function confirmOP() {
 }
 </script>
 
-<div class="floatingLogo"><img src="images/logo.png"></div>
+<div class="floatingLogo"><img src="images/logo_wide.png"></div>
 
 <h1><?php echo __("Database Updater") ?></h1>
 
@@ -92,10 +92,8 @@ function confirmOP() {
                                </form>";
                }
 
-               return;
-       }
+       } else if ($version <= $latest_version && !$op) {
 
-       if (!$op) {
                print_warning(__("Please backup your database before proceeding."));
 
                print "<p>" . T_sprintf("Your Tiny Tiny RSS database needs update to the latest version (<b>%d</b> to <b>%d</b>).", $version, $latest_version) . "</p>";
@@ -160,6 +158,20 @@ function confirmOP() {
                        <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
                        </form>";
 
+       } else if ($version >= $latest_version) {
+
+               print_error(__("Your database schema is from a newer version of Tiny Tiny RSS."));
+
+               print "<p>" . T_sprintf("Found schema version: <b>%d</b>, required: <b>%d</b>.", $version, $latest_version) . "</p>";
+
+               print "<p>" . __("Schema upgrade impossible. Please update Tiny Tiny RSS files to the newer version and continue.") . "</p>";
+
+               print "<form method=\"GET\" action=\"backend.php\">
+                       <input type=\"hidden\" name=\"op\" value=\"logout\">
+                       <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
+                       </form>";
+
+
        }
 
 ?>
index 40ea2637a379da8b3580de8e849c68e90c392494..2e1eb84c6f4459d34635bbee0f684f78dc5f5039 100644 (file)
--- a/opml.php
+++ b/opml.php
                                <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
                        </head>
                        <body>
-                       <div class=\"floatingLogo\"><img src=\"images/logo.png\"></div>
+                       <div class=\"floatingLogo\"><img src=\"images/logo_wide.png\"></div>
                        <h1>".__('OPML Utility')."</h1>";
 
                db_query($link, "BEGIN");
index 86a8824cf28d88abcc8a1b835bb7014332cb1639..144189f74b0e2dfd74a9a6d79829177c8b3eb9d5 100644 (file)
 
 <body>
 
-<div class="floatingLogo"><img src="images/logo.png"></div>
+<div class="floatingLogo"><img src="images/logo_wide.png"></div>
 
 <h1><?php echo __("Create new account") ?></h1>