. * * @category Group * @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://status.net/ */ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } require_once INSTALLDIR.'/lib/noticelist.php'; require_once INSTALLDIR.'/lib/feedlist.php'; /** * Permalink for a group * * The group nickname can change, but not the group ID. So we use * an URL with the ID in it as the permanent identifier. * * @category Group * @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://status.net/ */ class GroupbyidAction extends Action { /** group we're viewing. */ var $group = null; /** * Is this page read-only? * * @return boolean true */ function isReadOnly(array $args=array()) { return true; } function prepare(array $args=array()) { parent::prepare($args); $id = $this->arg('id'); if (!$id) { // 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::getKV('id', $id); if (!$this->group) { // TRANS: Client error displayed referring to a group's permalink for a non-existing group ID. $this->clientError(_('No such group.'), 404); } return true; } /** * Handle the request * * Shows a profile for the group, some controls, and a list of * group notices. * * @return void */ function handle(array $args=array()) { common_redirect($this->group->homeUrl(), 303); } }