From: Aaron Schulz Date: Wed, 25 Mar 2009 20:05:23 +0000 (+0000) Subject: * Changes to r48839 X-Git-Tag: 1.31.0-rc.0~42353 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=30419d6fba880a7b814bdc703e79660fd9336c61;p=lhc%2Fweb%2Fwiklou.git * Changes to r48839 ** Fix typo, missing "count" ** Add match boundaries --- diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index e92fd648d0..bc5abc8c18 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -144,15 +144,16 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { break; } // Just get the whole log if there are a lot if items - if( $ids > 20 ) return null; + if( count($ids) > 20 ) return null; // Digit chars only foreach( $ids as $id ) { if( preg_match( '/^\d+$/', $id, $m ) ) { $safeIds[] = $m[0]; } } + // Format is if( count($safeIds) ) { - return array("log_params RLIKE '".implode('|',$safeIds)."'"); + return array("log_params RLIKE '(^|\n|,)(".implode('|',$safeIds).")(,|$)'"); } return null; }