source: trunk/prototype/modules/filters/interceptors/FilterMapping.php @ 5996

Revision 5996, 19.9 KB checked in by airton, 12 years ago (diff)

Ticket #2641 - Problemas com filtros que contem mais de uma acao

Line 
1<?php
2/**
3*
4* Copyright (C) 2011 Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
5*
6* This program is free software; you can redistribute it and/or modify it under
7* the terms of the GNU Affero General Public License version 3 as published by
8* the Free Software Foundation with the addition of the following permission
9* added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
10* WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE
11* WARRANTY OF NON INFRINGEMENT  OF THIRD PARTY RIGHTS.
12*
13* This program is distributed in the hope that it will be useful, but WITHOUT
14* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15* FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
16* details.
17*
18* You should have received a copy of the GNU Affero General Public License
19* along with this program; if not, see www.gnu.org/licenses or write to
20* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21* MA 02110-1301 USA.
22*
23* This code is based on the OpenXchange Connector and on the Prognus pSync
24* Connector both developed by the community and licensed under the GPL
25* version 2 or above as published by the Free Software Foundation.
26*
27* You can contact Prognus Software Livre headquarters at Av. Tancredo Neves,
28* 6731, PTI, Bl. 05, Esp. 02, Sl. 10, Foz do Iguaçu - PR - Brasil or at
29* e-mail address prognus@prognus.com.br.
30*
31* Descrição rápida do arquivo
32*
33* Arquivo responsável pela manipulação dos filtros
34*
35* @package    filters
36* @license    http://www.gnu.org/copyleft/gpl.html GPL
37* @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
38* @version    1.0
39* @sponsor    Caixa EconÃŽmica Federal
40* @since      Arquivo disponibilizado na versão 2.4
41*/
42
43
44
45/**
46* Classe responsável pela manipulação dos filtros.
47*
48*
49* @package    prototype
50* @license    http://www.gnu.org/copyleft/gpl.html GPL
51* @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
52* @author     Airton Bordin Junior <airton@prognus.com.br>
53* @author     Gustavo Pereira dos Santos <gustavo@prognus.com.br>
54* @version    1.0
55* @since      Classe disponibilizada na versão 2.4
56*/
57class FilterMapping
58{
59       
60        var $service;
61       
62       
63        /**
64        * Método que formata o Script de acordo com a sintaxe do Sieve.
65        *
66        * @license    http://www.gnu.org/copyleft/gpl.html GPL
67        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
68        * @sponsor    Caixa EconÃŽmica Federal
69        * @author     Airton Bordin Junior <airton@prognus.com.br>
70        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
71        * @param      <Array> <$rules> <Array com as regras do usuário>
72        * @return     <Regra de acordo com a sintaxe do Sieve>
73        * @access     <public>
74        */
75        public function formatSieveScript( $rules )
76    {
77       
78                $require_fileinto = $require_flag = $require_reject = $require_vacation = $require_body = $require_imapflag = $vacation = $startswith = $endswith = false;
79
80                $script_rules = $script_header = $script_criteria = $vacation_action = "";
81
82                $i = 0;
83
84                foreach( $rules as $name => $data )
85                {
86                        if(array_key_exists("block", $data)) {
87                                /* Usado na opção Bloquear usuário do ExpressoMail */
88                                if($data['block']) {
89                                        ($i >0) ? $script_match = 'elsif anyof' : $script_match = 'if anyof';
90                                        $script_match = $script_match . "(address :is \"from\" [\"" .$data['name'] . "\"]) {\r\n"; 
91                                        $script_match .= "fileinto \"INBOX/Spam\"; \r\n}\r\n";
92                                        $script_rules .= $script_match;
93                                        $script_match = "";
94                                        $script_criteria = "";
95                                        $require_fileinto = true;
96                                        $i++;
97                                        continue;
98                                }
99                        }
100                        //if( $data['enabled'] == 'false' )
101                                //continue;
102
103                        $vacation = false;
104                        $criteria = $data['criteria'];
105                        $action   = $data['actions'];
106                       
107                        ($i >0) ? $script_match = 'els' : $script_match = '';
108                        $data['isExact'] == 'false' ?  $script_match .= 'if anyof (' : $script_match .= 'if allof (';
109
110                        if( is_array($criteria) )
111                        foreach ($criteria as $j => $value)
112                        {                                       
113
114                                switch($criteria[$j]['field']) {
115                                        case 'To':   
116                                        case 'to':   
117                                        case 'CC':
118                                        case 'Cc':
119                                                $criteria[$j]['field'] = "[\"To\", \"TO\", \"Cc\", \"CC\"]";
120                                                $script_criteria .= "address :";
121                                                break;
122                                        case 'from':
123                                                $criteria[$j]['field'] = "\"" . $criteria[$j]['field'] . "\"";
124                                                $script_criteria .= "address :";
125                                                break;
126                                        case 'size':   
127                                                $criteria[$j]['field'] = '';
128                                                $script_criteria .= "size :";
129                                                break;
130                                        case 'subject':
131                                                $criteria[$j]['field'] = "\"" . $criteria[$j]['field'] . "\"";
132                                                $criteria[$j]['value'] = "" . imap_8bit($criteria[$j]['value']) . "\", \"" . base64_encode($criteria[$j]['value']) . "";
133                                                $script_criteria .= "header :";
134                                                break;
135                                        case 'body':
136                                                $criteria[$j]['field'] = '';
137                                                $script_criteria .= "body :";
138                                                $require_body = true;
139                                                break;
140                                        case 'vacation':
141                                                continue;
142                                        default:
143                                                $script_criteria .= "header :";
144                                                break;
145                                }
146                               
147                                switch ($criteria[$j]['operator']) {
148                                        case '>':
149                                                $criteria[$j]['operator'] = "over";
150                                                break;
151                                        case '<':
152                                                $criteria[$j]['operator'] = "under";
153                                                break;
154                                        case '=':
155                                                $criteria[$j]['operator'] = "is";
156                                                $criteria[$j]['value'] = "[\"" . $criteria[$j]['value'] . "\"]";
157                                                break;
158                                        case '*':
159                                                $criteria[$j]['operator'] = "contains";
160                                                $criteria[$j]['value'] = "[\"" . $criteria[$j]['value'] . "\"]";
161                                                break;                                         
162                                        case '^':
163                                                $criteria[$j]['operator'] = "matches";
164                                                $criteria[$j]['value'] = "[\"" . $criteria[$j]['value'] . "*\"]";
165                                                $startswith = true;
166                                                break;
167                                        case '$':
168                                                $criteria[$j]['operator'] = "matches";
169                                                $criteria[$j]['value'] = "[\"*" . $criteria[$j]['value'] . "\"]";
170                                                $endswith = true;
171                                                break;
172                                        /*
173                                           TO-DO:
174                                           Inconsistência na regra do "não contém".
175                                        */
176                                        case '!*':
177                                                $criteria[$j]['operator'] = "contains";
178                                                $criteria[$j]['value'] = "[\"" . $criteria[$j]['value'] . "\"]";
179                                                break;
180                                }
181                               
182                                if ($criteria[$j]['field'] == "" || $criteria[$j]['field'] == "\"subject\"" || $startswith || $endswith)
183                                {
184                                        $script_criteria .= $criteria[$j]['operator'] . " " . $criteria[$j]['field'] . " " . $criteria[$j]['value'] . ", ";
185                                        $startswith = $endswith = false;
186                                }
187                                else
188                                        $script_criteria .= $criteria[$j]['operator'] . " " . $criteria[$j]['field'] . " " . $criteria[$j]['value'] . ", ";
189                        }
190                        $script_criteria = substr($script_criteria,0,-2);
191                        /* if ($vacation == false) */
192                        $script_criteria .= ")";
193
194                        $script_action = " {\r\n ";
195                       
196                        if( is_array($action) )
197                        foreach ($action as $k => $value)
198                        {
199                                switch ($action[$k]['type']) {
200                                        case 'redirect':
201                                                break;
202                                        case 'reject':
203                                                $require_reject = true;
204                                                break;
205                                        case 'fileinto':
206                                                $require_fileinto = true;
207                                                break;
208                                        case 'vacation':
209                                                $require_vacation = true;
210                                                $action[$k]['parameter'] = "\"" . $action[$k]['parameter'] . "\"";
211                                                $vacation_action = " :subject \"Fora do Escrit&oacuterio\" " . $action[$k]['parameter'] . ";";
212                                                $vacation = true;
213                                                continue;
214                                        case 'setflag':
215                                                $require_flag = true;
216                                                $action[$k]['parameter'] = "\\\\" . $action[$k]['parameter'];
217                                                break;
218                                        case 'discard':
219                                                break;
220                                }
221                                if ($vacation == false) $script_action .= $action[$k]['type'] . " \"" . $action[$k]['parameter'] . "\";\r\n ";
222                        }
223                        $script_action .= "}";
224                       
225                        if($vacation != true)
226                                $script_rules .= $script_match . $script_criteria . $script_action . "\r\n";
227
228                        if($data['id'] != "vacation")
229                                $i++;
230                        $script_match = "";
231                        $script_criteria = ""; 
232                        $data['applyMessages'] = "";                                                   
233                }
234
235                if($require_reject || $require_fileinto || $require_vacation || $require_body || $require_flag)
236                {
237                        $script_header .= "require [";
238                        $require_reject ? $script_header .= "\"reject\", " : "";
239                        $require_fileinto ? $script_header .= "\"fileinto\", " : "";
240                        $require_vacation? $script_header .= "\"vacation\", " : ""; 
241                        $require_flag ? $script_header .= "\"imapflags\", " : ""; 
242                        $require_body ? $script_header .= "\"body\", " : "";  /* tem que instalar as extensões no Cyrus */
243                        $script_header = substr($script_header,0,-2);
244                        $script_header .= "];\r\n";
245                }
246
247                if( $vacation_action )
248                {
249                  $script_rules .= "vacation" . $vacation_action . "\r\n";
250                }
251
252                $json_data = json_encode($rules);
253               
254                $script_begin = "#Filtro gerado por Expresso Livre versão 2.4\r\n\r\n";
255
256                $content = $script_begin . $script_header . $script_rules . "\r\n\r\n#PseudoScript#" . "\r\n#" . $json_data;
257
258                return( $content );
259        }
260       
261        /**
262        * Método que lê e faz o parser dos filtros antigos
263        *
264        * @license    http://www.gnu.org/copyleft/gpl.html GPL
265        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
266        * @sponsor    Caixa EconÃŽmica Federal
267        * @author     Airton Bordin Junior <airton@prognus.com.br>
268        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
269        * @param      <$scriptName> <Regras do usuário>
270        * @return     <Regra do usuário parseada>
271        * @access     <public>
272        */
273        public function readOldScript($scriptName)
274        {
275        // Recebe o conteúdo do array;
276        $lines = array();
277        $lines = preg_split("/\n/", $scriptName);
278
279        // Pega o tamanho da regra na primeira do script;
280        $size_rule = array_shift($lines);
281
282        // Recebe o tamanho do script, pela primeira linha;
283        //$this->size = trim($size_rule);
284
285        // Verifica a composição do script; */
286        $line = array_shift($lines);
287
288        // Variaveis para a regra e o campo ferias;
289        $regexps = array('##PSEUDO', '#rule', '#vacation', '#mode');
290        $retorno['rule'] = array();
291
292        $line = array_shift($lines);
293        while (isset($line)) {
294            foreach ($regexps as $regp) {
295                if (preg_match("/$regp/i", $line)) {
296                    // Recebe todas as regras criadas no servidor;
297                    if (preg_match("/#rule&&/i", $line)) {
298                        $retorno['rule'][] = ltrim($line) . "\n";                         
299                    }
300                }
301            }
302            // Pega a proxima linha do sript;
303            $line = array_shift($lines);
304        }
305        return $retorno;
306    }
307       
308       
309       
310       
311        /**
312        * Método que faz o parsing do Script Sieve, transformando em Array.
313        *
314        * @license    http://www.gnu.org/copyleft/gpl.html GPL
315        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
316        * @sponsor    Caixa EconÃŽmica Federal
317        * @author     Airton Bordin Junior <airton@prognus.com.br>
318        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
319        * @param      <String> <$script> <Script Sieve com as regras do usuário>
320        * @return     <Regras do usuário em Array>
321        * @access     <public>
322        */
323        public function parseSieveScript( $script )
324        {
325                 $old_rule = strripos($script, "##PSEUDO script start");
326               
327                if($old_rule) {
328                        $parsed_rule = $this->readOldScript($script);
329                        $old_rules = array();
330                        $j = 0;
331                        foreach ($parsed_rule['rule'] as $i => $value) {
332                               
333                                $array_rule = explode("&&", $parsed_rule['rule'][$i]);
334
335                                /* TO-DO: Ver as actions possíveis além de reject e fileinto */
336                                switch($array_rule[6]) {
337                                        case 'reject':
338                                                $action_type      = 'reject';
339                                                $action_parameter = $array_rule[7];
340                                                break;
341                                        case 'folder':
342                                                $action_type      = 'fileinto';
343                                                $action_parameter = $array_rule[7];
344                                                break;
345                                }
346
347                                if($array_rule[3] != "") {
348                                        $criteria_value = $array_rule[3];
349                                        $criteria_operator = '=';
350                                        $criteria_field = 'from';
351                                }
352                                else
353                                {
354                                        $criteria_value = $array_rule[5];
355                                        $criteria_operator = '=';
356                                        $criteria_field = 'subject';
357                                }
358
359                                $old_retorno = array();
360                                $old_retorno['isExact']                                 = true;
361                                $old_retorno['name']                                    = 'regra_migrada_' . $array_rule[1];
362                                $old_retorno['criteria']                                = array();
363                                $old_retorno['criteria'][0]                     = array();
364                                $old_retorno['criteria'][0]['value']    = $criteria_value;
365                                $old_retorno['criteria'][0]['operator'] = $criteria_operator;
366                                $old_retorno['criteria'][0]['field']    = $criteria_field;
367                                $old_retorno['actions']                 = array();
368                                $old_retorno['actions'][0]              = array();
369                                $old_retorno['actions'][0]['parameter'] = $action_parameter;
370                                $old_retorno['actions'][0]['type']      = $action_type;
371                                $old_retorno['enabled']                 = ($array_rule[2] == 'ENABLED') ? true: false;
372                                $old_retorno['id']                      = 'regra_migrada_' . $array_rule[1];
373                                $old_retorno['applyMessages']           = '';
374
375                                $old_rules[$j] = $old_retorno;
376                                $j++;
377                        }                       
378                        return $old_rules;
379                }
380                /* Não tem regra antiga */
381                $pos = strripos($script, "#PseudoScript#");
382                $pseudo_script = substr( $script, $pos+17 );
383
384                $return = json_decode( $pseudo_script, true );
385       
386                return $return;
387        }
388
389        var $rules = false;
390
391        /**
392        * Construtor da classe.
393        *
394        * @license    http://www.gnu.org/copyleft/gpl.html GPL
395        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
396        * @sponsor    Caixa EconÃŽmica Federal
397        * @author     Airton Bordin Junior <airton@prognus.com.br>
398        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
399        * @access     <public>
400        */
401        public function __construct()
402        {
403                $this->service = Controller::service("Sieve");
404        }
405
406       
407        /**
408        * Método que recupera as regras do usuário.
409        *
410        * @license    http://www.gnu.org/copyleft/gpl.html GPL
411        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
412        * @sponsor    Caixa EconÃŽmica Federal
413        * @author     Airton Bordin Junior <airton@prognus.com.br>
414        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
415        * @return     <Regras do usuário>
416        * @access     <public>
417        */
418        public function getRules()
419        {
420                $this->rules = Controller::find( array( 'concept' => 'filter' ) );
421
422                if( !$this->rules ) {
423                        $this->rules = array();
424                }
425               
426                return( $this->rules );
427        }
428
429       
430        /**
431        * Método que aplica o filtro para as mensagens do usuário.
432        *
433        * @license    http://www.gnu.org/copyleft/gpl.html GPL
434        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
435        * @sponsor    Caixa EconÃŽmica Federal
436        * @author     Airton Bordin Junior <airton@prognus.com.br>
437        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
438        * @param      <$uri>
439        * @param      <$result>
440        * @param      <$criteria>
441        * @param      <$original>
442        * @access     <public>
443        */
444        public function applySieveFilter( &$uri , &$result , &$criteria , $original  )
445        {
446               
447                //if()                 
448                //{                                             
449                        $result['id'] = $uri['id'];
450                        $rule_apply = array();
451                       
452                        $filter = Controller::read($uri);
453                        $filter_ = $this->parseSieveScript($filter['content']);
454                       
455                        foreach ($filter_ as $f_) {
456                                if($f_['id'] == $uri['id']) {
457                                        $rule_apply     = $f_;
458                                }
459                        }
460                                       
461                        $actions = array();
462                        $actions['type']      = $rule_apply['actions'][0]['type'];
463                        $actions['parameter'] = $rule_apply['actions'][0]['parameter'];
464                        /* Hardcoded */
465                        $actions['keep']      = false;
466
467                        $messages_to_apply = array();                   
468
469                        $messages = $rule_apply['applyMessages'];
470                        /*       
471                        $proc = array();
472                        $proc['keep'] = false;
473                                 
474                        */
475                        $imap = Controller::service( 'Imap' );
476                        $imap->apliSieveFilter($messages , $actions);
477                        return $result;
478                //}
479        }
480
481       
482        /**
483        * Método que lê o script do usuário.
484        *
485        * @license    http://www.gnu.org/copyleft/gpl.html GPL
486        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
487        * @sponsor    Caixa EconÃŽmica Federal
488        * @author     Airton Bordin Junior <airton@prognus.com.br>
489        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
490        * @param      <$uri>
491        * @param      <$result>
492        * @param      <$criteria>
493        * @param      <$original>
494        * @return     <Script do usuário>
495        * @access     <public>
496        */
497        public function readUserScript( &$uri , &$params , &$criteria , $original )
498        { 
499                $uri['id'] = $this->service->config['user'];
500        }
501 
502 
503        /**
504        * Método que seta o script do usuário.
505        *
506        * @license    http://www.gnu.org/copyleft/gpl.html GPL
507        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
508        * @sponsor    Caixa EconÃŽmica Federal
509        * @author     Airton Bordin Junior <airton@prognus.com.br>
510        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
511        * @param      <$uri>
512        * @param      <$result>
513        * @param      <$criteria>
514        * @param      <$original>
515        * @return     <Script do usuário>
516        * @access     <public>
517        */
518        public function setRule( &$uri , &$params , &$criteria , $original  )
519        {
520                if( !$this->rules )
521                $this->rules = $this->getRules();
522
523            $uri['id'] = $params['id'] = isset($params['id']) ? $params['id'] : urlencode($params['name']);
524
525            $i = 0;
526
527            for( ; isset($this->rules[$i]) && $this->rules[$i]['id'] !== $params['id']; $i++ );
528
529            $this->rules[$i] = array_merge( ( isset($this->rules[$i]) ? $this->rules[$i] : array() ), $params );
530
531            $params = array( 'name' => $this->service->config['user'],
532                             'content' => $this->formatSieveScript( $this->rules ),
533                             'active' => true );
534        }
535
536       
537        /**
538        * Método que deleta o script do usuário.
539        *
540        * @license    http://www.gnu.org/copyleft/gpl.html GPL
541        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
542        * @sponsor    Caixa EconÃŽmica Federal
543        * @author     Airton Bordin Junior <airton@prognus.com.br>
544        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
545        * @param      <$uri>
546        * @param      <$result>
547        * @param      <$criteria>
548        * @param      <$original>
549        * @access     <public>
550        */
551        public function deleteRule( &$uri, &$params, &$criteria, $original )
552        {
553                if( !$this->rules ) {   
554                        $this->rules = $this->getRules();
555                }         
556                $params['id'] = $uri['id'];
557
558                $update = false;
559               
560                $rules = array();
561
562                foreach( $this->rules as $i => $rule )
563                        if( $rule['id'] !== $uri['id'] )
564                                $rules[] = $this->rules[$i];
565
566                $this->rules = $rules;
567               
568                $uri['id'] = '';
569
570                $params = array( 'name' => $this->service->config['user'],
571                           'content' => $this->formatSieveScript( $this->rules ),
572                           'active' => true );
573
574                $URI = Controller::URI( $uri['concept'], $this->service->config['user'] );
575                $this->service->update( $URI, $params );
576       
577                return( false );
578        }
579
580       
581        /**
582        * Método que pega o script do usuário.
583        *
584        * @license    http://www.gnu.org/copyleft/gpl.html GPL
585        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
586        * @sponsor    Caixa EconÃŽmica Federal
587        * @author     Airton Bordin Junior <airton@prognus.com.br>
588        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
589        * @param      <$uri>
590        * @param      <$result>
591        * @param      <$criteria>
592        * @param      <$original>
593        * @return     <Script do usuário>
594        * @access     <public>
595        */
596        public function getSieveRule( &$uri , &$params , &$criteria , $original )
597        {         
598                $script = $this->parseSieveScript( $params['content'] );
599
600                foreach( $script as $i => $rule )
601                        if(is_array ($rule['name']) && is_array($original['id']))
602                        if( $rule['name'] === $original['id'] )
603                                return( $params = $rule );
604        }
605
606       
607        /**
608        * Método que lista as regras do usuário.
609        *
610        * @license    http://www.gnu.org/copyleft/gpl.html GPL
611        * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
612        * @sponsor    Caixa EconÃŽmica Federal
613        * @author     Airton Bordin Junior <airton@prognus.com.br>
614        * @author         Gustavo Pereira dos Santos <gustavo@prognus.com.br>   
615        * @param      <$uri>
616        * @param      <$result>
617        * @param      <$criteria>
618        * @param      <$original>
619        * @return     <Regras do usuário>
620        * @access     <public>
621        */
622        public function listSieveRules( &$uri , &$params , &$criteria , $original  )
623        {
624                $return = $params = $this->parseSieveScript( $params[0]['content'] );
625                return( $return );
626        }
627}
Note: See TracBrowser for help on using the repository browser.