From 2b2a0b941132441d769f4d1bc8269e2323f192f3 Mon Sep 17 00:00:00 2001 From: Steve Buzonas Date: Tue, 4 Jun 2013 16:31:11 -0400 Subject: [PATCH] Update base path to allow installations directed by mod_rewrite toload --- xhprof_lib/display/xhprof.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xhprof_lib/display/xhprof.php b/xhprof_lib/display/xhprof.php index 4be67bc8..99a40e1a 100644 --- a/xhprof_lib/display/xhprof.php +++ b/xhprof_lib/display/xhprof.php @@ -40,9 +40,9 @@ /** * Our coding convention disallows relative paths in hrefs. - * Get the base URL path from the SCRIPT_NAME. + * Get the base URL path from the REQUEST_URI. */ -$base_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\'); +$base_path = rtrim(dirname($_SERVER['REQUEST_URI']), '/\\'); /** @@ -58,7 +58,7 @@ function xhprof_include_js_css($ui_dir_url_path = null) { if (empty($ui_dir_url_path)) { - $ui_dir_url_path = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\'); + $ui_dir_url_path = rtrim(dirname($_SERVER['REQUEST_URI']), '/\\'); } // style sheets