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
b21e0edb
Commit
b21e0edb
authored
Jan 13, 2010
by
Richard Mansfield
Browse files
Detach files in parent cache before deleting blog posts (bug #506755)
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
8462db20
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/lib.php
View file @
b21e0edb
...
...
@@ -1038,6 +1038,14 @@ abstract class ArtefactType {
public
function
detach
(
$attachmentid
=
null
)
{
if
(
is_null
(
$attachmentid
))
{
execute_sql
(
"
DELETE FROM
{
artefact_parent_cache
}
WHERE parent = ?
AND artefact IN (
SELECT attachment
FROM
{
artefact_attachment
}
WHERE artefact = ?
)"
,
array
(
$this
->
id
,
$this
->
id
));
delete_records
(
'artefact_attachment'
,
'artefact'
,
$this
->
id
);
return
;
}
...
...
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