]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/deletenotice.php
Type-hint is array here.
[quix0rs-gnu-social.git] / actions / deletenotice.php
index d8037ab4443fbcfaf1b45f3ace961726ac6bb5ec..f0aa767916f551caaf6e44cbe3104b012124ef03 100644 (file)
@@ -65,19 +65,13 @@ 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));
             }
-        }
-
-        $url = common_get_returnto();
-
-        if ($url) {
-            common_set_returnto(null);
         } else {
-            $url = common_local_url('public');
+            common_redirect(common_get_returnto(), 303);
         }
 
-        common_redirect($url, 303);
+        common_redirect(common_local_url('top'), 303);
     }
 }