summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97226d3)
raw | patch | inline | side by side (parent: 97226d3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Mar 2007 07:37:27 +0000 (07:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Mar 2007 07:37:27 +0000 (07:37 +0000) |
This commit should close the Ticket #8 (Add/Change #8 (Templates - Create some kind of templates.))
closes #8 fixed
> 2nd try
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5896 594d385d-05f5-0310-b6e9-bd551577e9d8
closes #8 fixed
> 2nd try
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5896 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_My_Tree.inc | patch | blob | history |
index e94f6ea27174ded0a5c463eb611e5103dbc04385..7afb53dfbea4ca28c3459d1a48c7fb79bd41c2b4 100644 (file)
function check()
{
- $msgs = array();
+ $msgs = array();
/* Some logical checks.
* like : only sieve_comment can appear before require.
*/
-
+
/* Ensure that there are no command before require
* - Get id of last require tag
* - Collect object types in from of this tag.
$msgs[] = $str;
print_red($str);;
}
-
- foreach($this->pap as $obj){
- $o_msgs = $obj->check();
- foreach($o_msgs as $o_msg){
- $msgs[] = $o_msg;
- }
- }
- return($msgs);
+
+ foreach($this->pap as $obj){
+ $o_msgs = $obj->check();
+ foreach($o_msgs as $o_msg){
+ $msgs[] = $o_msg;
+ }
+ }
+ return($msgs);
}
$require_id = $key;
}
}
-
+
/* No require found, add one */
if($require_id == -1){
$require = new sieve_require(NULL,preg_replace("/[^0-9]/","",microtime()),$this);
}
$ret = preg_replace("/\"\"/","\"",$ret);
$ret = preg_replace("/\n/","\r\n",$ret);
-
+
return($ret);
}
$ret = array();
if($data[$id]['class'] == "left-bracket"){
while(isset($data[$id]) && $data[$id]['class'] != "right-bracket" && $id < count($data)){
-
+
if($data[$id]['class'] == "quoted-string"){
$ret[] = $data[$id]['text'];
}
$str = trim(preg_replace("/\.$/","",$str));
$ret[] = $str;
}
-
+
return(array("OFFSET" => $id, "STRINGS" => $ret));
}