From: jarry1250 Date: Mon, 26 Mar 2012 21:50:34 +0000 (+0100) Subject: First half of fix for bug #30332 ("API spamblocklist error should provide *all* block... X-Git-Tag: 1.31.0-rc.0~24121^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=bec44603736025328502ffa21e53d805000a7126;p=lhc%2Fweb%2Fwiklou.git First half of fix for bug #30332 ("API spamblocklist error should provide *all* blocked URLs, not just one"). Allow spamPageWithContent() to accept an array of matches, rather than just one. Not dependent on other half of fix. Change-Id: I75faac51f24bbb2569b36bc2e44f3cd5c43b1bd7 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 8f4761ca7f..31e66267a5 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3027,12 +3027,15 @@ HTML /** * Show "your edit contains spam" page with your diff and text * - * @param $match string|bool Text which triggered one or more filters + * @param $match string|Array|bool Text (or array of texts) which triggered one or more filters */ public function spamPageWithContent( $match = false ) { - global $wgOut; + global $wgOut, $wgLang; $this->textbox2 = $this->textbox1; + if( is_array( $match ) ){ + $match = $wgLang->listToText( $match ); + } $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) ); $wgOut->addHTML( '
' );