Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
NO-TICKET: Fixing the base path for xhprof
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehul Mittal committed Nov 21, 2019
1 parent c9396b7 commit 131f3eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions third-party/xhprof/xhprof_lib/display/xhprof.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']), '/\\');


/**
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion third-party/xhprof/xhprof_lib/utils/xhprof_runs.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function list_runs() {
usort($files, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
foreach ($files as $file) {
list($run,$source) = explode('.', basename($file));
echo '<li><a href="' . htmlentities($_SERVER['SCRIPT_NAME'])
echo '<li><a href="' . htmlentities($_SERVER['REQUEST_URI'])
. '?run=' . htmlentities($run) . '&source='
. htmlentities($source) . '">'
. htmlentities(basename($file)) . "</a><small> "
Expand Down

0 comments on commit 131f3eb

Please sign in to comment.