Use $badLines instead of $badList for PLURAL: counting.

count( $badList ) is always 1 as it is a string.
This commit is contained in:
Raimond Spekking 2007-07-24 10:32:37 +00:00
parent bde084c272
commit 7df7acb6e0

View file

@ -72,9 +72,9 @@ function wfSpamBlacklistValidate( $editPage, $text, $section, &$hookError ) {
wfDebug( "Spam blacklist validator: [[$thisPageName]] not a local blacklist\n" ); wfDebug( "Spam blacklist validator: [[$thisPageName]] not a local blacklist\n" );
return true; return true;
} }
$lines = explode( "\n", $text ); $lines = explode( "\n", $text );
$badLines = SpamRegexBatch::getBadLines( $lines ); $badLines = SpamRegexBatch::getBadLines( $lines );
if( $badLines ) { if( $badLines ) {
wfDebug( "Spam blacklist validator: [[$thisPageName]] given invalid input lines: " . wfDebug( "Spam blacklist validator: [[$thisPageName]] given invalid input lines: " .
@ -86,7 +86,7 @@ function wfSpamBlacklistValidate( $editPage, $text, $section, &$hookError ) {
"</tt>\n"; "</tt>\n";
$hookError = $hookError =
"<div class='errorbox'>" . "<div class='errorbox'>" .
wfMsgExt( 'spam-invalid-lines', array( 'parsemag' ), count( $badList ) ) . wfMsgExt( 'spam-invalid-lines', array( 'parsemag' ), count( $badLines ) ) .
$badList . $badList .
"</div>\n" . "</div>\n" .
"<br clear='all' />\n"; "<br clear='all' />\n";