Changeset 5316 for trunk/expressoMail1_2


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

Ticket #2423 - Trocar chamada da variável rootPath

Location:
trunk/expressoMail1_2
Files:
11 edited

Legend:

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

    r5294 r5316  
    5050        $this->EmailExpresso = trim($_SESSION['phpgw_info']['expressomail']['user']['email']); 
    5151                 
    52                 include_once $_SESSION['rootPath'] . '/header.inc.php';  
    53                 require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php'; 
     52                include_once dirname(__FILE__).'/../../header.inc.php';  
     53                require_once dirname(__FILE__).'/../../API/class.servicelocator.php'; 
    5454                $alternativeMailService = ServiceLocator::getService('ldap'); 
    5555                $this->AlternateEmailExpresso = $alternativeMailService->getMailAlternateByUidNumber($_SESSION['phpgw_info']['expressomail']['user']['account_id']); 
  • trunk/expressoMail1_2/inc/class.attachment.inc.php

    r5172 r5316  
    3737         * Requires 
    3838         */ 
    39             require_once $_SESSION['rootPath'].'/library/mime/mimePart.php'; 
    40             require_once $_SESSION['rootPath'].'/library/mime/mimeDecode.php'; 
     39            require_once dirname(__FILE__).'/../../library/mime/mimePart.php'; 
     40            require_once dirname(__FILE__).'/../../library/mime/mimeDecode.php'; 
    4141        //----------------------------------------------------------// 
    4242 
  • trunk/expressoMail1_2/inc/class.db_functions.inc.php

    r5134 r5316  
    369369            if($msg_number != null && $msg_part != null && $msg_folder != null && (intval($idx_file == '0' ? '1' : $idx_file))) 
    370370            { 
    371                 require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     371                require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    372372                $attachmentObj = new attachment(); 
    373373                $attachmentObj->setStructureFromMail($msg_folder,$msg_number); 
  • trunk/expressoMail1_2/inc/class.exporteml.inc.php

    r5181 r5316  
    664664        function download_all_attachments($params) { 
    665665                 
    666                 require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     666                require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    667667                $atObj = new attachment(); 
    668668                $atObj->setStructureFromMail($params['folder'],$params['num_msg']); 
  • 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');  
  • trunk/expressoMail1_2/inc/class.ldap_functions.inc.php

    r5245 r5316  
    11<?php 
    22 
    3 require_once(($_SESSION['rootPath'] ? $_SESSION['rootPath'] : PHPGW_INCLUDE_ROOT).'/API/class.servicelocator.php'); 
     3require_once(dirname(__FILE__).'/../../API/class.servicelocator.php'); 
    44include_once("class.imap_functions.inc.php"); 
    55include_once("class.functions.inc.php"); 
     
    277277                $modal = true; 
    278278              
    279             include_once $_SESSION['rootPath']. '/header.inc.php'; 
     279            include_once dirname(__FILE__). '/../../header.inc.php'; 
    280280             
    281281            if($modal) 
     
    387387        function quickSearchGlobal($params, $all=false)  
    388388        {               
    389             include_once $_SESSION['rootPath']. '/header.inc.php'; 
     389            include_once dirname(__FILE__). '/../../header.inc.php'; 
    390390            $c = CreateObject('phpgwapi.config','contactcenter'); 
    391391            $all_data = $c->read_repository(); 
  • trunk/expressoMail1_2/inc/get_archive.php

    r5272 r5316  
    9292if($msgNumber != 'null' && $indexPart !== null && $msgFolder) 
    9393{ 
    94     require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     94    require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    9595 
    9696    $attachment = new attachment(); 
  • trunk/expressoMail1_2/inc/show_embedded_attach.php

    r4416 r5316  
    44 */ 
    55 require_once '../../header.session.inc.php'; 
    6  require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     6 require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    77 //------------------------// 
    88 
  • trunk/expressoMail1_2/inc/show_img.php

    r4416 r5316  
    44 */ 
    55 require_once '../../header.session.inc.php'; 
    6  require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     6 require_oncedirname(__FILE__).'/class.attachment.inc.php'; 
    77 //------------------------// 
    88 
  • trunk/expressoMail1_2/inc/show_thumbs.php

    r4416 r5316  
    44 */ 
    55 require_once '../../header.session.inc.php'; 
    6  require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; 
     6 require_once dirname(__FILE__).'/class.attachment.inc.php'; 
    77 //------------------------// 
    88 
  • trunk/expressoMail1_2/index.php

    r5295 r5316  
    169169        $template->set_var("msg_number",$_GET['msgball']['msgnum'] ? $_GET['msgball']['msgnum'] : $_GET['to']); 
    170170        $template->set_var("user_email",$_SESSION['phpgw_info']['expressomail']['user']['email']); 
    171         include_once $_SESSION['rootPath'] . '/header.inc.php'; 
    172         require_once $_SESSION['rootPath'] . '/API/class.servicelocator.php'; 
     171        include_once dirname(__FILE__) . '/../header.inc.php'; 
     172        require_once dirname(__FILE__) . '/../API/class.servicelocator.php'; 
    173173        $alternativeMailService = ServiceLocator::getService('ldap'); 
    174174        $AlternateEmailExpresso = Array(); 
Note: See TracChangeset for help on using the changeset viewer.