* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- require_once( 'ApiBase.php' );
-}
-
/**
* API module for sending out RSD information
* @ingroup API
$service = array( 'apis' => $this->formatRsdApiList() );
ApiResult::setContent( $service, 'MediaWiki', 'engineName' );
- ApiResult::setContent( $service, 'http://www.mediawiki.org/', 'engineLink' );
+ ApiResult::setContent( $service, 'https://www.mediawiki.org/', 'engineLink' );
+ ApiResult::setContent( $service, Title::newMainPage()->getCanonicalUrl(), 'homePageLink' );
$result->setIndexedTagName( $service['apis'], 'api' );
}
public function getDescription() {
- return 'Export an RSD schema';
+ return 'Export an RSD (Really Simple Discovery) schema';
}
- protected function getExamples() {
+ public function getExamples() {
return array(
'api.php?action=rsd'
);
$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://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' => '',
}
return $outputData;
}
-
- public function getVersion() {
- return __CLASS__ . ': $Id$';
- }
}
class ApiFormatXmlRsd extends ApiFormatXml {
parent::__construct( $main, $format );
$this->setRootElement( 'rsd' );
}
-
+
public function getMimeType() {
return 'application/rsd+xml';
}
-
- public function getVersion() {
- return __CLASS__ . ': $Id$';
- }
}