ImportSourceHook: add failsafe getSetting method

This commit is contained in:
Thomas Gelf 2015-12-03 00:39:46 +01:00
parent 5144b8bfed
commit a7f11f7702
2 changed files with 8 additions and 1 deletions

View File

@ -301,7 +301,6 @@ class Sync
if ($object->hasBeenModified()) {
$object->store($db);
}
}
$dba->commit();

View File

@ -64,6 +64,14 @@ abstract class ImportSourceHook
return $this;
}
public function getSetting($name, $default = null) {
if (array_key_exists($name, $this->settings)) {
return $this->settings[$name];
} else {
return $default;
}
}
/**
* Returns an array containing importable objects
*