Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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();
 }