/**
  * @see	\wcf\system\attachment\IAttachmentObjectType::canDelete()
  */
 public function canDelete($objectID)
 {
     if ($objectID) {
         $entry = new Entry($objectID);
         return $entry->isEditable();
     }
     return false;
 }
コード例 #2
0
 /**
  * @see	\wcf\data\IDeleteAction::delete()
  */
 public function delete()
 {
     // delete news update
     parent::delete();
     foreach ($this->objects as $entryUpdate) {
         $entry = new Entry($entryUpdate->entryID);
         $entry->updateEntryUpdates();
     }
 }
コード例 #3
0
 /**
  * @see    \wcf\system\comment\manager\ICommentManager::isAccessible()
  */
 public function isAccessible($objectID, $validateWritePermission = false)
 {
     // check object id
     $entry = new Entry($objectID);
     if (!$entry->entryID || !$entry->canRead()) {
         return false;
     }
     return true;
 }
コード例 #4
0
 /**
  * @see	\wcf\page\IPage::readParameters()
  */
 public function readParameters()
 {
     MessageForm::readParameters();
     if (isset($_REQUEST['id'])) {
         $this->updateID = intval($_REQUEST['id']);
     }
     $this->update = new EntryUpdate($this->updateID);
     if (!$this->update->updateID) {
         throw new IllegalLinkException();
     }
     $this->entryID = $this->update->entryID;
     $this->entry = new Entry($this->entryID);
     // check news permissions
     if (!$this->entry->canEdit()) {
         throw new PermissionDeniedException();
     }
 }