diff options
author | Andrew Dolgov <[email protected]> | 2021-03-02 15:03:01 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-02 15:03:01 +0300 |
commit | d6629ed18863f797d34ebdc65815d7af21cb8332 (patch) | |
tree | a72a114c576f2aa15710d18a8090a9bced9c56ba /classes/handler/public.php | |
parent | 86b12fc06c33fe742ac4035a031716674bdb6462 (diff) |
move dbupdater to db/updater; move base SCHEMA_VERSION constant inside db/updater class
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-x | classes/handler/public.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php index f7df6fc74..08df7bbc1 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -660,14 +660,14 @@ class Handler_Public extends Handler { <?php @$op = clean($_REQUEST["subop"] ?? ""); - $updater = new DbUpdater(Db::pdo(), Config::get(Config::DB_TYPE), SCHEMA_VERSION); + $updater = new Db_Updater(Db::pdo(), Config::get(Config::DB_TYPE)); if ($op == "performupdate") { - if ($updater->is_update_required()) { + if (Db_Updater::is_update_required()) { - print "<h2>" . T_sprintf("Performing updates to version %d", SCHEMA_VERSION) . "</h2>"; + print "<h2>" . T_sprintf("Performing updates to version %d", Db_Updater::SCHEMA_VERSION) . "</h2>"; - for ($i = $updater->get_schema_version() + 1; $i <= SCHEMA_VERSION; $i++) { + for ($i = Config::get_schema_version(true) + 1; $i <= Db_Updater::SCHEMA_VERSION; $i++) { print "<ul>"; print "<li class='text-info'>" . T_sprintf("Updating to version %d", $i) . "</li>"; @@ -704,10 +704,10 @@ class Handler_Public extends Handler { print "<a href='index.php'>".__("Return to Tiny Tiny RSS")."</a>"; } } else { - if ($updater->is_update_required()) { + if (Db_Updater::is_update_required()) { print "<h2>".T_sprintf("Tiny Tiny RSS database needs update to the latest version (%d to %d).", - $updater->get_schema_version(), SCHEMA_VERSION)."</h2>"; + Config::get_schema_version(true), Db_Updater::SCHEMA_VERSION)."</h2>"; if (Config::get(Config::DB_TYPE) == "mysql") { print_error("<strong>READ THIS:</strong> Due to MySQL limitations, your database is not completely protected while updating. ". |