Skip to content

Internal: Fix pagination issue in SortableTable session handling - refs BT#22319 #6005

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

Merged
merged 1 commit into from
Dec 30, 2024
Merged
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
15 changes: 12 additions & 3 deletions main/inc/local.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1250,16 +1250,25 @@

if (!empty($_SESSION)) {
foreach ($_SESSION as $key => $session_item) {
if (strpos($key, 'lp_autolaunch_') === false) {
continue;
} else {
// Clear session keys related to SortableTable
if (strpos($key, 'table_') === 0 || strpos($key, 'sortable_table_') === 0) {
if (isset($_SESSION[$key])) {
Session::erase($key);
}
}

// Clear session keys related to lp_autolaunch_
if (strpos($key, 'lp_autolaunch_') !== false) {
if (isset($_SESSION[$key])) {
Session::erase($key);
}
}
}
}

// Clear the general clean_sortable_table flag if it exists
Session::erase('clean_sortable_table');

if (api_get_group_id()) {
Session::erase('_gid');
}
Expand Down
Loading