"fixed not working install (segfault) caused by account creation in sitemgr's default_records and the new uid code in addressbook_sql::save() going into an invinit recureing, because so_sql::update calls $this->save() instead of self::save()"

This commit is contained in:
Ralf Becker 2008-06-18 19:56:26 +00:00
parent 40c143c843
commit b89e7b46a1

View File

@ -563,7 +563,7 @@ class so_sql
} }
$this->init($fields); $this->init($fields);
$ret = $this->save(); $ret = self::save();
if ($merge) if ($merge)
{ {
@ -665,7 +665,7 @@ class so_sql
if ($criteria[$col][0] == '!') if ($criteria[$col][0] == '!')
{ {
$cmp_op = ' NOT'.$cmp_op; $cmp_op = ' NOT'.$cmp_op;
$criteria[$col] = substr($criteria[$col],1); $criteria[$col] = '('.substr($criteria[$col],1).' OR '.$criteria[$col].' IS NULL)';
$negate = true; $negate = true;
} }
$query[] = ($negate ? ' ('.$db_col.' IS NULL OR ' : '').$db_col.$cmp_op.$this->db->quote($wildcard.str_replace(array('%','_','*','?'),array('\\%','\\_','%','_'),$criteria[$col]).$wildcard).($negate ? ') ' : ''); $query[] = ($negate ? ' ('.$db_col.' IS NULL OR ' : '').$db_col.$cmp_op.$this->db->quote($wildcard.str_replace(array('%','_','*','?'),array('\\%','\\_','%','_'),$criteria[$col]).$wildcard).($negate ? ') ' : '');