Rule::to_string
authorPierre Habouzit <madcoder@debian.org>
Mon, 22 Sep 2003 16:45:14 +0000 (16:45 +0000)
committerPierre Habouzit <madcoder@debian.org>
Mon, 22 Sep 2003 16:45:14 +0000 (16:45 +0000)
philter/philter/include/rule.inc.php

index f31c20e..1e361be 100644 (file)
@@ -87,7 +87,14 @@ class Rule {
     }
 
     function to_string() {
-        return "";
+        global $philter;
+        $res = ":0 c\n";
+        foreach($this->matches as $match)
+            $res .= $philter->['config']['match_plugins'][$match[0]]->to_string($match);
+        $res.= "{\n";
+        foreach($this->actions as $action)
+            $res .= $philter->['config']['actioh_plugins'][$action[0]]->to_string($action);
+        $res.= "}\n\n";
     }
 
     function sql_clean($_uid, $_rid) {