From f0176ea80ae4c0d9525bbb9e609b596cf4a9fe87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 12 Apr 2005 04:41:42 +0000 Subject: [PATCH] * Changed the wfIsBadImage() regex to something hopefully easier to comprehend --- includes/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1