mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ImageMap
synced 2024-11-15 10:25:09 +00:00
* (bug 12651) Don't record special:, media:, and interwiki links in ImageMap in the internal link tables
This commit is contained in:
parent
bc22c2501e
commit
acf2a86d63
|
@ -292,7 +292,15 @@ class ImageMap {
|
|||
# Register links
|
||||
$parser->mOutput->addImage( $imageTitle->getDBkey() );
|
||||
foreach ( $links as $title ) {
|
||||
$parser->mOutput->addLink( $title );
|
||||
if( $title->isExternal() || $title->getNamespace() == NS_SPECIAL ) {
|
||||
// Don't register special or interwiki links...
|
||||
} elseif( $title->getNamespace() == NS_MEDIA ) {
|
||||
// Regular Media: links are recorded as image usages
|
||||
$parser->mOutput->addImage( $title->getDBkey() );
|
||||
} else {
|
||||
// Plain ol' link
|
||||
$parser->mOutput->addLink( $title );
|
||||
}
|
||||
}
|
||||
if ( isset( $extLinks ) ) {
|
||||
foreach ( $extLinks as $title ) {
|
||||
|
|
Loading…
Reference in a new issue