diff -aurN avelsieve-orig/addrule.php avelsieve/addrule.php --- avelsieve-orig/addrule.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/addrule.php 2011-05-09 11:42:56.000000000 +0300 @@ -41,9 +41,9 @@ if(isset($_POST['cancel'])) { unset($_SESSION['newrule']); - session_unregister('newrule'); unset($part); - session_unregister('part'); + if (isset($_SESSION['part'])) + unset($_SESSION['part']); header("Location: ./table.php"); exit; } @@ -250,8 +250,8 @@ $_SESSION['comm']['new'] = true; /* Remove addrule.php stuff */ - session_unregister('newrule'); - session_unregister('part'); + unset($_SESSION['newrule']); + unset($_SESSION['part']); /* go to table.php */ session_write_close(); diff -aurN avelsieve-orig/include/DO_Sieve.class.php avelsieve/include/DO_Sieve.class.php --- avelsieve-orig/include/DO_Sieve.class.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/include/DO_Sieve.class.php 2011-05-09 11:28:39.000000000 +0300 @@ -138,7 +138,7 @@ * @param string $script * @return string */ - function encode_script($script) { + static function encode_script($script) { global $languages, $squirrelmail_language, $default_charset; /* change $default_charset to user's charset */ @@ -183,7 +183,7 @@ * @param string $script * @return string */ - function decode_script($script) { + static function decode_script($script) { global $languages, $squirrelmail_language, $default_charset; diff -aurN avelsieve-orig/include/avelsieve_condition_datetime.class.php avelsieve/include/avelsieve_condition_datetime.class.php --- avelsieve-orig/include/avelsieve_condition_datetime.class.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/include/avelsieve_condition_datetime.class.php 2011-05-09 11:26:28.000000000 +0300 @@ -53,7 +53,7 @@ * @return void */ function __construct(&$s, $rule, $n, $test = 'currentdate') { - parent::__construct(&$s, $rule, $n); + parent::__construct($s, $rule, $n); if($test == 'currentdate') { $this->test = 'currentdate'; diff -aurN avelsieve-orig/include/html_main.inc.php avelsieve/include/html_main.inc.php --- avelsieve-orig/include/html_main.inc.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/include/html_main.inc.php 2011-05-09 11:42:56.000000000 +0300 @@ -225,7 +225,7 @@ */ function clear_avelsieve_messages() { if(isset($_SESSION['comm'])) { - session_unregister('comm'); + unset($_SESSION['comm']); } } diff -aurN avelsieve-orig/include/html_rulestable.inc.php avelsieve/include/html_rulestable.inc.php --- avelsieve-orig/include/html_rulestable.inc.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/include/html_rulestable.inc.php 2011-05-09 11:25:25.000000000 +0300 @@ -161,7 +161,7 @@ */ function rules_confirmation_text() { $out = $this->retrieve_avelsieve_messages(); - session_unregister('comm'); + unset($_SESSION['comm']); return $out; } diff -aurN avelsieve-orig/include/managesieve.lib.php avelsieve/include/managesieve.lib.php --- avelsieve-orig/include/managesieve.lib.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/include/managesieve.lib.php 2011-05-09 11:19:44.000000000 +0300 @@ -139,13 +139,13 @@ unset($this->error_raw); $this->line=fgets($this->fp,1024); - $this->token = split(" ", $this->line, 2); + $this->token = explode(' ', $this->line, 2); if($this->token[0] == "NO"){ /* we need to try and extract the error code from here. There are two possibilites: one, that it will take the form of: NO ("yyyyy") "zzzzzzz" or, two, NO {yyyyy} "zzzzzzzzzzz" */ $this->x = 0; - list($this->ltoken, $this->mtoken, $this->rtoken) = split(" ", $this->line." ", 3); + list($this->ltoken, $this->mtoken, $this->rtoken) = explode(' ', $this->line.' ', 3); if($this->mtoken[0] == "{"){ while($this->mtoken[$this->x] != "}" or $this->err_len < 1){ $this->err_len = substr($this->mtoken, 1, $this->x); @@ -233,7 +233,7 @@ atleast true for timsieved as it sits in 2.1.16, if someone has a BYE (REFERRAL ...) example for later timsieved please forward it to me and I'll code it in proper-like! - mloftis@wgops.com */ - $this->reftok = split(" ", $this->token[1], 3); + $this->reftok = explode(' ', $this->token[1], 3); $this->refsv = substr($this->reftok[1], 0, -2); $this->refsv = substr($this->refsv, 1); @@ -438,7 +438,7 @@ //response. They repsond as follows: "Cyrus timsieved v1.0.0" "SASL={PLAIN,........}" //So, if we see IMPLEMENTATION in the first line, then we are done. - if(ereg("IMPLEMENTATION",$this->line)) + if( strpos($this->line, 'IMPLEMENTATION') !== FALSE ) { //we're on the Cyrus V2 or Cyrus V3 sieve server while(sieve::status($this->line) == F_DATA){ @@ -454,7 +454,7 @@ } else { $this->cap_type="auth"; } - $this->modules = split(" ", $this->item[1]); + $this->modules = explode(' ', $this->item[1]); if(is_array($this->modules)){ foreach($this->modules as $this->module) $this->capabilities[$this->cap_type][$this->module]=true; @@ -884,7 +884,7 @@ $cap_type="auth"; } - $this->modules = split(' ', $this->item[1]); + $this->modules = explode(' ', $this->item[1]); if(is_array($this->modules)){ foreach($this->modules as $m) { $this->capabilities[$cap_type][strtolower($m)]=true; diff -aurN avelsieve-orig/setup.php avelsieve/setup.php --- avelsieve-orig/setup.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/setup.php 2011-05-09 11:43:08.000000000 +0300 @@ -181,7 +181,7 @@ if($box == 'Junk' || $box == 'INBOX.Junk') { return true; } - $parts = split(str_replace('.', '\.',$delimiter), $box); + $parts = explode($delimiter, $box); if(sizeof($parts) > 1 && ($parts[0] == 'Junk' || $parts[1] == 'Junk')) { return true; } diff -aurN avelsieve-orig/table.php avelsieve/table.php --- avelsieve-orig/table.php 2009-05-29 11:24:15.000000000 +0300 +++ avelsieve/table.php 2011-05-09 11:43:08.000000000 +0300 @@ -120,7 +120,7 @@ $s->delete('phpscript'); } */ } - session_unregister('rules'); + unset($_SESSION['rules']); header("Location: $location/../../src/options.php\n\n"); // header("Location: $location/../../src/options.php?optpage=avelsieve\n\n"); @@ -364,7 +364,7 @@ if (isset($_SESSION['returnnewrule'])) { /* There is a new rule to be added */ $newrule = $_SESSION['returnnewrule']; - session_unregister('returnnewrule'); + unset($_SESSION['returnnewrule']); $rules[] = $newrule; $haschanged = true; }