mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
show session restore time
This commit is contained in:
parent
608e2ef249
commit
ed5db11312
@ -165,9 +165,15 @@ class egw_framework
|
||||
);
|
||||
if($GLOBALS['egw_info']['user']['preferences']['common']['show_generation_time'])
|
||||
{
|
||||
$totaltime = sprintf('%4.2lf',perfgetmicrotime() - $GLOBALS['egw_info']['flags']['page_start_time']);
|
||||
$totaltime = sprintf('%4.2lf',microtime(true) - $GLOBALS['egw_info']['flags']['page_start_time']);
|
||||
|
||||
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>';
|
||||
$var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime);
|
||||
if ($GLOBALS['egw_info']['flags']['session_restore_time'])
|
||||
{
|
||||
$var['page_generation_time'] .= ' '.lang('(session restored in %1 seconds)',
|
||||
sprintf('%4.2lf',$GLOBALS['egw_info']['flags']['session_restore_time']));
|
||||
}
|
||||
$var['page_generation_time'] .= '</span></div>';
|
||||
}
|
||||
$var['powered_by'] = lang('Powered by').' <a href="'.$GLOBALS['egw_info']['server']['webserver_url'].'/about.php">eGroupWare</a> '.lang('version').' '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'];
|
||||
$var['activate_tooltips'] = '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/wz_tooltip/wz_tooltip.js" type="text/javascript"></script>';
|
||||
|
@ -89,6 +89,7 @@ if ($GLOBALS['egw_info']['server']['sessions_type'] == 'php4-restore' && $_REQUE
|
||||
$GLOBALS['egw']->wakeup2(); // adapt the restored egw-object/enviroment to this request (eg. changed current app)
|
||||
|
||||
//printf("<p style=\"position: absolute; right: 0px; top: 0px;\">egw-enviroment restored in %d ms</p>\n",1000*(perfgetmicrotime()-$GLOBALS['egw_info']['flags']['page_start_time']));
|
||||
$GLOBALS['egw_info']['flags']['session_restore_time'] = microtime(true) - $GLOBALS['egw_info']['flags']['page_start_time'];
|
||||
if (is_object($GLOBALS['egw']->translation)) return; // exit this file, as the rest of the file creates a new egw-object and -enviroment
|
||||
}
|
||||
// egw object could NOT be restored from the session, create a new one
|
||||
|
@ -680,12 +680,6 @@ class idots_framework extends egw_framework
|
||||
{
|
||||
$content .= "</body>\n</html>\n"; // close body and html tag, eg. for popups
|
||||
}
|
||||
if (DEBUG_TIMER)
|
||||
{
|
||||
$totaltime = sprintf('%4.2lf',microtime(true) - $GLOBALS['egw_info']['flags']['page_start_time']);
|
||||
|
||||
$content .= lang('Page was generated in %1 seconds',$totaltime);
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user