]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Updated ShowGroup to Resolve Aliases Again.
authorChristopher Vollick <psycotica0@gmail.com>
Fri, 26 Feb 2010 15:10:38 +0000 (10:10 -0500)
committerBrion Vibber <brion@pobox.com>
Fri, 26 Feb 2010 20:30:23 +0000 (12:30 -0800)
The way we find groups changed with this new Local_group table.
I had to update this too.

actions/showgroup.php

index 0139ba157de75ca00496a695813d655931027ff5..4e1fcb6c7b1cb86b253870a3d50c1fb998054ea6 100644 (file)
@@ -125,14 +125,6 @@ class ShowgroupAction extends GroupDesignAction
         $local = Local_group::staticGet('nickname', $nickname);
 
         if (!$local) {
-            common_log(LOG_NOTICE, "Couldn't find local group for nickname '$nickname'");
-            $this->clientError(_('No such group.'), 404);
-            return false;
-        }
-
-        $this->group = User_group::staticGet('id', $local->group_id);
-
-        if (!$this->group) {
             $alias = Group_alias::staticGet('alias', $nickname);
             if ($alias) {
                 $args = array('id' => $alias->group_id);
@@ -142,11 +134,19 @@ class ShowgroupAction extends GroupDesignAction
                 common_redirect(common_local_url('groupbyid', $args), 301);
                 return false;
             } else {
+                common_log(LOG_NOTICE, "Couldn't find local group for nickname '$nickname'");
                 $this->clientError(_('No such group.'), 404);
                 return false;
             }
         }
 
+        $this->group = User_group::staticGet('id', $local->group_id);
+
+        if (!$this->group) {
+            $this->clientError(_('No such group.'), 404);
+            return false;
+        }
+
         common_set_returnto($this->selfUrl());
 
         return true;