X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgroups.php;h=10a1d5964d374ac2d18118223b3f297ca5211ed5;hb=f8b187d5a4ac5eab1f025d61e30d5244cef6123d;hp=6faa497fc6fc07d058d2e1b23c943257a29c9fb9;hpb=8ba19b0686bc4f616e506ab387eb287ae95226df;p=quix0rs-gnu-social.git diff --git a/actions/groups.php b/actions/groups.php index 6faa497fc6..10a1d5964d 100644 --- a/actions/groups.php +++ b/actions/groups.php @@ -1,6 +1,6 @@ . * * @category Personal - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli + * @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); } @@ -40,10 +40,10 @@ require_once INSTALLDIR.'/lib/grouplist.php'; * Show the latest groups on the site * * @category Personal - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @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 GroupsAction extends Action @@ -51,6 +51,11 @@ class GroupsAction extends Action var $page = null; var $profile = null; + function isReadOnly($args) + { + return true; + } + function title() { if ($this->page == 1) { @@ -95,9 +100,13 @@ class GroupsAction extends Action function showContent() { - $this->element('a', array('href' => common_local_url('newgroup'), - 'id' => 'new_group'), - _('Create a new group')); + if (common_logged_in()) { + $this->elementStart('p', array('id' => 'new_group')); + $this->element('a', array('href' => common_local_url('newgroup'), + 'class' => 'more'), + _('Create a new group')); + $this->elementEnd('p'); + } $offset = ($this->page-1) * GROUPS_PER_PAGE; $limit = GROUPS_PER_PAGE + 1; @@ -106,6 +115,7 @@ class GroupsAction extends Action $groups->orderBy('created DESC'); $groups->limit($offset, $limit); + $cnt = 0; if ($groups->find()) { $gl = new GroupList($groups, null, $this); $cnt = $gl->show();