summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: abee5e3)
raw | patch | inline | side by side (parent: abee5e3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Jul 2010 15:51:56 +0000 (15:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Jul 2010 15:51:56 +0000 (15:51 +0000) |
-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
-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 a9c050ae9be30be9155ca997a47e28e3c2859f30..c3c99f607c7aa757e1f472c8684a649ba9afeb34 100644 (file)
* 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);
{
$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 5caa14547a5d11f8706e4a7ae96e9f3969538a0d..68fb8972ce65ba8bb1a4be79273083b6f70dedb0 100644 (file)
* 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 */
}
/* 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));
/* 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 */
/* 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 c2c7e1dacc2115d1381bee51e6ef7ecf94324937..f591f2e101919a1701801357448d8b9ed85b3228 100644 (file)
<td style='width:50%;padding-right:10px;' class='right-border'>
<table style='width:100%;' summary="{t}Generic settings{/t}">
<tr>
- <td>{t}File name{/t}
- {$must}
- </td>
+ <td>{t}File name{/t}{$must} </td>
<td style='width:100%;'>
{render acl=$cnACL}
<input value="{$templateFile}" type='text' name="templateFile">
</td>
</tr>
<tr>
- <td><LABEL for="templatePath">{t}Destination path{/t}
- {$must} </LABEL>
- </td>
+ <td>
+ <LABEL for="templatePath">{t}Destination path{/t}{$must} </LABEL></td>
<td>
{render acl=$FAItemplatePathACL}
<input type="text" name="templatePath" value="{$templatePath}" id="templatePath" >
<td style='width:50%;' class='right-border'>
<table summary="{t}Template file status{/t}">
<tr>
- <td>{t}File{/t}
- {$must}:
+ <td>{t}File{/t}{$must}:
{$status}
{if $bStatus}
<td>
<table summary="{t}File attributes{/t}">
<tr>
- <td><LABEL for="user">{t}Owner{/t}
- {$must} </LABEL>
+ <td><LABEL for="user">{t}Owner{/t}{$must} </LABEL>
</td>
<td>
{render acl=$FAIownerACL}
</td>
</tr>
<tr>
- <td><LABEL for="group">{t}Group{/t}
- {$must} </LABEL>
+ <td><LABEL for="group">{t}Group{/t}{$must} </LABEL>
</td>
<td>
{render acl=$FAIownerACL}
</td>
</tr>
<tr>
- <td>{t}Access{/t}
- {$must}
+ <td>{t}Access{/t}{$must}
</td>
<td>
<table summary="{t}File permissions{/t}"><colgroup width="55" span="3"></colgroup>