Skip to content
Snippets Groups Projects
Commit 641b638c authored by llaffont's avatar llaffont
Browse files

Ajout des règles de rewriting pour l'accès a l'interface XHProf

git-svn-id: http://afi-forge.afi-sa.fr/svn/opacce/trunk@2673 e3cc70dd-a52f-4065-8a26-0e09943c8c5c
parent 098fbc46
Branches
Tags
No related merge requests found
RewriteEngine on
RewriteCond %{REQUEST_URI} !/xhprof_html
RewriteRule !(userfiles|public|tmp|temp)/.*\.(js|ico|txt|gif|jpg|jpeg|png|css|xml|swf|mov|pdf|doc|docx|woff|eot|svg|ttf|xls|wsdl|mp3|m4v|ogg|ogv)$ index.php [NC,NE]
AddType application/x-javascript .js
......
......@@ -52,6 +52,9 @@ class ZendAfi_Controller_Plugin_XHProfile extends Zend_Controller_Plugin_Abstrac
if (!$this->_enabled)
return;
$view=new ZendAfi_Controller_Action_Helper_View();
$xhprof_data = xhprof_disable();
require_once "xhprof/xhprof_lib/utils/xhprof_lib.php";
require_once "xhprof/xhprof_lib/utils/xhprof_runs.php";
......@@ -59,7 +62,7 @@ class ZendAfi_Controller_Plugin_XHProfile extends Zend_Controller_Plugin_Abstrac
$run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_testing");
$this->_response
->setRedirect('http://' . $_SERVER['SERVER_NAME'] . "/xhprof/index.php?run={$run_id}&source=xhprof_testing\n")
->setRedirect($view->absoluteUrl("/xhprof/xhprof_html/index.php?run={$run_id}&source=xhprof_testing\n"))
->clearBody();
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment