Commit 21ac8b0a authored by Penny Leach's avatar Penny Leach
Browse files

removed some debug code, only set dirty flag if something has actually

changed in artefact set
parent e1c3c0d8
......@@ -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