Changeset 0ece58d in github


Ignore:
Timestamp:
Jul 28, 2008 6:28:32 AM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
8c72e33
Parents:
3ac95d5
Message:

Add consistency checks + complete some phpdoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcmail.php

    reec34ef r0ece58d  
    234234   * This will instantiate a rcmail_template object and set 
    235235   * environment vars according to the current session and configuration 
     236   * 
     237   * @param boolean True if this request is loaded in a (i)frame 
     238   * @return object rcube_template Reference to HTML output object 
    236239   */ 
    237240  public function load_gui($framed = false) 
    238241  { 
    239242    // init output page 
    240     $this->output = new rcube_template($this->task, $framed); 
     243    if (!($this->output instanceof rcube_template)) 
     244      $this->output = new rcube_template($this->task, $framed); 
    241245 
    242246    foreach (array('flag_for_deletion') as $js_config_var) { 
     
    263267  /** 
    264268   * Create an output object for JSON responses 
     269   * 
     270   * @return object rcube_json_output Reference to JSON output object 
    265271   */ 
    266272  public function init_json() 
    267273  { 
    268     $this->output = new rcube_json_output($this->task); 
     274    if (!($this->output instanceof rcube_json_output)) 
     275      $this->output = new rcube_json_output($this->task); 
    269276     
    270277    return $this->output; 
     
    309316    $conn = false; 
    310317     
    311     if ($_SESSION['imap_host']) { 
     318    if ($_SESSION['imap_host'] && !$this->imap->conn) { 
    312319      if (!($conn = $this->imap->connect($_SESSION['imap_host'], $_SESSION['username'], $this->decrypt_passwd($_SESSION['password']), $_SESSION['imap_port'], $_SESSION['imap_ssl'], rcmail::get_instance()->config->get('imap_auth_type', 'check')))) { 
    313320        if ($this->output) 
     
    318325    } 
    319326 
    320     return $conn;     
     327    return $conn; 
    321328  } 
    322329 
Note: See TracChangeset for help on using the changeset viewer.