* Changed the wfIsBadImage() regex to something hopefully easier to comprehend
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 12 Apr 2005 04:41:42 +0000 (04:41 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 12 Apr 2005 04:41:42 +0000 (04:41 +0000)
includes/Image.php

index 7d353a5..fbc4786 100644 (file)
@@ -1068,7 +1068,7 @@ function wfIsBadImage( $name ) {
 
        $lines = explode("\n", wfMsgForContent( 'bad_image_list' ));
        foreach ( $lines as $line ) {
-               if ( preg_match( '/^\*\s*\[\[:(' . $wgLang->getNsText( NS_IMAGE ) . ':[^\]]*)\]\]/', $line, $m ) ) {
+               if ( preg_match( '/^\*\s*\[\[:(' . $wgLang->getNsText( NS_IMAGE ) . ':.*(?=]]))\]\]/', $line, $m ) ) {
                        $t = Title::newFromText( $m[1] );
                        if ( $t->getDBkey() == $name ) {
                                return true;