fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7765] API: connect to db


From: Sigurd Nes
Subject: [Fmsystem-commits] [7765] API: connect to db
Date: Fri, 30 Sep 2011 17:35:22 +0000

Revision: 7765
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7765
Author:   sigurdne
Date:     2011-09-30 17:35:22 +0000 (Fri, 30 Sep 2011)
Log Message:
-----------
API: connect to db

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.db_adodb.inc.php
    trunk/phpgwapi/inc/class.db_pdo.inc.php

Modified: trunk/phpgwapi/inc/class.db_adodb.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_adodb.inc.php   2011-09-30 14:39:39 UTC (rev 
7764)
+++ trunk/phpgwapi/inc/class.db_adodb.inc.php   2011-09-30 17:35:22 UTC (rev 
7765)
@@ -355,6 +355,11 @@
                */
                public function transaction_begin()
                {
+                       if(!$this->adodb)
+                       {
+                               $this->connect();
+                       }
+
                        $this->Transaction =  $this->adodb->StartTrans();
                        return $this->Transaction;
                }

Modified: trunk/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_pdo.inc.php     2011-09-30 14:39:39 UTC (rev 
7764)
+++ trunk/phpgwapi/inc/class.db_pdo.inc.php     2011-09-30 17:35:22 UTC (rev 
7765)
@@ -543,6 +543,11 @@
                        echo "<b>db::{$bt[0]['function']} Called from file: 
{$bt[0]['file']} line: {$bt[0]['line']}</b><br/>";
                        unset($bt);
 */
+                       if(!$this->db)
+                       {
+                               $this->connect();
+                       }
+                       
                        $this->Transaction = $this->db->beginTransaction();
                        return $this->Transaction;
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]