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:
authorrobocoder <anthon.pang@gmail.com>2010-12-19 20:55:50 +0300
committerrobocoder <anthon.pang@gmail.com>2010-12-19 20:55:50 +0300
commit9414694ad3974b5709b5b7e8be2d862efc14f05f (patch)
tree693b64e42409f6c888c9793867fe1d1843774e8b /core/Session
parent21b2d996bdd82acc704c8a103143c43825695694 (diff)
fixes #1901, refs #1592 - we can't use mock objects because of static method calls, so the wrappers around Zend_Session and Zend_Session_Namespace dummy initialize when executing from php-cli or headless php-cgi; this also addresses the hack by Parallels in their APS scripts
git-svn-id: http://dev.piwik.org/svn/trunk@3468 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Session')
-rw-r--r--core/Session/Namespace.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/Session/Namespace.php b/core/Session/Namespace.php
new file mode 100644
index 0000000000..919928298d
--- /dev/null
+++ b/core/Session/Namespace.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ * @version $Id$
+ *
+ * @category Piwik
+ * @package Piwik
+ */
+
+/**
+ * Session namespace.
+ *
+ * @package Piwik
+ */
+class Piwik_Session_Namespace extends Zend_Session_Namespace
+{
+ public function __construct($namespace = 'Default', $singleInstance = false)
+ {
+ if(Piwik_Common::isPhpCliMode())
+ {
+ self::$_readable = true;
+ return;
+ }
+
+ parent::__construct($namespace, $singleInstance);
+ }
+}