release session in non-json.php requests like lang.php, as it blocks parallel execution

This commit is contained in:
Ralf Becker 2021-07-09 07:46:01 +02:00
parent 4627b3b2b1
commit ff92db4e33
6 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,9 @@ $GLOBALS['egw_info'] = array(
include '../header.inc.php';
// release session, as we dont need it and it blocks parallel requests
$GLOBALS['egw']->session->commit_session();
$contacts = new Api\Contacts();
$contacts->photo();

View File

@ -26,6 +26,9 @@ $GLOBALS['egw_info'] = array(
include '../header.inc.php';
// release session, as we dont need it and it blocks parallel requests
$GLOBALS['egw']->session->commit_session();
// Get appname
$appname = $_GET['app'] && $GLOBALS['egw_info']['apps'][$_GET['app']] ? $_GET['app'] : Api\Categories::GLOBAL_APPNAME;

View File

@ -26,6 +26,9 @@ $GLOBALS['egw_info'] = array(
include '../header.inc.php';
// release session, as we dont need it and it blocks parallel requests
$GLOBALS['egw']->session->commit_session();
// use an etag over config and link-registry
$config = json_encode(Api\Config::clientConfigs());
$link_registry = Api\Link::json_registry();

View File

@ -28,6 +28,9 @@ $GLOBALS['egw_info'] = array(
include '../header.inc.php';
// release session, as we dont need it and it blocks parallel requests
$GLOBALS['egw']->session->commit_session();
$content = json_encode(Api\Image::map(preg_match('/^[a-z0-9_-]+$/i',$_GET['template']) ? $_GET['template'] : null),
JSON_FORCE_OBJECT | // export empty php-arrays as empty objects, not empty arrays
JSON_UNESCAPED_SLASHES | // do not escape slashes, smaller and better readable

View File

@ -37,6 +37,8 @@ catch (\EGroupware\Api\Exception\NoPermission\App $e)
{
// ignore missing run rights for an app, as translations of other apps are loaded sometimes without run rights
}
// release session, as we dont need it and it blocks parallel requests
$GLOBALS['egw']->session->commit_session();
// use an etag with app, lang and a hash over the creation-times of all lang-files
$etag = '"'.$_GET['app'].'-'.$_GET['lang'].'-'. Api\Translation::etag($_GET['app'], $_GET['lang']).'"';

View File

@ -26,6 +26,9 @@ $GLOBALS['egw_info'] = array(
include '../header.inc.php';
// release session, as we dont need it and it blocks parallel requests
$GLOBALS['egw']->session->commit_session();
// use an etag over config and link-registry
$preferences = json_encode($GLOBALS['egw_info']['user']['preferences']['common']);
$ab_preferences = json_encode($GLOBALS['egw_info']['user']['preferences']['addressbook']);