Merge "Stop php strict error warnings from MemcachedClient::_flush_read_buffer()"
[lhc/web/wiklou.git] / includes / api / ApiRsd.php
index a806c3a..f0e1fad 100644 (file)
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       require_once( 'ApiBase.php' );
-}
-
 /**
  * API module for sending out RSD information
  * @ingroup API
@@ -47,8 +43,8 @@ class ApiRsd extends ApiBase {
 
                $service = array( 'apis' => $this->formatRsdApiList() );
                ApiResult::setContent( $service, 'MediaWiki', 'engineName' );
-               ApiResult::setContent( $service, 'http://www.mediawiki.org/', 'engineLink' );
-               ApiResult::setContent( $service, wfExpandUrl( Title::newMainPage()->getFullURL() ), 'homePageLink' );
+               ApiResult::setContent( $service, 'https://www.mediawiki.org/', 'engineLink' );
+               ApiResult::setContent( $service, Title::newMainPage()->getCanonicalUrl(), 'homePageLink' );
 
                $result->setIndexedTagName( $service['apis'], 'api' );
 
@@ -98,10 +94,10 @@ class ApiRsd extends ApiBase {
                $apis = array(
                        'MediaWiki' => array(
                                // The API link is required for all RSD API entries.
-                               'apiLink' => wfExpandUrl( wfScript( 'api' ) ),
+                               'apiLink' => wfExpandUrl( wfScript( 'api' ), PROTO_CURRENT ),
 
                                // Docs link is optional, but recommended.
-                               'docs' => 'http://www.mediawiki.org/wiki/API',
+                               'docs' => 'https://www.mediawiki.org/wiki/API',
 
                                // Some APIs may need a blog ID, but it may be left blank.
                                'blogID' => '',