]> git.wh0rd.org - tt-rss.git/blobdiff - db-updater.php
update_rss_feed: bailout if cache is considered valid, but older than last_updated
[tt-rss.git] / db-updater.php
index 63c3c647a0f7b6e10b2ca48d8555c3b6b46700fe..2726110639aad6af7fd29864037a894bf12d7078 100644 (file)
@@ -1,5 +1,6 @@
 <?php
-       set_include_path(get_include_path() . PATH_SEPARATOR . "include");
+       set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
+               get_include_path());
 
        require_once "functions.php";
        require_once "sessions.php";
@@ -38,10 +39,12 @@ function confirmOP() {
 }
 </script>
 
-<div class="floatingLogo"><img src="images/logo_wide.png"></div>
+<div class="floatingLogo"><img src="images/logo_small.png"></div>
 
 <h1><?php echo __("Database Updater") ?></h1>
 
+<div class="content">
+
 <?php
        function getline($fp, $delim) {
                $result = "";
@@ -124,6 +127,7 @@ function confirmOP() {
                foreach (array_keys($update_versions) as $v) {
                        if ($v == $version + 1) {
                                print "<p>".T_sprintf("Updating to version %d...", $v)."</p>";
+                               db_query($link, "BEGIN");
                                $fp = fopen($update_versions[$v], "r");
                                if ($fp) {
                                        while (!feof($fp)) {
@@ -135,6 +139,7 @@ function confirmOP() {
                                        }
                                }
                                fclose($fp);
+                               db_query($link, "COMMIT");
 
                                print "<p>".__("Checking version... ");
 
@@ -152,8 +157,8 @@ function confirmOP() {
                        }
                }
 
-               print "<p>".T_sprintf("Finished. Performed <b>%d</b> update(s) up to schema
-                       version <b>%d</b>.", $num_updates, $version)."</p>";
+               print "<p>".sprintf(ngettext("Finished. Performed <b>%d</b> update up to schema version <b>%d</b>.",
+                       "Finished. Performed <b>%d</b> updates up to schema version <b>%d</b>.", $num_updates), $num_updates, $version)."</p>";
 
                print "<form method=\"GET\" action=\"backend.php\">
                        <input type=\"hidden\" name=\"op\" value=\"logout\">
@@ -178,6 +183,8 @@ function confirmOP() {
 
 ?>
 
+</div>
+
 </body>
 </html>