Index: trunk/extensions/ImageMap/ImageMap_body.php |
— | — | @@ -292,7 +292,15 @@ |
293 | 293 | # Register links |
294 | 294 | $parser->mOutput->addImage( $imageTitle->getDBkey() ); |
295 | 295 | foreach ( $links as $title ) { |
296 | | - $parser->mOutput->addLink( $title ); |
| 296 | + if( $title->isExternal() || $title->getNamespace() == NS_SPECIAL ) { |
| 297 | + // Don't register special or interwiki links... |
| 298 | + } elseif( $title->getNamespace() == NS_MEDIA ) { |
| 299 | + // Regular Media: links are recorded as image usages |
| 300 | + $parser->mOutput->addImage( $title->getDBkey() ); |
| 301 | + } else { |
| 302 | + // Plain ol' link |
| 303 | + $parser->mOutput->addLink( $title ); |
| 304 | + } |
297 | 305 | } |
298 | 306 | if ( isset( $extLinks ) ) { |
299 | 307 | foreach ( $extLinks as $title ) { |