* @return boolean hook value; true means continue processing, false means stop.
*/
- function onEndNoticeSave($notice)
+ function onEndNoticeSave(Notice $notice)
{
try {
return true;
}
- function onNoticeDeleteRelated($notice) {
+ function onNoticeDeleteRelated(Notice $notice) {
$score = Spam_score::getKV('notice_id', $notice->id);
if (!empty($score)) {
$score->delete();
return true;
}
- function onUserRightsCheck($profile, $right, &$result) {
+ function onUserRightsCheck(Profile $profile, $right, &$result) {
switch ($right) {
case self::REVIEWSPAM:
case self::TRAINSPAM:
function onEndShowNoticeOptionItems($nli)
{
+ // FIXME: Cannot use type-hint NoticeListItem as NoticeListItemAdapter exists, too!
+ assert(is_object($nli));
+
$profile = Profile::current();
if (!empty($profile) && $profile->hasRight(self::TRAINSPAM)) {
return true;
}
- function onEndShowStyles($action)
+ function onEndShowStyles(Action $action)
{
$action->element('style', null,
'.form-train-spam input.submit { background: url('.$this->path('icons/bullet_black.png').') no-repeat 0px 0px } ' . "\n" .
return true;
}
- function onEndPublicGroupNav($nav)
+ function onEndPublicGroupNav(Menu $nav)
{
$user = common_current_user();
return true;
}
- function onEndNoticeInScope($notice, $profile, &$bResult)
+ function onEndNoticeInScope(Notice $notice, Profile $profile, &$bResult)
{
if ($this->hideSpam) {
if ($bResult) {