Changeset 4344 in subversion
- Timestamp:
- Dec 17, 2010 4:16:47 AM (2 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 2 edited
-
config/main.inc.php.dist (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/config/main.inc.php.dist
r4296 r4344 84 84 // Folders need to be ended with directory separator, e.g. "INBOX." 85 85 // (special directory "~" is an exception to this rule) 86 // These can be used also to overwrite server's namespaces 86 87 $rcmail_config['imap_ns_personal'] = null; 87 88 $rcmail_config['imap_ns_other'] = null; -
trunk/roundcubemail/program/include/rcube_imap.php
r4340 r4344 547 547 $imap_delimiter = $config->get('imap_delimiter'); 548 548 549 if ($imap_delimiter) {550 $this->delimiter = $imap_delimiter;551 }552 553 549 if (!$this->conn) 554 550 return; … … 556 552 $ns = $this->conn->getNamespace(); 557 553 558 // NAMESPACE supported554 // Set namespaces (NAMESPACE supported) 559 555 if (is_array($ns)) { 560 556 $this->namespace = $ns; 561 562 if (empty($this->delimiter)) 563 $this->delimiter = $ns['personal'][0][1]; 564 if (empty($this->delimiter)) 565 $this->delimiter = $this->conn->getHierarchyDelimiter(); 566 if (empty($this->delimiter)) 567 $this->delimiter = '/'; 568 } 569 // not supported, get namespace from config 570 else if ($imap_personal !== null || $imap_shared !== null || $imap_other !== null) { 571 if (empty($this->delimiter)) 572 $this->delimiter = $this->conn->getHierarchyDelimiter(); 573 if (empty($this->delimiter)) 574 $this->delimiter = '/'; 575 557 } 558 else { 576 559 $this->namespace = array( 577 560 'personal' => NULL, … … 579 562 'shared' => NULL, 580 563 ); 581 582 if ($imap_personal !== null) { 583 foreach ((array)$imap_personal as $dir) { 584 $this->namespace['personal'][] = array($dir, $this->delimiter); 564 } 565 566 if ($imap_delimiter) { 567 $this->delimiter = $imap_delimiter; 568 } 569 if (empty($this->delimiter)) { 570 $this->delimiter = $this->namespace['personal'][0][1]; 571 } 572 if (empty($this->delimiter)) { 573 $this->delimiter = $this->conn->getHierarchyDelimiter(); 574 } 575 if (empty($this->delimiter)) { 576 $this->delimiter = '/'; 577 } 578 579 // Overwrite namespaces 580 if ($imap_personal !== null) { 581 $this->namespace['personal'] = NULL; 582 foreach ((array)$imap_personal as $dir) { 583 $this->namespace['personal'][] = array($dir, $this->delimiter); 584 } 585 } 586 if ($imap_other !== null) { 587 $this->namespace['other'] = NULL; 588 foreach ((array)$imap_other as $dir) { 589 if ($dir) { 590 $this->namespace['other'][] = array($dir, $this->delimiter); 585 591 } 586 592 } 587 if ($imap_other !== null) { 588 foreach ((array)$imap_other as $dir) { 589 if ($dir) { 590 $this->namespace['other'][] = array($dir, $this->delimiter); 591 } 592 } 593 } 594 if ($imap_shared !== null) { 595 foreach ((array)$imap_shared as $dir) { 596 if ($dir) { 597 $this->namespace['shared'][] = array($dir, $this->delimiter); 598 } 593 } 594 if ($imap_shared !== null) { 595 $this->namespace['shared'] = NULL; 596 foreach ((array)$imap_shared as $dir) { 597 if ($dir) { 598 $this->namespace['shared'][] = array($dir, $this->delimiter); 599 599 } 600 600 }
Note: See TracChangeset
for help on using the changeset viewer.
