Ignore:
Timestamp:
03/01/12 10:37:23 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2398 - Compatibilizacao com PHP-5.3 no modulo ExpressoAdmin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/inc/sieve-php.lib.php

    r506 r5593  
    121121 
    122122    $this->line=fgets($this->fp,1024); 
    123     $this->token = split(" ", $this->line, 2); 
     123    $this->token = preg_split('/ /', $this->line, 2); 
    124124 
    125125    if($this->token[0] == "NO"){ 
     
    127127           NO ("yyyyy") "zzzzzzz" or, two, NO {yyyyy} "zzzzzzzzzzz" */ 
    128128        $this->x = 0; 
    129         list($this->ltoken, $this->mtoken, $this->rtoken) = split(" ", $this->line." ", 3); 
     129        list($this->ltoken, $this->mtoken, $this->rtoken) = preg_split('/ /', $this->line." ", 3); 
    130130        if($this->mtoken[0] == "{"){ 
    131131            while($this->mtoken[$this->x] != "}" or $this->err_len < 1){ 
     
    372372    //So, if we see IMLEMENTATION in the first line, then we are done. 
    373373 
    374     if(ereg("IMPLEMENTATION",$this->line)) 
     374    if(preg_match('/IMPLEMENTATION/',$this->line)) 
    375375    { 
    376376      //we're on the Cyrus V2 sieve server 
     
    389389                  $this->cap_type="auth";             
    390390 
    391               $this->modules = split(" ", $this->item[1]); 
     391              $this->modules = preg_split('/ /', $this->item[1]); 
    392392              if(is_array($this->modules)){ 
    393393                  foreach($this->modules as $this->module) 
     
    422422 
    423423        //then split again at the ", " stuff. 
    424         $this->modules = split($this->modules, ", "); 
     424        $this->modules = preg_split("/$this->modules/", ', '); 
    425425  
    426426        //fill up our $this->modules property 
     
    767767    //So, if we see IMLEMENTATION in the first line, then we are done. 
    768768 
    769     if(ereg("IMPLEMENTATION",$this->line)) 
     769    if(preg_match('/IMPLEMENTATION/',$this->line)) 
    770770    { 
    771771      //we're on the Cyrus V2 sieve server 
     
    784784                  $this->cap_type="auth";             
    785785 
    786               $this->modules = split(" ", $this->item[1]); 
     786              $this->modules = preg_split('/ /', $this->item[1]); 
    787787              if(is_array($this->modules)){ 
    788788                  foreach($this->modules as $this->module) 
     
    814814 
    815815        //then split again at the ", " stuff. 
    816         $this->modules = split($this->modules, ", "); 
     816        $this->modules = preg_split("/$this->modules/", ', '); 
    817817  
    818818        //fill up our $this->modules property 
Note: See TracChangeset for help on using the changeset viewer.