* Expand the thumburl to an absolute url to make it consistent with url and
descriptionurl
* (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
+* (bug 22061) API: add prop=headitems to action=parse
=== Languages updated in 1.16 ===
$this->enableClientCache( false );
}
$this->mNoGallery = $parserOutput->getNoGallery();
- $this->mHeadItems = array_merge( $this->mHeadItems, (array)$parserOutput->mHeadItems );
+ $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() );
// Versioning...
foreach ( (array)$parserOutput->mTemplateIds as $ns => $dbks ) {
if ( isset( $this->mTemplateIds[$ns] ) ) {
$result_array['displaytitle'] = $p_result->getDisplayTitle() ?
$p_result->getDisplayTitle() :
$titleObj->getPrefixedText();
+
+ if( isset( $prop['headitems'] ) )
+ $result_array['headitems'] = $this->formatHeadItems( $p_result->getHeadItems() );
+
if ( !is_null( $oldid ) )
$result_array['revid'] = intval( $oldid );
'images' => 'img',
'externallinks' => 'el',
'sections' => 's',
+ 'headitems' => 'hi'
);
$this->setIndexedTagNames( $result_array, $result_mapping );
$result->addValue( null, $this->getModuleName(), $result_array );
return $result;
}
+ private function formatHeadItems( $headItems ) {
+ $result = array();
+ foreach( $headItems as $tag => $content ) {
+ $entry = array();
+ $entry['tag'] = $tag;
+ $this->getResult()->setContent( $entry, $content );
+ $result[] = $entry;
+ }
+ return $result;
+ }
+
private function setIndexedTagNames( &$array, $mapping ) {
foreach ( $mapping as $key => $name ) {
if ( isset( $array[$key] ) )
'sections',
'revid',
'displaytitle',
+ 'headitems'
)
),
'pst' => false,
function &getImages() { return $this->mImages; }
function &getExternalLinks() { return $this->mExternalLinks; }
function getNoGallery() { return $this->mNoGallery; }
+ function getHeadItems() { return $this->mHeadItems; }
function getSubtitle() { return $this->mSubtitle; }
function getOutputHooks() { return (array)$this->mOutputHooks; }
function getWarnings() { return array_keys( $this->mWarnings ); }