+ if( $nt->getInterwiki() != "" ) {
+ # Interwiki links are not stored in the link tables
+ continue;
+ }
+ if( $nt->getNamespace() == Namespace::getSpecial() ) {
+ # Special links not stored in link tables
+ continue;
+ }
+ if( $nt->getNamespace() == Namespace::getMedia() ) {
+ # treat media: links as image: links
+ $nt = Title::makeTitle( Namespace::getImage(), $nt->getDBkey() );
+ }