]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/editpeopletag.php
Added missing isPrivateScope().
[quix0rs-gnu-social.git] / actions / editpeopletag.php
index 654fbee3393e8b908bb4bc30b3a3a174d294a4ca..4e00cb2442e1c6a36b129ce78f5d074c954b5b20 100644 (file)
@@ -277,6 +277,14 @@ class EditpeopletagAction extends Action
             return;
         }
 
+        // We tested $delete && !$confirm earlier so confirmation is required before getting here
+        if ($delete) {
+            // This might take quite a bit of time.
+            $this->peopletag->delete();
+            // send home.
+            common_redirect(common_local_url('all', array('nickname' => $this->tagger->getNickname())), 303);
+        }
+
         $this->peopletag->query('BEGIN');
 
         $orig = clone($this->peopletag);
@@ -301,13 +309,6 @@ class EditpeopletagAction extends Action
             Profile_tag_subscription::cleanup($this->peopletag);
         }
 
-        if ($delete) {
-            // This might take quite a bit of time.
-            $this->peopletag->delete();
-            // send home.
-            common_redirect(common_local_url('all', array('nickname' => $this->tagger->nickname)), 303);
-        }
-
         if ($tag != $orig->tag) {
             common_redirect(common_local_url('editpeopletag',
                                              array('tagger' => $this->tagger->nickname,