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:
authorbenakamoorthi <benaka.moorthi@gmail.com>2012-12-22 06:05:40 +0400
committerbenakamoorthi <benaka.moorthi@gmail.com>2012-12-22 06:05:40 +0400
commit554f7c93eee1516081eb7e567d6dc3deb9780be4 (patch)
treeab1d6d80a4c50db070b8289459a681597e888679 /core/Session.php
parentfe1b1443a9f90bfc47601059fe47f5bf6b9e2924 (diff)
Fixes #2997, check for NFS filesystem during system check and if installing switch to database sessions.
git-svn-id: http://dev.piwik.org/svn/trunk@7681 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Session.php')
-rw-r--r--core/Session.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/Session.php b/core/Session.php
index 2a0b23c104..2fa49685d3 100644
--- a/core/Session.php
+++ b/core/Session.php
@@ -79,7 +79,7 @@ class Piwik_Session extends Zend_Session
// Note: this handler doesn't work well in load-balanced environments and may have a concurrency issue with locked session files
// for "files", use our own folder to prevent local session file hijacking
- $sessionPath = PIWIK_USER_PATH . '/tmp/sessions';
+ $sessionPath = self::getSessionsDirectory();
// We always call mkdir since it also chmods the directory which might help when permissions were reverted for some reasons
Piwik_Common::mkdir($sessionPath);
@@ -137,4 +137,14 @@ class Piwik_Session extends Zend_Session
Piwik_ExitWithMessage($message);
}
}
+
+ /**
+ * Returns the directory session files are stored in.
+ *
+ * @return string
+ */
+ public static function getSessionsDirectory()
+ {
+ return PIWIK_USER_PATH . '/tmp/sessions';
+ }
}