r48843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48842‎ | r48843 | r48844 >
Date:20:05, 25 March 2009
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
* Changes to r48839
** Fix typo, missing "count"
** Add match boundaries
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -144,15 +144,16 @@
145145 break;
146146 }
147147 // Just get the whole log if there are a lot if items
148 - if( $ids > 20 ) return null;
 148+ if( count($ids) > 20 ) return null;
149149 // Digit chars only
150150 foreach( $ids as $id ) {
151151 if( preg_match( '/^\d+$/', $id, $m ) ) {
152152 $safeIds[] = $m[0];
153153 }
154154 }
 155+ // Format is <id1,id2,i3...>
155156 if( count($safeIds) ) {
156 - return array("log_params RLIKE '".implode('|',$safeIds)."'");
 157+ return array("log_params RLIKE '(^|\n|,)(".implode('|',$safeIds).")(,|$)'");
157158 }
158159 return null;
159160 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48839(bug 15814) Filter log chunk at Special:RevisionDelete to selected itemsaaron18:25, 25 March 2009

Comments

#Comment by Aaron Schulz (talk | contribs)   03:53, 26 May 2009

Removed in r50567

Status & tagging log