From: Ævar Arnfjörð Bjarmason Date: Tue, 12 Apr 2005 04:41:42 +0000 (+0000) Subject: * Changed the wfIsBadImage() regex to something hopefully easier to comprehend X-Git-Tag: 1.5.0alpha1~289 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=f0176ea80ae4c0d9525bbb9e609b596cf4a9fe87;p=lhc%2Fweb%2Fwiklou.git * Changed the wfIsBadImage() regex to something hopefully easier to comprehend --- diff --git a/includes/Image.php b/includes/Image.php index 7d353a5ecb..fbc4786990 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -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;