X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgroupbyid.php;h=befd526de11a6472e432ab1a7153d4866e65d7e2;hb=627d84a1e2db2aca5d2ce1272f6e83fb7faa8ad2;hp=bc0709f4f6f9f35e9e2a3c15140e9cfc70be683a;hpb=865b716f0919b6e5133133cd6be53f4143660324;p=quix0rs-gnu-social.git diff --git a/actions/groupbyid.php b/actions/groupbyid.php index bc0709f4f6..befd526de1 100644 --- a/actions/groupbyid.php +++ b/actions/groupbyid.php @@ -28,7 +28,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -47,7 +47,6 @@ require_once INSTALLDIR.'/lib/feedlist.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class GroupbyidAction extends Action { /** group we're viewing. */ @@ -58,35 +57,29 @@ class GroupbyidAction extends Action * * @return boolean true */ - - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; } - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); - if (!common_config('inboxes','enabled')) { - $this->serverError(_('Inboxes must be enabled for groups to work')); - return false; - } - $id = $this->arg('id'); if (!$id) { - $this->clientError(_('No ID')); - return false; + // TRANS: Client error displayed referring to a group's permalink without providing a group ID. + $this->clientError(_('No ID.')); } common_debug("Got ID $id"); - $this->group = User_group::staticGet('id', $id); + $this->group = User_group::getKV('id', $id); if (!$this->group) { - $this->clientError(_('No such group'), 404); - return false; + // TRANS: Client error displayed referring to a group's permalink for a non-existing group ID. + $this->clientError(_('No such group.'), 404); } return true; @@ -100,9 +93,8 @@ class GroupbyidAction extends Action * * @return void */ - - function handle($args) + function handle(array $args=array()) { common_redirect($this->group->homeUrl(), 303); } -} \ No newline at end of file +}