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 {
$artefact->icon = call_static_method(generate_artefact_class_name($artefact->artefacttype), 'get_icon', array('id' => $artefact->id));
$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;
}
......
......@@ -601,11 +601,11 @@ JAVASCRIPT;
$folderdata = self::artefactchooser_folder_data(&$artefact);
if ($artefact->artefacttype == 'profileicon') {
$artefact->description = $artefact->title;
$artefact->description = str_shorten($artefact->title, 30);
}
else {
$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;
......
Markdown is supported
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