Performance: Skip another few cache selects
This commit is contained in:
parent
9972823957
commit
922d8de6d0
2 changed files with 16 additions and 3 deletions
|
@ -1018,7 +1018,7 @@ class kolab_storage
|
||||||
$folder->children = array(); // reset list
|
$folder->children = array(); // reset list
|
||||||
|
|
||||||
// skip top folders or ones with a custom displayname
|
// skip top folders or ones with a custom displayname
|
||||||
if (count($path) < 1 || kolab_storage::custom_displayname($folder->name)) {
|
if (count($path) < 1 || $folder->get_custom_displayname()) {
|
||||||
$tree->children[] = $folder;
|
$tree->children[] = $folder;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -146,6 +146,20 @@ abstract class kolab_storage_folder_api
|
||||||
* @return string Folder name
|
* @return string Folder name
|
||||||
*/
|
*/
|
||||||
public function get_name()
|
public function get_name()
|
||||||
|
{
|
||||||
|
if ($name = $this->get_custom_displayname()) {
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return kolab_storage::object_prettyname($this->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the custom display name of this folder
|
||||||
|
*
|
||||||
|
* @return string Folder custom name
|
||||||
|
*/
|
||||||
|
public function get_custom_displayname()
|
||||||
{
|
{
|
||||||
$rcmail = rcube::get_instance();
|
$rcmail = rcube::get_instance();
|
||||||
|
|
||||||
|
@ -156,12 +170,11 @@ abstract class kolab_storage_folder_api
|
||||||
if ($name = $metadata[kolab_storage::NAME_KEY_PRIVATE]) {
|
if ($name = $metadata[kolab_storage::NAME_KEY_PRIVATE]) {
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($name = $metadata[kolab_storage::NAME_KEY_SHARED]) {
|
if ($name = $metadata[kolab_storage::NAME_KEY_SHARED]) {
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return kolab_storage::object_prettyname($this->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue