Use HTTPS instead of protocol relative for WMF links
authorFomafix <fomafix@googlemail.com>
Fri, 17 May 2019 05:16:16 +0000 (07:16 +0200)
committerFomafix <fomafix@googlemail.com>
Fri, 17 May 2019 06:12:10 +0000 (08:12 +0200)
The WMF websites redirect from HTTP to HTTPS.

Change-Id: I916c97697b4ffa9774eec9c8e6ab650a08bb6edd

includes/DefaultSettings.php
includes/OutputPage.php
includes/actions/HistoryAction.php
includes/skins/Skin.php
includes/specials/SpecialImport.php
includes/specials/SpecialRecentChanges.php
resources/src/mediawiki.debug/debug.js

index 28e9ec8..69da9c7 100644 (file)
@@ -3497,7 +3497,7 @@ $wgFooterIcons = [
                        // "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
                        // plus srcset for 1.5x, 2x resolution variants.
                        "src" => null,
-                       "url" => "//www.mediawiki.org/",
+                       "url" => "https://www.mediawiki.org/",
                        "alt" => "Powered by MediaWiki",
                ]
        ],
index c45fce7..edffc3b 100644 (file)
@@ -1478,7 +1478,7 @@ class OutputPage extends ContextSource {
                        $helpUrl = $to;
                } else {
                        $toUrlencoded = wfUrlencode( str_replace( ' ', '_', $to ) );
-                       $helpUrl = "//www.mediawiki.org/wiki/Special:MyLanguage/$toUrlencoded";
+                       $helpUrl = "https://www.mediawiki.org/wiki/Special:MyLanguage/$toUrlencoded";
                }
 
                $link = Html::rawElement(
index 706241a..538b0a1 100644 (file)
@@ -188,7 +188,10 @@ class HistoryAction extends FormlessAction {
                        return;
                }
 
-               $this->addHelpLink( '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Page_history', true );
+               $this->addHelpLink(
+                       'https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Page_history',
+                       true
+               );
 
                // Fail nicely if article doesn't exist.
                if ( !$this->page->exists() ) {
index 86a1c4c..7254746 100644 (file)
@@ -906,7 +906,7 @@ abstract class Skin extends ContextSource {
                $url2 = htmlspecialchars(
                        "$resourceBasePath/resources/assets/poweredby_mediawiki_176x62.png"
                );
-               $text = '<a href="//www.mediawiki.org/"><img src="' . $url1
+               $text = '<a href="https://www.mediawiki.org/"><img src="' . $url1
                        . '" srcset="' . $url1_5 . ' 1.5x, ' . $url2 . ' 2x" '
                        . 'height="31" width="88" alt="Powered by MediaWiki" /></a>';
                Hooks::run( 'SkinGetPoweredBy', [ &$text, $this ] );
index 302a55f..c3aec83 100644 (file)
@@ -322,7 +322,7 @@ class SpecialImport extends SpecialPage {
                $action = $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] );
                $user = $this->getUser();
                $out = $this->getOutput();
-               $this->addHelpLink( '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Import', true );
+               $this->addHelpLink( 'https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Import', true );
 
                if ( $user->isAllowed( 'importupload' ) ) {
                        $mappingSelection = $this->getMappingFormPart( 'upload' );
index 9102f81..6949c61 100644 (file)
@@ -159,7 +159,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                }
 
                $this->addHelpLink(
-                       '//meta.wikimedia.org/wiki/Special:MyLanguage/Help:Recent_changes',
+                       'https://meta.wikimedia.org/wiki/Special:MyLanguage/Help:Recent_changes',
                        true
                );
                parent::execute( $subpage );
index 86bc44a..a8c7264 100644 (file)
                        }
 
                        bitDiv( 'mwversion' )
-                               .append( $( '<a>' ).attr( 'href', '//www.mediawiki.org/' ).text( 'MediaWiki' ) )
+                               .append( $( '<a>' ).attr( 'href', 'https://www.mediawiki.org/' ).text( 'MediaWiki' ) )
                                .append( document.createTextNode( ': ' + this.data.mwVersion + ' ' ) )
                                .append( gitInfo );