* 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 <Firstname><Lastname>@gmail.com
*
}
// 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 );
// 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'
- . '<pre><b>$wgEnableAPI=true;</b></pre>' );
+ echo 'MediaWiki API is not enabled for this site. Add the following line to your LocalSettings.php'
+ . '<pre><b>$wgEnableAPI=true;</b></pre>';
die( 1 );
}