CustomVariables: fix method calls

This commit is contained in:
Thomas Gelf 2015-06-24 09:43:48 +02:00
parent a2790652ec
commit ac5bfd32f3

View File

@ -136,14 +136,14 @@ class CustomVariables implements Iterator, Countable, IcingaConfigRenderer
} }
$where = $db->quoteInto(sprintf('%s = ?', $foreignColumn), $foreignId) $where = $db->quoteInto(sprintf('%s = ?', $foreignColumn), $foreignId)
. $this->quoteInto(' AND varname = ?', $var->getKey()); . $db->quoteInto(' AND varname = ?', $var->getKey());
if ($var->hasBeenDeleted()) { if ($var->hasBeenDeleted()) {
$db->delete($table, $where); $db->delete($table, $where);
} elseif ($var->hasBeenModified()) { } elseif ($var->hasBeenModified()) {
$db->update( $db->update(
$table, $table,
array('varvalue' => $var->getValueForDb()), array('varvalue' => $var->getDbValue()),
$where $where
); );
} }