r36336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36335‎ | r36336 | r36337 >
Date:14:58, 16 June 2008
Author:demon
Status:old
Tags:
Comment:
No point in allowing external images in an ImageMap if we don't allow external images period.
Modified paths:
  • /trunk/extensions/ImageMap/ImageMap_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ImageMap/ImageMap_body.php
@@ -133,7 +133,7 @@
134134 if (is_null($title))
135135 return self::error('imagemap_invalid_title', $lineNum);
136136 $alt = $title->getFullText();
137 - } elseif ( in_array( substr( $link , 1 , strpos($link, '//' )+1 ) , $wgUrlProtocols ) || in_array( substr( $link , 1 , strpos($link, ':' ) ) , $wgUrlProtocols ) ) {
 137+ } elseif ( in_array( substr( $link , 1 , strpos($link, '//' )+1 ) , $wgUrlProtocols ) || in_array( substr( $link , 1 , strpos($link, ':' ) ) , $wgUrlProtocols ) && $wgAllowExternalImages ) {
138138 if ( preg_match( '/^ \[ ([^\s]*+) \s ([^\]]*+) \] \w* $ /x', $link, $m ) ) {
139139 $title = $m[1];
140140 $alt = trim( $m[2] );

Status & tagging log