Rule::to_string
[old-projects.git] / 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) {