diff options
author | Andrew Dolgov <[email protected]> | 2021-02-25 15:28:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-25 15:28:27 +0300 |
commit | efd196839a20ae7e38be227c62b9c134ddec4bea (patch) | |
tree | ce669c677cd793165af87e71e49adade319baa3b /include/functions.php | |
parent | 1464abbbfc73171bd65e13d3b6e07511f5663815 (diff) |
stop caching schema version entirely, fix some session_start() related warnings
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/include/functions.php b/include/functions.php index 9b5661383..746f8d39e 100644 --- a/include/functions.php +++ b/include/functions.php @@ -305,22 +305,14 @@ return $s ? 1 : 0; } - // Session caching removed due to causing wrong redirects to upgrade - // script when get_schema_version() is called on an obsolete session - // created on a previous schema version. - function get_schema_version($nocache = false) { - global $schema_version; - + function get_schema_version() { $pdo = Db::pdo(); - if (!$schema_version && !$nocache) { - $row = $pdo->query("SELECT schema_version FROM ttrss_version")->fetch(); - $version = $row["schema_version"]; - $schema_version = $version; - return $version; - } else { - return $schema_version; - } + $row = $pdo->query("SELECT schema_version FROM ttrss_version")->fetch(); + $version = $row["schema_version"]; + $schema_version = $version; + + return $version; } function file_is_locked($filename) { |