Commit f5c4caf4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Lock files attached to locked blogposts


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 5778ca49
......@@ -1098,7 +1098,13 @@ abstract class ArtefactType {
array($userid, $userid)
);
if ($submitted) {
$lock = artefact_get_descendants($submitted);
$descendants = get_column_sql('
SELECT artefact
FROM {artefact_parent_cache}
WHERE parent IN (' . join(',', $submitted) . ')',
array()
);
$lock = $descendants ? array_merge($submitted, $descendants) : $submitted;
}
db_begin();
if (!empty($lock)) {
......
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