public function testForErrors()
 {
     if (!$this->object->getVersionID()) {
         $c = Page::getByID($this->object->getCollectionID());
         $cp = new Permissions($c);
         if ($cp->canViewPageVersions()) {
             return COLLECTION_FORBIDDEN;
         } else {
             return COLLECTION_NOT_FOUND;
         }
     } elseif (!$this->object->isMostRecent()) {
         return VERSION_NOT_RECENT;
     }
     return parent::testForErrors();
 }
Example #2
0
 public function isMostRecent()
 {
     return parent::isMostRecent();
 }