phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.db.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.db.inc.php
Date: Fri, 22 Sep 2006 03:00:33 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/09/22 03:00:33

Modified files:
        inc            : class.db.inc.php 

Log message:
        code cleanup and use new error handler

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.db.inc.php?cvsroot=phpgwapi&r1=1.30&r2=1.31

Patches:
Index: class.db.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.db.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- class.db.inc.php    3 Sep 2006 06:15:27 -0000       1.30
+++ class.db.inc.php    22 Sep 2006 03:00:33 -0000      1.31
@@ -9,7 +9,7 @@
        * @link http://www.sanisoft.com/phplib/manual/DB_sql.php
        * @package phpgwapi
        * @subpackage database
-       * @version $Id: class.db.inc.php,v 1.30 2006/09/03 06:15:27 skwashd Exp 
$
+       * @version $Id: class.db.inc.php,v 1.31 2006/09/22 03:00:33 skwashd Exp 
$
        */
 
        if (empty($GLOBALS['phpgw_info']['server']['db_type']))
@@ -158,7 +158,6 @@
                        if($this->debug)
                        {
                                // $GLOBALS['phpgw']->log
-                               //echo 'disconnect: depricated';
                        }
                        $this->adodb->close();
                }
@@ -194,7 +193,6 @@
                        if($this->debug)
                        {
                                // $GLOBALS['phpgw']->log
-                               //echo 'to_timestanp: depricated';
                        }
                        return substr($this->adodb->DBTimeStamp($epoch), 1, -1);
                }
@@ -210,7 +208,6 @@
                        if($this->debug)
                        {
                                //$GLOBALS['phpgw']->log
-                               //echo 'from_timestanp: depricated';
                        }
                        return $this->adodb->UnixTimeStamp($timestamp);
                }
@@ -226,7 +223,6 @@
                        if($this->debug)
                        {
                                //$GLOBALS['phpgw']->log
-                               //echo 'depricated: limit';
                        }
                        die('where is the sql string?');
                }
@@ -236,7 +232,6 @@
                */
                function free()
                {
-                       //if($this->debug) /* $GLOBALS['phpgw']->log */ //echo 
"depricated: limit";
                        unset($this->resultSet);
                        return true;
                }
@@ -251,7 +246,6 @@
                */
                function query($Query_String, $line = '', $file = '')
                {
-                       //if($this->debug) /* $GLOBALS['phpgw']->log */ //echo 
"query: depricated: $Query_String <br>";
                        if(!$this->adodb->isConnected())
                        {
                                $this->connect();
@@ -259,10 +253,7 @@
                        $this->resultSet = $this->adodb->Execute($Query_String);
                        if(!$this->resultSet && $this->Halt_On_Error == 'yes')
                        {
-                               echo $Query_String.'<br>';
-                               echo $this->adodb->ErrorMsg();
-                               _debug_array(debug_backtrace());
-                               die();
+                               trigger_error("$Query_String\n" . 
$this->adodb->ErrorMsg(), E_USER_ERROR);
                        }
                        else
                        {
@@ -288,11 +279,6 @@
                                $num_rows = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
                        }
                        
-                       if($this->debug)
-                       {
-                               //$GLOBALS['phpgw']->log
-                               //echo 'depricated: limit_query';
-                       }
                        if(!$this->adodb->isConnected())
                        {
                                $this->connect();
@@ -301,10 +287,7 @@
                        $this->resultSet = 
$this->adodb->SelectLimit($Query_String, $num_rows, $offset);
                        if(!$this->resultSet && $this->Halt_On_Error == 'yes')
                        {
-                               //echo "$Query_String<br>";
-                               print $this->adodb->ErrorMsg();
-                               _debug_array(debug_backtrace());
-                               die();
+                               trigger_error("$Query_String\n" . 
$this->adodb->ErrorMsg(), E_USER_ERROR);
                        }
                        else
                        {
@@ -320,7 +303,6 @@
                */
                function next_record()
                {
-                       //if($this->debug) /* $GLOBALS['phpgw']->log */ //echo 
"depricated: next_record<br>";
                        if($this->resultSet && $this->resultSet->RecordCount())
                        {
                                if($this->delayPointer)
@@ -348,7 +330,6 @@
                */
                function seek($pos = 0)
                {
-                       //if($this->debug) /* $GLOBALS['phpgw']->log */ //echo 
"depricated: seek";
                        if($this->resultSet)
                        {
                                return $this->resultSet->Move($pos);
@@ -408,7 +389,6 @@
                */
                function lock($table, $mode='write')
                {
-                       //echo "depricated: lock";
                        //$this->adodb->BeginTrans();
                }
                
@@ -420,7 +400,6 @@
                */
                function unlock()
                {
-                       //echo "depricated: unlock";
                        //$this->adodb->CommitTrans();
                }
                
@@ -539,7 +518,6 @@
                */
                function nf()
                {
-                       //echo "depricated: nf";
                        return $this->num_rows();
                }
 
@@ -548,7 +526,6 @@
                */
                function np()
                {
-                       //echo "depricated: np";
                        print $this->num_rows();
                }
 
@@ -671,11 +648,6 @@
                */
                function table_names()
                {
-                       if($this->debug)
-                       {
-                               //echo "depricated: table_names";
-                       }
-                       
                        if(!$this->adodb->IsConnected())
                        {
                                $this->connect();




reply via email to

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