function getActivePage() { if ($this->bActivePageExists === false) { return null; } if ($this->oPage) { return $this->oPage->getActivePage(); } $oPage = new AnwPageById($this->getPageId()); if ($oPage->exists()) { return $oPage; } return null; }
static function getPageByChangeId($nPageId, $nChangeId) { //is it active page? $oPage = new AnwPageById($nPageId); if ($oPage->exists() && $oPage->getChangeId() == $nChangeId) { return $oPage; } //is it an archive? $oPage = new AnwPageById($nPageId, $nChangeId); if ($oPage->exists() && $oPage->getChangeId() == $nChangeId) { return $oPage; } throw new AnwPageNotFoundException(); }