summaryrefslogtreecommitdiff
path: root/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'api.php')
-rw-r--r--api.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/api.php b/api.php
index 39d27dd6..a5a25799 100644
--- a/api.php
+++ b/api.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, '/' );
@@ -115,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 );
@@ -127,7 +129,7 @@ if ( $wgAPIRequestLog ) {
$items = array(
wfTimestamp( TS_MW ),
$endtime - $starttime,
- wfGetIP(),
+ $wgRequest->getIP(),
$_SERVER['HTTP_USER_AGENT']
);
$items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';