From adc4aee80f7cd3242f65f0b316af2b560a64712c Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Wed, 7 Dec 2016 11:58:25 +0100 Subject: Change templates set through administration UI --- application/ApplicationUtils.php | 1 + 1 file changed, 1 insertion(+) (limited to 'application/ApplicationUtils.php') diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php index 7f963e97..a0f482b0 100644 --- a/application/ApplicationUtils.php +++ b/application/ApplicationUtils.php @@ -150,6 +150,7 @@ class ApplicationUtils 'inc', 'plugins', $conf->get('resource.raintpl_tpl'), + $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme'), ) as $path) { if (! is_readable(realpath($path))) { $errors[] = '"'.$path.'" directory is not readable'; -- cgit v1.2.3 From a0df06517bada0f811b464017ce385290e02c2bf Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 3 Jan 2017 11:42:21 +0100 Subject: Minor improvements regarding #705 (coding style, unit tests, etc.) --- application/ApplicationUtils.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'application/ApplicationUtils.php') diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php index a0f482b0..cc009a1d 100644 --- a/application/ApplicationUtils.php +++ b/application/ApplicationUtils.php @@ -195,4 +195,24 @@ class ApplicationUtils return $errors; } + + /** + * Get a list of available themes. + * + * It will return the name of any directory present in the template folder. + * + * @param string $tplDir Templates main directory. + * + * @return array List of theme names. + */ + public static function getThemes($tplDir) + { + $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR); + $themes = []; + foreach ($allTheme as $value) { + $themes[] = str_replace($tplDir.'/', '', $value); + } + + return $themes; + } } -- cgit v1.2.3 From 04a0e8ea34c241fdf6bd30b11f5242656f9cd1c2 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 3 Jan 2017 12:01:25 +0100 Subject: Updater: keep custom theme preference with the new theme setting --- application/ApplicationUtils.php | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'application/ApplicationUtils.php') diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php index cc009a1d..a0f482b0 100644 --- a/application/ApplicationUtils.php +++ b/application/ApplicationUtils.php @@ -195,24 +195,4 @@ class ApplicationUtils return $errors; } - - /** - * Get a list of available themes. - * - * It will return the name of any directory present in the template folder. - * - * @param string $tplDir Templates main directory. - * - * @return array List of theme names. - */ - public static function getThemes($tplDir) - { - $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR); - $themes = []; - foreach ($allTheme as $value) { - $themes[] = str_replace($tplDir.'/', '', $value); - } - - return $themes; - } } -- cgit v1.2.3