From: hickert Date: Wed, 5 Nov 2008 09:23:45 +0000 (+0000) Subject: Updated template path detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=719573b723e814c47f02b4a747196e0e39d9fde9;p=gosa.git 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 --- 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));