From 539853d5e4c8b0c90b6eb5aa1736d84e8b48a36a Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 24 May 2008 19:11:33 +0000 Subject: [PATCH] refactorings --- lib/Doctrine/Connection.php | 2 +- lib/Doctrine/Connection/Mock.php | 5 +++++ lib/Doctrine/Formatter.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Connection.php b/lib/Doctrine/Connection.php index a287f0db3..a3fd61719 100644 --- a/lib/Doctrine/Connection.php +++ b/lib/Doctrine/Connection.php @@ -619,7 +619,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun */ public function quote($input, $type = null) { - return $this->formatter->quote($input, $type); + return $this->dbh->quote($input, $type); } /** diff --git a/lib/Doctrine/Connection/Mock.php b/lib/Doctrine/Connection/Mock.php index 775f0b25a..fd8ab4cb4 100644 --- a/lib/Doctrine/Connection/Mock.php +++ b/lib/Doctrine/Connection/Mock.php @@ -47,5 +47,10 @@ class Doctrine_Connection_Mock extends Doctrine_Connection_Common public function __construct() { + } + + public function quote($input) + { + return $input; } } \ No newline at end of file diff --git a/lib/Doctrine/Formatter.php b/lib/Doctrine/Formatter.php index 6a029ae7d..634ebbdbe 100644 --- a/lib/Doctrine/Formatter.php +++ b/lib/Doctrine/Formatter.php @@ -168,7 +168,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module case 'gzip': case 'blob': case 'clob': - return $this->conn->getDbh()->quote($input); + return $this->conn->quote($input); } }