r111201 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111200‎ | r111201 | r111202 >
Date:21:13, 10 February 2012
Author:mah
Status:reverted (Comments)
Tags:
Comment:
part 1 of fix for Bug 30332 - API spamblocklist error should provide *all* blocked URLs, not just one
Patch from Jarry1250
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -3037,12 +3037,16 @@
30383038 /**
30393039 * Show "your edit contains spam" page with your diff and text
30403040 *
3041 - * @param $match string|bool Text which triggered one or more filters
 3041+ * @param $match array|string|bool Text (or array of texts) which triggered one or more filters
30423042 */
30433043 public function spamPageWithContent( $match = false ) {
30443044 global $wgOut;
30453045 $this->textbox2 = $this->textbox1;
30463046
 3047+ if( is_array( $match ) ){
 3048+ $match = $wgLang->listToText( $match );
 3049+ }
 3050+
30473051 $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
30483052
30493053 $wgOut->addHTML( '<div id="spamprotected">' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r111225ugh, missed this global varmah01:43, 11 February 2012
r111255do not query at all if there were errors during query parsing and the query h...mkroetzsch19:48, 11 February 2012
r111361revert r111225 and r111201mah12:40, 13 February 2012

Comments

#Comment by IAlex (talk | contribs)   21:17, 10 February 2012

$wgLang is not declared as global.

#Comment by RobLa-WMF (talk | contribs)   00:02, 11 February 2012

Per my email to wikitech-l about extending the slush, please revert this. At a minimum, the particular patch is broken per iAlex's comment.

#Comment by MarkAHershberger (talk | contribs)   02:09, 11 February 2012

I missed the important last sentance of that email (http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/58622): "Until we agree on this strategy or some other strategy that everyone agrees is workable, we'll need to keep the code slush in place."

#Comment by MarkAHershberger (talk | contribs)   02:14, 11 February 2012

I won't make any more commits to core or extensions that we deploy until we have this straightened out

#Comment by RobLa-WMF (talk | contribs)   20:02, 11 February 2012

I'd prefer it if you reverted this. I'm not sure I see the value in having one-half of Jarry1250's patch applied.

#Comment by MarkAHershberger (talk | contribs)   01:49, 13 February 2012

I got so busy with other things that I neglected to commit the second part (though I did test it). I'll revert this and go through gerritt.

Status & tagging log