r87382 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87381‎ | r87382 | r87383 >
Date:01:53, 4 May 2011
Author:dantman
Status:ok (Comments)
Tags:
Comment:
Add proper $out setting to Skin::getCategories which is present in the other similar methods. Replaces r87380.
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -607,9 +607,9 @@
608608 * the ->getCategories( $out ) form with whatout OutputPage is on hand
609609 */
610610 function getCategories( OutputPage $out=null ) {
611 - if( !$out ) {
612 - global $wgOut;
613 - $out = $wgOut;
 611+
 612+ if( $out === null ){
 613+ $out = $this->getContext()->output;
614614 }
615615
616616 $catlinks = $this->getCategoryLinks( $out );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87380Add hack to shut up fatals when getCategories() is called without an actual O...demon01:43, 4 May 2011

Comments

#Comment by Dantman (talk | contribs)   01:57, 4 May 2011

FWIW, I plan to kill the $out args I added and replace them with that `$out = $this->getContext()->output`. And go the other direction, depreciating $out args in most of the methods that originally had them (with the exception of Skin::outputPage which is the entrypoint that may set the context).

#Comment by Brion VIBBER (talk | contribs)   18:39, 7 June 2011

This was actually removed by further cleanup on r87389 :)

Status & tagging log