Commit ab4302ad authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon
Browse files

Add the method update_artefact_references() to HTML artefact (Note)



Bug 1390833

This will update all attachments to the artefact

Change-Id: Idc06d5ce35b2427575b44d53f4aa56dfc7b01cf8
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent c91bac68
......@@ -904,4 +904,16 @@ class ArtefactTypeHtml extends ArtefactType {
public static function is_allowed_in_progressbar() {
return false;
}
public function update_artefact_references(&$view, &$template, &$artefactcopies, $oldid) {
parent::update_artefact_references($view, $template, $artefactcopies, $oldid);
// Attach copies of the files that were attached to the old note.
if (isset($artefactcopies[$oldid]->oldattachments)) {
foreach ($artefactcopies[$oldid]->oldattachments as $a) {
if (isset($artefactcopies[$a])) {
$this->attach($artefactcopies[$a]->newid);
}
}
}
}
}
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