]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Event hook for SQLProfile
authorBrion Vibber <brion@pobox.com>
Fri, 17 Dec 2010 19:46:11 +0000 (11:46 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 17 Dec 2010 19:46:11 +0000 (11:46 -0800)
classes/Memcached_DataObject.php

index ccfd886a1d3dc3ce9ce8de594aa1c5287f5d8634..eb5d2627f27efc664d45ff530305334dd19cc4ae 100644 (file)
@@ -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');