From f55d36cc5015c33057f2b33443661aed033f052b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 25 Feb 2017 15:17:36 +0100 Subject: [PATCH] improve waterfall by releasing session --- api/src/Framework.php | 3 +++ api/src/Framework/Ajax.php | 3 +++ api/src/Mail.php | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/src/Framework.php b/api/src/Framework.php index f9399cf11d..8f99e68c1d 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -1372,6 +1372,9 @@ abstract class Framework extends Framework\Extra */ public static function ajax_get_preference($app) { + // dont block session, while we read preferences, they are not supposed to change something in the session + $GLOBALS['egw']->session->commit_session(); + if (preg_match('/^[a-z0-9_]+$/i', $app)) { // send etag header, if we are directly called (not via jsonq!) diff --git a/api/src/Framework/Ajax.php b/api/src/Framework/Ajax.php index fb6f1556a6..0bb3f01434 100755 --- a/api/src/Framework/Ajax.php +++ b/api/src/Framework/Ajax.php @@ -704,6 +704,9 @@ abstract class Ajax extends Api\Framework */ public function ajax_sidebox($appname, $md5) { + // dont block session, while we read sidebox, they are not supposed to change something in the session + $GLOBALS['egw']->session->commit_session(); + $response = Api\Json\Response::get(); $sidebox = $this->get_sidebox($appname); $encoded = json_encode($sidebox); diff --git a/api/src/Mail.php b/api/src/Mail.php index f107dde81b..4c8a679fa5 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -128,7 +128,7 @@ class Mail * * @array */ - static $htmLawed_config = array('comment'=>1, //remove comments + static $htmLawed_config = array('comment'=>2, //remove comments 'make_tag_strict' => 3, // 3 is a new own config value, to indicate that transformation is to be performed, but don't transform font as size transformation of numeric sizes to keywords alters the intended result too much 'keep_bad'=>2, //remove tags but keep element content (4 and 6 keep element content only if text (pcdata) is valid in parent element as per specs, this may lead to textloss if balance is switched on) // we switch the balance off because of some broken html mails contents get removed like (td in table), and let browser deal with it @@ -482,6 +482,8 @@ class Mail { Cache::setCache(Cache::INSTANCE,'email','activeMailbox'.trim($GLOBALS['egw_info']['user']['account_id']),self::$activeFolderCache, 60*60*10); } + // no need to block session any longer + $GLOBALS['egw']->session->commit_session(); } /**