From 98a79565d100585b8caa2746174a863625ab0881 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 30 Jun 2023 18:46:43 +0700 Subject: [PATCH] Fixed broken sessions (#205) * Fixed broken sessions * Update CHANGELOG.md * Update poll.php * Update config.php * fix --- CHANGELOG.md | 1 + library/config.php | 2 +- library/includes/sessions.php | 2 ++ poll.php | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dc88ee4..4c6a9fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Merged pull requests:** - Release v2.1.5-2023.06 🎉 +- Fixed broken sessions [\#205](https://github.com/torrentpier/torrentpier-lts/pull/205) ([belomaxorka](https://github.com/belomaxorka)) - IP detect subsystem replace [\#204](https://github.com/torrentpier/torrentpier-lts/pull/204) ([belomaxorka](https://github.com/belomaxorka)) - Fixed broken skype widget in user profile [\#203](https://github.com/torrentpier/torrentpier-lts/pull/203) ([belomaxorka](https://github.com/belomaxorka)) - Redirect to viewprofile.php if profile.php hasn't arguments [\#202](https://github.com/torrentpier/torrentpier-lts/pull/202) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/library/config.php b/library/config.php index 809d4021..e9382883 100644 --- a/library/config.php +++ b/library/config.php @@ -515,7 +515,7 @@ $bb_cfg['user_not_active_days_keep'] = 180; // inactive users but only wi $bb_cfg['group_members_per_page'] = 50; // количество групп на одной странице // Tidy -$bb_cfg['tidy_post'] = in_array('tidy', get_loaded_extensions()); +$bb_cfg['tidy_post'] = (!in_array('tidy', get_loaded_extensions())) ? false : true; // Ads $bb_cfg['show_ads'] = false; diff --git a/library/includes/sessions.php b/library/includes/sessions.php index 25ae6d47..4593b3e1 100644 --- a/library/includes/sessions.php +++ b/library/includes/sessions.php @@ -334,6 +334,7 @@ class user_common */ function session_end ($update_lastvisit = false, $set_cookie = true) { + cache_rm_userdata($this->data); DB()->query(" DELETE FROM ". BB_SESSIONS ." WHERE session_id = '{$this->data['session_id']}' @@ -358,6 +359,7 @@ class user_common { $this->create_autologin_id($this->data, false); + cache_rm_user_sessions($this->data['user_id']); DB()->query(" DELETE FROM ". BB_SESSIONS ." WHERE session_user_id = '{$this->data['user_id']}' diff --git a/poll.php b/poll.php index c5e6a9a3..2c270150 100644 --- a/poll.php +++ b/poll.php @@ -138,7 +138,7 @@ switch ($mode) bb_die($lang['NEW_POLL_ADDED']); break; - // редактирование + // редакторование case 'poll_edit': if (!$t_data['topic_vote']) {