Index: trunk/phase3/includes/Skin.php |
— | — | @@ -192,7 +192,7 @@ |
193 | 193 | } |
194 | 194 | |
195 | 195 | function initPage( OutputPage $out ) { |
196 | | - global $wgFavicon, $wgAppleTouchIcon; |
| 196 | + global $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI; |
197 | 197 | |
198 | 198 | wfProfileIn( __METHOD__ ); |
199 | 199 | |
— | — | @@ -216,15 +216,17 @@ |
217 | 217 | 'title' => wfMsgForContent( 'opensearch-desc' ), |
218 | 218 | ) ); |
219 | 219 | |
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 | + } |
229 | 231 | |
230 | 232 | $this->addMetadataLinks( $out ); |
231 | 233 | |