r51869 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51868‎ | r51869 | r51870 >
Date:08:13, 15 June 2009
Author:thomasv
Status:ok
Tags:
Comment:
follow-up to r51788
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -212,18 +212,14 @@
213213 $text = $rev->getText();
214214
215215 //check if it is using pagelist
216 - preg_match_all( "/<pagelist(.*?)\/>/is", $text, $m, PREG_PATTERN_ORDER );
 216+ preg_match_all( "/<pagelist([^<]*?)\/>/is", $text, $m, PREG_PATTERN_ORDER );
217217 if( $m[1] ) {
218 -
219 - $params = array();
220 - for( $k = 0; $k < count( $m[1] ); $k++) {
221 - preg_match_all( "/([0-9a-z]*?)\=(.*?)\s/", $m[1][$k] . " ", $m2, PREG_PATTERN_ORDER );
222 - for( $i = 0; $i < count( $m2[1] ); $i++) {
223 - $params[ $m2[1][$i] ] = $m2[2][$i];
224 - }
 218+ $params_s = "";
 219+ for( $k = 0; $k < count( $m[1] ); $k++) {
 220+ $params_s = $params_s . $m[1][$k];
225221 }
 222+ $params = Sanitizer::decodeTagAttributes( $params_s );
226223 $links = null;
227 -
228224 } else {
229225 $params = null;
230226 $tag_pattern = "/\[\[($page_namespace:.*?)(\|(.*?)|)\]\]/i";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51788the index page may contain several pagelists (follow-up to r51787)thomasv11:18, 12 June 2009

Status & tagging log