HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Comment and discussion tab had no "Active" class while using another localization than english

DiuDiu
edited August 2011 in Feedback
Hi People,
i don't know where to post else, but i hope this is the right place.
Well as the title says the two tabs hadn't the "Active" class which messed up my theme.
After a little research I found the reason: lines 166 and 167 in /applications/vanilla/settings/class.hooks.php had hardcoded tab names.
$Sender->AddProfileTab(T('Discussions'), 'profile/discussions/'.$Sender->User->UserID.'/'.urlencode($Sender->User->Name), 'Discussions', T('Discussions').CountString(GetValueR('User.CountDiscussions', $Sender, NULL), "/profile/count/discussions?userid=$UserID"));
$Sender->AddProfileTab('Comments', 'profile/comments/'.$Sender->User->UserID.'/'.urlencode($Sender->User->Name), 'Comments', 'Comments'.CountString(GetValueR('User.CountComments', $Sender, NULL), "/profile/count/comments?userid=$UserID"));
I added the T() function and it works as it should
$Sender->AddProfileTab(T('Discussions'), 'profile/discussions/'.$Sender->User->UserID.'/'.urlencode($Sender->User->Name), 'Discussions', T('Discussions').CountString(GetValueR('User.CountDiscussions', $Sender, NULL), "/profile/count/discussions?userid=$UserID"));
$Sender->AddProfileTab(T('Comments'), 'profile/comments/'.$Sender->User->UserID.'/'.urlencode($Sender->User->Name), 'Comments', T('Comments').CountString(GetValueR('User.CountComments', $Sender, NULL), "/profile/count/comments?userid=$UserID"));
That's all for now. Bye.
Tagged:
Sign In or Register to comment.