]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'group-join-rejections' into 'nightly'
authormmn <mmn@hethane.se>
Mon, 14 Dec 2015 20:48:18 +0000 (20:48 +0000)
committermmn <mmn@hethane.se>
Mon, 14 Dec 2015 20:48:18 +0000 (20:48 +0000)
Fix group-join request rejections

Relates to #105

See merge request !65

classes/Group_join_queue.php

index 8007552fcff4c6a4e8fcdf980efae29ef7acfa6d..9ff221c49fcf4b00daff2bed97921253b9185133 100644 (file)
@@ -76,18 +76,15 @@ class Group_join_queue extends Managed_DataObject
 
     /**
      * Abort the pending group join...
-     *
-     * @param User_group $group
      */
     function abort()
     {
         $profile = $this->getMember();
         $group = $this->getGroup();
-        if ($request) {
-            if (Event::handle('StartCancelJoinGroup', array($profile, $group))) {
-                $this->delete();
-                Event::handle('EndCancelJoinGroup', array($profile, $group));
-            }
+
+        if (Event::handle('StartCancelJoinGroup', array($profile, $group))) {
+            $this->delete();
+            Event::handle('EndCancelJoinGroup', array($profile, $group));
         }
     }