Use editname (kolab folder name) for calendar edit form
This commit is contained in:
parent
34346bce45
commit
2e0b6536d5
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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'],
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue