Changeset 5747 for trunk/prototype/modules/filters/interceptors
- Timestamp:
- 03/19/12 10:08:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/filters/interceptors/FilterMapping.php
r5728 r5747 84 84 foreach( $rules as $name => $data ) 85 85 { 86 /* Usado na opção Bloquear usuário do ExpressoMail */ 87 if($data['block']) { 88 ($i >0) ? $script_match = 'elsif anyof' : $script_match = 'if anyof'; 89 $script_match = $script_match . "(address :is \"from\" [\"" .$data['name'] . "\"]) {\r\n"; 90 $script_match .= "fileinto \"INBOX/Spam\"; \r\n}\r\n"; 91 $script_rules .= $script_match; 92 $script_match = ""; 93 $script_criteria = ""; 94 $require_fileinto = true; 95 $i++; 96 continue; 86 87 if(array_key_exists("block", $data)) { 88 /* Usado na opção Bloquear usuário do ExpressoMail */ 89 if($data['block']) { 90 ($i >0) ? $script_match = 'elsif anyof' : $script_match = 'if anyof'; 91 $script_match = $script_match . "(address :is \"from\" [\"" .$data['name'] . "\"]) {\r\n"; 92 $script_match .= "fileinto \"INBOX/Spam\"; \r\n}\r\n"; 93 $script_rules .= $script_match; 94 $script_match = ""; 95 $script_criteria = ""; 96 $require_fileinto = true; 97 $i++; 98 continue; 99 } 97 100 } 98 99 if( $data['enabled'] == 'false' ) 100 continue; 101 //if( $data['enabled'] == 'false' ) 102 //continue; 101 103 102 104 $vacation = false; … … 194 196 $script_action = " {\r\n "; 195 197 196 if( is_array($action s) )198 if( is_array($action) ) 197 199 foreach ($action as $k=> $value); 198 200 { … … 257 259 $content = $script_begin . $script_header . $script_rules . "\r\n\r\n#PseudoScript#" . "\r\n#" . $json_data; 258 260 //$content = ""; 261 259 262 return( $content ); 260 263 } … … 415 418 public function applySieveFilter( &$uri , &$result , &$criteria , $original ) 416 419 { 420 /* 417 421 $result['id'] = $uri['id']; 418 422 $rule_apply = array(); … … 436 440 $proc = array(); 437 441 $proc['keep'] = false; 438 439 440 $imap = Controller::service( 'Imap' );442 */ 443 444 //$imap = Controller::service( 'Imap' ); 441 445 //$imap->apliSieveFilter($original['properties']['applyMessages'] , $proc ); 442 $imap->apliSieveFilter($messages , $actions );443 return $result;446 //$imap->apliSieveFilter($messages , $actions ); 447 //return $result; 444 448 } 445 449 … … 564 568 565 569 foreach( $script as $i => $rule ) 570 if(is_array ($rule['name']) && is_array($original['id'])) 566 571 if( $rule['name'] === $original['id'] ) 567 572 return( $params = $rule );
Note: See TracChangeset
for help on using the changeset viewer.