1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:46:00 +00:00

bring back web dbupdate using new migrations system

This commit is contained in:
Andrew Dolgov
2021-03-04 09:22:24 +03:00
parent e19570f422
commit 5eb0f3d640
14 changed files with 117 additions and 218 deletions

View File

@@ -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);

View File

@@ -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();
}
}
}