Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added the ability to disable the activity tab in profiles.
  • Loading branch information
tburry committed Jul 12, 2011
1 parent c153c6d commit 7474360
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -42,7 +42,7 @@ public function Initialize() {
$this->AddCssFile('style.css');
$this->AddModule('GuestModule');
parent::Initialize();
}
}

public function Activity($UserReference = '', $Username = '', $UserID = '', $Offset = '0') {
$this->Permission('Garden.Profiles.View');
Expand Down Expand Up @@ -230,8 +230,10 @@ public function Index($User = '', $Username = '', $UserID = '') {

if ($this->User->UserID == Gdn::Session()->UserID)
return $this->Notifications();
else
elseif (C('Garden.Profile.ShowActivities', TRUE))
return $this->Activity($User, $Username, $UserID);
else
return Gdn::Dispatcher()->Dispatch('/profile/discussions/'.ConcatSep('/', rawurlencode($User), rawurlencode($Username), rawurlencode($UserID)));
}

public function Invitations() {
Expand Down Expand Up @@ -768,7 +770,8 @@ public function BuildProfile() {
$this->AddProfileTab($Notifications, 'profile/notifications', 'Notifications', $NotificationsHtml);
}

$this->AddProfileTab(T('Activity'), $ActivityUrl, 'Activity');
if (C('Garden.Profile.ShowActivities', TRUE))
$this->AddProfileTab(T('Activity'), $ActivityUrl, 'Activity');

$this->FireEvent('AddProfileTabs');
}
Expand Down

0 comments on commit 7474360

Please sign in to comment.