r36338 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36337‎ | r36338 | r36339 >
Date:15:08, 16 June 2008
Author:demon
Status:old
Tags:
Comment:
Ignore that...I'm an idiot.
Modified paths:
  • /trunk/extensions/ImageMap/ImageMap_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ImageMap/ImageMap_body.php
@@ -27,7 +27,7 @@
2828 const NONE = 4;
2929
3030 static function render( $input, $params, $parser ) {
31 - global $wgScriptPath, $wgUser, $wgUrlProtocols, $wgNoFollowLinks, $wgAllowExternalImages;
 31+ global $wgScriptPath, $wgUser, $wgUrlProtocols, $wgNoFollowLinks;
3232 wfLoadExtensionMessages( 'ImageMap' );
3333
3434 $lines = explode( "\n", $input );
@@ -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 ) && $wgAllowExternalImages ) {
 137+ } elseif ( in_array( substr( $link , 1 , strpos($link, '//' )+1 ) , $wgUrlProtocols ) || in_array( substr( $link , 1 , strpos($link, ':' ) ) , $wgUrlProtocols ) ) {
138138 if ( preg_match( '/^ \[ ([^\s]*+) \s ([^\]]*+) \] \w* $ /x', $link, $m ) ) {
139139 $title = $m[1];
140140 $alt = trim( $m[2] );

Status & tagging log