Only show training buttons if you can train

This commit is contained in:
Evan Prodromou 2012-03-19 10:30:54 -04:00
parent 717bb5f456
commit cfef7af2ae

View File

@ -168,6 +168,10 @@ class ActivitySpamPlugin extends Plugin
function onEndShowNoticeOptionItems($nli)
{
$profile = Profile::current();
if (!empty($profile) && $profile->hasRight(self::TRAINSPAM)) {
$notice = $nli->getNotice();
$out = $nli->getOut();
@ -186,6 +190,7 @@ class ActivitySpamPlugin extends Plugin
$form->show();
}
}
}
return true;
}