From: Meik S. <acy...@ph...> - 2009-08-01 16:08:24
|
Author: acydburn Date: Sat Aug 1 17:08:05 2009 New Revision: 9909 Log: return errors if return_on_error is true for multi_insert (Patch by bantu) Modified: branches/phpBB-3_0_0/phpBB/includes/db/dbal.php Modified: branches/phpBB-3_0_0/phpBB/includes/db/dbal.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/db/dbal.php (original) --- branches/phpBB-3_0_0/phpBB/includes/db/dbal.php Sat Aug 1 17:08:05 2009 *************** *** 447,453 **** $ary[] = '(' . implode(', ', $values) . ')'; } ! $this->sql_query('INSERT INTO ' . $table . ' ' . ' (' . implode(', ', array_keys($sql_ary[0])) . ') VALUES ' . implode(', ', $ary)); } else { --- 447,453 ---- $ary[] = '(' . implode(', ', $values) . ')'; } ! return $this->sql_query('INSERT INTO ' . $table . ' ' . ' (' . implode(', ', array_keys($sql_ary[0])) . ') VALUES ' . implode(', ', $ary)); } else { *************** *** 458,464 **** return false; } ! $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('INSERT', $ary)); } } --- 458,469 ---- return false; } ! $result = $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('INSERT', $ary)); ! ! if (!$result) ! { ! return false; ! } } } |