]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/System.php
Merge pull request #10033 from friendica/bug/10032-event-query
[friendica.git] / src / Core / System.php
index cb916610248cf385cc2332968cd42512e75a1884..38db75d89319aef24ae2d7d39672eb0346831d2b 100644 (file)
@@ -49,10 +49,16 @@ class System
                $previous = ['class' => '', 'function' => '', 'database' => false];
 
                // The ignore list contains all functions that are only wrapper functions
-               $ignore = ['fetchUrl', 'call_user_func_array'];
+               $ignore = ['call_user_func_array'];
 
                while ($func = array_pop($trace)) {
                        if (!empty($func['class'])) {
+                               if (in_array($previous['function'], ['insert', 'fetch', 'toArray', 'exists', 'count', 'selectFirst', 'selectToArray',
+                                       'select', 'update', 'delete', 'selectFirstForUser', 'selectForUser'])
+                                       && (substr($previous['class'], 0, 15) === 'Friendica\Model')) {
+                                       continue;
+                               }
+
                                // Don't show multiple calls from the Database classes to show the essential parts of the callstack
                                $func['database'] = in_array($func['class'], ['Friendica\Database\DBA', 'Friendica\Database\Database']);
                                if (!$previous['database'] || !$func['database']) {