summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-04 09:22:24 +0300
committerAndrew Dolgov <[email protected]>2021-03-04 09:22:24 +0300
commit5eb0f3d640374a82a026164942adc79bb1262576 (patch)
tree1227d76bb1184b4e505ea53ca49ea3252ac9512d /include
parente19570f422df8e4ba0d604b517efad111def9a23 (diff)
bring back web dbupdate using new migrations system
Diffstat (limited to 'include')
-rw-r--r--include/functions.php4
-rw-r--r--include/sessions.php24
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();
+ }
}
}