From 719573b723e814c47f02b4a747196e0e39d9fde9 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 Nov 2008 09:23:45 +0000 Subject: [PATCH] Updated template path detection -basename and dirname don't work with paths only like '/etc/gosa/', basename returns 'gosa' and dirname returns '/etc' .. Replaced git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12918 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc index 0fea63c2c..7ecd486cf 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc @@ -131,8 +131,8 @@ class faiTemplateEntry extends plugin } /* We now split cn/FAItemplatePath to make things more clear... */ - $smarty->assign("templateFile", basename($this->FAItemplatePath)); - $smarty->assign("templatePath", dirname($this->FAItemplatePath)); + $smarty->assign("templateFile", preg_replace("/^.*\//","",$this->FAItemplatePath)); + $smarty->assign("templatePath", preg_replace("/[^\/]*$/","",$this->FAItemplatePath)); $smarty->assign("freeze", preg_match("/freeze/i",$this->FAIstate));; $display.= $smarty->fetch(get_template_path('faiTemplateEntry.tpl', TRUE)); -- 2.30.2