cvs: pear /LiveUser_Admin/Storage SQL.php
| From: | Lukas Smith | Date: | Tue, 07 Jun 2005 13:07:20 +0000 |
| Subject: | cvs: pear /LiveUser_Admin/Storage SQL.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-32404@lists.php.net to get a copy of this message | ||
lsmith Tue Jun 7 09:07:20 2005 EDT
Modified files:
/pear/LiveUser_Admin/Storage SQL.php
Log:
- moved table, fields and alias propertiers to Storage.php
- added universal implementation of disconnect
http://cvs.php.net/diff.php/pear/LiveUser_Admin/Storage/SQL.php?r1=1.30&r2=1.31&ty=u
Index: pear/LiveUser_Admin/Storage/SQL.php
diff -u pear/LiveUser_Admin/Storage/SQL.php:1.30 pear/LiveUser_Admin/Storage/SQL.php:1.31
--- pear/LiveUser_Admin/Storage/SQL.php:1.30 Tue Jun 7 06:05:51 2005
+++ pear/LiveUser_Admin/Storage/SQL.php Tue Jun 7 09:07:20 2005
@@ -57,7 +57,7 @@
* @author Bjoern Kraus <krausbn@php.net>
* @copyright 2002-2005 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
- * @version CVS: $Id: SQL.php,v 1.30 2005/06/07 10:05:51 lsmith Exp $
+ * @version CVS: $Id: SQL.php,v 1.31 2005/06/07 13:07:20 lsmith Exp $
* @link http://pear.php.net/LiveUser_Admin
*/
@@ -115,30 +115,6 @@
var $prefix = 'liveuser_';
/**
- * Table configuration
- *
- * @var array
- * @access public
- */
- var $tables = array();
-
- /**
- * All fields with their types
- *
- * @var array
- * @access public
- */
- var $fields = array();
-
- /**
- * All fields with their alias
- *
- * @var array
- * @access public
- */
- var $alias = array();
-
- /**
* Insert data into a table
*
*
@@ -827,15 +803,26 @@
}
/**
- * properly disconnect from resources
+ * Properly disconnect from database
*
* @return void
*
- * @access public
+ * @access public
*/
function disconnect()
{
- $this->disconnect();
+ if ($this->dsn) {
+ $result = $this->dbc->disconnect();
+ if (PEAR::isError($result)) {
+ $this->_stack->push(
+ LIVEUSER_ERROR, 'exception',
+ array('reason' => $result->getMessage() . '-' .
$result->getUserInfo())
+ );
+ return false;
+ }
+ $this->dbc = null;
+ }
+ return true;
}
}
?>