Remove unused variables from setupTemplate
authorPiotr Miazga <piotr@polishdeveloper.pl>
Fri, 16 Aug 2019 16:40:14 +0000 (18:40 +0200)
committerPiotr Miazga <piotr@polishdeveloper.pl>
Fri, 16 Aug 2019 16:40:14 +0000 (18:40 +0200)
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

includes/skins/SkinTemplate.php

index 5fd9f1f..af7ec29 100644 (file)
@@ -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();