From: Piotr Miazga Date: Fri, 16 Aug 2019 16:40:14 +0000 (+0200) Subject: Remove unused variables from setupTemplate X-Git-Tag: 1.34.0-rc.0~698^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=4d6d27b07bf47d09ed255118399502ea831b2fcb;p=lhc%2Fweb%2Fwiklou.git Remove unused variables from setupTemplate Both $repository and $cache_dir are never used, no other skin/ extension makes use of that, variables are defined just because of PHP Strict standards. IMHO there is no need to define those, all Skins that extend Skin class define optional params so PHP will not complain. Change-Id: I059415a795e5836b9399890ecfd4fb5ee1888ac3 --- diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 5fd9f1fed7..af7ec294e9 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -62,12 +62,10 @@ class SkinTemplate extends Skin { * roughly equivalent to PHPTAL 0.7. * * @param string $classname - * @param bool|string $repository Subdirectory where we keep template files - * @param bool|string $cache_dir * @return QuickTemplate * @private */ - function setupTemplate( $classname, $repository = false, $cache_dir = false ) { + function setupTemplate( $classname ) { return new $classname( $this->getConfig() ); } @@ -179,7 +177,7 @@ class SkinTemplate extends Skin { $user = $this->getUser(); $title = $this->getTitle(); - $tpl = $this->setupTemplate( $this->template, 'skins' ); + $tpl = $this->setupTemplate( $this->template ); $this->thispage = $title->getPrefixedDBkey(); $this->titletxt = $title->getPrefixedText();