Changeset 411


Ignore:
Timestamp:
09/10/08 11:01:37 (16 years ago)
Author:
rafaelraymundo
Message:

Para nova ferramenta - expressomini(mobile). Adicao da funcionalidade de leitura de e-mails. Foi preciso
fazer mudancas em phpgwapi/inc/functions.inc.php e expressoMail1_2/inc/class.imap_functions.inc.php.

Location:
trunk
Files:
2 edited

Legend:

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

    r398 r411  
    152152                $msg_folder = $params['msg_folder']; 
    153153                 
    154                 if(!$this->mbox) 
     154                if(!$this->mbox || !is_resource($this->mbox)) 
    155155                        $this->mbox = $this->open_mbox($msg_folder);             
    156156                 
     
    926926                $return['new_msgs'] = imap_num_recent($this->mbox); 
    927927                $return['msgs_to_delete'] = $msg_to_delete; 
    928                 if($this->mbox) 
     928                if($this->mbox && is_resource($this->mbox)) 
    929929                        imap_close($this->mbox); 
    930930                return $return; 
     
    10761076        { 
    10771077                $folder = $params['folder']; 
    1078                 if(!$this->mbox) { 
     1078                if(!$this->mbox || !is_resource($this->mbox)) { 
    10791079                        $this->mbox = $this->open_mbox($folder); 
    1080                         if(!$this->mbox) 
     1080                        if(!$this->mbox || !is_resource($this->mbox)) 
    10811081                        return imap_last_error(); 
    10821082                }                
    10831083                $num_msgs = imap_num_msg($this->mbox); 
    1084                 if($this->mbox) 
     1084                if($this->mbox || is_resource($this->mbox)) 
    10851085                        imap_close($this->mbox); 
    10861086                 
     
    17001700                $return["flag"] = $flag; 
    17011701                 
    1702                 if(!$this->mbox) 
     1702                if(!$this->mbox && !is_resource($this->mbox)) 
    17031703                        $this->mbox = $this->open_mbox($folder); 
    17041704                 
     
    17181718                        $return["status"] = imap_clearflag_full($this->mbox, $msgs_to_set, "\\Flagged", ST_UID); 
    17191719                 
    1720                 if($this->mbox) 
     1720                if($this->mbox && is_resource($this->mbox)) 
    17211721                        imap_close($this->mbox); 
    17221722                return $return; 
     
    18051805        function get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse){ 
    18061806                 
    1807                 if(!$this->mbox) 
     1807                if(!$this->mbox || !is_resource($this->mbox)){ 
    18081808                        $this->mbox = $this->open_mbox($folder); 
    1809                  
     1809                } 
    18101810                switch($sort_box_type){ 
    18111811                        case 'SORTFROM': 
     
    19181918                        $folder_id = "INBOX"; 
    19191919                 
    1920                 if(!$this->mbox) 
     1920                if(!$this->mbox || !is_resource($this->mbox)) 
    19211921                        $this->mbox = $this->open_mbox(); 
    19221922 
    19231923                $quota = imap_get_quotaroot($this->mbox, $folder_id); 
    1924                 if($this->mbox) 
     1924                if($this->mbox && is_resource($this->mbox)) 
    19251925                        imap_close($this->mbox); 
    19261926                         
  • trunk/phpgwapi/inc/functions.inc.php

    r370 r411  
    450450                \*************************************************************************/ 
    451451                if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' && 
    452                         $GLOBALS['phpgw_info']['flags']['currentapp'] != 'about') 
     452                        $GLOBALS['phpgw_info']['flags']['currentapp'] != 'about' && 
     453                        $GLOBALS['phpgw_info']['flags']['currentapp'] != 'mobile') 
    453454                { 
    454455                        // This will need to use ACL in the future 
Note: See TracChangeset for help on using the changeset viewer.