From 14b46e2183f10359cc53d597913a878f53e23719 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sun, 9 Aug 2009 19:12:59 +0800 Subject: Added configuration option to only allow OpenID logins. If $config['site']['openidonly'] is set to true: * the Login/Register pages will be removed from the navigation; * directly accesses to the Login/Register pages will redirect to the OpenID login page; * most links to the Login/Register pages will link to the OpenID login page instead. The user will still need to set a password to access the API and RSS feeds. --- actions/showgroup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actions/showgroup.php') diff --git a/actions/showgroup.php b/actions/showgroup.php index 32ec674a9..4d8ba5fa8 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -440,8 +440,9 @@ class ShowgroupAction extends GroupDesignAction $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . 'short messages about their life and interests. '. - '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'), - $this->group->nickname); + '[Join now](%%%%action.%s%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'), + $this->group->nickname, + (!common_config('site','openidonly')) ? 'register' : 'openidlogin'); } else { $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' . 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' . -- cgit v1.2.3-54-g00ecf From b4c345392372ca39e0a5061b281df2074575e9d7 Mon Sep 17 00:00:00 2001 From: Christopher Vollick Date: Wed, 19 Aug 2009 09:22:06 -0400 Subject: Resolve Group Aliases in showgroup.php For Example, let's say 'alias' was an alias for the group 'group'. Previously, if you went to '/group/group' it'd work, but '/group/alias' it'd say "No Such Group". This was untrue. Now it checks aliases when it can't find a group with a given name. If it finds one it redirects you to the original group. --- actions/showgroup.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'actions/showgroup.php') diff --git a/actions/showgroup.php b/actions/showgroup.php index 4d8ba5fa8..b0cc1dbc7 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -130,8 +130,18 @@ class ShowgroupAction extends GroupDesignAction $this->group = User_group::staticGet('nickname', $nickname); if (!$this->group) { - $this->clientError(_('No such group'), 404); - return false; + $alias = Group_alias::staticGet('alias', $nickname); + if ($alias) { + $args = array('id' => $alias->group_id); + if ($this->page != 1) { + $args['page'] = $this->page; + } + common_redirect(common_local_url('groupbyid', $args), 301); + return false; + } else { + $this->clientError(_('No such group'), 404); + return false; + } } common_set_returnto($this->selfUrl()); -- cgit v1.2.3-54-g00ecf