From 765b95cd4981b0b1f6ddad474b9165535e6d46c6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 16 May 2021 20:53:38 +0200 Subject: [PATCH] release session after accounts query was cached (in session) --- admin/inc/class.admin_ui.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/admin/inc/class.admin_ui.inc.php b/admin/inc/class.admin_ui.inc.php index 7e051a04de..0eeae274a0 100644 --- a/admin/inc/class.admin_ui.inc.php +++ b/admin/inc/class.admin_ui.inc.php @@ -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) {