Linker: Do not localize links to other wikis in comments
[lhc/web/wiklou.git] / includes / Linker.php
index b133ecd..9ae7cc6 100644 (file)
@@ -1331,7 +1331,10 @@ class Linker {
                        $link = Linker::makeExternalLink(
                                WikiMap::getForeignURL(
                                        $wikiId,
-                                       $title->getPrefixedText(),
+                                       $title->getNamespace() === 0
+                                               ? $title->getDBkey()
+                                               : MWNamespace::getCanonicalName( $title->getNamespace() ) . ':'
+                                                       . $title->getDBkey(),
                                        $title->getFragment()
                                ),
                                $text,
@@ -2094,9 +2097,6 @@ class Linker {
         * @return array
         */
        public static function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
-               # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
-               # no attribute" instead of "output '' as value for attribute", this
-               # would be three lines.
                $attribs = [
                        'title' => self::titleAttrib( $name, 'withaccess', $msgParams ),
                        'accesskey' => self::accesskey( $name )
@@ -2118,9 +2118,6 @@ class Linker {
         * @return null|string
         */
        public static function tooltip( $name, $options = null ) {
-               # @todo FIXME: If Sanitizer::expandAttributes() treated "false" as "output
-               # no attribute" instead of "output '' as value for attribute", this
-               # would be two lines.
                $tooltip = self::titleAttrib( $name, $options );
                if ( $tooltip === false ) {
                        return '';