* (bug 11719) Remove trailing blanks in YAML output.
* (bug 13541) Added siprop=specialpagealiases to meta=siteinfo
* Added fallback8bitEncoding field to meta=siteinfo&siprop=general output
+* (bug 13544) Added prop=revid to action=parse
=== Languages updated in 1.13 ===
if(!is_null($page) && (!is_null($text) || $title != "API"))
$this->dieUsage("The page parameter cannot be used together with the text and title parameters", 'params');
$prop = array_flip($params['prop']);
+ $revid = false;
global $wgParser, $wgUser;
if(!is_null($page)) {
// Try the parser cache first
$articleObj = new Article($titleObj);
+ if(isset($prop['revid']))
+ $revid = $articleObj->getRevIdFetched();
$pcache =& ParserCache::singleton();
$p_result = $pcache->get($articleObj, $wgUser);
if(!$p_result) {
$result_array['externallinks'] = array_keys($p_result->getExternalLinks());
if(isset($prop['sections']))
$result_array['sections'] = $p_result->getSections();
+ if($revid !== false)
+ $result_array['revid'] = $revid;
$result_mapping = array(
'langlinks' => 'll',
'text' => null,
'page' => null,
'prop' => array(
- ApiBase :: PARAM_DFLT => 'text|langlinks|categories|links|templates|images|externallinks|sections',
+ ApiBase :: PARAM_DFLT => 'text|langlinks|categories|links|templates|images|externallinks|sections|revid',
ApiBase :: PARAM_ISMULTI => true,
ApiBase :: PARAM_TYPE => array(
'text',
'templates',
'images',
'externallinks',
- 'sections'
+ 'sections',
+ 'revid'
)
)
);