aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-12-06 02:28:54 +0000
committerpatdenice <patdenice@piwigo.org>2008-12-06 02:28:54 +0000
commit6873537fe612c8adfe655a87c1750be8e8427dc3 (patch)
treea1ef0f880f29addf6b084267259a95fa257491a9 /include
parent0479bcde106ec3a016c28f2fce458c4b09b1a664 (diff)
- Add a "Bound Template" column for template extensions.
git-svn-id: http://piwigo.org/svn/trunk@2923 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/template.class.php3
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))
{