Răsfoiți Sursa

Ticket #4971 - Build-in API support: Attached polls in Timeline.

AntonLV 1 an în urmă
părinte
comite
2b7d026aed
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      modules/boonex/timeline/classes/BxTimelineTemplate.php

+ 5 - 1
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -1746,7 +1746,11 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
 
     public function getDataCached($aEvent, $aBrowseParams = array())
     public function getDataCached($aEvent, $aBrowseParams = array())
     {
     {
-        if(!$this->_oConfig->isCacheItem())
+        /**
+         * Item Cache is disabled for API calls to avoid issues with personalized 
+         * content in items (like attched polls, etc).
+         */
+        if($this->_bIsApi || !$this->_oConfig->isCacheItem())
             return $this->getData($aEvent, $aBrowseParams);
             return $this->getData($aEvent, $aBrowseParams);
 
 
         /**
         /**