From 75c797d0f24af8421431d7956db3833c8ca9fa45 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 25 May 2007 18:13:13 +0000 Subject: [PATCH] fixed exec to save the include_xajax flag too (looping) --- etemplate/inc/class.uietemplate.inc.php | 27 +++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 198b8fee73..e5e3f01133 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -311,7 +311,7 @@ $GLOBALS['egw']->xslttpl->set_var('phpgw',array('body_data' => $html)); } } - $this->save_appsession($this->as_array(2) + array( + $this->save_appsession($sess = $this->as_array(2) + array( 'readonlys' => $readonlys, 'content' => $content, 'changes' => $changes, @@ -322,6 +322,7 @@ 'java_script' => $GLOBALS['egw_info']['etemplate']['java_script'], 'java_script_from_flags' => $GLOBALS['egw_info']['flags']['java_script'], 'java_script_body_tags' => $GLOBALS['egw']->js->body, + 'include_xajax' => $GLOBALS['egw_info']['flags']['include_xajax'], 'dom_enabled' => $GLOBALS['egw_info']['etemplate']['dom_enabled'], 'hooked' => $hooked != '' ? $hooked : $GLOBALS['egw_info']['etemplate']['hook_content'], 'hook_app' => $hooked ? $GLOBALS['egw_info']['flags']['currentapp'] : $GLOBALS['egw_info']['etemplate']['hook_app'], @@ -332,7 +333,27 @@ 'method' => $method, 'name_vars' => $this->name_vars, ),$id); - +/* +echo "

total size session data = ".($total=strlen(serialize($sess)))."

\n"; +echo "

shares bigger then 1.0% percent of it:

\n"; +foreach($sess as $key => $val) +{ + $len = strlen(is_array($val) ? serialize($val) : $val); + $len .= ' ('.sprintf('%2.1lf',($percent = 100.0 * $len / $total)).'%)'; + if ($percent < 1.0) continue; + echo "

$key: strlen(\$val)=$len

\n"; + if (is_array($val) && $len > 2000) + { + foreach($val as $k => $v) + { + $l = strlen(is_array($v) ? serialize($v) : $v); + $l .= ' ('.sprintf('%2.1lf',($p = 100.0 * $l / $total)).'%)'; + if ($p < 1.0) continue; + echo "

 - {$key}[$k]: strlen(\$v)=$l

\n"; + } + } +} +*/ if ($this->sitemgr || (int) $output_mode == 1 || (int) $output_mode == -1) // return html { return $html; @@ -441,6 +462,8 @@ $GLOBALS['egw']->xslttpl->set_var('phpgw',array('body_data' => $session_data['hooked'])); } } + if($session_data['include_xajax']) $GLOBALS['egw_info']['flags']['include_xajax'] = true; + if (!empty($session_data['app_header'])) { $GLOBALS['egw_info']['flags']['app_header'] = $session_data['app_header'];