]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/System.php
Merge pull request #10133 from annando/notice
[friendica.git] / src / Core / System.php
index cb916610248cf385cc2332968cd42512e75a1884..5069a4a9800c6e8da47848bf97f03c727bec6154 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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']) {