From: Tim Düsterhus Date: Sun, 2 Feb 2020 14:57:27 +0000 (+0100) Subject: Add \wcf\getRequestId() to request information in SQL queries X-Git-Tag: 5.2.2~11^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a77c0ecd1642804f84fb621fe68a2cb83460332;p=GitHub%2FWoltLab%2FWCF.git Add \wcf\getRequestId() to request information in SQL queries --- diff --git a/wcfsetup/install/files/lib/system/database/Database.class.php b/wcfsetup/install/files/lib/system/database/Database.class.php index 4c426bfd16..8fd5af789d 100644 --- a/wcfsetup/install/files/lib/system/database/Database.class.php +++ b/wcfsetup/install/files/lib/system/database/Database.class.php @@ -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'].')'; }