Update timezones always reports nothing to update, as automatic called init_static() already done the update

This commit is contained in:
Ralf Becker 2015-09-02 12:46:46 +00:00
parent a0c153f066
commit beeaf21521

View File

@ -7,7 +7,7 @@
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @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.'<br/>'.$alias_msg;
egw_cache::setSession(__CLASS__, 'tzs_checked', true);
}
}
@ -323,10 +332,12 @@ class calendar_timezones
{
throw new egw_exception_no_permission_admin();
}
$output = '<h3>'.self::import_zones()."</h3>\n";
$output .= '<h3>'.self::import_tz_aliases()."</h3>\n";
$GLOBALS['egw']->framework->render($output, lang('Update timezones'), true);
if (empty(self::$import_msg))
{
self::$import_msg = self::import_zones();
self::$import_msg .= '<br/>'.self::import_tz_aliases();
}
$GLOBALS['egw']->framework->render('<h3>'.self::$import_msg.'</h3>', lang('Update timezones'), false);
}
/**