/** * Cache data handler * * @param string $estigma tag to replace * @param int $cacheId query cache position * @param boolean $mod is public access? * @return none * */ private function replaceDataEstigmas($estigma, $cacheId, $mod) { $block = $this->page->getBlock($estigma); $blockOld = $block; while ($estigmas = BM::getObject('db')->dataFromCache($cacheId)): foreach ($estigmas as $estigma => $data): $blockNew = $blockOld; $blockNew = str_replace("{" . $estigma . "}", $data, $blockNew); endforeach; $block .= $blockNew; endwhile; $pageContent = $this->page->getContent(); if (!$mod):$block = "Access denied"; endif; $newContent = str_replace($blockOld, $block, $pageContent); $this->page->setContent($newContent); }