allow to use an etag in so_sql_cf::save(), eg array("etag=etag+1")

This commit is contained in:
Ralf Becker 2009-08-10 16:32:45 +00:00
parent b400e8d880
commit 281502f36f

View File

@ -293,9 +293,12 @@ class so_sql_cf extends so_sql
*/
function save($keys=null,$extra_where=null)
{
if (is_array($keys) && count($keys)) $this->data_merge($keys);
$ret = parent::save(null,$extra_where);
if (is_array($keys) && count($keys) && !isset($keys[0])) // allow to use an etag, eg array('etag=etag+1')
{
$this->data_merge($keys);
$keys = null;
}
$ret = parent::save($keys,$extra_where);
if ($ret == 0 && $this->customfields)
{