r79871 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79870‎ | r79871 | r79872 >
Date:19:42, 8 January 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Added QuickTemplate::getSkin(), useful for extensions when executing hooks passing only the template as parameter
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -1386,6 +1386,15 @@
13871387 $msg = $this->translator->translate( $str );
13881388 return ( $msg != '-' ) && ( $msg != '' ); # ????
13891389 }
 1390+
 1391+ /**
 1392+ * Get the Skin object related to this object
 1393+ *
 1394+ * @return Skin object
 1395+ */
 1396+ public function getSkin() {
 1397+ return $this->data['skin'];
 1398+ }
13901399 }
13911400
13921401 /**

Comments

#Comment by Aaron Schulz (talk | contribs)   22:58, 14 June 2011

Is this still needed with Linker being static and such?

#Comment by IAlex (talk | contribs)   09:44, 15 June 2011

It's used to get an Title object ($this->getSkin()->getTitle()).

Status & tagging log