diff options
author | Thomas Bruederli <bruederli@kolabsys.com> | 2013-10-16 14:35:56 (GMT) |
---|---|---|
committer | Thomas Bruederli <bruederli@kolabsys.com> | 2013-10-16 14:36:56 (GMT) |
commit | 9d8ec10247dab9bdb27f30aca7e96ad0c2d99e68 (patch) | |
tree | 8826ab8eafab0e067be62484af41e69724cdf2fa | |
parent | 24f64bee5ae8ac6e7c6522c5e7fb686df658ca46 (diff) | |
download | roundcubemail-plugins-kolab-9d8ec10247dab9bdb27f30aca7e96ad0c2d99e68.tar.gz |
Use full folder names by default and truncated ones for listings (#2370)
-rw-r--r-- | plugins/calendar/drivers/kolab/kolab_driver.php | 9 | ||||
-rw-r--r-- | plugins/calendar/lib/calendar_ui.php | 4 | ||||
-rw-r--r-- | plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php | 9 | ||||
-rw-r--r-- | plugins/tasklist/tasklist_ui.php | 4 |
4 files changed, 14 insertions, 12 deletions
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php index cffe6b1..14639c4 100644 --- a/plugins/calendar/drivers/kolab/kolab_driver.php +++ b/plugins/calendar/drivers/kolab/kolab_driver.php @@ -114,21 +114,22 @@ class kolab_driver extends calendar_driver foreach ($folders as $id => $cal) { $fullname = $cal->get_name(); - $name = kolab_storage::folder_displayname($fullname, $names); + $listname = kolab_storage::folder_displayname($fullname, $names); // special handling for virtual folders if ($cal->virtual) { $calendars[$cal->id] = array( 'id' => $cal->id, - 'name' => $name, + 'name' => $fullname, + 'listname' => $listname, 'virtual' => true, ); } else { $calendars[$cal->id] = array( 'id' => $cal->id, - 'name' => $name, - 'altname' => $fullname, + 'name' => $fullname, + 'listname' => $listname, 'editname' => $cal->get_foldername(), 'color' => $cal->get_color(), 'readonly' => $cal->readonly, diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index 9ea93ef..9ffb4ee 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -200,7 +200,7 @@ class calendar_ui $html_id = html_identifier($id); $class = 'cal-' . asciiwords($id, true); - $title = !empty($prop['altname']) && $prop['altname'] != $prop['name'] ? html_entity_decode($prop['altname'], ENT_COMPAT, RCMAIL_CHARSET) : ''; + $title = $prop['name'] != $prop['listname'] ? html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : ''; if ($prop['virtual']) $class .= ' virtual'; @@ -212,7 +212,7 @@ class calendar_ui $li .= html::tag('li', array('id' => 'rcmlical' . $html_id, 'class' => $class), ($prop['virtual'] ? '' : html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active']), '') . html::span('handle', ' ')) . - html::span(array('class' => 'calname', 'title' => $title), $prop['name'])); + html::span(array('class' => 'calname', 'title' => $title), $prop['listname'])); } $this->rc->output->set_env('calendars', $jsenv); diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php index 787ced4..c630a41 100644 --- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php +++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php @@ -95,14 +95,15 @@ class tasklist_kolab_driver extends tasklist_driver $path_imap = join($delim, $path_imap); $fullname = kolab_storage::object_name($utf7name); - $name = kolab_storage::folder_displayname($fullname, $listnames); + $listname = kolab_storage::folder_displayname($fullname, $listnames); // special handling for virtual folders if ($folder->virtual) { $list_id = kolab_storage::folder_id($utf7name); $this->lists[$list_id] = array( 'id' => $list_id, - 'name' => $name, + 'name' => $fullname, + 'listname' => $listname, 'virtual' => true, ); continue; @@ -127,8 +128,8 @@ class tasklist_kolab_driver extends tasklist_driver $list_id = kolab_storage::folder_id($utf7name); $tasklist = array( 'id' => $list_id, - 'name' => $name, - 'altname' => $fullname, + 'name' => $fullname, + 'listname' => $listname, 'editname' => $editname, 'color' => $folder->get_color('0000CC'), 'showalarms' => isset($prefs[$list_id]['showalarms']) ? $prefs[$list_id]['showalarms'] : $alarms, diff --git a/plugins/tasklist/tasklist_ui.php b/plugins/tasklist/tasklist_ui.php index 99d0875..dab9b12 100644 --- a/plugins/tasklist/tasklist_ui.php +++ b/plugins/tasklist/tasklist_ui.php @@ -106,7 +106,7 @@ class tasklist_ui $html_id = html_identifier($id); $class = 'tasks-' . asciiwords($id, true); - $title = !empty($prop['altname']) && $prop['altname'] != $prop['name'] ? html_entity_decode($prop['altname'], ENT_COMPAT, RCMAIL_CHARSET) : ''; + $title = $prop['name'] != $prop['listname'] ? html_entity_decode($prop['name'], ENT_COMPAT, RCMAIL_CHARSET) : ''; if ($prop['virtual']) $class .= ' virtual'; @@ -118,7 +118,7 @@ class tasklist_ui $li .= html::tag('li', array('id' => 'rcmlitasklist' . $html_id, 'class' => $class), ($prop['virtual'] ? '' : html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active']))) . html::span('handle', ' ') . - html::span(array('class' => 'listname', 'title' => $title), $prop['name'])); + html::span(array('class' => 'listname', 'title' => $title), $prop['listname'])); } $this->rc->output->set_env('tasklists', $jsenv); |