Add \wcf\getRequestId() to request information in SQL queries
authorTim Düsterhus <duesterhus@woltlab.com>
Sun, 2 Feb 2020 14:57:27 +0000 (15:57 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Sun, 2 Feb 2020 15:04:47 +0000 (16:04 +0100)
wcfsetup/install/files/lib/system/database/Database.class.php

index 4c426bfd16e96eb9cdfa02f8ccd1b8d5838060bb..8fd5af789d7341eaffda241f28bea4299b460e25 100644 (file)
@@ -261,7 +261,7 @@ abstract class Database {
                        //       must be absolutely lightweight.
                        $requestInformation = '';
                        if (defined('ENABLE_PRODUCTION_DEBUG_MODE') && ENABLE_PRODUCTION_DEBUG_MODE && isset($_SERVER['REQUEST_URI'])) {
-                               $requestInformation = substr($_SERVER['REQUEST_URI'], 0, 90);
+                               $requestInformation = substr($_SERVER['REQUEST_URI'].(\wcf\getRequestId() ? ' ('.\wcf\getRequestId().')' : ''), 0, 90);
                                if (isset($_REQUEST['className']) && isset($_REQUEST['actionName'])) {
                                        $requestInformation .= ' ('.$_REQUEST['className'].':'.$_REQUEST['actionName'].')';
                                }