Index: trunk/extensions/ImageMap/ImageMap_body.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | const NONE = 4; |
34 | 34 | |
35 | 35 | static function render( $input, $params, $parser ) { |
36 | | - global $wgScriptPath, $wgUser, $wgImageMapAllowExternalLinks, $wgUrlProtocols, $wgNoFollowLinks; |
| 36 | + global $wgScriptPath, $wgUser, $wgUrlProtocols, $wgNoFollowLinks; |
37 | 37 | |
38 | 38 | $lines = explode( "\n", $input ); |
39 | 39 | |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | if (is_null($title)) |
132 | 132 | return self::error('imagemap_invalid_title', $lineNum); |
133 | 133 | $alt = $title->getFullText(); |
134 | | - } elseif ( $wgImageMapAllowExternalLinks && ( in_array( substr( $link , 1 , strpos($link, '//' )+1 ) , $wgUrlProtocols ) || in_array( substr( $link , 1 , strpos($link, ':' ) ) , $wgUrlProtocols ) ) ) { |
| 134 | + } elseif ( in_array( substr( $link , 1 , strpos($link, '//' )+1 ) , $wgUrlProtocols ) || in_array( substr( $link , 1 , strpos($link, ':' ) ) , $wgUrlProtocols ) ) { |
135 | 135 | if ( preg_match( '/^ \[ ([^\s]*+) \s ([^\]]*+) \] \w* $ /x', $link, $m ) ) { |
136 | 136 | $title = htmlspecialchars( $m[1] ); |
137 | 137 | $alt = htmlspecialchars( trim( $m[2] ) ); |
Index: trunk/extensions/ImageMap/ImageMap.php |
— | — | @@ -1,11 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/** |
5 | | - * Set this to true to enable extern links [http://www.example.com] as |
6 | | - * link destination |
7 | | - */ |
8 | | -$wgImageMapAllowExternalLinks = false; |
9 | | - |
10 | 4 | $wgExtensionFunctions[] = 'wfSetupImageMap'; |
11 | 5 | $wgAutoloadClasses['ImageMap'] = dirname(__FILE__).'/ImageMap_body.php'; |
12 | 6 | $wgExtensionCredits['parserhook']['ImageMap'] = array( |