Changeset 2657


Ignore:
Timestamp:
04/28/10 18:06:48 (14 years ago)
Author:
niltonneto
Message:

Ticket #1056 - Corrigido problema que remove todas as regras ao criar um nova.

Location:
trunk/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.ScriptS.inc.php

    r2360 r2657  
    7171                        $aux = $this->SieveS->putscript($this->scriptfile, $this->createScript()); 
    7272                        if(!$aux){ 
    73                                 // Caso de erro, grava dentro da variável errstr; 
    74                                 $this->errstr = "O arquivo não foi criado"; 
     73                                $this->errstr = "Error: file not created"; 
     74                                return $this->errstr; 
    7575                        } 
    7676                        // Mata a variavel; 
     
    8080                         
    8181                        if(!$aux){ 
    82                                 // Caso de erro, grava dentro da variavel errstr; 
    83                                 $this->errstr = "O arquivo não foi ativado"; 
     82                                $this->errstr = "Error: error to activate file"; 
     83                                return $this->errstr; 
    8484                        } 
    8585                        else{ 
     
    9494                $this->SieveS->close(); 
    9595                         
    96                 if($this->rules){                
     96                if($this->rules) 
    9797                        return $this->rules; 
    98                 }else{ 
    99                         return $this->errstr; 
    100                 } 
    10198                         
    10299        } 
     
    109106         
    110107                $var_decode = rawurldecode($params['arfilter']); 
     108                $var_decode = preg_replace('/\n\./', '.', $var_decode); 
    111109                 
    112110                $narray  = explode("_end_",$var_decode); 
  • trunk/expressoMail1_2/js/jscode/filter.js

    r2519 r2657  
    1111        function cfilter(){ 
    1212 
     13                this.criticalError = false; 
    1314                this.mode_in   = ""; 
    1415                this.rulest              = new Array; 
     
    5152                        var handler_sieve = function(data) 
    5253                        { 
     54                                if (data.indexOf('Error:') == 0) 
     55                                { 
     56                                        _this.criticalError = true; 
     57                                        alert(data); 
     58                                } 
     59                                else 
     60                                try{ 
    5361                                if(data.rule.length > 0){ 
    5462                                        for(var i=0 ; i < data.rule.length; i++) 
     
    6472                                _this.out_officeR = _this.out_officeR ? trim(_this.out_officeR.toString().replace("\n","")) : ""; 
    6573                                if(data.mode.length > 0){_this.mode_in = data.mode[0];} 
     74                        } 
     75                                catch(e){ 
     76                                        _this.criticalError = true; 
     77                                        alert("Expresso:"+e.description); 
     78                                } 
    6679                        } 
    6780                        if(Element('form_status') != null) 
     
    745758                var args   = "expressoMail1_2.ScriptS.rec_rules"; 
    746759                var params = "arfilter="+aux_rul; 
    747                 cExecute(args,h_filter,params); 
     760                if(!_this.criticalError) 
     761                        cExecute(args,h_filter,params); 
    748762        } 
    749763 
Note: See TracChangeset for help on using the changeset viewer.