|
|
|
@ -1676,10 +1676,11 @@ class rcmail extends rcube
|
|
|
|
|
*
|
|
|
|
|
* @param string $name Folder name
|
|
|
|
|
* @param bool $with_path Enable path localization
|
|
|
|
|
* @param bool $path_remove Remove the path
|
|
|
|
|
*
|
|
|
|
|
* @return string Localized folder name in UTF-8 encoding
|
|
|
|
|
*/
|
|
|
|
|
public function localize_foldername($name, $with_path = false)
|
|
|
|
|
public function localize_foldername($name, $with_path = false, $path_remove = false)
|
|
|
|
|
{
|
|
|
|
|
$realnames = $this->config->get('show_real_foldernames');
|
|
|
|
|
|
|
|
|
@ -1687,10 +1688,18 @@ class rcmail extends rcube
|
|
|
|
|
return $this->gettext($folder_class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// try to localize path of the folder
|
|
|
|
|
if ($with_path && !$realnames) {
|
|
|
|
|
$storage = $this->get_storage();
|
|
|
|
|
$delimiter = $storage->get_hierarchy_delimiter();
|
|
|
|
|
|
|
|
|
|
// Remove the path
|
|
|
|
|
if ($path_remove) {
|
|
|
|
|
if (strpos($name, $delimiter)) {
|
|
|
|
|
$path = explode($delimiter, $name);
|
|
|
|
|
$name = array_pop($path);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// try to localize path of the folder
|
|
|
|
|
else if ($with_path && !$realnames) {
|
|
|
|
|
$path = explode($delimiter, $name);
|
|
|
|
|
$count = count($path);
|
|
|
|
|
|
|
|
|
|