From e54f72c34a247f1940db36b0196dbe0c20ee15ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 Oct 2012 23:30:18 +0000 Subject: [PATCH] Fix for broken counter --- inc/daily/daily_surfbar.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/daily/daily_surfbar.php b/inc/daily/daily_surfbar.php index a0d1af6299..495f0b0fb7 100644 --- a/inc/daily/daily_surfbar.php +++ b/inc/daily/daily_surfbar.php @@ -49,10 +49,13 @@ if (!defined('__SECURITY')) { // Debug line //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.'); +// Get value +$counter = getConfig('surfbar_daily_counter'); + // Reset surfbar counter -updateConfiguration(array('surfbar_daily_counter', 'surfbar_yester_counter'), array(0, getConfig('surfbar_daily_counter'))); -setConfigEntry('surfbar_yester_counter', getConfig('surfbar_daily_counter')); +updateConfiguration(array('surfbar_daily_counter', 'surfbar_yester_counter'), array(0, $counter)); setConfigEntry('surfbar_daily_counter' , 0); +setConfigEntry('surfbar_yester_counter', $counter); // Debug line //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.'); -- 2.39.5