summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-14 15:47:39 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-14 15:47:39 -0700
commit1c87532912b63effc047da2913e55a6551d8f629 (patch)
treecaafcfed82f352f28c237e98e4c55c07628e1c2a /lib
parentd3a0c524cce9be65b8e45280168cf3584a60f81c (diff)
The rest of the things necessary to make group block work
Link to the group block form. Hide join button if the current user is blocked.
Diffstat (limited to 'lib')
-rw-r--r--lib/grouplist.php2
-rw-r--r--lib/router.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/grouplist.php b/lib/grouplist.php
index 1b8547499..1ded5160b 100644
--- a/lib/grouplist.php
+++ b/lib/grouplist.php
@@ -166,7 +166,7 @@ class GroupList extends Widget
if ($user->isMember($this->group)) {
$lf = new LeaveForm($this->out, $this->group);
$lf->show();
- } else {
+ } else if (!Group_block::isBlocked($this->group, $user->getProfile())) {
$jf = new JoinForm($this->out, $this->group);
$jf->show();
}
diff --git a/lib/router.php b/lib/router.php
index 456d1793e..469d9a171 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -101,7 +101,7 @@ class Router
$main = array('login', 'logout', 'register', 'subscribe',
'unsubscribe', 'confirmaddress', 'recoverpassword',
'invite', 'favor', 'disfavor', 'sup',
- 'block', 'subedit');
+ 'block', 'subedit', 'groupblock');
foreach ($main as $a) {
$m->connect('main/'.$a, array('action' => $a));
@@ -164,10 +164,10 @@ class Router
array('action' => 'newnotice'),
array('replyto' => '[A-Za-z0-9_-]+'));
- $m->connect('notice/:notice/file',
- array('action' => 'file'),
+ $m->connect('notice/:notice/file',
+ array('action' => 'file'),
array('notice' => '[0-9]+'));
-
+
$m->connect('notice/:notice',
array('action' => 'shownotice'),
array('notice' => '[0-9]+'));