public function rebuildHash($pageId) { if (is_object($this->_constData)) { ob_start(); $page = new PageReCacher($pageId, $this->dbName); $pageHandler = new RealPageHandler($this->localPath, $this->dbName); $pageHandler->printPage(); $content = ob_get_contents(); ob_clean(); if (!empty($content)) { $hash = md5($content); if ($hash != $page->checksum) { $page->refreshLastmodify($hash); } } unset($page, $pageHandler); return TRUE; } }
private function printWWWSection($dontCheckHidden = false) { /***********************************/ include_once ENGINE_PATH . 'class/classPage.php'; include_once ENGINE_PATH . 'class/classPageReCacher.php'; /***********************************/ if ($this->pageId == $this->constData->getConst('loginPage')) { header('HTTP/1.1 403 Forbidden'); return; } if ($this->isCacher) { $page = new PageReCacher($this->pageId); } else { $page = new Page($this->pageId); } VBox::set('Page', $page); // if page is hidden // if(!$dontCheckHidden && $page->checkHidden() && substr_count($_SERVER['HTTP_REFERER'],$page->address['base_address'])==0) { if (!$dontCheckHidden && $page->checkHidden()) { //if (isset($_GET['t'])) { echo $_GET['t'].' test '.$this->pageId; die(); } if ($this->checkInGreenList()) { return TRUE; } header('HTTP/1.1 302 Found'); header('Location: ' . $page->address['base_address']); return; } /***********************************/ include_once ENGINE_PATH . 'class/classBlocksData.php'; include_once ENGINE_PATH . 'class/classRealPageHandler.php'; include_once LIB_PATH . 'Smarty/Smarty.class.php'; /***********************************/ //proceed uncached version code $pageHandler = new RealPageHandler(); $pageHandler->printPage(); }