]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/deletenotice.php
[CORE][UI][ROUTER] Added view action, which inlines images and videos but downloads...
[quix0rs-gnu-social.git] / actions / deletenotice.php
index 40b276a34895e664c2801fc4b741a876ae378360..2dd0848aa575e30c17ca371faccebc7769bf2fd6 100644 (file)
@@ -65,13 +65,11 @@ class DeletenoticeAction extends FormAction
     {
         if ($this->arg('yes')) {
             if (Event::handle('StartDeleteOwnNotice', array($this->scoped->getUser(), $this->notice))) {
-                $this->notice->delete();
+                $this->notice->deleteAs($this->scoped);
                 Event::handle('EndDeleteOwnNotice', array($this->scoped->getUser(), $this->notice));
             }
-        } else {
-            common_redirect(common_get_returnto(), 303);
         }
 
-        common_redirect(common_local_url('top'), 303);
+        common_redirect(common_get_returnto(), 303);
     }
 }