X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=api.php;h=9d7f6480ed31ba929416abc76c4559344256f8ce;hb=e0b187264cf2df355116af119fab18cdf7ebf19d;hp=abf601fb48c1124d6f4505949cb77ac9efedf8c2;hpb=27fad304dff43703c40ec93970aaa8760677491b;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index abf601fb48..9d7f6480ed 100644 --- a/api.php +++ b/api.php @@ -8,7 +8,7 @@ * as an argument in the URL ('?action=') and with write-enabled set to the * value of $wgEnableWriteAPI as specified in LocalSettings.php. * It then invokes "execute()" on the ApiMain object instance, which - * produces output in the format sepecified in the URL. + * produces output in the format specified in the URL. * * Copyright © 2006 Yuri Astrakhan @gmail.com * @@ -41,11 +41,7 @@ if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5. } // Initialise common code. -if ( isset( $_SERVER['MW_COMPILED'] ) ) { - require ( 'core/includes/WebStart.php' ); -} else { - require ( __DIR__ . '/includes/WebStart.php' ); -} +require ( __DIR__ . '/includes/WebStart.php' ); wfProfileIn( 'api.php' ); $starttime = microtime( true ); @@ -58,8 +54,8 @@ if ( !$wgRequest->checkUrlExtension() ) { // Verify that the API has not been disabled if ( !$wgEnableAPI ) { header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration Error', true, 500 ); - echo( 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php' - . '
$wgEnableAPI=true;
' ); + echo 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php' + . '
$wgEnableAPI=true;
'; die( 1 ); }