]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/SQLProfile/SQLProfilePlugin.php
Merge branch 'testing' into moveaccount
[quix0rs-gnu-social.git] / plugins / SQLProfile / SQLProfilePlugin.php
index 035c56c2806d4372e55c0ce3a72deef8f71b2d03..c17646f042d1b9a1f52abf60f113f216d49849f4 100644 (file)
@@ -38,14 +38,14 @@ class SQLProfilePlugin extends Plugin
                             'author' => 'Brion Vibber',
                             'homepage' => 'http://status.net/wiki/Plugin:SQLProfile',
                             'rawdescription' =>
-                            _m('Debug tool to watch for poorly indexed DB queries'));
+                            _m('Debug tool to watch for poorly indexed DB queries.'));
 
         return true;
     }
 
     function onStartDBQuery($obj, $query, &$result)
     {
-        if (!$this->recursionGuard) {
+        if (!$this->recursionGuard && preg_match('/\bselect\b/i', $query)) {
             $this->recursionGuard = true;
             $xobj = clone($obj);
             $explain = $xobj->query('EXPLAIN ' . $query);