예제 #1
0
 /**
  * (non-PHPdoc)
  * @see FormlessAction::onView()
  */
 public function onView()
 {
     $this->getOutput()->setPageTitle($this->getPageTitle());
     $c = $this->getItemClass();
     // Yeah, this is needed in PHP 5.3 >_>
     $object = $c::get($this->getTitle()->getText());
     if ($object === false) {
         $this->getOutput()->addWikiMsg('ep-' . strtolower($this->getName()) . '-norevs');
         $lastRev = EPRevision::selectRow(null, array('type' => EPPageObject::getTypeForNS($this->getTitle()->getNamespace()), 'object_identifier' => $this->getTitle()->getText(), 'deleted' => true), array('SORT BY' => EPRevision::getPrefixedField('time'), 'ORDER' => 'DESC'));
         if ($lastRev !== false) {
             // TODO: show available info about deletion
             $this->getOutput()->addWikiMsg('ep-' . strtolower($this->getName()) . '-deleted');
         }
     } else {
         $this->displayRevisions($object);
     }
     return '';
 }