Commit f3d7cbf7 authored by Penny Leach's avatar Penny Leach
Browse files

fix for destructor for artefact to set parent cache stuff when new

parent 8ec4c556
......@@ -250,6 +250,13 @@ abstract class ArtefactType {
$this->commit();
}
if (!empty($this->parentdirty)) {
if (!empty($this->parent) && !record_exists('artefact_parent_cache', 'aretfact', $this->id)) {
$apc = new StdClass;
$apc->artefact = $this->id;
$apc->parent = $this->parent;
$apc->dirty = 1; // set this so the cronjob will pick it up and go set all the other parents.
insert_record('artefact_parent_cache', $apc);
}
set_field_select('artefact_parent_cache', 'dirty', 1,
'artefact = ? OR parent = ?', array($this->id, $this->id));
}
......
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