diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-09-06 07:22:22 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-09-06 07:22:22 +0400 |
commit | a07631b3205889451124192f04aaf81fd447236e (patch) | |
tree | 69a77d212b79fbfea84db64fdbbc55394d5210d3 | |
parent | 0a88a60905a4e0b22ed9f5168b6edc9dafeb23cf (diff) |
Fix Tracker variable was not set properly
-rw-r--r-- | core/Config.php | 5 | ||||
-rw-r--r-- | core/Tracker.php | 10 | ||||
-rw-r--r-- | libs/Zend/Registry.php | 3 | ||||
-rwxr-xr-x | misc/log-analytics/import_logs.py | 5 |
4 files changed, 8 insertions, 15 deletions
diff --git a/core/Config.php b/core/Config.php index c40484cb91..d88709379a 100644 --- a/core/Config.php +++ b/core/Config.php @@ -225,10 +225,9 @@ class Config foreach ($values as &$value) { $value = $this->decodeValues($value); } - } else { - $values = html_entity_decode($values, ENT_COMPAT, 'UTF-8'); + return $values; } - return $values; + return html_entity_decode($values, ENT_COMPAT, 'UTF-8'); } /** diff --git a/core/Tracker.php b/core/Tracker.php index 8b28a73596..a148eb34ea 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -11,12 +11,6 @@ namespace Piwik; use Exception; -use Piwik\Config; -use Piwik\Piwik; -use Piwik\Common; -use Piwik\Access; -use Piwik\Translate; -use Piwik\TaskScheduler; use Piwik\Tracker\Cache; use Piwik\Tracker\Db\DbException; use Piwik\Tracker\Db\Mysqli; @@ -24,7 +18,6 @@ use Piwik\Tracker\Db\Pdo\Mysql; use Piwik\Tracker\Request; use Piwik\Tracker\Visit; use Piwik\Tracker\VisitInterface; -use Piwik\PluginsManager; use Zend_Registry; /** @@ -224,13 +217,12 @@ class Tracker */ public function main($args = null) { - $displayedGIF = false; $tokenAuth = $this->initRequests($args); - $isAuthenticated = false; if (!empty($this->requests)) { foreach ($this->requests as $params) { $request = new Request($params, $tokenAuth); + $isAuthenticated = $request->isAuthenticated(); $this->init($request); try { diff --git a/libs/Zend/Registry.php b/libs/Zend/Registry.php index 0bf2827e65..622f21ccd2 100644 --- a/libs/Zend/Registry.php +++ b/libs/Zend/Registry.php @@ -144,7 +144,8 @@ class Zend_Registry extends ArrayObject if (!$instance->offsetExists($index)) { // require_once 'Zend/Exception.php'; - throw new Zend_Exception("No entry is registered for key '$index'"); +// debug_print_backtrace(); + throw new Zend_Exception("No entry is registered for key '$index'" ); } return $instance->offsetGet($index); diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 944795bbc6..df9390bab4 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -808,7 +808,8 @@ class Piwik(object): try: return json.loads(res) except ValueError: - raise urllib2.URLError('Piwik returned an invalid response: ' + res[:300]) + truncate_after = 3000 + raise urllib2.URLError('Piwik returned an invalid response: ' + res[:truncate_after]) @staticmethod @@ -824,7 +825,7 @@ class Piwik(object): if on_failure is not None: error_message = on_failure(response, kwargs.get('data')) else: - truncate_after = 200 + truncate_after = 2000 truncated_response = (response[:truncate_after] + '..') if len(response) > truncate_after else response error_message = "didn't receive the expected response. Response was %s " % truncated_response |