From: Brion Vibber Date: Fri, 17 Dec 2010 19:46:11 +0000 (-0800) Subject: Event hook for SQLProfile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0535a3d15c08cd847299e15df7a707b6658c6480;p=quix0rs-gnu-social.git Event hook for SQLProfile --- diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index ccfd886a1d..eb5d2627f2 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -338,7 +338,11 @@ class Memcached_DataObject extends Safe_DataObject } $start = microtime(true); - $result = parent::_query($string); + $result = null; + if (Event::handle('StartDBQuery', array($this, $string, &$result))) { + $result = parent::_query($string); + Event::handle('EndDBQuery', array($this, $string, &$result)); + } $delta = microtime(true) - $start; $limit = common_config('db', 'log_slow_queries');