[limb-svn] r6004 - 3.x/trunk/limb/dbal/src/drivers/sqlite

svn at limb-project.com svn at limb-project.com
Wed Jun 20 01:12:16 MSD 2007


Author: pachanga
Date: 2007-06-20 01:12:16 +0400 (Wed, 20 Jun 2007)
New Revision: 6004
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6004

Modified:
   3.x/trunk/limb/dbal/src/drivers/sqlite/lmbSqliteConnection.class.php
Log:
-- connection error recursion fixed

Modified: 3.x/trunk/limb/dbal/src/drivers/sqlite/lmbSqliteConnection.class.php
===================================================================
--- 3.x/trunk/limb/dbal/src/drivers/sqlite/lmbSqliteConnection.class.php	2007-06-19 21:11:23 UTC (rev 6003)
+++ 3.x/trunk/limb/dbal/src/drivers/sqlite/lmbSqliteConnection.class.php	2007-06-19 21:12:16 UTC (rev 6004)
@@ -54,7 +54,7 @@
 
   function connect()
   {
-    $this->connectionId = sqlite_open($this->config['database']);
+    $this->connectionId = sqlite_open($this->config['database'], 0666, $error);
 
     if($this->connectionId === false)
       $this->_raiseError();
@@ -76,10 +76,10 @@
 
   function _raiseError($sql = null)
   {
-    if(!$this->getConnectionId())
+    if(!$this->connectionId)
       throw new lmbDbException('Could not connect to database "' . $this->config['database'] . '"');
 
-    $errno = sqlite_last_error($this->getConnectionId());
+    $errno = sqlite_last_error($this->connectionId);
 
     $info = array('driver' => 'sqlite');
     $info['errorno'] = $errno;
@@ -177,4 +177,4 @@
   }
 }
 
-?>
\ No newline at end of file
+?>



More information about the limb-svn mailing list