From a1ca62af50047a92692c009b97bebb73f94db7ea Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 25 Feb 2021 21:42:05 +0300 Subject: cache schema version better --- include/functions.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'include/functions.php') diff --git a/include/functions.php b/include/functions.php index 746f8d39e..6d845035e 100644 --- a/include/functions.php +++ b/include/functions.php @@ -166,8 +166,6 @@ define('SELF_USER_AGENT', 'Tiny Tiny RSS/' . get_version() . ' (http://tt-rss.org/)'); ini_set('user_agent', SELF_USER_AGENT); - $schema_version = false; - /* compat shims */ function _debug($msg) { @@ -306,13 +304,7 @@ } function get_schema_version() { - $pdo = Db::pdo(); - - $row = $pdo->query("SELECT schema_version FROM ttrss_version")->fetch(); - $version = $row["schema_version"]; - $schema_version = $version; - - return $version; + return Config::get_schema_version(); } function file_is_locked($filename) { -- cgit v1.2.3