Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -165,9 +165,18 @@ |
166 | 166 | $result_array['displaytitle'] = $p_result->getDisplayTitle() ? |
167 | 167 | $p_result->getDisplayTitle() : |
168 | 168 | $titleObj->getPrefixedText(); |
169 | | - |
| 169 | + |
170 | 170 | if ( isset( $prop['headitems'] ) ) |
171 | 171 | $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 | + } |
172 | 181 | |
173 | 182 | if ( !is_null( $oldid ) ) |
174 | 183 | $result_array['revid'] = intval( $oldid ); |
— | — | @@ -267,7 +276,8 @@ |
268 | 277 | 'sections', |
269 | 278 | 'revid', |
270 | 279 | 'displaytitle', |
271 | | - 'headitems' |
| 280 | + 'headitems', |
| 281 | + 'headhtml' |
272 | 282 | ) |
273 | 283 | ), |
274 | 284 | 'pst' => false, |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -842,6 +842,7 @@ |
843 | 843 | * (bug 18758) API read of watchlist's wl_notificationtimestamp |
844 | 844 | * (bug 20809) Expose EditFormPreloadText via the API |
845 | 845 | * (bug 18427) Comment (edit summary) parser option for API |
| 846 | +* (bug 18608) - API should provide list of CSS styles to apply to rendered output |
846 | 847 | |
847 | 848 | === Languages updated in 1.16 === |
848 | 849 | |