// 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, '/' );
$items = array(
wfTimestamp( TS_MW ),
$endtime - $starttime,
- wfGetIP(),
+ $wgRequest->getIP(),
$_SERVER['HTTP_USER_AGENT']
);
$items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';