summaryrefslogtreecommitdiff
path: root/actions/showgroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/showgroup.php')
-rw-r--r--actions/showgroup.php43
1 files changed, 27 insertions, 16 deletions
diff --git a/actions/showgroup.php b/actions/showgroup.php
index 32ec674a9..8157ee3c8 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -1,6 +1,6 @@
<?php
/**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
*
* Group main page
*
@@ -20,15 +20,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Group
- * @package Laconica
- * @author Evan Prodromou <evan@controlyourself.ca>
- * @author Sarven Capadisli <csarven@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @author Sarven Capadisli <csarven@status.net>
+ * @copyright 2008-2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://laconi.ca/
+ * @link http://status.net/
*/
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
@@ -41,10 +41,10 @@ define('MEMBERS_PER_SECTION', 27);
* Group main page
*
* @category Group
- * @package Laconica
- * @author Evan Prodromou <evan@controlyourself.ca>
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://laconi.ca/
+ * @link http://status.net/
*/
class ShowgroupAction extends GroupDesignAction
@@ -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());
@@ -438,13 +448,14 @@ class ShowgroupAction extends GroupDesignAction
{
if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
$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 ' .
+ 'based on the Free Software [StatusNet](http://status.net/) 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 ' .
+ 'based on the Free Software [StatusNet](http://status.net/) tool. Its members share ' .
'short messages about their life and interests. '),
$this->group->nickname);
}