diff --git a/db-updater.php b/db-updater.php deleted file mode 100644 index 272611063..000000000 --- a/db-updater.php +++ /dev/null @@ -1,190 +0,0 @@ - - - - -Database Updater - - - - - - - - - - -

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

"; - - } else { - print_notice(__("Tiny Tiny RSS database is up to date.")); - print "
- -
"; - } - - } else if ($version <= $latest_version && !$op) { - - print_warning(__("Please backup your database before proceeding.")); - - print "

" . T_sprintf("Your Tiny Tiny RSS database needs update to the latest version (%d to %d).", $version, $latest_version) . "

"; - - /* print "

Available incremental updates:"; - - foreach (array_keys($update_versions) as $v) { - if ($v > $version) { - print " $v"; - } - } */ - - print "

"; - - print "
- - -
"; - - } else if ($op == "do") { - - print "

".__("Performing updates...")."

"; - - $num_updates = 0; - - foreach (array_keys($update_versions) as $v) { - if ($v == $version + 1) { - print "

".T_sprintf("Updating to version %d...", $v)."

"; - db_query($link, "BEGIN"); - $fp = fopen($update_versions[$v], "r"); - if ($fp) { - while (!feof($fp)) { - $query = trim(getline($fp, ";")); - if ($query != "") { - print "

$query

"; - db_query($link, $query); - } - } - } - fclose($fp); - db_query($link, "COMMIT"); - - print "

".__("Checking version... "); - - $result = db_query($link, "SELECT schema_version FROM ttrss_version"); - $version = db_fetch_result($result, 0, "schema_version"); - - if ($version == $v) { - print __("OK!"); - } else { - print "".__("ERROR!").""; - return; - } - - $num_updates++; - } - } - - print "

".sprintf(ngettext("Finished. Performed %d update up to schema version %d.", - "Finished. Performed %d updates up to schema version %d.", $num_updates), $num_updates, $version)."

"; - - print "
- - -
"; - - } else if ($version >= $latest_version) { - - print_error(__("Your database schema is from a newer version of Tiny Tiny RSS.")); - - print "

" . T_sprintf("Found schema version: %d, required: %d.", $version, $latest_version) . "

"; - - print "

" . __("Schema upgrade impossible. Please update Tiny Tiny RSS files to the newer version and continue.") . "

"; - - print "
- - -
"; - - - } - -?> - -
- - - -