Fixed faulty logic in badges/all
This commit is contained in:
parent
f93e55ec09
commit
b96ac9233d
@ -48,7 +48,7 @@ class BadgesController extends Gdn_Controller {
|
||||
|
||||
// TODO: Add leaderboard module
|
||||
|
||||
$this->Render();
|
||||
$this->Render('all');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user