From: hickert Date: Thu, 8 Jul 2010 15:51:56 +0000 (+0000) Subject: Updated FAI templates X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d9c698af75fb0d19a5f862a9d9ea16d3a20b5a9f;p=gosa.git Updated FAI templates -Updated templates - the must * was placed below the label... -Fixed POST handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18969 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index a9c050ae9..c3c99f607 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -310,11 +310,7 @@ class faiTemplate extends plugin * If we post the escaped strings they will be escaped again */ foreach($this->attributes as $attrs){ - if(get_magic_quotes_gpc()){ - $smarty->assign($attrs,stripslashes($this->$attrs)); - }else{ - $smarty->assign($attrs,($this->$attrs)); - } + $smarty->assign($attrs,set_post($this->$attrs)); } $dn = $this->acl_base_for_current_object($this->dn); @@ -557,7 +553,7 @@ class faiTemplate extends plugin { $vars = array("cn"); $smarty = get_smarty(); - $smarty->assign("cn", htmlentities($this->cn)); + $smarty->assign("cn", set_post($this->cn)); $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE)); $ret = array(); $ret['string'] = $str; diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc index 5caa14547..68fb8972c 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc @@ -129,11 +129,7 @@ class faiTemplateEntry extends plugin * If we post the escaped strings they will be escaped again */ foreach($this->attributes as $attrs){ - if(get_magic_quotes_gpc()){ - $smarty->assign($attrs,stripslashes($this->$attrs)); - }else{ - $smarty->assign($attrs,($this->$attrs)); - } + $smarty->assign($attrs,set_post($this->$attrs)); } /* Assign file modes */ @@ -158,8 +154,8 @@ class faiTemplateEntry extends plugin } /* We now split cn/FAItemplatePath to make things more clear... */ - $smarty->assign("templateFile", preg_replace("/^.*\//","",$this->FAItemplatePath)); - $smarty->assign("templatePath", preg_replace("/[^\/]*$/","",$this->FAItemplatePath)); + $smarty->assign("templateFile", set_post(preg_replace("/^.*\//","",$this->FAItemplatePath))); + $smarty->assign("templatePath", set_post(preg_replace("/[^\/]*$/","",$this->FAItemplatePath))); $smarty->assign("freeze", preg_match("/freeze/i",$this->FAIstate));; $display.= $smarty->fetch(get_template_path('faiTemplateEntry.tpl', TRUE)); @@ -180,9 +176,9 @@ class faiTemplateEntry extends plugin /* Set user.group (FAIowner) attribute */ if(isset($_POST['group']) && isset($_POST["user"]) && $this->acl_is_writeable("FAIowner")){ - $this->FAIowner = $_POST["user"].'.'.$_POST["group"]; - $this->user = $_POST['user']; - $this->group= $_POST['group']; + $this->FAIowner = get_post("user").'.'.get_post("group"); + $this->user = get_post('user'); + $this->group= get_post('group'); } /* Check if permissions have changed */ @@ -230,7 +226,9 @@ class faiTemplateEntry extends plugin /* Call common method to give check the hook */ $message= plugin::check(); - if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){ + if(isset($this->parent->SubObjects[$this->cn]) && + $this->parent->SubObjects[$this->cn]['status'] != 'delete' && + $this->cn != $this->orig_cn){ $message[] = msgPool::duplicated(_("Name")); } diff --git a/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl b/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl index c2c7e1dac..f591f2e10 100644 --- a/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl +++ b/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl @@ -7,9 +7,7 @@ - + - +
{t}File name{/t} - {$must}  - {t}File name{/t}{$must}  {render acl=$cnACL} @@ -17,9 +15,8 @@
- + {render acl=$FAItemplatePathACL} @@ -46,8 +43,7 @@ -
{t}File{/t} - {$must}:  + {t}File{/t}{$must}:  {$status} {if $bStatus} @@ -80,8 +76,7 @@ - - -
+ {render acl=$FAIownerACL} @@ -90,8 +85,7 @@
+ {render acl=$FAIownerACL} @@ -102,8 +96,7 @@
{t}Access{/t} - {$must}  + {t}Access{/t}{$must}