]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showgroup.php
Changed all $config[][] calls to common_config()
[quix0rs-gnu-social.git] / actions / showgroup.php
index 468990e7ba1051396ddeebc935d2e14fcdb6daeb..b6022840bf47997f89cda54970e56b9779d123b6 100644 (file)
@@ -129,6 +129,8 @@ class ShowgroupAction extends Action
             return false;
         }
 
+        common_set_returnto($this->selfUrl());
+
         return true;
     }
 
@@ -242,7 +244,7 @@ class ShowgroupAction extends Action
         if ($this->group->location) {
             $this->elementStart('dl', 'entity_location');
             $this->element('dt', null, _('Location'));
-            $this->element('dd', 'location', $this->group->location);
+            $this->element('dd', 'label', $this->group->location);
             $this->elementEnd('dl');
         }
 
@@ -273,10 +275,8 @@ class ShowgroupAction extends Action
         $cur = common_current_user();
         if ($cur) {
             if ($cur->isMember($this->group)) {
-                if (!$cur->isAdmin($this->group)) {
-                    $lf = new LeaveForm($this, $this->group);
-                    $lf->show();
-                }
+                $lf = new LeaveForm($this, $this->group);
+                $lf->show();
             } else {
                 $jf = new JoinForm($this, $this->group);
                 $jf->show();
@@ -290,37 +290,18 @@ class ShowgroupAction extends Action
     }
 
     /**
-     * Show a list of links to feeds this page produces
-     *
-     * @return void
-     */
-
-    function showExportData()
-    {
-        $fl = new FeedList($this);
-        $fl->show(array(0=>array('href'=>common_local_url('grouprss',
-                                                          array('nickname' => $this->group->nickname)),
-                                 'type' => 'rss',
-                                 'version' => 'RSS 1.0',
-                                 'item' => 'notices')));
-    }
-
-    /**
-     * Show a list of links to feeds this page produces
+     * Get a list of the feeds for this page
      *
      * @return void
      */
 
-    function showFeeds()
+    function getFeeds()
     {
         $url =
           common_local_url('grouprss',
                            array('nickname' => $this->group->nickname));
 
-        $this->element('link', array('rel' => 'alternate',
-                                     'href' => $url,
-                                     'type' => 'application/rss+xml',
-                                     'title' => sprintf(_('Notice feed for %s group'),
+        return array(new Feed(Feed::RSS1, $url, sprintf(_('Notice feed for %s group'),
                                                         $this->group->nickname)));
     }