]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Remove leave button from grouplist if current user is admin of that group.
authorAdrian Lang <mail@adrianlang.de>
Sun, 8 Mar 2009 00:31:25 +0000 (01:31 +0100)
committerAdrian Lang <mail@adrianlang.de>
Sun, 8 Mar 2009 00:45:57 +0000 (01:45 +0100)
lib/grouplist.php

index 4c448e250d5011b13d3d8280fac33c97cf482bd5..8f3b0abd8729fe1dce6649e8230e47b4e2586b3f 100644 (file)
@@ -164,8 +164,10 @@ class GroupList extends Widget
             # XXX: special-case for user looking at own
             # subscriptions page
             if ($user->isMember($this->group)) {
-                $lf = new LeaveForm($this->out, $this->group);
-                $lf->show();
+                if (!$user->isAdmin($this->group)) {
+                    $lf = new LeaveForm($this->out, $this->group);
+                    $lf->show();
+                }
             } else {
                 $jf = new JoinForm($this->out, $this->group);
                 $jf->show();