Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-02-03 21:11:24 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-02-03 21:11:24 +0300
commit2591f954bb4686b6184561d481a727b843511f37 (patch)
treed3bebcd05be76fc0fa000b38a8414d7431f99b67
parentef20c5c926bfd8a47b42de246dff32350d0ee680 (diff)
- fixing piwik.php when no plugins LogStats to load
-rw-r--r--modules/ExceptionHandler.php3
-rw-r--r--modules/FrontController.php4
-rw-r--r--modules/Log/Exception.php1
-rw-r--r--modules/LogStats.php13
-rw-r--r--piwik.php12
5 files changed, 25 insertions, 8 deletions
diff --git a/modules/ExceptionHandler.php b/modules/ExceptionHandler.php
index 593a16dbef..13e1e013cb 100644
--- a/modules/ExceptionHandler.php
+++ b/modules/ExceptionHandler.php
@@ -8,7 +8,8 @@
*
* @package Piwik_Helper
*/
-
+
+require_once "modules/Piwik.php";
/**
*
*
diff --git a/modules/FrontController.php b/modules/FrontController.php
index 8e1ae0af63..deafc0ebd2 100644
--- a/modules/FrontController.php
+++ b/modules/FrontController.php
@@ -13,8 +13,8 @@
/**
* Zend classes
*/
-include "Zend/Exception.php";
-include "Zend/Loader.php";
+require_once "Zend/Exception.php";
+require_once "Zend/Loader.php";
require_once "Zend/Debug.php";
require_once "Zend/Auth.php";
require_once "Zend/Auth/Adapter/DbTable.php";
diff --git a/modules/Log/Exception.php b/modules/Log/Exception.php
index c65484cd0e..84c3a42b55 100644
--- a/modules/Log/Exception.php
+++ b/modules/Log/Exception.php
@@ -9,6 +9,7 @@
* @package Piwik_Log
* @subpackage Piwik_Log_Exception
*/
+require_once "Log.php";
/**
* Class used to log an exception event.
diff --git a/modules/LogStats.php b/modules/LogStats.php
index bc167b37f6..1e1e91623f 100644
--- a/modules/LogStats.php
+++ b/modules/LogStats.php
@@ -84,11 +84,14 @@ class Piwik_LogStats
private function initProcess()
{
- $pluginsLogStats = Piwik_LogStats_Config::getInstance()->Plugins_LogStats;
- if(is_array($pluginsLogStats)
- && count($pluginsLogStats) != 0)
- {
- Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsLogStats['Plugins_LogStats'] );
+ try{
+ $pluginsLogStats = Piwik_LogStats_Config::getInstance()->Plugins_LogStats;
+ if(is_array($pluginsLogStats)
+ && count($pluginsLogStats) != 0)
+ {
+ Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsLogStats['Plugins_LogStats'] );
+ }
+ } catch(Exception $e) {
}
$saveStats = Piwik_LogStats_Config::getInstance()->LogStats['record_statistics'];
diff --git a/piwik.php b/piwik.php
index d0ae53d7c5..7859c14cbe 100644
--- a/piwik.php
+++ b/piwik.php
@@ -51,6 +51,18 @@ require_once "LogStats/Visit.php";
$GLOBALS['DEBUGPIWIK'] = false;
+
+if($GLOBALS['DEBUGPIWIK'] === true)
+{
+ date_default_timezone_set(date_default_timezone_get());
+ /**
+ * Error / exception handling functions
+ */
+ require_once PIWIK_INCLUDE_PATH . "/modules/ErrorHandler.php";
+ require_once PIWIK_INCLUDE_PATH . "/modules/ExceptionHandler.php";
+ set_error_handler('Piwik_ErrorHandler');
+ set_exception_handler('Piwik_ExceptionHandler');
+}
ob_start();
printDebug($_GET);
$process = new Piwik_LogStats;