Fix support for imap hierarchy delimiter different than a slash char (Bifrost#T71208)
This commit is contained in:
parent
741ba7afbd
commit
ce097cdbef
2 changed files with 8 additions and 4 deletions
|
@ -39,6 +39,7 @@ class kolab_user_calendar extends kolab_calendar
|
||||||
public function __construct($user_or_folder, $calendar)
|
public function __construct($user_or_folder, $calendar)
|
||||||
{
|
{
|
||||||
$this->cal = $calendar;
|
$this->cal = $calendar;
|
||||||
|
$this->imap = $calendar->rc->get_storage();
|
||||||
|
|
||||||
// full user record is provided
|
// full user record is provided
|
||||||
if (is_array($user_or_folder)) {
|
if (is_array($user_or_folder)) {
|
||||||
|
|
|
@ -157,7 +157,8 @@ abstract class kolab_storage_folder_api
|
||||||
*/
|
*/
|
||||||
public function get_foldername()
|
public function get_foldername()
|
||||||
{
|
{
|
||||||
$parts = explode('/', $this->name);
|
$parts = explode($this->imap->get_hierarchy_delimiter(), $this->name);
|
||||||
|
|
||||||
return rcube_charset::convert(end($parts), 'UTF7-IMAP');
|
return rcube_charset::convert(end($parts), 'UTF7-IMAP');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +169,9 @@ abstract class kolab_storage_folder_api
|
||||||
*/
|
*/
|
||||||
public function get_parent()
|
public function get_parent()
|
||||||
{
|
{
|
||||||
$path = explode('/', $this->name);
|
$delim = $this->imap->get_hierarchy_delimiter();
|
||||||
|
$path = explode($delim, $this->name);
|
||||||
|
|
||||||
array_pop($path);
|
array_pop($path);
|
||||||
|
|
||||||
// don't list top-level namespace folder
|
// don't list top-level namespace folder
|
||||||
|
@ -176,7 +179,7 @@ abstract class kolab_storage_folder_api
|
||||||
$path = array();
|
$path = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
return join('/', $path);
|
return join($delim, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue