]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/subgroupnav.php
Extended profile - fix some issues saving and displaying dates
[quix0rs-gnu-social.git] / lib / subgroupnav.php
index 4a9b36ae8fa1a198c7d2cb7d2be8f8732c4b62cb..ee4b0a8dffc482242c94d0bccb92e8cfd2f10f26 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Local navigation for subscriptions group of pages
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Subs
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @copyright 2008-2011 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);
 }
 
@@ -37,15 +37,14 @@ require_once INSTALLDIR.'/lib/widget.php';
  * Local nav menu for subscriptions, subscribers
  *
  * @category Subs
- * @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 SubGroupNav extends Widget
+class SubGroupNav extends Menu
 {
-    var $action = null;
     var $user = null;
 
     /**
@@ -57,7 +56,6 @@ class SubGroupNav extends Widget
     function __construct($action=null, $user=null)
     {
         parent::__construct($action);
-        $this->action = $action;
         $this->user = $user;
     }
 
@@ -76,6 +74,12 @@ class SubGroupNav extends Widget
 
         if (Event::handle('StartSubGroupNav', array($this))) {
 
+            $this->out->menuItem(common_local_url('showstream', array('nickname' =>
+                                                                      $this->user->nickname)),
+                                 _('Profile'),
+                                 (empty($profile)) ? $this->user->nickname : $profile->getBestName(),
+                                 $action == 'showstream',
+                                 'nav_profile');
             $this->out->menuItem(common_local_url('subscriptions',
                                                   array('nickname' =>
                                                         $this->user->nickname)),
@@ -100,7 +104,7 @@ class SubGroupNav extends Widget
                                          $this->user->nickname),
                                  $action == 'usergroups',
                                  'nav_usergroups');
-            if (!is_null($cur) && $this->user->id === $cur->id) {
+            if (common_config('invite', 'enabled') && !is_null($cur) && $this->user->id === $cur->id) {
                 $this->out->menuItem(common_local_url('invite'),
                                      _('Invite'),
                                      sprintf(_('Invite friends and colleagues to join you on %s'),