Skip to content

Commit 329834f

Browse files
feat(mueller): switch from has-comment check to URL check
1 parent 07e8d50 commit 329834f

File tree

1 file changed

+13
-3
lines changed
  • php-config/Emergence/Mueller/Investigator.config.d

1 file changed

+13
-3
lines changed

php-config/Emergence/Mueller/Investigator.config.d/laddr.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,20 @@
1515
}
1616
];
1717

18-
Investigator::$tests['has-comment'] = [
19-
'points' => -10,
18+
Investigator::$tests['has-comment-url'] = [
19+
'points' => -100,
2020
'function' => function (IUser $User, array &$userCache) {
21-
return count(Investigator::getUserComments($User, $userCache)) > 0;
21+
22+
foreach (Investigator::getUserComments($User, $userCache) as $Comment) {
23+
if (
24+
stripos($Comment['Message'], 'http://') !== false
25+
|| stripos($Comment['Message'], 'https://') !== false
26+
) {
27+
return true;
28+
}
29+
}
30+
31+
return false;
2232
}
2333
];
2434

0 commit comments

Comments
 (0)