Commit e56aab83 authored by Richard Mansfield's avatar Richard Mansfield
Browse files
parents 5749db2e 21ac8b0a
......@@ -235,8 +235,11 @@ abstract class ArtefactType {
public function set($field, $value) {
if (property_exists($this, $field)) {
if ($this->{$field} != $value) {
// only set it to dirty if it's changed
$this->dirty = true;
}
$this->{$field} = $value;
$this->dirty = true;
if ($field == 'parent') {
$this->parentdirty = true;
}
......@@ -251,7 +254,6 @@ abstract class ArtefactType {
* artefact cache as dirty if necessary.
*/
public function __destruct() {
try {
if (!empty($this->dirty)) {
$this->commit();
}
......@@ -266,10 +268,6 @@ abstract class ArtefactType {
set_field_select('artefact_parent_cache', 'dirty', 1,
'artefact = ? OR parent = ?', array($this->id, $this->id));
}
}
catch (Exception $e) {
log_warn($e->GetMessage());
}
}
public function is_container() {
......
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