Skip to content
Snippets Groups Projects
Commit 50eb6ed3 authored by Laurent's avatar Laurent
Browse files

No need for xhprof to be in root of htdocs

parent f1dae83e
Branches
Tags
3 merge requests!715Master,!651Master,!647Stable
......@@ -16,11 +16,11 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_Controller_Plugin_XHProfile extends Zend_Controller_Plugin_Abstract {
protected
protected
$_enabled = false;
public function setRootUrl($url) {
......@@ -50,7 +50,7 @@ class ZendAfi_Controller_Plugin_XHProfile extends Zend_Controller_Plugin_Abstrac
xhprof_enable();
}
public function postDispatch(Zend_Controller_Request_Abstract $request) {
if (!$this->_enabled)
return;
......@@ -59,13 +59,13 @@ class ZendAfi_Controller_Plugin_XHProfile extends Zend_Controller_Plugin_Abstrac
$xhprof_data = xhprof_disable();
require_once ROOT_PATH."xhprof/xhprof_lib/utils/xhprof_lib.php";
require_once ROOT_PATH."xhprof/xhprof_lib/utils/xhprof_runs.php";
require_once "xhprof/xhprof_lib/utils/xhprof_lib.php";
require_once "xhprof/xhprof_lib/utils/xhprof_runs.php";
$xhprof_runs = new XHProfRuns_Default();
$run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_testing");
$this->_response
->setRedirect($view->absoluteUrl("/xhprof/xhprof_html/index.php?run={$run_id}&source=xhprof_testing\n"))
->setRedirect(BASE_URL."/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