summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d073db1)
raw | patch | inline | side by side (parent: d073db1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 12 Mar 2007 14:55:41 +0000 (14:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 12 Mar 2007 14:55:41 +0000 (14:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5769 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveElements.inc | patch | blob | history |
index 511e836c9207212628fe1d66fc70a11fecf5990a..3b84ebdf436b02f1e23b5bad3ccace3156954ab3 100644 (file)
if(isset($_POST['redirect_to_'.$this->object_id])){
$rt = stripslashes($_POST['redirect_to_'.$this->object_id]);
- $tmp = array();
- $tmp2 = split(",",$rt);
- foreach($tmp2 as $val){
- $tmp[] = "\"".trim(preg_replace("/\"/","",$val))."\"";
- }
- $this->data = $tmp;
+ $rt = "\"".trim(preg_replace("/\"/","",$rt))."\"";
+ $this->data = $rt;
}
}
{
foreach($data['ELEMENTS'] as $node ){
if(in_array($node['class'],array("quoted-string","text"))){
- $this->data[] = $node['text'];
+ $this->data = $node['text'];
}
}
}
function get_sieve_script_part()
{
- $tmp = "";
- foreach($this->data as $dat){
- $tmp.= "\"".$dat."\", ";
- }
- $tmp = preg_replace("/,$/","",trim($tmp));
- $tmp = preg_replace ("/\"\"/","\"",$tmp);
- return("redirect ".$tmp.";\n");
+ return("redirect ".sieve_create_strings($this->data).";\n");
}
function execute()
{
- $values = "";
- foreach($this->data as $key){
- $values .= $key.", ";
- }
- $values = preg_replace("/,$/","",trim($values));
+ $values = $this->data;
$smarty = get_smarty();
$smarty->assign("ID", $this->object_id);