Commit 274b6b86 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Truncate file paths; remove trailing / in folder names

parent ae246f79
...@@ -109,7 +109,9 @@ class PluginBlocktypeFolder extends PluginBlocktype { ...@@ -109,7 +109,9 @@ class PluginBlocktypeFolder extends PluginBlocktype {
$artefact->icon = call_static_method(generate_artefact_class_name($artefact->artefacttype), 'get_icon', array('id' => $artefact->id)); $artefact->icon = call_static_method(generate_artefact_class_name($artefact->artefacttype), 'get_icon', array('id' => $artefact->id));
$artefact->hovertitle = $artefact->description; $artefact->hovertitle = $artefact->description;
$artefact->description = $folderdata->ownername . ArtefactTypeFileBase::get_full_path($artefact->id, $folderdata->data);
$path = $artefact->parent ? ArtefactTypeFileBase::get_full_path($artefact->parent, $folderdata->data) : '';
$artefact->description = str_shorten($folderdata->ownername . $path . $artefact->title, 30);
return $artefact; return $artefact;
} }
......
...@@ -601,11 +601,11 @@ JAVASCRIPT; ...@@ -601,11 +601,11 @@ JAVASCRIPT;
$folderdata = self::artefactchooser_folder_data(&$artefact); $folderdata = self::artefactchooser_folder_data(&$artefact);
if ($artefact->artefacttype == 'profileicon') { if ($artefact->artefacttype == 'profileicon') {
$artefact->description = $artefact->title; $artefact->description = str_shorten($artefact->title, 30);
} }
else { else {
$path = $artefact->parent ? self::get_full_path($artefact->parent, $folderdata->data) : ''; $path = $artefact->parent ? self::get_full_path($artefact->parent, $folderdata->data) : '';
$artefact->description = $folderdata->ownername . $path . $artefact->title; $artefact->description = str_shorten($folderdata->ownername . $path . $artefact->title, 30);
} }
return $artefact; return $artefact;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment