From 11e1a5d72a6701f446480d02ab233d1c83f3e1e4 Mon Sep 17 00:00:00 2001 From: mattpiwik <matthieu.aubry@gmail.com> Date: Tue, 5 Apr 2011 07:43:11 +0000 Subject: [PATCH] Small changes git-svn-id: http://dev.piwik.org/svn/trunk@4325 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- core/Controller.php | 1 + core/FrontController.php | 1 + core/Piwik.php | 2 +- piwik.php | 3 ++- plugins/CoreUpdater/templates/update_welcome.tpl | 2 +- plugins/SitesManager/tests/SitesManager.test.php | 5 +++++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/Controller.php b/core/Controller.php index 42ee917d23..ec631e811b 100644 --- a/core/Controller.php +++ b/core/Controller.php @@ -358,6 +358,7 @@ abstract class Piwik_Controller $this->setBasicVariablesView($view); } catch(Exception $e) { //TODO here display std error message rather than redirect + //echo $e->getMessage();exit; self::redirectToIndex( Piwik::getLoginPluginName(), $action = 'index' ); } } diff --git a/core/FrontController.php b/core/FrontController.php index 7d3640bb41..b97829bfb4 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -163,6 +163,7 @@ class Piwik_FrontController try { Piwik::printSqlProfilingReportZend(); Piwik::printQueryCount(); + Piwik::printTimer(); } catch(Exception $e) {} } diff --git a/core/Piwik.php b/core/Piwik.php index 8c35b22298..6c446e3753 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -1072,7 +1072,7 @@ class Piwik */ static public function printTimer() { - echo Zend_Registry::get('timer'); + Piwik::log(Zend_Registry::get('timer')); } /** diff --git a/piwik.php b/piwik.php index 42a7b27a23..714574c571 100644 --- a/piwik.php +++ b/piwik.php @@ -58,7 +58,7 @@ if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) $timer = new Piwik_Timer(); set_error_handler('Piwik_ErrorHandler'); set_exception_handler('Piwik_ExceptionHandler'); - printDebug("Input parameters: <br/>" . var_export($_GET, true)); + printDebug("Debug enabled - Input parameters: <br/>" . var_export($_GET, true)); Piwik_Tracker_Db::enableProfiling(); // Config might have been created by proxy-piwik.php try { @@ -81,3 +81,4 @@ if(!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) printDebug($timer); } } + diff --git a/plugins/CoreUpdater/templates/update_welcome.tpl b/plugins/CoreUpdater/templates/update_welcome.tpl index a926274dd3..f12c731dbd 100644 --- a/plugins/CoreUpdater/templates/update_welcome.tpl +++ b/plugins/CoreUpdater/templates/update_welcome.tpl @@ -30,7 +30,7 @@ <h4>{'CoreUpdater_NoteForLargePiwikInstances'|translate}</h4> <ul> <li>{'CoreUpdater_TheUpgradeProcessMayFailExecuteCommand'|translate:$commandUpgradePiwik}</li> - <li>It is also recommended, for high traffic Piwik servers, to <a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/faq/how-to/#faq_111'>momentarily disable visitor Tracking and put the Piwik User Interface in maintenance mode</a>.</li> + <li>It is also recommended for high traffic Piwik servers to <a target='_blank' href='?module=Proxy&action=redirect&url={"http://piwik.org/faq/how-to/#faq_111"|escape:"url"}'>momentarily disable visitor Tracking and put the Piwik User Interface in maintenance mode</a>.</li> <li>{'CoreUpdater_YouCouldManuallyExecuteSqlQueries'|translate}<br /> <a href='#' id='showSql' style='margin-left:20px'>› {'CoreUpdater_ClickHereToViewSqlQueries'|translate}</a> <div id='sqlQueries' style='display:none'> diff --git a/plugins/SitesManager/tests/SitesManager.test.php b/plugins/SitesManager/tests/SitesManager.test.php index 012fa7d570..11e6864c6c 100644 --- a/plugins/SitesManager/tests/SitesManager.test.php +++ b/plugins/SitesManager/tests/SitesManager.test.php @@ -26,6 +26,11 @@ class Test_Piwik_SitesManager extends Test_Database Piwik_Site::clearCache(); } + public function tearDown() + { + Piwik_Site::clearCache(); + } + /** * empty name -> exception */ -- GitLab