public function delete() {
		$this->RenderedContent = '';
		if ($this->checkPerm('Delete')) {
			$this->Tags()->removeAll();
			// if we have replies, we can't delete completely!
			if ($this->config()->soft_delete || ($this->Replies()->exists() && $this->Replies()->count() > 0)) {
				$count = $this->Replies()->count();
				$item = $this->Replies()->first();
				$this->Deleted = true;
                $this->OriginalContent = $this->Author . "\n\n" . $this->Content;
				$this->Content = _t('MicroPost.DELETED', '[deleted]');
				$this->Author = $this->Content;
				$this->write();
			} else {
                return parent::delete();
			}
		}
	}
public function delete() {
		$this->RenderedContent = '';
		if ($this->checkPerm('Delete')) {
			$this->Tags()->removeAll();
			// if we have replies, we can't delete completely!
			if ($this->config()->soft_delete || ($this->Replies()->exists() && $this->Replies()->count() > 0)) {
				$count = $this->Replies()->count();
				$item = $this->Replies()->first();
				$this->Deleted = true;
                $this->OriginalContent = $this->Author . "\n\n" . $this->Content;
				$this->Content = _t('MicroPost.DELETED', '[deleted]');
				$this->Author = $this->Content;
				$this->write();
			} else {
                return parent::delete();
			}
		}
	}
public function delete ( ) { $ this -> RenderedContent = '' ; if ( $ this -> checkPerm ( 'Delete' ) ) { $ this -> Tags ( ) -> removeAll ( ) ; // if we have replies, we can't delete completely! if ( $ this -> config ( ) -> soft_delete || ( $ this -> Replies ( ) -> exists ( ) && $ this -> Replies ( ) -> count ( ) > 0 ) ) { $ count = $ this -> Replies ( ) -> count ( ) ; $ item = $ this -> Replies ( ) -> first ( ) ; $ this -> Deleted = true ; $ this -> OriginalContent = $ this -> Author . "\n\n" . $ this -> Content ; $ this -> Content = _t ( 'MicroPost.DELETED' , '[deleted]' ) ; $ this -> Author = $ this -> Content ; $ this -> write ( ) ; } else { return parent :: delete ( ) ; } } }
When 'deleting' an object, we actually just remove all its content
When deleting an object we actually just remove all its content