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:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-06-28 18:53:41 +0400
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-06-28 18:53:41 +0400
commit960ae5f61dcfe1d1b37bedd452cf6e5ca5b803e3 (patch)
tree50086cbdaf58962870d282b4cc8358e3cf540591 /core/Log.php
parent02d07aa02ebd3ea2801941f4e398ea0b631f28c1 (diff)
Fixes #833 - Allow absolute path when relocating tmp folder outside of Piwik
document root.
Diffstat (limited to 'core/Log.php')
-rw-r--r--core/Log.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Log.php b/core/Log.php
index 6fb465ea10..3c2c6a9058 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -35,7 +35,14 @@ abstract class Piwik_Log extends Zend_Log
$logToDatabaseColumnMapping )
{
parent::__construct();
- $this->logToFileFilename = PIWIK_INCLUDE_PATH . '/' . Zend_Registry::get('config')->log->logger_file_path . $logToFileFilename;
+
+ $log_dir = Zend_Registry::get('config')->log->logger_file_path;
+ if($log_dir[0] != '/' && $log_dir[0] != DIRECTORY_SEPARATOR)
+ {
+ $log_dir = PIWIK_INCLUDE_PATH . '/' . $log_dir;
+ }
+ $this->logToFileFilename = $log_dir . '/' . $logToFileFilename;
+
$this->fileFormatter = $fileFormatter;
$this->screenFormatter = $screenFormatter;
$this->logToDatabaseTableName = Piwik::prefixTable($logToDatabaseTableName);