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
83d3f7cb
Commit
83d3f7cb
authored
Jan 23, 2007
by
Richard Mansfield
Browse files
Use artefact_instance_from_id() to stop turning images into files
parent
68ceb67f
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/blog/lib.php
View file @
83d3f7cb
...
...
@@ -455,8 +455,9 @@ class ArtefactTypeBlogPost extends ArtefactType {
$smarty
->
assign
(
'artefact'
,
$this
);
$attachments
=
$this
->
get_attached_files
();
if
(
$attachments
)
{
require_once
(
'artefact.php'
);
foreach
(
$attachments
as
&
$attachment
)
{
$f
=
new
A
rtefact
TypeFile
(
$attachment
->
id
);
$f
=
a
rtefact
_instance_from_id
(
$attachment
->
id
);
$attachment
->
content
=
$f
->
render
(
FORMAT_ARTEFACT_LISTSELF
,
$options
);
}
$smarty
->
assign
(
'attachments'
,
$attachments
);
...
...
htdocs/artefact/file/lib.php
View file @
83d3f7cb
...
...
@@ -496,6 +496,10 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
return
$data
;
}
public
static
function
get_render_list
()
{
return
array
(
FORMAT_ARTEFACT_LISTSELF
,
FORMAT_ARTEFACT_RENDERMETADATA
);
}
}
class
ArtefactTypeFolder
extends
ArtefactTypeFileBase
{
...
...
Write
Preview
Markdown
is supported
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