From eedfb40e761bce821c4e06d149e0cc084c591a00 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 19 Nov 2006 14:35:19 +0000 Subject: [PATCH] Module constructor no longed needs Connection object --- lib/Doctrine/Connection/Module.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Connection/Module.php b/lib/Doctrine/Connection/Module.php index 94c51ccb6..514157f28 100644 --- a/lib/Doctrine/Connection/Module.php +++ b/lib/Doctrine/Connection/Module.php @@ -43,7 +43,10 @@ class Doctrine_Connection_Module { * @param Doctrine_Connection $conn Doctrine_Connection object, every connection * module holds an instance of Doctrine_Connection */ - public function __construct(Doctrine_Connection $conn) { + public function __construct($conn = null) { + if( ! ($conn instanceof Doctrine_Connection)) + $conn = Doctrine_Manager::getInstance()->getCurrentConnection(); + $this->conn = $conn; $e = explode('_', get_class($this));