Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
274b6b86
Commit
274b6b86
authored
Sep 01, 2008
by
Richard Mansfield
Browse files
Truncate file paths; remove trailing / in folder names
parent
ae246f79
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/blocktype/folder/lib.php
View file @
274b6b86
...
@@ -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
;
}
}
...
...
htdocs/artefact/file/lib.php
View file @
274b6b86
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment