summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8e88e9)
raw | patch | inline | side by side (parent: c8e88e9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 23 Mar 2007 06:58:49 +0000 (06:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 23 Mar 2007 06:58:49 +0000 (06:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5867 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_semantics.inc | patch | blob | history | |
include/sieve/class_tree.inc | patch | blob | history |
index 44a376829a136d25652eb4f64cdc432965859929..1f34d6063e16586faaec517dffda554a57548efe 100644 (file)
'valid_after' => $this->nonTestCommands_,
'arguments' => array(
array('class' => 'string', 'occurrences' => '1', 'values' => array(
- array('occurrences' => '1', 'regex' => '".*"', 'name' => 'reason')
+ array('occurrences' => '1', 'regex' => '("|).*("|)', 'name' => 'reason')
))
)
);
}
}
-?>
\ No newline at end of file
+?>
index 920b809ce28e65417ee4ffb2a56dd3e30f4ba4ac..37198f0cd803fc3545b7b1b9855b1c9587c131e8 100644 (file)
return $this->nodes_[$node_id];
}
- function getLastNode($parent_id)
- {
- $childs = $this->getChilds($parent_id);
-
- for ($i=count($childs); $i>0; --$i)
- {
- $node = $this->getNode($childs[$i-1]);
- if ($node['text'] == '{')
- {
- // return command owning the block
- return $this->getNode($parent_id);
- }
- if ($node['class'] != 'comment')
- {
- return $node;
- }
- }
-
- return $this->getNode($parent_id);
- }
-
function setDumpFunc($callback)
{
if ($callback == NULL || is_callable($callback))
if ($last)
{
$infix = '`--- ';
- $c_prefix = $prefix . ' ';
+ $child_prefix = $prefix . ' ';
}
else
{
$infix = '|--- ';
- $c_prefix = $prefix . '| ';
+ $child_prefix = $prefix . '| ';
}
$node = $this->nodes_[$node_id];
$this->dump_ .= "$prefix$infix$node\n";
}
- $childs = $this->childs_[$node_id];
- for ($i=0; $i<count($childs); ++$i)
+ if (isset($this->childs_[$node_id]))
{
- $c_last = false;
- if ($i+1 == count($childs))
+ $childs = $this->childs_[$node_id];
+ $last_child = count($childs);
+
+ for ($i=1; $i <= $last_child; ++$i)
{
- $c_last = true;
+ $this->doDump_($childs[$i-1], $child_prefix, ($i == $last_child ? true : false));
}
-
- $this->doDump_($childs[$i], $c_prefix, $c_last);
}
}
}
-?>
+?>
\ No newline at end of file