]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Can now delete lists/peopletags (thanks MrB)
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 8 Feb 2015 22:48:35 +0000 (23:48 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 8 Feb 2015 22:48:35 +0000 (23:48 +0100)
Reported on https://bugz.foocorp.net/T79
Fix by MrB: https://gist.github.com/mrvdb/0f5d84c9b56c0a390c4a

actions/editpeopletag.php

index c812255c700fecb8a7d12f7e0f88b2353f652c5a..45c8adaa7d59fc933a4ec70ddb157c5dfebfdc0f 100644 (file)
@@ -277,6 +277,14 @@ class EditpeopletagAction extends Action
             return;
         }
 
             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);
         $this->peopletag->query('BEGIN');
 
         $orig = clone($this->peopletag);
@@ -301,13 +309,6 @@ class EditpeopletagAction extends Action
             Profile_tag_subscription::cleanup($this->peopletag);
         }
 
             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,
         if ($tag != $orig->tag) {
             common_redirect(common_local_url('editpeopletag',
                                              array('tagger' => $this->tagger->nickname,