Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken sessions #205

Merged
merged 5 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion library/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
$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;
Expand Down
2 changes: 2 additions & 0 deletions library/includes/sessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ function session_create ($userdata, $auto_created = false)
*/
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']}'
Expand All @@ -358,6 +359,7 @@ function session_end ($update_lastvisit = false, $set_cookie = true)
{
$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']}'
Expand Down
2 changes: 1 addition & 1 deletion poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
bb_die($lang['NEW_POLL_ADDED']);
break;

// редактирование
// редакторование
case 'poll_edit':
if (!$t_data['topic_vote'])
{
Expand Down