Horde classes are using UTF7-IMAP encoding (see also https://bugzilla.kolabsys.com/show_bug.cgi?id=116)
This commit is contained in:
parent
b80e40805f
commit
431c1b4e1c
3 changed files with 10 additions and 4 deletions
|
@ -130,7 +130,9 @@ class rcube_kolab_contacts extends rcube_addressbook
|
||||||
*/
|
*/
|
||||||
public function get_name()
|
public function get_name()
|
||||||
{
|
{
|
||||||
return strtr(preg_replace('!^(INBOX|user)/!i', '', $this->imap_folder), '/', ':');
|
$folder = rcube_charset_convert($this->imap_folder, 'UTF7-IMAP');
|
||||||
|
// @TODO: use namespace prefixes
|
||||||
|
return strtr(preg_replace('!^(INBOX|user)/!i', '', $folder), '/', ':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ pear install Net_DNS2
|
||||||
pear install Net_SMTP
|
pear install Net_SMTP
|
||||||
pear install Mail_mimeDecode
|
pear install Mail_mimeDecode
|
||||||
pear install Auth_SASL
|
pear install Auth_SASL
|
||||||
|
pear install Date
|
||||||
|
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
|
|
|
@ -87,7 +87,7 @@ class rcube_kolab
|
||||||
* Get a list of storage folders for the given data type
|
* Get a list of storage folders for the given data type
|
||||||
*
|
*
|
||||||
* @param string Data type to list folders for (contact,event,task,note)
|
* @param string Data type to list folders for (contact,event,task,note)
|
||||||
* @return array List of Kolab_Folder objects
|
* @return array List of Kolab_Folder objects (folder names in UTF7-IMAP)
|
||||||
*/
|
*/
|
||||||
public static function get_folders($type)
|
public static function get_folders($type)
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ class rcube_kolab
|
||||||
/**
|
/**
|
||||||
* Get storage object for read/write access to the Kolab backend
|
* Get storage object for read/write access to the Kolab backend
|
||||||
*
|
*
|
||||||
* @param string IMAP folder to access
|
* @param string IMAP folder to access (UTF7-IMAP)
|
||||||
* @param string Object type to deal with (leave empty for auto-detection using annotations)
|
* @param string Object type to deal with (leave empty for auto-detection using annotations)
|
||||||
* @return object Kolab_Data The data storage object
|
* @return object Kolab_Data The data storage object
|
||||||
*/
|
*/
|
||||||
|
@ -122,10 +122,13 @@ class rcube_kolab
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates folder ID from folder name
|
* Creates folder ID from folder name
|
||||||
|
*
|
||||||
|
* @param string $folder Folder name (UTF7-IMAP)
|
||||||
|
*
|
||||||
|
* @return string Folder ID string
|
||||||
*/
|
*/
|
||||||
public static function folder_id($folder)
|
public static function folder_id($folder)
|
||||||
{
|
{
|
||||||
$folder = rcube_charset_convert($folder, RCMAIL_CHARSET, 'UTF7-IMAP');
|
|
||||||
return asciiwords(strtr($folder, '/.', '--'));
|
return asciiwords(strtr($folder, '/.', '--'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue