~ubuntu-branches/ubuntu/vivid/gosa/vivid

« back to all changes in this revision

Viewing changes to include/sieve/class_sieveElement_Else_Elsif.inc

Tags: 2.7.1-1
* New upstream release
* Updated packaging to not include smarty (Closes: #620489)
* Fixed case of POSIX (Closes: #620486)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
/* Sieve else tag */
4
 
class sieve_elsif extends sieve_if
5
 
{
6
 
  var $TYPE = "elsif";
7
 
}
8
 
 
9
 
class sieve_else
10
 
{
11
 
  var $object_id = -1;
12
 
 
13
 
  function check()
14
 
  {
15
 
    return(array());
16
 
  }
17
 
 
18
 
  function sieve_else($data,$object_id)
19
 
  {
20
 
    $this->object_id = $object_id;
21
 
  }
22
 
 
23
 
  function save_object()
24
 
  {
25
 
  }
26
 
 
27
 
  function execute()
28
 
  {
29
 
    $smarty = get_smarty();
30
 
    $smarty->assign("ID", $this->object_id);
31
 
    $object_container = $smarty->fetch(get_template_path("templates/object_container_clear.tpl",TRUE,dirname(__FILE__)));
32
 
    $object= $smarty->fetch(get_template_path("templates/element_else.tpl",TRUE,dirname(__FILE__)));
33
 
    $str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container);
34
 
    return($str);
35
 
  }
36
 
 
37
 
  function get_sieve_script_part()
38
 
  {
39
 
    return("else");
40
 
  }
41
 
}
42
 
 
43
 
?>