Skip to content

Commit

Permalink
Merge pull request #6005 from christianbeeznest/stib-22319
Browse files Browse the repository at this point in the history
Internal: Fix pagination issue in SortableTable session handling - refs BT#22319
  • Loading branch information
NicoDucou authored Dec 30, 2024
2 parents bf8f2dd + 3d19c00 commit 3745aba
Showing 1 changed file with 12 additions and 3 deletions.
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

0 comments on commit 3745aba

Please sign in to comment.