Commit 1a994aee authored by Matthias Meusburger's avatar Matthias Meusburger
Browse files

speedup Zend_Db quoteIdentifier

parent e141dfba
......@@ -48,7 +48,7 @@ require_once 'Zend/Loader.php';
*/
abstract class Zend_Db_Adapter_Abstract
{
protected static $_quoted_identifiers = [];
/**
* User-provided configuration
*
......@@ -970,8 +970,10 @@ abstract class Zend_Db_Adapter_Abstract
protected function _quoteIdentifier($value, $auto=false)
{
if ($auto === false || $this->_autoQuoteIdentifiers === true) {
if (isset(static::$_quoted_identifiers[$value]))
return static::$_quoted_identifiers[$value];
$q = $this->getQuoteIdentifierSymbol();
return ($q . str_replace("$q", "$q$q", $value) . $q);
return static::$_quoted_identifiers[$value] = ($q . str_replace("$q", "$q$q", $value) . $q);
}
return $value;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment