fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17471] API: fix check for adodb connected


From: sigurdne
Subject: [Fmsystem-commits] [17471] API: fix check for adodb connected
Date: Tue, 26 Dec 2017 07:28:09 -0500 (EST)

Revision: 17471
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17471
Author:   sigurdne
Date:     2017-12-26 07:28:09 -0500 (Tue, 26 Dec 2017)
Log Message:
-----------
API: fix check for adodb connected

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

Modified: trunk/phpgwapi/inc/class.db_adodb.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_adodb.inc.php   2017-12-26 11:22:55 UTC (rev 
17470)
+++ trunk/phpgwapi/inc/class.db_adodb.inc.php   2017-12-26 12:28:09 UTC (rev 
17471)
@@ -244,7 +244,7 @@
                                return '';
                        }
 
-                       if ( !$this->adodb || $this->adodb->IsConnected() )
+                       if ( empty( $this->adodb ) || 
!$this->adodb->IsConnected() )
                        {
                                $this->connect();
                        }
@@ -288,7 +288,7 @@
                */
                public function query($sql, $line = '', $file = '',$exec = 
false, $fetch_single = false)
                {
-                       if ( !$this->adodb || $this->adodb->IsConnected() )
+                       if ( empty( $this->adodb ) || 
!$this->adodb->IsConnected() )
                        {
                                $this->connect();
                        }
@@ -343,7 +343,7 @@
                                $num_rows = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
                        }
                        
-                       if ( !$this->adodb || $this->adodb->IsConnected() )
+                       if ( empty( $this->adodb ) || 
!$this->adodb->IsConnected() )
                        {
                                $this->connect();
                        }
@@ -781,7 +781,7 @@
                        $this->adodb = 
newADOConnection($GLOBALS['phpgw_info']['server']['db_type']);
                        $this->adodb->NConnect($this->Host, $adminname, 
$adminpasswd);
                        
-                       if ( !$this->adodb || $this->adodb->IsConnected() )
+                       if ( empty( $this->adodb ) || 
!$this->adodb->IsConnected() )
                        {
                                echo 'Connection FAILED<br />';
                                return False;




reply via email to

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