diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc b/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc
index cf8d6bd1f98a9d5f3b0512cbb696b0030b2a2dc6..f73356586dfdf37d36484a58c7e4867bab05eed4 100644 (file)
Some attributes like (BOOL_INTEGER) can be TRUE/FALSE and INTEGER.
This means, if the value is empty it is BOOL and $negation defines its boolean value.
*/
- if(in_array($this->options[$opt]['TYPE'],array("BOOL_INTEGER","STRING_BOOL"))){
+ if(in_array_strict($this->options[$opt]['TYPE'],array("BOOL_INTEGER","STRING_BOOL"))){
if(empty($value)){
$option['NEGATE'] = FALSE;
if($negation){
}
/* Special handling for BOOLEAN values */
- if(in_array($this->options[$opt]['TYPE'],array("BOOLEAN"))){
+ if(in_array_strict($this->options[$opt]['TYPE'],array("BOOLEAN"))){
$option['NEGATE'] = FALSE;
if($negation){
$option['VALUE'] = "FALSE";
/*****
Negate STRING_BOOL && BOOL_INTEGER
*****/
- if(in_array($this->options[$opt]['TYPE'],array('STRING_BOOL','BOOL_INTEGER'))){
- if(in_array($val, array("TRUE","FALSE"))){
+ if(in_array_strict($this->options[$opt]['TYPE'],array('STRING_BOOL','BOOL_INTEGER'))){
+ if(in_array_strict($val, array("TRUE","FALSE"))){
if($val == "TRUE"){
$this->sudoOption[$opt][$id]["VALUE"] = "FALSE";
}else{
/*****
Negate STRING / INTEGER
*****/
- if(in_array($this->options[$opt]['TYPE'],array('STRING','INTEGER','LISTS'))){
+ if(in_array_strict($this->options[$opt]['TYPE'],array('STRING','INTEGER','LISTS'))){
$this->sudoOption[$opt][$id]['NEGATE'] = !$this->sudoOption[$opt][$id]['NEGATE'];
}
/*****
Negate BOOLEAN
*****/
- if(in_array($this->options[$opt]['TYPE'],array('BOOLEAN'))){
+ if(in_array_strict($this->options[$opt]['TYPE'],array('BOOLEAN'))){
if($val == "TRUE"){
$this->sudoOption[$opt][$id]["VALUE"] = "FALSE";
}else{
/****
Get posted value for BOOLEAN
****/
- if(in_array($this->options[$name]['TYPE'],array("BOOLEAN"))){
+ if(in_array_strict($this->options[$name]['TYPE'],array("BOOLEAN"))){
if(isset($_POST['option_value__'.$name.'_'.$id])){
$this->sudoOption[$name][$id]["VALUE"] = get_post('option_value__'.$name.'_'.$id);
}
/****
Get posted value for STRING / INTEGER
****/
- if(in_array($this->options[$name]['TYPE'],array("STRING","INTEGER"))){
+ if(in_array_strict($this->options[$name]['TYPE'],array("STRING","INTEGER"))){
if(isset($_POST['option_value__'.$name.'_'.$id])){
$this->sudoOption[$name][$id]["VALUE"] = get_post('option_value__'.$name.'_'.$id);
}
/****
Get posted value for STRING_BOOL / BOOL_INTEGER
****/
- if(in_array($this->options[$name]['TYPE'],array("BOOL_INTEGER","STRING_BOOL"))){
+ if(in_array_strict($this->options[$name]['TYPE'],array("BOOL_INTEGER","STRING_BOOL"))){
if(isset($_POST['option_selection__'.$name.'_'.$id])){
$sel = get_post('option_selection__'.$name.'_'.$id);
$val = "";
/****
Get posted value for LISTS
****/
- if(in_array($this->options[$name]['TYPE'],array("LISTS"))){
+ if(in_array_strict($this->options[$name]['TYPE'],array("LISTS"))){
foreach($this->sudoOption[$name] as $entry_key => $entry){
if(isset($_POST['list_value__'.$name.'_'.$entry_key])){
$val = get_post('list_value__'.$name.'_'.$entry_key);
/****
Save BOOLEAN
****/
- if(in_array($type,array("BOOLEAN"))){
+ if(in_array_strict($type,array("BOOLEAN"))){
$option = $name;
if($value == "FALSE"){
$option = "!".$option;
/****
Save STRING / INTEGER
****/
- if(in_array($type,array("STRING","INTEGER"))){
+ if(in_array_strict($type,array("STRING","INTEGER"))){
if($value != ""){
$option = $name."=".$value;
}else{
/****
Save STRING_BOOL / BOOL_INTEGER
****/
- if(in_array($type,array("STRING_BOOL","BOOL_INTEGER"))){
+ if(in_array_strict($type,array("STRING_BOOL","BOOL_INTEGER"))){
if($value == "FALSE"){
$option = "!".$name;
}elseif($value == "TRUE"){