From 30419d6fba880a7b814bdc703e79660fd9336c61 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 25 Mar 2009 20:05:23 +0000 Subject: [PATCH] * Changes to r48839 ** Fix typo, missing "count" ** Add match boundaries --- includes/specials/SpecialRevisiondelete.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.20.1