use database-backed sessions in single user mode

This commit is contained in:
Andrew Dolgov 2021-05-11 19:21:53 +03:00
parent 82749ee7a7
commit e3c4724dc1
1 changed files with 5 additions and 7 deletions

View File

@ -106,13 +106,11 @@
} }
if (\Config::get_schema_version() >= 0) { if (\Config::get_schema_version() >= 0) {
if (!\Config::get(\Config::SINGLE_USER_MODE)) {
session_set_save_handler('\Sessions\ttrss_open', session_set_save_handler('\Sessions\ttrss_open',
'\Sessions\ttrss_close', '\Sessions\ttrss_read', '\Sessions\ttrss_close', '\Sessions\ttrss_read',
'\Sessions\ttrss_write', '\Sessions\ttrss_destroy', '\Sessions\ttrss_write', '\Sessions\ttrss_destroy',
'\Sessions\ttrss_gc'); '\Sessions\ttrss_gc');
register_shutdown_function('session_write_close'); register_shutdown_function('session_write_close');
}
if (!defined('NO_SESSION_AUTOSTART')) { if (!defined('NO_SESSION_AUTOSTART')) {
if (isset($_COOKIE[session_name()])) { if (isset($_COOKIE[session_name()])) {