diff options
author | patdenice <patdenice@piwigo.org> | 2008-12-06 02:31:02 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2008-12-06 02:31:02 +0000 |
commit | 76181e5a495a21a2bfae205fcfa89062f0cc9eeb (patch) | |
tree | 1fa224b421633abb86e2de4e4d9a07c8c42de9e2 /include | |
parent | f4f4f9724a480a4336af547c3a0ff814924f0acc (diff) |
merge -c2923 from trunk to branch 2.0.
- Add a "Bound Template" column for template extensions.
git-svn-id: http://piwigo.org/svn/branches/2.0@2924 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/template.class.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/template.class.php b/include/template.class.php index e641d3cb8..86d5a1062 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -186,11 +186,13 @@ class Template { { $handle = $value[0]; $param = $value[1]; + $tpl = $value[2]; } elseif (is_string($value)) { $handle = $value; $param = 'N/A'; + $tpl = 'N/A'; } else { @@ -198,6 +200,7 @@ class Template { } if ((stripos(implode('/',array_flip($_GET)), $param) > 0 or $param == 'N/A') + and (preg_match('/'.preg_quote($tpl,'/').'$/', $this->get_template_dir()) or $tpl == 'N/A') and (!isset($this->extents[$handle]) or $overwrite) and file_exists($dir . $filename)) { |