summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-09-09 15:01:03 -0400
committerEvan Prodromou <evan@status.net>2010-09-09 15:01:03 -0400
commit4419e43f7f62d92f01ba8f844aa9cd472051dd84 (patch)
tree4c80501a0306c1cddd2427685824bef62683020b /actions
parent6f95ccd37de1f7e2063206e87c93cbe06097eae7 (diff)
parentf2fd8b36f4a932f50770c84d769297bcfc1c1483 (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: EVENTS.txt plugins/TwitterBridge/daemons/twitterstatusfetcher.php plugins/TwitterBridge/twitterbasicauthclient.php
Diffstat (limited to 'actions')
-rw-r--r--actions/apistatusesdestroy.php8
-rw-r--r--actions/deletenotice.php5
2 files changed, 8 insertions, 5 deletions
diff --git a/actions/apistatusesdestroy.php b/actions/apistatusesdestroy.php
index 0dfeb4812..485eae66e 100644
--- a/actions/apistatusesdestroy.php
+++ b/actions/apistatusesdestroy.php
@@ -125,10 +125,10 @@ class ApiStatusesDestroyAction extends ApiAuthAction
}
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(
diff --git a/actions/deletenotice.php b/actions/deletenotice.php
index f8010a814..68c43040b 100644
--- a/actions/deletenotice.php
+++ b/actions/deletenotice.php
@@ -172,7 +172,10 @@ class DeletenoticeAction extends Action
}
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();