Changeset 4130 in subversion
- Timestamp:
- Oct 25, 2010 5:11:49 AM (3 years ago)
- Location:
- trunk/roundcubemail/program/include
- Files:
-
- 2 edited
-
rcube_imap.php (modified) (1 diff)
-
rcube_imap_generic.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap.php
r4118 r4130 164 164 165 165 // get server properties 166 if (!empty($this->conn->rootdir)) 167 $this->set_rootdir($this->conn->rootdir); 166 $rootdir = $this->conn->getRootDir(); 167 if (!empty($rootdir)) 168 $this->set_rootdir($rootdir); 168 169 if (empty($this->delimiter)) 169 170 $this->get_hierarchy_delimiter(); -
trunk/roundcubemail/program/include/rcube_imap_generic.php
r4129 r4130 87 87 public $errornum; 88 88 public $message; 89 public $rootdir;90 public $delimiter;91 89 public $data = array(); 92 90 public $flags = array( … … 129 127 } 130 128 129 /** 130 * Send simple (one line) command to the connection stream 131 * 132 * @param string $string Command string 133 * @param bool $endln True if CRLF need to be added at the end of command 134 * 135 * @param int Number of bytes sent, False on error 136 */ 131 137 function putLine($string, $endln=true) 132 138 { … … 148 154 } 149 155 150 // $this->putLine replacement with Command Continuation Requests (RFC3501 7.5) support 156 /** 157 * Send command to the connection stream with Command Continuation 158 * Requests (RFC3501 7.5) and LITERAL+ (RFC2088) support 159 * 160 * @param string $string Command string 161 * @param bool $endln True if CRLF need to be added at the end of command 162 * 163 * @param int Number of bytes sent, False on error 164 */ 151 165 function putLineC($string, $endln=true) 152 166 { … … 535 549 } 536 550 551 /** 552 * Gets the root directory and delimiter (of personal namespace) 553 * 554 * @return mixed A root directory name, or false. 555 */ 537 556 function getRootDir() 538 557 { 539 558 if (isset($this->prefs['rootdir']) && is_string($this->prefs['rootdir'])) { 540 $this->rootdir = $this->prefs['rootdir']; 541 return true; 559 return $this->prefs['rootdir']; 542 560 } 543 561 … … 552 570 553 571 $first_userspace = $user_space_data[0]; 554 if (count($first_userspace) !=2 ) {572 if (count($first_userspace) !=2) { 555 573 return false; 556 574 } 557 575 558 $this->rootdir = $first_userspace[0]; 559 $this->delimiter = $first_userspace[1]; 560 $this->prefs['rootdir'] = substr($this->rootdir, 0, -1); 561 $this->prefs['delimiter'] = $this->delimiter; 562 563 return true; 576 $rootdir = $first_userspace[0]; 577 $this->prefs['delimiter'] = $first_userspace[1]; 578 $this->prefs['rootdir'] = $rootdir ? substr($rootdir, 0, -1) : ''; 579 580 return $this->prefs['rootdir']; 564 581 } 565 582 … … 575 592 function getHierarchyDelimiter() 576 593 { 577 if ($this-> delimiter) {578 return $this-> delimiter;594 if ($this->prefs['delimiter']) { 595 return $this->prefs['delimiter']; 579 596 } 580 597 if (!empty($this->prefs['delimiter'])) { 581 return ($this->delimiter = $this->prefs['delimiter']);598 return $this->prefs['delimiter']; 582 599 } 583 600 … … 591 608 592 609 if (strlen($delimiter) > 0) { 593 $this->delimiter = $delimiter; 594 return $delimiter; 610 return ($this->prefs['delimiter'] = $delimiter); 595 611 } 596 612 } … … 615 631 616 632 // extract delimiter 617 return $this-> delimiter= $first_userspace[1];633 return $this->prefs['delimiter'] = $first_userspace[1]; 618 634 } 619 635 … … 1846 1862 $mailbox = '*'; 1847 1863 } 1848 1849 if (empty($ref) && $this-> rootdir) {1850 $ref = $this-> rootdir;1851 } 1852 1864 /* 1865 if (empty($ref) && $this->prefs['rootdir']) { 1866 $ref = $this->prefs['rootdir']; 1867 } 1868 */ 1853 1869 $args = array($this->escape($ref), $this->escape($mailbox)); 1854 1870
Note: See TracChangeset
for help on using the changeset viewer.
