Changeset 4436 for sandbox


Ignore:
Timestamp:
05/17/11 16:26:32 (13 years ago)
Author:
airton
Message:

Ticket #1887 - Redefinicao do parser de email - Adequacao ao phpdoc

Location:
sandbox/2.2.0.2/expressoMail1_2/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/expressoMail1_2/inc/class.attachment.inc.php

    r4414 r4436  
    11<?php 
     2/** 
     3* Classe que manipula e gerencia toda a parte de anexos. 
     4* 
     5* @package    ExpressoMail 
     6* @license    http://www.gnu.org/copyleft/gpl.html GPL 
     7* @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     8* @author     Cristiano Correa 
     9*/ 
    210 
    311class attachment 
     
    1927    /** 
    2028     * Constructor 
     29         * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     30         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
    2131     * @param string $folder Imap folder name 
    2232     * @param integer $msgNumber Imap menssagem number 
     
    4959    /** 
    5060     * Open mail from Imap and parse structure 
    51      * @return string  menssagem 
     61     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     62         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     63         * @return string  menssagem 
    5264     */ 
    5365    public function setStructureFromMail($folder,$msgNumber) 
     
    8496 
    8597    /** 
    86      *  Set Stucture from Mail_mimeDecode Structure 
    87      * @param Mail_mimeDecode $structure 
     98     * Set Stucture from Mail_mimeDecode Structure 
     99     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     100         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     101         * @param Mail_mimeDecode $structure 
    88102     */ 
    89103    public function setStructure($structure) 
     
    94108    /** 
    95109     *  Set Stucture from raw mail code 
     110         * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     111         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
    96112     * @param Mail_mimeDecode $structure 
    97113     */ 
     
    104120    /** 
    105121     * Returns Attachment Decoded 
    106      * @param string $partNumber Index part 
     122     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     123         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     124         * @param string $partNumber Index part 
    107125     * @return string Attachment Decoded 
    108126     */ 
     
    116134     /** 
    117135     * Returns EmbeddedImages Infos 
    118      * @return array EmbeddedImages 
     136     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     137         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     138         * @return array EmbeddedImages 
    119139     */ 
    120140    public function getEmbeddedImagesInfo() 
     
    127147    /** 
    128148     * Returns Attachments Infos 
    129      * @return array 
     149     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     150         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     151         * @return array 
    130152     */ 
    131153    public function getAttachmentsInfo() 
     
    138160    /** 
    139161     * Returns Attachment Info 
    140      * @param string $partNumber Index part 
     162     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     163         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     164         * @param string $partNumber Index part 
    141165     * @return array 
    142166     */ 
     
    150174    /** 
    151175     * returns the source code menssagem 
    152      * @return string  menssagem 
     176     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     177         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     178         * @return string  menssagem 
    153179     */ 
    154180    private function _getRaw() 
     
    159185    /** 
    160186     * Returns content from the searched 
    161      * @param pointer $structure Structure object 
     187     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     188         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     189         * @param pointer $structure Structure object 
    162190     * @param string $soughtIndex 
    163191     * @param pointer $body Content 
     
    192220    } 
    193221 
     222        /** 
     223     * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     224         * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     225     */ 
    194226    private function _getPartInfo(&$structure, $soughtIndex,&$info,$pIndex = '0') 
    195227    { 
     
    353385    } 
    354386 
    355    
    356  
    357  
    358387} 
    359388 
    360  
    361389?> 
  • sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r4429 r4436  
    576576        } 
    577577         
     578        /** 
     579        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     580        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     581        * @param     $msg_number numero da mensagem 
     582        */ 
    578583        function getRawHeader($msg_number) 
    579584    { 
     
    581586        } 
    582587         
     588        /** 
     589        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     590        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     591        * @param     $msg_number numero da mensagem 
     592        */ 
    583593        function getRawBody($msg_number) 
    584594    { 
     
    586596        } 
    587597 
     598         
     599        /** 
     600        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     601        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     602        * @param     $msg mensagem 
     603        */ 
    588604        function builderMsgHeader($msg) 
    589605    { 
     
    615631    } 
    616632         
    617         /** 
     633                /** 
    618634        * Constroe o corpo da msg direto na variavel de conteudo 
    619635        * @param Mail_mimeDecode $structure 
     
    741757         
    742758         
    743                 function get_msg_sample($msg_number) 
     759        /** 
     760        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     761        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     762        * @param     $msg_number numero da mensagem 
     763        */ 
     764        function get_msg_sample($msg_number) 
    744765        { 
    745766 
     
    13501371                } 
    13511372 
     1373                                 
     1374        /** 
     1375        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     1376        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     1377        * @param     $images 
     1378        * @param     $msgno 
     1379        * @param     $body 
     1380        * @param     $msg_folder 
     1381        */                       
    13521382        function process_embedded_images($images, $msgno, $body, $msg_folder) 
    13531383        { 
     
    14481478        }        
    14491479 
    1450 function replace_links(&$body) 
     1480         
     1481         
     1482        /** 
     1483        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     1484        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     1485        * @param     $body corpo da mensagem 
     1486        */ 
     1487        function replace_links(&$body) 
    14511488        { 
    14521489                // Domains and IPs addresses found in the text and which is not a link yet should be replaced by one. 
     
    16211658        } 
    16221659 
     1660         
     1661        /** 
     1662        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     1663        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     1664        * @param     $images 
     1665        * @param     $msg_number 
     1666        * @param     $msg_folder 
     1667        */ 
    16231668        function get_thumbs($images, $msg_number, $msg_folder) 
    16241669        { 
     
    24292474        } 
    24302475         
     2476         
     2477        /** 
     2478        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     2479        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     2480        * @param     $mail email 
     2481        * @param     $msg_uid uid da mensagem 
     2482        * @param     $forwarding_attachments anexos 
     2483        */ 
    24312484        function buildEmbeddedImages(&$mail,$msg_uid,&$forwarding_attachments) 
    24322485        { 
     
    39463999        } 
    39474000 
    3948 function spam($params) 
     4001         
     4002        /** 
     4003        * @license   http://www.gnu.org/copyleft/gpl.html GPL 
     4004        * @author    Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 
     4005        * @param     $params 
     4006        */ 
     4007        function spam($params) 
    39494008        { 
    39504009                 
     
    40104069                return false; 
    40114070        } 
    4012         function get_header($msg_number){ 
    4013                 $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $msg_number), 80, 255); 
     4071         
     4072         
     4073        function get_header($msg_number) 
     4074        { 
     4075        $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $msg_number), 80, 255); 
    40144076                if (!is_object($header)) 
    40154077                        return false; 
     
    40404102        } 
    40414103        if($timestamp){ 
    4042             $tempDir = ini_get("session.save_path"); 
    4043             $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 
     4104                        $pdate = date_parse(date('r')); // pega a data atual do servidor (TODO: pegar a data da mensagem local)  
     4105                $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ];           
     4106                        $timestamp += $pdate['zone']*(60); //converte a data da mensagem para o fuso horário GMT 0. Isto é feito devido ao Expresso Mail armazenar a data no fuso horário GMT 0 e para exibi-la converte ela para o fuso horário local.  
     4107                                  
     4108                /* TODO: o diretorio /tmp deve ser substituido pelo diretorio temporario configurado no setup */  
     4109                $file = "/tmp/sess_".$_SESSION[ 'phpgw_session' ][ 'session_id' ];  
    40444110                $f = fopen($file,"w"); 
    40454111                fputs($f,base64_encode($source)); 
    40464112            fclose($f); 
    4047             $command = "python ".$_SERVER['DOCUMENT_ROOT']."/expressoMail1_2/imap.py ".escapeshellarg($imap_server)." ".escapeshellarg($imap_port)." ".escapeshellarg($username)." ".escapeshellarg($password)." ".escapeshellarg($timestamp)." ".escapeshellarg($folder)." ".escapeshellarg($file); 
     4113            $command = "python ".$_SESSION['rootPatch']."/expressoMail1_2/imap.py ".escapeshellarg($imap_server)." ".escapeshellarg($imap_port)." ".escapeshellarg($username)." ".escapeshellarg($password)." ".escapeshellarg($timestamp)." ".escapeshellarg($folder)." ".escapeshellarg($file); 
    40484114            $return['command']=exec(escapeshellcmd($command)); 
    40494115        }else{ 
Note: See TracChangeset for help on using the changeset viewer.