AntonLV пре 5 година
родитељ
комит
40dd246cb6
2 измењених фајлова са 9 додато и 3 уклоњено
  1. 8 2
      inc/classes/BxDolLiveUpdates.php
  2. 1 1
      template/scripts/BxBaseLiveUpdates.php

+ 8 - 2
inc/classes/BxDolLiveUpdates.php

@@ -237,9 +237,15 @@ class BxDolLiveUpdates extends BxDolFactory implements iBxDolSingleton
         return $aSystems;
         return $aSystems;
     }
     }
 
 
-    protected function _getCachedData()
+    protected function _getCachedData($bInit = false)
     {
     {
-    	return $this->_getCached('data');
+        $aData = $this->_getCached('data');
+        if($bInit)
+            foreach($this->_aSystems as $aSystem)
+                if(isset($aData[$aSystem['name']]) && (int)$aSystem['init'] == 0)
+                    $aData[$aSystem['name']] = 0;
+
+    	return $aData;
     }
     }
 
 
     protected function _clearCached()
     protected function _clearCached()

+ 1 - 1
template/scripts/BxBaseLiveUpdates.php

@@ -32,7 +32,7 @@ class BxBaseLiveUpdates extends BxDolLiveUpdates
          * Load and cache(if it's needed) default(system) 
          * Load and cache(if it's needed) default(system) 
          * live updates for current user.
          * live updates for current user.
          */ 
          */ 
-        $aCached = $this->_getCachedData();
+        $aCached = $this->_getCachedData(true);
 
 
         $aParams = array_merge(array(
         $aParams = array_merge(array(
             'sActionsUrl' => BX_DOL_URL_ROOT . 'live_updates.php',
             'sActionsUrl' => BX_DOL_URL_ROOT . 'live_updates.php',