diff options
author | vdigital <vdigital@piwigo.org> | 2010-03-10 22:22:30 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2010-03-10 22:22:30 +0000 |
commit | 964a191ff17e0913d7fdcf579c7106624f2505be (patch) | |
tree | a0330967581941d4207ea64e68d41ced86faedaa | |
parent | dfe94b111d61f5ff282ce3fb5446ce7b10148892 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | include/template.class.php | 9 |
1 files changed, 5 insertions, 4 deletions
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'; |