dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Adding ability of jQuery badge to display the number zero if requested."
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryRevisions.php
diff --git
a/includes/api/ApiQueryRevisions.php
b/includes/api/ApiQueryRevisions.php
index
ad40a64
..
66ff3f0
100644
(file)
--- a/
includes/api/ApiQueryRevisions.php
+++ b/
includes/api/ApiQueryRevisions.php
@@
-546,9
+546,9
@@
class ApiQueryRevisions extends ApiQueryBase {
if ( $text === null ) {
$format = $this->contentFormat ? $this->contentFormat : $content->getDefaultFormat();
if ( $text === null ) {
$format = $this->contentFormat ? $this->contentFormat : $content->getDefaultFormat();
+ $model = $content->getModel();
if ( !$content->isSupportedFormat( $format ) ) {
if ( !$content->isSupportedFormat( $format ) ) {
- $model = $content->getModel();
$name = $title->getPrefixedDBkey();
$this->dieUsage( "The requested format {$this->contentFormat} is not supported ".
$name = $title->getPrefixedDBkey();
$this->dieUsage( "The requested format {$this->contentFormat} is not supported ".
@@
-556,7
+556,11
@@
class ApiQueryRevisions extends ApiQueryBase {
}
$text = $content->serialize( $format );
}
$text = $content->serialize( $format );
+
+ // always include format and model.
+ // Format is needed to deserialize, model is needed to interpret.
$vals['contentformat'] = $format;
$vals['contentformat'] = $format;
+ $vals['contentmodel'] = $model;
}
if ( $text !== false ) {
}
if ( $text !== false ) {
@@
-783,7
+787,10
@@
class ApiQueryRevisions extends ApiQueryBase {
ApiBase::PROP_NULLABLE => true
),
'texthidden' => 'boolean'
ApiBase::PROP_NULLABLE => true
),
'texthidden' => 'boolean'
- )
+ ),
+ 'contentmodel' => array(
+ 'contentmodel' => 'string'
+ ),
);
self::addTokenProperties( $props, $this->getTokenFunctions() );
);
self::addTokenProperties( $props, $this->getTokenFunctions() );