diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 4 | ||||
-rw-r--r-- | include/sessions.php | 24 |
2 files changed, 15 insertions, 13 deletions
diff --git a/include/functions.php b/include/functions.php index 4d11ea31f..5e75439cf 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2,8 +2,8 @@ define('LABEL_BASE_INDEX', -1024); define('PLUGIN_FEED_BASE_INDEX', -128); - /** constant is @deprecated, use Db_Updater::SCHEMA_VERSION instead */ - define('SCHEMA_VERSION', Db_Updater::SCHEMA_VERSION); + /** constant is @deprecated, use Config::SCHEMA_VERSION instead */ + define('SCHEMA_VERSION', Config::SCHEMA_VERSION); if (version_compare(PHP_VERSION, '8.0.0', '<')) { libxml_disable_entity_loader(true); diff --git a/include/sessions.php b/include/sessions.php index 3a1a3b8cd..cda42f52b 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -122,17 +122,19 @@ return true; } - if (!\Config::get(\Config::SINGLE_USER_MODE)) { - session_set_save_handler('\Sessions\ttrss_open', - '\Sessions\ttrss_close', '\Sessions\ttrss_read', - '\Sessions\ttrss_write', '\Sessions\ttrss_destroy', - '\Sessions\ttrss_gc'); - register_shutdown_function('session_write_close'); - } + if (\Config::get_schema_version() >= 0) { + if (!\Config::get(\Config::SINGLE_USER_MODE)) { + session_set_save_handler('\Sessions\ttrss_open', + '\Sessions\ttrss_close', '\Sessions\ttrss_read', + '\Sessions\ttrss_write', '\Sessions\ttrss_destroy', + '\Sessions\ttrss_gc'); + register_shutdown_function('session_write_close'); + } - if (!defined('NO_SESSION_AUTOSTART')) { - if (isset($_COOKIE[session_name()])) { - if (session_status() != PHP_SESSION_ACTIVE) - session_start(); + if (!defined('NO_SESSION_AUTOSTART')) { + if (isset($_COOKIE[session_name()])) { + if (session_status() != PHP_SESSION_ACTIVE) + session_start(); + } } } |