diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_If.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieveElement_If.inc
index f0802aefd050d54c23b35b65b1035e13f8b7f229..4412f3fe6a0a3d86062c8f01f137b9fca633c725 100644 (file)
/* Match types */
$this->match_types = array(
":is" => _("is"),
- ":regex" => _("regex"),
+ ":regex" => _("reg-ex"),
":contains" => _("contains"),
":matches" => _("matches"),
":count" => _("count"),
$script .= $data['Match_type']." ";
/* Add special match type for count and value */
- if(in_array($data['Match_type'], array(":value",":count")) && !empty($data['Match_type_value'])) {
+ if(in_array_strict($data['Match_type'], array(":value",":count")) && !empty($data['Match_type_value'])) {
$script .= sieve_create_strings($data['Match_type_value'])." ";
}
$script .= $data['Match_type']." ";
/* Add special match type for count and value */
- if(in_array($data['Match_type'], array(":value",":count")) && !empty($data['Match_type_value'])) {
+ if(in_array_strict($data['Match_type'], array(":value",":count")) && !empty($data['Match_type_value'])) {
$script .= sieve_create_strings($data['Match_type_value'])." ";
}
$script .= $data['Match_type']." ";
/* Add special match type for count and value */
- if(in_array($data['Match_type'], array(":value",":count")) && !empty($data['Match_type_value'])) {
+ if(in_array_strict($data['Match_type'], array(":value",":count")) && !empty($data['Match_type_value'])) {
$script .= sieve_create_strings($data['Match_type_value'])." ";
}
"LastError" => "",
"Match_type" => ":contains",
"Match_type_value"=> "",
- "Key_List" => array(_("emtpy")),
+ "Key_List" => array(_("empty")),
"Value_List" => array(_("empty"))) ;
if($type == "address"){
$values["Address_Part"] = ":all";
/* In case of :count and :value match types
* we have a special match operator we should save.
*/
- if(in_array($parsed[$key]['Match_type'],array(":value",":count"))){
+ if(in_array_strict($parsed[$key]['Match_type'],array(":value",":count"))){
if(isset($_POST['operator_'.$element_id])){
$op = $_POST['operator_'.$element_id];
}
default :
{
- trigger_error(_("Unhandled switch type"));
+ trigger_error(_("Unknown switch type"));
}
}
}
$Match_type = $node['text'];
/* Get value operator */
- if(in_array($Match_type,array(":value",":count"))){
+ if(in_array_strict($Match_type,array(":value",":count"))){
$i ++;
$node = $data[$i];
/* Skip first values, [if,not,exists] */
$node = $data[$id];
- while(in_array($node['text'],array("if","not","exists"))){
+ while(in_array_strict($node['text'],array("if","not","exists"))){
$id ++;
$node = $data[$id];
}
$next = NULL;
$num = 0;
for($i = $id ; $i < count($data) ; $i++ ){
- if(in_array($data[$i]['class'],array("left-parant","left-bracket"))){
+ if(in_array_strict($data[$i]['class'],array("left-parant","left-bracket"))){
$open_brakets ++;
}
if($data[$i]['class'] == "comma" && $open_brakets == 1){
$num ++;
}
- if(!in_array($data[$i]['class'],array("comma","left-parant","right-parant")) || $open_brakets >1 ){
+ if(!in_array_strict($data[$i]['class'],array("comma","left-parant","right-parant")) || $open_brakets >1 ){
$par[$num][] = $data[$i];
}
- if(in_array($data[$i]['class'],array("right-parant","right-bracket"))){
+ if(in_array_strict($data[$i]['class'],array("right-parant","right-bracket"))){
$open_brakets --;
}
}