From 964a191ff17e0913d7fdcf579c7106624f2505be Mon Sep 17 00:00:00 2001 From: vdigital Date: Wed, 10 Mar 2010 22:22:30 +0000 Subject: New feature: Modeling could be turn off in themeconf $themeconf['modeling'] = false; /* Assume to have all *.tpl files in the template. git-svn-id: http://piwigo.org/svn/trunk@5101 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/template.class.php') diff --git a/include/template.class.php b/include/template.class.php index 5f5ef1ce1..2fb4ac7d8 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -100,15 +100,16 @@ class Template { */ function set_template_dir($dir) { - if (!defined('IN_ADMIN')) + $modeling = $this->get_themeconf('modeling'); + if (!defined('IN_ADMIN') and ($modeling !== false)) { // Modeling is active only on gallery side and never in admin // Set the normal directory $this->smarty->template_dir = array($dir); // Modeling by theme parameter - $modeling = './template/' . $this->get_themeconf('modeling'); - if ( $modeling != './template/' and is_dir($modeling)) + $model = './template/' . $modeling; + if ( $model != './template/' and is_dir($model)) { - $this->smarty->template_dir[] = $modeling; + $this->smarty->template_dir[] = $model; } // Default template directory $this->smarty->template_dir[] = './template/default'; -- cgit v1.2.3