r75648 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75647‎ | r75648 | r75649 >
Date:16:19, 29 October 2010
Author:btongminh
Status:ok
Tags:
Comment:
Follow-up r75621: Check for $wgEnableAPI before adding the RSD link to the head
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -192,7 +192,7 @@
193193 }
194194
195195 function initPage( OutputPage $out ) {
196 - global $wgFavicon, $wgAppleTouchIcon;
 196+ global $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI;
197197
198198 wfProfileIn( __METHOD__ );
199199
@@ -216,15 +216,17 @@
217217 'title' => wfMsgForContent( 'opensearch-desc' ),
218218 ) );
219219
220 - # Real Simple Discovery link, provides auto-discovery information
221 - # for the MediaWiki API (and potentially additional custom API
222 - # support such as WordPress or Twitter-compatible APIs for a
223 - # blogging extension, etc)
224 - $out->addLink( array(
225 - 'rel' => 'EditURI',
226 - 'type' => 'application/rsd+xml',
227 - 'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ) ),
228 - ) );
 220+ if ( $wgEnableAPI ) {
 221+ # Real Simple Discovery link, provides auto-discovery information
 222+ # for the MediaWiki API (and potentially additional custom API
 223+ # support such as WordPress or Twitter-compatible APIs for a
 224+ # blogging extension, etc)
 225+ $out->addLink( array(
 226+ 'rel' => 'EditURI',
 227+ 'type' => 'application/rsd+xml',
 228+ 'href' => wfExpandUrl( wfAppendQuery( wfScript( 'api' ), array( 'action' => 'rsd' ) ) ),
 229+ ) );
 230+ }
229231
230232 $this->addMetadataLinks( $out );
231233

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75621(bug 25648) API discovery information has been added as RSD link in page <hea...btongminh19:20, 28 October 2010

Status & tagging log