Fix for bug 13251, allows some rebuld scripts to work with Postgres.
[lhc/web/wiklou.git] / maintenance / cleanupSpam.php
index 534e160..36d8b25 100644 (file)
@@ -14,9 +14,8 @@ function cleanupArticle( $id, $domain ) {
        $rev = Revision::newFromTitle( $title );
        $revId = $rev->getId();
        $currentRevId = $revId;
-       $regex = LinkFilter::makeRegex( $domain );
        
-       while ( $rev && preg_match( $regex, $rev->getText() ) ) {
+       while ( $rev && LinkFilter::matchEntry( $rev->getText() , $domain ) ) {
                # Revision::getPrevious can't be used in this way before MW 1.6 (Revision.php 1.26)
                #$rev = $rev->getPrevious();
                $revId = $title->getPreviousRevisionID( $revId );
@@ -108,4 +107,4 @@ if ( isset($options['all']) ) {
        }
 }
 
-?>
+