cvs: pear /MDB2 MDB2.php

From: Date: Wed, 25 Oct 2006 15:37:08 +0000
Subject: cvs: pear /MDB2 MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42816@lists.php.net to get a copy of this message
quipo Wed Oct 25 15:37:08 2006 UTC Modified files: /pear/MDB2 MDB2.php Log: also use _skipDelimitedStrings() in the base class http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2.php?r1=1.273&r2=1.274&diff_format=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.273 pear/MDB2/MDB2.php:1.274 --- pear/MDB2/MDB2.php:1.273 Wed Oct 25 14:25:17 2006 +++ pear/MDB2/MDB2.php Wed Oct 25 15:37:07 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.273 2006/10/25 14:25:17 quipo Exp $ +// $Id: MDB2.php,v 1.274 2006/10/25 15:37:07 quipo Exp $ // /** @@ -2872,25 +2872,16 @@ if (is_null($placeholder_type)) { $placeholder_type_guess = $query[$p_position]; } - // skip any delimited strings - foreach ($ignores as $ignore) { - if (is_int($start_quote = strpos($query, $ignore['start'], $position)) && $start_quote < $p_position) { - $end_quote = $start_quote; - do { - if (!is_int($end_quote = strpos($query, $ignore['end'], $end_quote + 1))) { - if ($ignore['end'] === "\n") { - $end_quote = strlen($query) - 1; - } else { - $err =& $this->raiseError(MDB2_ERROR_SYNTAX, null, null, - 'query with an unterminated text string specified', __FUNCTION__); - return $err; - } - } - } while ($ignore['escape'] && $query[($end_quote - 1)] == $ignore['escape']); - $position = $end_quote + 1; - continue(2); - } + + $new_pos = $this->_skipDelimitedStrings($query, $position, $p_position); + if (PEAR::isError($new_pos)) { + return $new_pos; + } + if ($new_pos != $position) { + $position = $new_pos; + continue; //evaluate again starting from the new position } + if ($query[$position] == $placeholder_type_guess) { if (is_null($placeholder_type)) { $placeholder_type = $query[$p_position];

« previous php.pear.cvs (#42816) next »