Avoid setting multiple Content-Type headers.
[lhc/web/wiklou.git] / api.php
diff --git a/api.php b/api.php
index 05a881e..889c5f1 100644 (file)
--- a/api.php
+++ b/api.php
@@ -45,7 +45,7 @@ if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.
 
 // Initialise common code.
 if ( isset( $_SERVER['MW_COMPILED'] ) ) {
-       require ( 'phase3/includes/WebStart.php' );
+       require ( 'core/includes/WebStart.php' );
 } else {
        require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
 }
@@ -68,11 +68,13 @@ if ( !$wgEnableAPI ) {
 
 // Selectively allow cross-site AJAX
 
-/*
+/**
  * Helper function to convert wildcard string into a regex
  * '*' => '.*?'
  * '?' => '.'
- * @ return string
+ *
+ * @param $search string
+ * @return string
  */
 function convertWildcard( $search ) {
        $search = preg_quote( $search, '/' );
@@ -103,9 +105,6 @@ if ( $wgCrossSiteAJAXdomains && isset( $_SERVER['HTTP_ORIGIN'] ) ) {
 
 // Set a dummy $wgTitle, because $wgTitle == null breaks various things
 // In a perfect world this wouldn't be necessary
-//
-// @todo @fixme Ummmm, doesn't this line make the PHP4 check at the top completely
-// useless? Suggest moving more stuff out of api.php like we did with index.php
 $wgTitle = Title::makeTitle( NS_MAIN, 'API' );
 
 /* Construct an ApiMain with the arguments passed via the URL. What we get back
@@ -118,7 +117,7 @@ $processor = new ApiMain( $wgRequest, $wgEnableWriteAPI );
 $processor->execute();
 
 // Execute any deferred updates
-wfDoUpdates();
+DeferredUpdates::doUpdates();
 
 // Log what the user did, for book-keeping purposes.
 $endtime = microtime( true );