From 5eff2fb396b89efb9c6853ffc0a226a901d27126 Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Wed, 25 Jun 2014 19:03:46 +1000 Subject: [PATCH] Tidy up code --- modules/cms/classes/Theme.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/cms/classes/Theme.php b/modules/cms/classes/Theme.php index d152c35b4..4cfd54d98 100644 --- a/modules/cms/classes/Theme.php +++ b/modules/cms/classes/Theme.php @@ -31,13 +31,15 @@ class Theme /** * Returns the absolute theme path. - * @param string $dir Optional theme directory. Defaults to $this->getDirName() + * @param string $directory Optional theme directory. Defaults to $this->getDirName() + * @return string */ - public function getPath($dir = NULL) + public function getPath($dirName = null) { - if ( !$dir ) $dir = $this->getDirName(); + if (!$dirName) + $dirName = $this->getDirName(); - return base_path().Config::get('cms.themesDir').'/'.$dir; + return base_path().Config::get('cms.themesDir').'/'.$dirName; } /** @@ -54,10 +56,10 @@ class Theme * @param string $dir The theme directory * @return bool */ - public static function exists($dir) + public static function exists($dirName) { $theme = new self; - $path = $theme->getPath($dir); + $path = $theme->getPath($dirName); return File::isDirectory($path); }