[limb-svn] r6424 - in 3.x/trunk/limb/dbal/src: . drivers/mysql drivers/oci drivers/pgsql
svn at limb-project.com
svn at limb-project.com
Tue Oct 16 12:12:07 MSD 2007
Author: serega
Date: 2007-10-16 12:12:07 +0400 (Tue, 16 Oct 2007)
New Revision: 6424
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6424
Modified:
3.x/trunk/limb/dbal/src/drivers/mysql/lmbMysqlConnection.class.php
3.x/trunk/limb/dbal/src/drivers/oci/lmbOciConnection.class.php
3.x/trunk/limb/dbal/src/drivers/pgsql/lmbPgsqlConnection.class.php
3.x/trunk/limb/dbal/src/lmbDbDSN.class.php
Log:
-- minor fixes in connection classes and in lmbDbDSN due to recent lmbObject changes
Modified: 3.x/trunk/limb/dbal/src/drivers/mysql/lmbMysqlConnection.class.php
===================================================================
--- 3.x/trunk/limb/dbal/src/drivers/mysql/lmbMysqlConnection.class.php 2007-10-16 07:49:09 UTC (rev 6423)
+++ 3.x/trunk/limb/dbal/src/drivers/mysql/lmbMysqlConnection.class.php 2007-10-16 08:12:07 UTC (rev 6424)
@@ -2,9 +2,9 @@
/*
* Limb PHP Framework
*
- * @link http://limb-project.com
+ * @link http://limb-project.com
* @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
lmb_require('limb/dbal/src/drivers/lmbDbConnection.interface.php');
@@ -68,7 +68,7 @@
$this->_raiseError();
}
- if($charset = $this->config['charset'])
+ if(isset($this->config['charset']) && $charset = $this->config['charset'])
{
mysql_query("SET NAMES '$charset'", $this->connectionId);
}
Modified: 3.x/trunk/limb/dbal/src/drivers/oci/lmbOciConnection.class.php
===================================================================
--- 3.x/trunk/limb/dbal/src/drivers/oci/lmbOciConnection.class.php 2007-10-16 07:49:09 UTC (rev 6423)
+++ 3.x/trunk/limb/dbal/src/drivers/oci/lmbOciConnection.class.php 2007-10-16 08:12:07 UTC (rev 6424)
@@ -2,9 +2,9 @@
/*
* Limb PHP Framework
*
- * @link http://limb-project.com
+ * @link http://limb-project.com
* @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
lmb_require('limb/dbal/src/exception/lmbDbException.class.php');
lmb_require('limb/dbal/src/drivers/lmbDbConnection.interface.php');
@@ -66,8 +66,8 @@
$hostspec = $this->config->get('host');
$port = $this->config->get('port');
$db = $this->config->get('database');
- $persistent = $this->config->get('persistent');
- $charset = $this->config->get('charset');
+ $persistent = isset($this->config['persistent']) ? $this->config['persistent'] : null;
+ $charset = isset($this->config['charset']) ? $this->config['charset'] : null;
$connect_function = $persistent ? 'oci_pconnect' : 'oci_connect';
Modified: 3.x/trunk/limb/dbal/src/drivers/pgsql/lmbPgsqlConnection.class.php
===================================================================
--- 3.x/trunk/limb/dbal/src/drivers/pgsql/lmbPgsqlConnection.class.php 2007-10-16 07:49:09 UTC (rev 6423)
+++ 3.x/trunk/limb/dbal/src/drivers/pgsql/lmbPgsqlConnection.class.php 2007-10-16 08:12:07 UTC (rev 6424)
@@ -2,9 +2,9 @@
/*
* Limb PHP Framework
*
- * @link http://limb-project.com
+ * @link http://limb-project.com
* @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
lmb_require('limb/dbal/src/drivers/lmbDbConnection.interface.php');
lmb_require(dirname(__FILE__) . '/lmbPgsqlQueryStatement.class.php');
@@ -55,7 +55,7 @@
global $php_errormsg;
- $persistent = $this->config['persistent'];
+ $persistent = isset($this->config['persistent']) ? $this->config['persistent'] : null;
$connstr = '';
@@ -94,7 +94,7 @@
$this->_raiseError($php_errormsg);
}
- if($charset = $this->config['charset'])
+ if(isset($this->config['charset']) && ($charset = $this->config['charset']))
{
pg_set_client_encoding($conn, $charset);
}
Modified: 3.x/trunk/limb/dbal/src/lmbDbDSN.class.php
===================================================================
--- 3.x/trunk/limb/dbal/src/lmbDbDSN.class.php 2007-10-16 07:49:09 UTC (rev 6423)
+++ 3.x/trunk/limb/dbal/src/lmbDbDSN.class.php 2007-10-16 08:12:07 UTC (rev 6424)
@@ -2,9 +2,9 @@
/*
* Limb PHP Framework
*
- * @link http://limb-project.com
+ * @link http://limb-project.com
* @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
lmb_require('limb/net/src/lmbUri.class.php');
lmb_require('limb/core/src/lmbObject.class.php');
@@ -34,6 +34,9 @@
}
elseif(is_string($args))
$this->_parseUri($args);
+
+ foreach($this->extra as $key => $value)
+ $this->$key = $value;
}
function _parseUri($str)
@@ -76,17 +79,6 @@
return $this->uri;
}
- protected function _getRaw($name)
- {
- $value = parent :: _getRaw($name);
-
- if(isset($value))
- return $value;
-
- if(isset($this->extra[$name]))
- return $this->extra[$name];
- }
-
function toString()
{
return $this->_getUri()->toString();
More information about the limb-svn
mailing list