Merge "Handle missing namespace prefix in XML dumps more gracefully"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 85bd09a..3ef646a 100644 (file)
@@ -906,7 +906,10 @@ abstract class Skin extends ContextSource {
                                $html = htmlspecialchars( $icon["alt"] );
                        }
                        if ( $url ) {
-                               $html = Html::rawElement( 'a', [ "href" => $url ], $html );
+                               global $wgExternalLinkTarget;
+                               $html = Html::rawElement( 'a',
+                                       [ "href" => $url, "target" => $wgExternalLinkTarget ],
+                                       $html );
                        }
                }
                return $html;
@@ -1035,7 +1038,7 @@ abstract class Skin extends ContextSource {
                global $wgStylePath, $wgStyleVersion;
 
                if ( $this->stylename === null ) {
-                       $class = get_class( $this );
+                       $class = static::class;
                        throw new MWException( "$class::\$stylename must be set to use getSkinStylePath()" );
                }