Use editname (kolab folder name) for calendar edit form

This commit is contained in:
Thomas Bruederli 2011-06-13 14:38:54 -06:00
parent 34346bce45
commit 2e0b6536d5
2 changed files with 12 additions and 0 deletions

View file

@ -71,6 +71,17 @@ class kolab_calendar
$dispname = preg_replace(array('!INBOX/Calendar/!', '!^INBOX/!', '!^shared/!', '!^user/([^/]+)/!'), array('','','','(\\1) '), $this->imap_folder);
return strlen($dispname) ? $dispname : $this->imap_folder;
}
/**
* Getter for the top-end calendar folder name (not the entire path)
*
* @return string Name of this calendar
*/
public function get_foldername()
{
$parts = explode('/', $this->imap_folder);
return end($parts);
}
/**
* Return color to display this calendar

View file

@ -70,6 +70,7 @@ class kolab_driver extends calendar_driver
$this->calendars[$calendar->id] = array(
'id' => $calendar->id,
'name' => $calendar->get_name(),
'editname' => $calendar->get_foldername(),
'color' => $calendar->get_color(),
'readonly' => $c_folder->_owner != $_SESSION['username'],
);