summaryrefslogtreecommitdiff
path: root/api.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /api.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
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';