]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/groupbyid.php
Show page title in user's profile page
[quix0rs-gnu-social.git] / actions / groupbyid.php
index 7d327d56ccf4525c4e2c010dd83e7d184a80abe1..8556675155262dc61d51c072c671409f3b3aba87 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Permalink for group
  *
  * 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')) {
-    exit(1);
-}
-
-require_once INSTALLDIR.'/lib/noticelist.php';
-require_once INSTALLDIR.'/lib/feedlist.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Permalink for a group
@@ -42,12 +37,11 @@ require_once INSTALLDIR.'/lib/feedlist.php';
  * an URL with the ID in it as the permanent identifier.
  *
  * @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 GroupbyidAction extends Action
 {
     /** group we're viewing. */
@@ -58,7 +52,6 @@ class GroupbyidAction extends Action
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -68,25 +61,20 @@ class GroupbyidAction extends Action
     {
         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 +88,8 @@ class GroupbyidAction extends Action
      *
      * @return void
      */
-
     function handle($args)
     {
         common_redirect($this->group->homeUrl(), 303);
     }
-}
\ No newline at end of file
+}