summaryrefslogtreecommitdiffstats
path: root/lib/private/template.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-09 11:41:48 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-09 11:53:11 +0100
commit770fa761b8bf8452ff17a2036ca8413e74935a3d (patch)
treeecce3b7443278b0ebdac588ba40840190a3aadcd /lib/private/template.php
parent0e604aa875a677f76b2bf326631646ac31fbadbd (diff)
downloadnextcloud-server-770fa761b8bf8452ff17a2036ca8413e74935a3d.tar.gz
nextcloud-server-770fa761b8bf8452ff17a2036ca8413e74935a3d.zip
Respect `mod_unique_id` and refactor `OC_Request::getRequestId`
When `mod_unique_id` is enabled the ID generated by it will be used for logging. This allows for correlation of the Apache logs and the ownCloud logs. Testplan: - [ ] When `mod_unique_id` is enabled the request ID equals the one generated by `mod_unique_id`. - [ ] When `mod_unique_id` is not available the request ID is a 20 character long random string - [ ] The generated Id is stable over the lifespan of one request Changeset looks a little bit larger since I had to adjust every unit test using the HTTP\Request class for proper DI. Fixes https://github.com/owncloud/core/issues/13366
Diffstat (limited to 'lib/private/template.php')
-rw-r--r--lib/private/template.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/template.php b/lib/private/template.php
index d407eb8384c..4fa1c867d54 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -223,7 +223,7 @@ class OC_Template extends \OC\Template\Base {
$content->assign('trace', $exception->getTraceAsString());
$content->assign('debugMode', defined('DEBUG') && DEBUG === true);
$content->assign('remoteAddr', OC_Request::getRemoteAddress());
- $content->assign('requestID', OC_Request::getRequestID());
+ $content->assign('requestID', \OC::$server->getRequest()->getId());
$content->printPage();
die();
}