Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/62177
Change subject: Add content model to prop=info
......................................................................
Add content model to prop=info
Fields of page table are shown by default in prop=info
Change-Id: Id8b90c341dea19337558ed355975ab890f0663e2
---
M includes/api/ApiQueryInfo.php
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/77/62177/1
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index 6dbda5f..df3a4ea 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -56,7 +56,7 @@
* @return void
*/
public function requestExtraData( $pageSet ) {
- global $wgDisableCounters;
+ global $wgDisableCounters, $wgContentHandlerUseDB;
$pageSet->requestField( 'page_restrictions' );
// when resolving redirects, no page will have this field
@@ -70,6 +70,9 @@
$pageSet->requestField( 'page_touched' );
$pageSet->requestField( 'page_latest' );
$pageSet->requestField( 'page_len' );
+ if ( $wgContentHandlerUseDB ) {
+ $pageSet->requestField( 'page_content_model' );
+ }
}
/**
@@ -364,6 +367,7 @@
if ( $this->pageIsNew[$pageid] ) {
$pageInfo['new'] = '';
}
+ $pageInfo['contentmodel'] = $title->getContentModel();
}
if ( !is_null( $this->params['token'] ) ) {
@@ -819,7 +823,8 @@
'starttimestamp' => array(
ApiBase::PROP_TYPE => 'timestamp',
ApiBase::PROP_NULLABLE => true
- )
+ ),
+ 'contentmodel' => 'string',
),
'watched' => array(
'watched' => 'boolean'
--
To view, visit https://gerrit.wikimedia.org/r/62177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8b90c341dea19337558ed355975ab890f0663e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits