r48885 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48884‎ | r48885 | r48886 >
Date:16:29, 26 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Added log_action filter
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -143,8 +143,10 @@
144144 $ids = $this->logids;
145145 break;
146146 }
 147+ // Revision delete logs
 148+ $conds = array( 'log_action' => 'revision' );
147149 // Just get the whole log if there are a lot if items
148 - if( count($ids) > 20 ) return null;
 150+ if( count($ids) > 20 ) return $conds;
149151 // Digit chars only
150152 foreach( $ids as $id ) {
151153 if( preg_match( '/^\d+$/', $id, $m ) ) {
@@ -153,9 +155,9 @@
154156 }
155157 // Format is <id1,id2,i3...>
156158 if( count($safeIds) ) {
157 - return array("log_params RLIKE '(^|\n|,)(".implode('|',$safeIds).")(,|$)'");
 159+ $conds[] = "log_params RLIKE '(^|\n|,)(".implode('|',$safeIds).")(,|$)'";
158160 }
159 - return null;
 161+ return $conds;
160162 }
161163
162164 private function secureOperation() {

Status & tagging log