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:
parent
c1a1d59ade
commit
32b42e21ee
2 changed files with 6 additions and 2 deletions
|
@ -203,7 +203,9 @@ class kolab_activesync_ui
|
||||||
$classes = array('mailbox');
|
$classes = array('mailbox');
|
||||||
|
|
||||||
if ($folder_class = $this->rc->folder_classname($folder)) {
|
if ($folder_class = $this->rc->folder_classname($folder)) {
|
||||||
|
if ($this->rc->text_exists($folder_class)) {
|
||||||
$foldername = html::quote($this->rc->gettext($folder_class));
|
$foldername = html::quote($this->rc->gettext($folder_class));
|
||||||
|
}
|
||||||
$classes[] = $folder_class;
|
$classes[] = $folder_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,9 @@ class kolab_delegation extends rcube_plugin
|
||||||
$classes = array('mailbox');
|
$classes = array('mailbox');
|
||||||
|
|
||||||
if ($folder_class = $this->rc->folder_classname($folder)) {
|
if ($folder_class = $this->rc->folder_classname($folder)) {
|
||||||
|
if ($this->rc->text_exists($folder_class)) {
|
||||||
$foldername = html::quote($this->rc->gettext($folder_class));
|
$foldername = html::quote($this->rc->gettext($folder_class));
|
||||||
|
}
|
||||||
$classes[] = $folder_class;
|
$classes[] = $folder_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue