summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c92df8)
raw | patch | inline | side by side (parent: 2c92df8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Jul 2010 12:21:16 +0000 (12:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Jul 2010 12:21:16 +0000 (12:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19229 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc
index a28343524ebcce683f8bc55982e9b4aeb5e10550..2b68577dbf23f725532651cf70852ba143260d3b 100644 (file)
NEGATE values
*********************/
foreach($_POST as $name => $value){
+ $value =get_post($name);
if(preg_match("/^neg_/",$name)){
$attr = preg_replace("/^neg_([^_]*)_.*$/","\\1",$name);
$value= preg_replace("/^neg_[^_]*_([0-9]*)$/","\\1",$name);
Delete values
*********************/
foreach($_POST as $name => $value){
+ $value =get_post($name);
if(preg_match("/^delS_/",$name)){
$attr = preg_replace("/^delS_([^_]*).*$/","\\1",$name);
$value= preg_replace("/^delS_[^_]*_([0-9]*)$/","\\1",$name);
!empty($_POST['new_'.$attr])){
$c = preg_quote(' *+-?_|!\'"()','/');
- if(preg_match("/^[a-z0-9{$c}]*$/i",$_POST['new_'.$attr])){
+ if(preg_match("/^[a-z0-9{$c}]*$/i",get_post('new_'.$attr))){
$attrs = $this->$attr;
- $attrs[] = trim($_POST['new_'.$attr]);
+ $attrs[] = trim(get_post('new_'.$attr));
$this->$attr = $attrs;
}else{
- msg_dialog::display(_("Error"),msgPool::invalid($attr,$_POST['new_'.$attr],"/[a-z0-9{$c}]/i"));
+ msg_dialog::display(_("Error"),msgPool::invalid($attr,get_post('new_'.$attr),"/[a-z0-9{$c}]/i"));
}
}
}
foreach(array("sudoCommand") as $attr){
if($this->acl_is_writeable($attr) && isset($_POST["add_".$attr]) && isset($_POST['new_'.$attr])){
$attrs = $this->$attr;
- $attrs[] = trim($_POST['new_'.$attr]);
+ $attrs[] = trim(get_post('new_'.$attr));
$this->$attr = $attrs;
}
}
$smarty->assign("trustModeDialog" , $trustModeDialog);
$smarty->assign("is_default",$this->is_default);
foreach($this->attributes as $attr){
- if(is_string($this->$attr)){
- $smarty->assign($attr,htmlentities($this->$attr));
- }else{
- $smarty->assign($attr,$this->$attr);
- }
+ $smarty->assign($attr, set_post($this->$attr));
$smarty->assign($attr."ACL",$this->getacl($attr));
}
"plPriority" => 0,
"plSection" => array("administration"),
"plCategory" => array("sudo" => array("objectClass" => "sudoRole", "description" => _("Sudo role"))),
-
+
"plProperties" =>
array(
array(
"mandatory" => FALSE)),
- "plProvidedAcls" => array(
- "accessTo" => _("System trust"),
- "cn" => _("Name"),
- "description" => _("Description"),
- "sudoUser" => _("Users"),
- "sudoHost" => _("Host"),
- "sudoCommand" => _("Command"),
- "sudoRunAs" => _("Run as user"),
- "trustModel" => _("Access control list"))
- ));
+ "plProvidedAcls" => array(
+ "accessTo" => _("System trust"),
+ "cn" => _("Name"),
+ "description" => _("Description"),
+ "sudoUser" => _("Users"),
+ "sudoHost" => _("Host"),
+ "sudoCommand" => _("Command"),
+ "sudoRunAs" => _("Run as user"),
+ "trustModel" => _("Access control list"))
+ ));
}
function PrepareForCopyPaste($source)
{
plugin::PrepareForCopyPaste($source);
-
+
$this->trustModeDialog->PrepareForCopyPaste($source);
foreach(array("sudoUser","sudoCommand","sudoHost","sudoRunAs") as $attr){
{
$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;