[Vtigercrm-commits] [vtiger-commits] r4321 - in /vtigercrm/branches/4.2_postgresql_integration/adodb: adodb-lib.inc.php adodb.inc.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 20 04:44:08 EST 2006


Author: allanbush
Date: Mon Mar 20 02:44:05 2006
New Revision: 4321

Log:
Modifed adodb's debugging output routine to only output on query errors.

This is a temperary change to more easily spot database issues and should be removed before merging this branch.

Modified:
    vtigercrm/branches/4.2_postgresql_integration/adodb/adodb-lib.inc.php
    vtigercrm/branches/4.2_postgresql_integration/adodb/adodb.inc.php

Modified: vtigercrm/branches/4.2_postgresql_integration/adodb/adodb-lib.inc.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/adodb/adodb-lib.inc.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/adodb/adodb-lib.inc.php Mon Mar 20 02:44:05 2006
@@ -933,18 +933,19 @@
 	
 	$dbt = $zthis->databaseType;
 	if (isset($zthis->dsnType)) $dbt .= '-'.$zthis->dsnType;
-	if ($inBrowser) {
-		if ($ss) {
-			$ss = '<code>'.htmlspecialchars($ss).'</code>';
-		}
-		if ($zthis->debug === -1)
-			ADOConnection::outp( "<br />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<br />\n",false);
-		else 
-			ADOConnection::outp( "<hr />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<hr />\n",false);
-	} else {
-		ADOConnection::outp("-----\n($dbt): ".$sqlTxt."\n-----\n",false);
-	}
-
+/*
+		if ($inBrowser) {
+			if ($ss) {
+				$ss = '<code>'.htmlspecialchars($ss).'</code>';
+			}
+			if ($zthis->debug === -1)
+				ADOConnection::outp( "<br />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<br />\n",false);
+			else 
+				ADOConnection::outp( "<hr />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<hr />\n",false);
+		} else {
+			ADOConnection::outp("-----\n($dbt): ".$sqlTxt."\n-----\n",false);
+		}
+// */
 	$qID = $zthis->_query($sql,$inputarr);
 	
 	/* 
@@ -957,6 +958,17 @@
 			if ($err = $zthis->ErrorNo()) ADOConnection::outp($err.': '.$emsg);
 		}
 	} else if (!$qID) {
+		if ($inBrowser) {
+			if ($ss) {
+				$ss = '<code>'.htmlspecialchars($ss).'</code>';
+			}
+			if ($zthis->debug === -1)
+				ADOConnection::outp( "<br />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<br />\n",false);
+			else 
+				ADOConnection::outp( "<hr />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<hr />\n",false);
+		} else {
+			ADOConnection::outp("-----\n($dbt): ".$sqlTxt."\n-----\n",false);
+		}
 		ADOConnection::outp($zthis->ErrorNo() .': '. $zthis->ErrorMsg());
 	}
 	
@@ -1018,4 +1030,4 @@
 	return $s;
 }
 
-?>
+?>

Modified: vtigercrm/branches/4.2_postgresql_integration/adodb/adodb.inc.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/adodb/adodb.inc.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/adodb/adodb.inc.php Mon Mar 20 02:44:05 2006
@@ -747,7 +747,7 @@
 				$this->_transOK = false;
 				if ($this->debug) ADOConnection::outp("Smart Commit failed");
 			} else
-				if ($this->debug) ADOConnection::outp("Smart Commit occurred");
+				if (false) ADOConnection::outp("Smart Commit occurred");
 		} else {
 			$this->_transOK = false;
 			$this->RollbackTrans();





More information about the vtigercrm-commits mailing list