Fixed faulty logic in badges/all

This commit is contained in:
Zachary Doll 2013-11-13 11:25:11 -06:00
parent f93e55ec09
commit b96ac9233d
3 changed files with 5 additions and 7 deletions

View File

@ -48,7 +48,7 @@ class BadgesController extends Gdn_Controller {
// TODO: Add leaderboard module
$this->Render();
$this->Render('all');
}
/**

View File

@ -236,11 +236,9 @@ class YagaHooks implements Gdn_IPlugin {
public function ProfileController_Render_Before($Sender) {
$this->_AddResources($Sender);
// $UserID = $Sender->User->UserID;
// $Module = new BadgesModule();
// $Module->SetUser($UserID);
$Sender->AddModule('BadgesModule');
if(C('Yaga.Badges.Enabled')) {
$Sender->AddModule('BadgesModule');
}
}
public function DiscussionController_Render_Before($Sender) {

View File

@ -12,7 +12,7 @@ foreach($this->Data('Badges') as $Badge) {
$AwardDescription = '';
$ReadClass = ' Read';
if($Badge->UserID) {
if($Badge->UserID == Gdn::Session()->UserID) {
$ReadClass = '';
$AwardDescription = 'You earned this badge ' . Gdn_Format::Date($Badge->DateInserted, 'html') . ' from ' . $Badge->InsertUserName;
if($Badge->Reason) {