Changeset 5a575b7 in github


Ignore:
Timestamp:
May 22, 2012 4:33:24 AM (12 months ago)
Author:
Aleksander Machniak <alec@…>
Branches:
master, HEAD, dev-browser-capabilities, pdo
Children:
0a1dd5b
Parents:
4bfe4ec
Message:

Deprecate storage_connect() method

Location:
program/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcmail.php

    r38a08c0 r5a575b7  
    20122012        return $this->storage_connect(); 
    20132013    } 
     2014 
     2015    /** 
     2016     * Connect to the mail storage server with stored session data 
     2017     * 
     2018     * @return bool True on success, False on error 
     2019     */ 
     2020    public function storage_connect() 
     2021    { 
     2022        $storage = $this->get_storage(); 
     2023 
     2024        if ($_SESSION['storage_host'] && !$storage->is_connected()) { 
     2025            $host = $_SESSION['storage_host']; 
     2026            $user = $_SESSION['username']; 
     2027            $port = $_SESSION['storage_port']; 
     2028            $ssl  = $_SESSION['storage_ssl']; 
     2029            $pass = $this->decrypt($_SESSION['password']); 
     2030 
     2031            if (!$storage->connect($host, $user, $pass, $port, $ssl)) { 
     2032                if (is_object($this->output)) { 
     2033                    $error = $storage->get_error_code() == -1 ? 'storageerror' : 'sessionerror'; 
     2034                    $this->output->show_message($error, 'error'); 
     2035                } 
     2036            } 
     2037            else { 
     2038                $this->set_storage_prop(); 
     2039                return $storage->is_connected(); 
     2040            } 
     2041        } 
     2042 
     2043        return false; 
     2044    } 
    20142045} 
  • program/include/rcube.php

    r76e499e r5a575b7  
    363363 
    364364  /** 
    365    * Connect to the mail storage server with stored session data 
    366    * 
    367    * @return bool True on success, False on error 
    368    */ 
    369   public function storage_connect() 
    370   { 
    371     $storage = $this->get_storage(); 
    372  
    373     if ($_SESSION['storage_host'] && !$storage->is_connected()) { 
    374       $host = $_SESSION['storage_host']; 
    375       $user = $_SESSION['username']; 
    376       $port = $_SESSION['storage_port']; 
    377       $ssl  = $_SESSION['storage_ssl']; 
    378       $pass = $this->decrypt($_SESSION['password']); 
    379  
    380       if (!$storage->connect($host, $user, $pass, $port, $ssl)) { 
    381         if (is_object($this->output)) 
    382           $this->output->show_message($storage->get_error_code() == -1 ? 'storageerror' : 'sessionerror', 'error'); 
    383       } 
    384       else { 
    385         $this->set_storage_prop(); 
    386         return $storage->is_connected(); 
    387       } 
    388     } 
    389  
    390     return false; 
    391   } 
    392  
    393   /** 
    394365   * Set storage parameters. 
    395366   * This must be done AFTER connecting to the server! 
Note: See TracChangeset for help on using the changeset viewer.