r62195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62194‎ | r62195 | r62196 >
Date:20:47, 9 February 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
* (bug 18608) - API should provide list of CSS styles to apply to rendered output
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -165,9 +165,18 @@
166166 $result_array['displaytitle'] = $p_result->getDisplayTitle() ?
167167 $p_result->getDisplayTitle() :
168168 $titleObj->getPrefixedText();
169 -
 169+
170170 if ( isset( $prop['headitems'] ) )
171171 $result_array['headitems'] = $this->formatHeadItems( $p_result->getHeadItems() );
 172+
 173+ if ( isset( $prop['headhtml'] ) ) {
 174+
 175+ $out = new OutputPage;
 176+ $out->addParserOutputNoText( $p_result ); // PO object generated by action=parse
 177+
 178+ $result_array['stylesheets'] = array();
 179+ $result->setContent( $result_array['headhtml'], $out->headElement( $wgUser->getSkin() ) );
 180+ }
172181
173182 if ( !is_null( $oldid ) )
174183 $result_array['revid'] = intval( $oldid );
@@ -267,7 +276,8 @@
268277 'sections',
269278 'revid',
270279 'displaytitle',
271 - 'headitems'
 280+ 'headitems',
 281+ 'headhtml'
272282 )
273283 ),
274284 'pst' => false,
Index: trunk/phase3/RELEASE-NOTES
@@ -842,6 +842,7 @@
843843 * (bug 18758) API read of watchlist's wl_notificationtimestamp
844844 * (bug 20809) Expose EditFormPreloadText via the API
845845 * (bug 18427) Comment (edit summary) parser option for API
 846+* (bug 18608) - API should provide list of CSS styles to apply to rendered output
846847
847848 === Languages updated in 1.16 ===
848849

Follow-up revisions

RevisionCommit summaryAuthorDate
r62196Minor fix to RELEASE-NOTES for r62195reedy20:48, 9 February 2010
r62234Whitespace fixes for r62195, remove out-of-context commentcatrope10:54, 10 February 2010
r66834bug 18608 done in a fashion much closer to how I should've done it originally....reedy16:35, 24 May 2010
r66856bug 18608 done in a fashion much closer to how I should've done it originally....reedy23:24, 24 May 2010

Comments

#Comment by P.Copp (talk | contribs)   18:16, 19 February 2010
+			$result_array['stylesheets'] = array();
+			$result->setContent( $result_array['headhtml'], $out->headElement( $wgUser->getSkin() ) );

This obviously throws an exception, should be 'headhtml' in both lines.

#Comment by Reedy (talk | contribs)   18:29, 19 February 2010

r62712

Seems i didn't change them all before finishing this bug

Status & tagging log