From 5cd27bea866e6ef2230fbeab432aadc1efb3e0f9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 11 Oct 2011 16:12:40 +0000 Subject: [PATCH] fixed timezone alias update always reports one timezone update, event if it updated nothing --- calendar/inc/class.calendar_timezones.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_timezones.inc.php b/calendar/inc/class.calendar_timezones.inc.php index 9d56c06691..3b56e5e705 100644 --- a/calendar/inc/class.calendar_timezones.inc.php +++ b/calendar/inc/class.calendar_timezones.inc.php @@ -284,7 +284,7 @@ class calendar_timezones } include($path); // sets $tz_aliases - $updated = 0; + $updates = 0; foreach($tz_aliases as $alias => $tzid) { if ((!($alias_id=self::tz2id($alias, 'alias')) || self::id2tz($alias_id, 'tzid') !== $tzid) && // not in DB or different @@ -295,7 +295,7 @@ class calendar_timezones ),array( 'tz_tzid' => $alias, ),__LINE__,__FILE__,'calendar'); - ++$updated; + ++$updates; } //error_log(__METHOD__."() alias=$alias, tzid=$tzid --> self::tz2id('$alias', 'alias') = ".array2string($alias_id).", self::tz2id('$tzid')=".array2string($tz_id)); } @@ -303,7 +303,7 @@ class calendar_timezones //_debug_array($tz2id); $updated = true; - return lang('Timezones aliases updated to version %1 (%2 records updated).', $tz_aliases_mtime, $updated); + return lang('Timezones aliases updated to version %1 (%2 records updated).', $tz_aliases_mtime, $updates); } /**