From 9bf3bd0cbce2176663b5fd53af22c83286241f3e Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 3 Feb 2007 04:26:10 +0000 Subject: eh? meh. git-svn-id: file:///svn/phpbb/trunk@6961 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/oracle.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'phpBB/includes/db/oracle.php') diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 9aa98ba9c8..4195bcfe52 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -113,7 +113,7 @@ class dbal_oracle extends dbal $array = array(); // We overcome Oracle's 4000 char limit by binding vars - if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/', $query, $regs)) + if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/s', $query, $regs)) { if (strlen($regs[3]) > 4000) { @@ -143,26 +143,21 @@ class dbal_oracle extends dbal preg_match_all('/(\\w++) = (\'(?:[^\']++|\'\')*+\'|\\d++)/', $data[0][2], $temp, PREG_SET_ORDER); unset($data); - $cols = array(); + $art = array(); foreach ($temp as $value) { - if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 4002) // check to see if this thing is greater than the max + 'x2 + a space + if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 4002) // check to see if this thing is greater than the max + 'x2 { - $cols[$value[1]] = ':' . strtoupper($value[1]); + $art[] = $value[1] . '=:' . strtoupper($value[1]); $array[$cols[$value[1]]] = str_replace("''", "'", substr($value[2], 1, -1)); } else { - $cols[$value[1]] = $value[2]; + $art[] = $value[1] . '=' . $value[2]; } } - $art = array(); - foreach ($cols as $col => $val) - { - $art[] = $col . '=' . $val; - } - $query = $update . implode(', ', $art) . ' ' . $where; + $query = $update . implode(', ', $art) . ' ' . $where; } } -- cgit v1.2.1