Verify folder_classname() result before use

In future versions it may return class name that is not a localization label.
This commit is contained in:
Aleksander Machniak 2019-06-05 14:01:55 +00:00
parent c1a1d59ade
commit 32b42e21ee
2 changed files with 6 additions and 2 deletions

View file

@ -203,7 +203,9 @@ class kolab_activesync_ui
$classes = array('mailbox');
if ($folder_class = $this->rc->folder_classname($folder)) {
$foldername = html::quote($this->rc->gettext($folder_class));
if ($this->rc->text_exists($folder_class)) {
$foldername = html::quote($this->rc->gettext($folder_class));
}
$classes[] = $folder_class;
}

View file

@ -581,7 +581,9 @@ class kolab_delegation extends rcube_plugin
$classes = array('mailbox');
if ($folder_class = $this->rc->folder_classname($folder)) {
$foldername = html::quote($this->rc->gettext($folder_class));
if ($this->rc->text_exists($folder_class)) {
$foldername = html::quote($this->rc->gettext($folder_class));
}
$classes[] = $folder_class;
}