From ef5975195c9e15db16aeec65ae0f3e6b359df23d Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 27 Mar 2019 12:08:52 +0100 Subject: [PATCH] renamed to replace and added in default file --- config/config.default.php | 4 ++++ external/header.php | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/config.default.php b/config/config.default.php index 01e994e..07146b8 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -55,6 +55,10 @@ 'profiler.simple_url' => function($url) { return preg_replace('/\=\d+/', '', $url); }, + + //'profiler.replace_url' => function($url) { + // return str_replace('token', '', $url); + //}, 'profiler.options' => array(), ); diff --git a/external/header.php b/external/header.php index 4e7e10d..9f2805e 100644 --- a/external/header.php +++ b/external/header.php @@ -145,9 +145,9 @@ function () { $uri = $cmd . ' ' . implode(' ', array_slice($_SERVER['argv'], 1)); } - $clean_url = Xhgui_Config::read('profiler.clean_url'); - if (is_callable($clean_url)) { - $uri = $clean_url($uri); + $replace_url = Xhgui_Config::read('profiler.replace_url'); + if (is_callable($replace_url)) { + $uri = $replace_url($uri); } $time = array_key_exists('REQUEST_TIME', $_SERVER)