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 aea7a5c0f2
commit 765b95cd49

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)
{