Ignore:
Timestamp:
01/06/12 08:52:37 (12 years ago)
Author:
cristiano
Message:

Ticket #2423 - Trocar chamada da variável rootPath

File:
1 edited

Legend:

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

    r5309 r5316  
    274274                $to = $header->to; 
    275275                $head_array['to'] = array(); 
    276                 if(isset($to[1]) && $to[1]->host == ".SYNTAX-ERROR.") { //E-mails que não possuem o campo "para", vêm com o recipiente preenchido, porém com um recipiente a mais alegando erro de sintaxe. 
     276                if(isset($to[1]) && isset($to[1]->host) && $to[1]->host == ".SYNTAX-ERROR.") { //E-mails que não possuem o campo "para", vêm com o recipiente preenchido, porém com um recipiente a mais alegando erro de sintaxe. 
    277277                        $head_array['to']['name'] = $head_array['to']['email'] = NULL; 
    278278                } 
     
    935935    { 
    936936        $return = array(); 
    937         require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     937        require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    938938         
    939939        $atObj = new attachment(); 
     
    13221322             * Requires of librarys 
    13231323             */ 
    1324             require_once $_SESSION['rootPath'].'/library/mime/mimePart.php'; 
    1325             require_once $_SESSION['rootPath'].'/library/mime/mimeDecode.php'; 
    1326             require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     1324            require_once dirname(__FILE__).'/../../library/mime/mimePart.php'; 
     1325            require_once dirname(__FILE__).'/../../library/mime/mimeDecode.php'; 
     1326            require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    13271327            //include_once("class.message_components.inc.php"); 
    13281328            //--------------------------------------------------------------------// 
     
    15331533 
    15341534                    case 'REPLY': 
    1535                           include_once($_SESSION['rootPath'].'/header.inc.php'); 
    1536                           include_once($_SESSION['rootPath'].'/calendar/inc/class.boicalendar.inc.php'); 
     1535                          include_once(dirname(__FILE__).'/../../header.inc.php'); 
     1536                          include_once(dirname(__FILE__).'/../../calendar/inc/class.boicalendar.inc.php'); 
    15371537                          $boicalendar = new boicalendar(); 
    15381538 
     
    20642064                if (!count($images)) return ''; 
    20652065                
    2066                 foreach ($images as $key => $value) {  
     2066                foreach ($images as $key => $value) {                     
    20672067                        $images[$key]['width']  = 160;  
    20682068                        $images[$key]['height'] = 120;  
    2069                         $images[$key]['url']    = "inc/get_archive.php?msgFolder=".$msg_folder."&msgNumber=".$msg_number."&indexPart=".$image['pid']."&image=true";  
     2069                        $images[$key]['url']    = "inc/get_archive.php?msgFolder=".$msg_folder."&msgNumber=".$msg_number."&indexPart=".$value['pid']."&image=true";  
    20702070                } 
    20712071 
     
    25702570        function send_mail($params) 
    25712571        { 
    2572                 require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php'; 
     2572                require_once dirname(__FILE__) . '/../../API/class.servicelocator.php'; 
    25732573                $mailService = ServiceLocator::getService('mail'); 
    25742574 
     
    32993299        function get_forwarding_attachment($msg_folder, $msg_number, $msg_part, $encoding) 
    33003300        { 
    3301             include_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     3301            include_once dirname(__FILE__).'/class.attachment.inc.php'; 
    33023302            $attachment = new attachment(); 
    33033303                        $attachment->decodeConf['rfc_822bodies'] = true; //Forçar a não decodificação de mensagens em anexo. 
     
    33083308        function get_forwarding_attachment2($msg_folder, $msg_number, $msg_part, $encoding) 
    33093309        { 
    3310             include_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     3310            include_once dirname(__FILE__).'/class.attachment.inc.php'; 
    33113311            $attachment = new attachment(); 
    33123312            $attachment->setStructureFromMail($msg_folder, $msg_number); 
     
    36633663        { 
    36643664         
    3665                 require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php'; 
     3665                require_oncedirname(__FILE__) . '/../../API/class.servicelocator.php'; 
    36663666                $mailService = ServiceLocator::getService('mail'); 
    36673667 
     
    49594959                fputs($f,base64_encode($source)); 
    49604960            fclose($f); 
    4961             $command = "python ".$_SESSION['rootPath']."/expressoMail1_2/imap.py \"$imap_server\" \"$imap_port\" \"$username\" \"$password\" \"$timestamp\" \"$folder\" \"$file\""; 
     4961            $command = "python ".dirname(__FILE__)."/../imap.py \"$imap_server\" \"$imap_port\" \"$username\" \"$password\" \"$timestamp\" \"$folder\" \"$file\""; 
    49624962            $return['command']= exec($command); 
    49634963        }else{ 
     
    51295129                                "$msg_user</body><br><br><hr>";  
    51305130                              
    5131                 require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php'; 
     5131                require_once dirname(__FILE__) . '/../../API/class.servicelocator.php'; 
    51325132                $mailService = ServiceLocator::getService('mail');       
    51335133                $mailService->addStringAttachment($mail_content, 'report.eml', 'application/text');  
Note: See TracChangeset for help on using the changeset viewer.