diff --git a/calendar/inc/class.calendar_timezones.inc.php b/calendar/inc/class.calendar_timezones.inc.php index 595c7139da..b60309762d 100644 --- a/calendar/inc/class.calendar_timezones.inc.php +++ b/calendar/inc/class.calendar_timezones.inc.php @@ -7,7 +7,7 @@ * @link http://www.egroupware.org * @package calendar * @author Ralf Becker - * @copyright (c) 2009-11 by RalfBecker-At-outdoor-training.de + * @copyright (c) 2009-15 by RalfBecker-At-outdoor-training.de * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -154,6 +154,13 @@ class calendar_timezones return !$data ? $data : ($what ? $data[$what] : $data); } + /** + * Import messages from init_static, if import happend in that request + * + * @var string + */ + protected static $import_msg; + /** * Init static variables for session and check for updated timezone information * @@ -184,6 +191,8 @@ class calendar_timezones $alias_msg = self::import_tz_aliases($updated); if ($updated) error_log($alias_msg); // log that timezone aliases have been updated + self::$import_msg = $msg.'
'.$alias_msg; + egw_cache::setSession(__CLASS__, 'tzs_checked', true); } } @@ -323,10 +332,12 @@ class calendar_timezones { throw new egw_exception_no_permission_admin(); } - $output = '

'.self::import_zones()."

\n"; - $output .= '

'.self::import_tz_aliases()."

\n"; - - $GLOBALS['egw']->framework->render($output, lang('Update timezones'), false); + if (empty(self::$import_msg)) + { + self::$import_msg = self::import_zones(); + self::$import_msg .= '
'.self::import_tz_aliases(); + } + $GLOBALS['egw']->framework->render('

'.self::$import_msg.'

', lang('Update timezones'), false); } /**