diff --git a/main/inc/local.inc.php b/main/inc/local.inc.php index 9119fee0e91..f34da59f33b 100755 --- a/main/inc/local.inc.php +++ b/main/inc/local.inc.php @@ -1250,9 +1250,15 @@ 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); } @@ -1260,6 +1266,9 @@ } } + // Clear the general clean_sortable_table flag if it exists + Session::erase('clean_sortable_table'); + if (api_get_group_id()) { Session::erase('_gid'); }