This means you can use API search on Wikipedia without explicitly adding
&srwhat=text to the query.
* Added iiprop=bitdepth to imageinfo and aiprop=bitdepth to allimages
-* API-specific permissions (such as 'writeapi' and 'apihighlimits' are now
- listed on action=help
-
+* (bug 14713) API-specific permissions (such as 'writeapi' and 'apihighlimits'
+ are now listed on action=help
+* (bug 15044) Added requestid parameter to api.php to facilitate distinguishing
+ between requests
=== Languages updated in 1.14 ===
* 'params' => array ( $someVarToSubst ) ),
* );
*/
- private static $mRights = array( 'writeapi' => array( 'msg' => 'Use of the write API' ,
- 'params' => array() ),
- 'apihighlimits' => array( 'msg' => 'Use higher limits in API queries (Slow queries: $1 results; Fast queries: $2 results). These limits also apply to multivalue parameters.',
- 'params' => array ( ApiMain :: LIMIT_SML2, ApiMain :: LIMIT_BIG2 ) ),
- );
+ private static $mRights = array('writeapi' => array(
+ 'msg' => 'Use of the write API',
+ 'params' => array()
+ ),
+ 'apihighlimits' => array(
+ 'msg' => 'Use higher limits in API queries (Slow queries: $1 results; Fast queries: $2 results). These limits also apply to multivalue parameters.',
+ 'params' => array (ApiMain::LIMIT_SML2, ApiMain::LIMIT_BIG2)
+ )
+ );
private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames;
$this->printResult(true);
}
- global $wgRequest;
if($this->mSquidMaxage == -1)
{
# Nobody called setCacheMaxAge(), use the (s)maxage parameters
- $smaxage = $wgRequest->getVal('smaxage', 0);
- $maxage = $wgRequest->getVal('maxage', 0);
+ $smaxage = $this->mRequest->getVal('smaxage', 0);
+ $maxage = $this->mRequest->getVal('maxage', 0);
}
else
$smaxage = $maxage = $this->mSquidMaxage;
}
$this->getResult()->reset();
+ // Re-add the id
+ if($this->mRequest->getCheck('requestid'))
+ $this->getResult()->addValue(null, 'requestid', $this->mRequest->getVal('requestid'));
$this->getResult()->addValue(null, 'error', $errMessage);
return $errMessage['code'];
* Execute the actual module, without any error handling
*/
protected function executeAction() {
+ // First add the id to the top element
+ if($this->mRequest->getCheck('requestid'))
+ $this->getResult()->addValue(null, 'requestid', $this->mRequest->getVal('requestid'));
$params = $this->extractRequestParams();
ApiBase :: PARAM_TYPE => 'integer',
ApiBase :: PARAM_DFLT => 0
),
+ 'requestid' => null,
);
}
'maxlag' => 'Maximum lag',
'smaxage' => 'Set the s-maxage header to this many seconds. Errors are never cached',
'maxage' => 'Set the max-age header to this many seconds. Errors are never cached',
+ 'requestid' => 'Request ID to distinguish requests. This will just be output back to you',
);
}