[Vtigercrm-commits] [vtiger-commits] r4421 - /vtigercrm/trunk/include/database/PearDatabase.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Mar 24 07:13:23 EST 2006
Author: saraj
Date: Fri Mar 24 05:13:13 2006
New Revision: 4421
Log:
vtiger log has been removed
Modified:
vtigercrm/trunk/include/database/PearDatabase.php
Modified: vtigercrm/trunk/include/database/PearDatabase.php
==============================================================================
--- vtigercrm/trunk/include/database/PearDatabase.php (original)
+++ vtigercrm/trunk/include/database/PearDatabase.php Fri Mar 24 05:13:13 2006
@@ -17,9 +17,7 @@
include('adodb/adodb.inc.php');
require_once("adodb/adodb-xmlschema.inc.php");
-require_once('vtigerlogger.php');
-global $vtlog;
-$vtlog = new vtigerLogger();
+$log =& LoggerManager::getLogger('VT');
class PearDatabase{
var $database = null;
@@ -185,7 +183,7 @@
* Contributor(s): ______________________________________..
*/
function checkConnection(){
-global $vtlog;
+global $log;
if(!isset($this->database))
{
$this->println("TRANS creating new connection");
@@ -202,7 +200,7 @@
else
{
// $this->println("checkconnect using old connection");
- $vtlog->logthis('checkconnect using old connection','info');
+ $log->info('checkconnect using old connection');
}
}
@@ -227,9 +225,9 @@
function query($sql, $dieOnError=false, $msg='')
{
- global $vtlog;
+ global $log;
//$this->println("ADODB query ".$sql);
- $vtlog->logthis('query being executed : '.$sql,'debug');
+ $log->debug('query being executed : '.$sql);
$this->checkConnection();
$result = & $this->database->Execute($sql);
$this->lastmysqlrow = -1;
@@ -282,9 +280,9 @@
function limitQuery($sql,$start,$count, $dieOnError=false, $msg='')
{
- global $vtlog;
+ global $log;
//$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count);
- $vtlog->logthis(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count,'debug');
+ $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count);
$this->checkConnection();
$result =& $this->database->SelectLimit($sql,$count,$start);
if(!$result) $this->checkError($msg.' Limit Query Failed:' . $sql . '::', $dieOnError);
@@ -397,12 +395,12 @@
*/
function getRowCount(&$result){
- global $vtlog;
+ global $log;
//$this->println("ADODB getRowCount");
if(isset($result) && !empty($result))
$rows= $result->RecordCount();
//$this->println("ADODB getRowCount rows=".$rows);
- $vtlog->logthis('getRowCount rows= '.$rows,'debug');
+ $log->debug('getRowCount rows= '.$rows);
return $rows;
}
@@ -459,12 +457,12 @@
}*/
function getAffectedRowCount(&$result){
- global $vtlog;
+ global $log;
// $this->println("ADODB getAffectedRowCount");
- $vtlog->logthis('getAffectedRowCount','debug');
+ $log->debug('getAffectedRowCount');
$rows =$this->database->Affected_Rows();
// $this->println("ADODB getAffectedRowCount rows=".rows);
- $vtlog->logthis('getAffectedRowCount rows = '.$rows,'debug');
+ $log->debug('getAffectedRowCount rows = '.$rows);
return $rows;
}
@@ -574,10 +572,10 @@
*/
function getNextRow(&$result, $encode=true){
- global $vtlog;
+ global $log;
//$this->println("ADODB getNextRow");
- $vtlog->logthis('getNextRow','info');
+ $log->info('getNextRow');
if(isset($result)){
$row = $this->change_key_case($result->FetchRow());
if($row && $encode&& is_array($row))return array_map('to_html', $row);
More information about the vtigercrm-commits
mailing list