release session after accounts query was cached (in session)

This commit is contained in:
Ralf Becker 2021-05-16 20:53:38 +02:00
parent e14d2ef332
commit a6d7fe9df5

View File

@ -325,9 +325,6 @@ class admin_ui
*/
public static function get_users(array $query, array &$rows=null)
{
// release session to allow parallel requests to run
$GLOBALS['egw']->session->commit_session();
$params = array(
'type' => (int)$query['filter'] ? (int)$query['filter'] : 'accounts',
'start' => $query['start'],
@ -374,6 +371,9 @@ class admin_ui
//error_log(__METHOD__."() accounts->search(".array2string($params).") total=".self::$accounts->total);
$total = self::$accounts->total;
// release session (after query got cached!) to allow parallel requests to run
$GLOBALS['egw']->session->commit_session();
foreach($rows as $key => &$row)
{
// Filter by status
@ -434,9 +434,6 @@ class admin_ui
*/
public static function get_groups(&$query, &$rows)
{
// release session to allow parallel requests to run
$GLOBALS['egw']->session->commit_session();
$groups = $GLOBALS['egw']->accounts->search(array(
'type' => 'groups',
'query' => $query['search'],
@ -446,6 +443,9 @@ class admin_ui
'offset' => (int)$query['num_rows']
));
// release session (after query got cached!) to allow parallel requests to run
$GLOBALS['egw']->session->commit_session();
$apps = array();
foreach($GLOBALS['egw_info']['apps'] as $app => $data)
{