alecpl
2011-05-27 f5a55bf173be2378db79860ced8486374971e72f
- Make debug handler to be a method of rcube_mdb2


1 files modified
11 ■■■■ changed files
program/include/rcube_mdb2.php 11 ●●●● patch | view | raw | blame | history
program/include/rcube_mdb2.php
@@ -84,7 +84,7 @@
            'persistent'       => $this->db_pconn,
            'emulate_prepared' => $this->debug_mode,
            'debug'            => $this->debug_mode,
            'debug_handler'    => 'mdb2_debug_handler',
            'debug_handler'    => array($this, 'debug_handler'),
            'portability'      => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL);
        if ($this->db_provider == 'pgsql') {
@@ -787,11 +787,11 @@
            'md5', 'rcube_sqlite_md5');
    }
}  // end class rcube_db
/* this is our own debug handler for the MDB2 connection */
function mdb2_debug_handler(&$db, $scope, $message, $context = array())
    /**
     * Debug handler for the MDB2
     */
    function debug_handler(&$db, $scope, $message, $context = array())
{
    if ($scope != 'prepare') {
        $debug_output = sprintf('%s(%d): %s;',
@@ -800,3 +800,4 @@
    }
}
}  // end class rcube_db