- $action: action being shown
EndShowPageTitle: when done showing the page title <h1>
-- $action: action being shown
\ No newline at end of file
+- $action: action being shown
+
+StartDeleteOwnNotice: when a user starts to delete their own notice
+- $user: the user doing the delete
+- $notice: the notice being deleted
+
+EndDeleteOwnNotice: when a user has deleted their own notice
+- $user: the user doing the delete
+- $notice: the notice being deleted
}
if ($this->user->id == $this->notice->profile_id) {
- $replies = new Reply;
- $replies->get('notice_id', $this->notice_id);
- $replies->delete();
- $this->notice->delete();
+ if (Event::handle('StartDeleteOwnNotice', array($this->user, $this->notice))) {
+ $this->notice->delete();
+ Event::handle('EndDeleteOwnNotice', array($this->user, $this->notice));
+ }
$this->showNotice();
} else {
$this->clientError(
}
if ($this->arg('yes')) {
- $this->notice->delete();
+ if (Event::handle('StartDeleteOwnNotice', array($this->user, $this->notice))) {
+ $this->notice->delete();
+ Event::handle('EndDeleteOwnNotice', array($this->user, $this->notice));
+ }
}
$url = common_get_returnto();