3e1d58e1c54ab4c5fb57fee19edf05ac0034c422
1 <?php
3 /* This class handles the keep statement */
4 class sieve_keep
5 {
6 var $object_id = -1;
8 function sieve_keep($data,$object_id)
9 {
10 $this->object_id = $object_id;
11 }
13 function save_object()
14 {
15 }
17 function check()
18 {
19 return(array());
20 }
22 function execute()
23 {
24 $smarty = get_smarty();
25 $smarty->assign("ID", $this->object_id);
26 $object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__)));
27 $object = $smarty->fetch(get_template_path("templates/element_keep.tpl",TRUE,dirname(__FILE__)));
28 $str = preg_replace("/%%OBJECT_CONTENT%%/", addcslashes($object,"\\"),$object_container);
29 return($str);
30 }
31 function get_sieve_script_part()
32 {
33 return("keep;");
34 }
35 }
37 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
38 ?>