cvs: pear /Perm_LiveUser/Auth/Container MDB.php MDB2.php /Perm_LiveUser/Perm/Container MDB2_Simple.php MDB_Simple.php
| From: | Lukas Smith | Date: | Fri, 12 Mar 2004 15:29:38 +0000 |
| Subject: | cvs: pear /Perm_LiveUser/Auth/Container MDB.php MDB2.php /Perm_LiveUser/Perm/Container MDB2_Simple.php MDB_Simple.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17344@lists.php.net to get a copy of this message | ||
lsmith Fri Mar 12 10:29:38 2004 EDT
Modified files:
/pear/Perm_LiveUser/Perm/Container MDB_Simple.php MDB2_Simple.php
/pear/Perm_LiveUser/Auth/Container MDB2.php MDB.php
Log:
- only disconnect when using the connect method (not when using the singleton method)
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Perm/Container/MDB_Simple.php?r1=1.15&r2=1.16&ty=u
Index: pear/Perm_LiveUser/Perm/Container/MDB_Simple.php
diff -u pear/Perm_LiveUser/Perm/Container/MDB_Simple.php:1.15
pear/Perm_LiveUser/Perm/Container/MDB_Simple.php:1.16
--- pear/Perm_LiveUser/Perm/Container/MDB_Simple.php:1.15 Mon Mar 8 14:55:29 2004
+++ pear/Perm_LiveUser/Perm/Container/MDB_Simple.php Fri Mar 12 10:29:37 2004
@@ -40,13 +40,20 @@
* - userrights
*
* @author Björn Kraus <krausbn@php.net>
- * @version $Id: MDB_Simple.php,v 1.15 2004/03/08 19:55:29 lsmith Exp $
+ * @version $Id: MDB_Simple.php,v 1.16 2004/03/12 15:29:37 lsmith Exp $
* @package LiveUser
* @category authentication
*/
class LiveUser_Perm_Container_MDB_Simple extends LiveUser_Perm_Common
{
/**
+ * dsn that was connected to
+ * @var object
+ * @access private
+ */
+ var $dsn = null;
+
+ /**
* PEAR::MDB connection object.
*
* @var object
@@ -104,6 +111,7 @@
$this->dbc =& MDB::singleton($connectOptions['dsn'],
array('optimize' => 'portability'));
break;
default:
+ $this->dsn = $connectOptions['dsn'];
$this->dbc =& MDB::connect($connectOptions['dsn'],
array('optimize' => 'portability'));
break;
}
@@ -157,8 +165,10 @@
*/
function disconnect()
{
- $this->dbc->disconnect();
- $this->dbc = null;
+ if ($this->dsn) {
+ $this->dbc->disconnect();
+ $this->dbc = null;
+ }
}
/**
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Perm/Container/MDB2_Simple.php?r1=1.5&r2=1.6&ty=u
Index: pear/Perm_LiveUser/Perm/Container/MDB2_Simple.php
diff -u pear/Perm_LiveUser/Perm/Container/MDB2_Simple.php:1.5
pear/Perm_LiveUser/Perm/Container/MDB2_Simple.php:1.6
--- pear/Perm_LiveUser/Perm/Container/MDB2_Simple.php:1.5 Mon Mar 8 14:55:29 2004
+++ pear/Perm_LiveUser/Perm/Container/MDB2_Simple.php Fri Mar 12 10:29:37 2004
@@ -40,13 +40,20 @@
* - userrights
*
* @author Björn Kraus <krausbn@php.net>
- * @version $Id: MDB2_Simple.php,v 1.5 2004/03/08 19:55:29 lsmith Exp $
+ * @version $Id: MDB2_Simple.php,v 1.6 2004/03/12 15:29:37 lsmith Exp $
* @package LiveUser
* @category authentication
*/
class LiveUser_Perm_Container_MDB2_Simple extends LiveUser_Perm_Common
{
/**
+ * dsn that was connected to
+ * @var object
+ * @access private
+ */
+ var $dsn = null;
+
+ /**
* PEAR::MDB2 connection object.
*
* @var object
@@ -104,6 +111,7 @@
$this->dbc =& MDB2::singleton($connectOptions['dsn'],
array('portability' => MDB2_PORTABILITY_ALL));
break;
default:
+ $this->dsn = $connectOptions['dsn'];
$this->dbc =& MDB2::connect($connectOptions['dsn'],
array('portability' => MDB2_PORTABILITY_ALL));
break;
}
@@ -157,8 +165,10 @@
*/
function disconnect()
{
- $this->dbc->disconnect();
- $this->dbc = null;
+ if ($this->dsn) {
+ $this->dbc->disconnect();
+ $this->dbc = null;
+ }
}
/**
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Auth/Container/MDB2.php?r1=1.2&r2=1.3&ty=u
Index: pear/Perm_LiveUser/Auth/Container/MDB2.php
diff -u pear/Perm_LiveUser/Auth/Container/MDB2.php:1.2
pear/Perm_LiveUser/Auth/Container/MDB2.php:1.3
--- pear/Perm_LiveUser/Auth/Container/MDB2.php:1.2 Mon Mar 1 15:54:04 2004
+++ pear/Perm_LiveUser/Auth/Container/MDB2.php Fri Mar 12 10:29:38 2004
@@ -48,13 +48,20 @@
* 'allowDuplicateHandles' => 1);
*
* @author Markus Wolff <wolff@21st.de>
- * @version $Id: MDB2.php,v 1.2 2004/03/01 20:54:04 lsmith Exp $
+ * @version $Id: MDB2.php,v 1.3 2004/03/12 15:29:38 lsmith Exp $
* @package LiveUser
* @category authentication
*/
class LiveUser_Auth_Container_MDB2 extends LiveUser_Auth_Common
{
/**
+ * dsn that was connected to
+ * @var object
+ * @access private
+ */
+ var $dsn = null;
+
+ /**
* PEAR::MDB2 connection object
* @var object
* @access private
@@ -112,6 +119,7 @@
$this->dbc =& MDB2::singleton($connectOptions['dsn'],
array('portability' => MDB2_PORTABILITY_ALL));
break;
default:
+ $this->dsn = $connectOptions['dsn'];
$this->dbc =& MDB2::connect($connectOptions['dsn'],
array('portability' => MDB2_PORTABILITY_ALL));
break;
}
@@ -130,8 +138,10 @@
*/
function disconnect()
{
- $this->dbc->disconnect();
- $this->dbc = null;
+ if ($this->dsn) {
+ $this->dbc->disconnect();
+ $this->dbc = null;
+ }
}
/**
http://cvs.php.net/diff.php/pear/Perm_LiveUser/Auth/Container/MDB.php?r1=1.24&r2=1.25&ty=u
Index: pear/Perm_LiveUser/Auth/Container/MDB.php
diff -u pear/Perm_LiveUser/Auth/Container/MDB.php:1.24
pear/Perm_LiveUser/Auth/Container/MDB.php:1.25
--- pear/Perm_LiveUser/Auth/Container/MDB.php:1.24 Mon Mar 1 15:54:04 2004
+++ pear/Perm_LiveUser/Auth/Container/MDB.php Fri Mar 12 10:29:38 2004
@@ -48,13 +48,27 @@
* 'allowDuplicateHandles' => 1);
*
* @author Markus Wolff <wolff@21st.de>
- * @version $Id: MDB.php,v 1.24 2004/03/01 20:54:04 lsmith Exp $
+ * @version $Id: MDB.php,v 1.25 2004/03/12 15:29:38 lsmith Exp $
* @package LiveUser
* @category authentication
*/
class LiveUser_Auth_Container_MDB extends LiveUser_Auth_Common
{
/**
+ * dsn that was connected to
+ * @var object
+ * @access private
+ */
+ var $dsn = null;
+
+ /**
+ * dsn that was connected to
+ * @var object
+ * @access private
+ */
+ var $dsn = null;
+
+ /**
* PEAR::MDB connection object
* @var object
* @access private
@@ -112,6 +126,7 @@
$this->dbc =& MDB::singleton($connectOptions['dsn'],
array('optimize' => 'portability'));
break;
default:
+ $this->dsn = $connectOptions['dsn'];
$this->dbc =& MDB::connect($connectOptions['dsn'],
array('optimize' => 'portability'));
break;
}
@@ -130,8 +145,10 @@
*/
function disconnect()
{
- $this->dbc->disconnect();
- $this->dbc = null;
+ if ($this->dsn) {
+ $this->dbc->disconnect();
+ $this->dbc = null;
+ }
}
/**