diff options
author | David M <davidmj@users.sourceforge.net> | 2007-02-03 04:26:10 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-02-03 04:26:10 +0000 |
commit | 9bf3bd0cbce2176663b5fd53af22c83286241f3e (patch) | |
tree | 2b0fdccaddbba7df6f282a44c1281bbb13e9f303 /phpBB/includes/db | |
parent | 22aa2b7c52c93c6869a8776e509da8df8d10480d (diff) | |
download | forums-9bf3bd0cbce2176663b5fd53af22c83286241f3e.tar forums-9bf3bd0cbce2176663b5fd53af22c83286241f3e.tar.gz forums-9bf3bd0cbce2176663b5fd53af22c83286241f3e.tar.bz2 forums-9bf3bd0cbce2176663b5fd53af22c83286241f3e.tar.xz forums-9bf3bd0cbce2176663b5fd53af22c83286241f3e.zip |
eh? meh.
git-svn-id: file:///svn/phpbb/trunk@6961 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/oracle.php | 17 |
1 files changed, 6 insertions, 11 deletions
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; } } |