diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-09-12 07:37:49 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-09-12 07:37:49 +0400 |
commit | 513cbb6b20660653e375c73081b2caacb583e203 (patch) | |
tree | 593217a72ea1905c6ac42baf22f6dc7aa27dc263 /core | |
parent | d989c794c832d40a66f7a56e6e0607a20e4a7af5 (diff) |
Minor code changes + style following review
Diffstat (limited to 'core')
-rw-r--r-- | core/DataTable.php | 1 | ||||
-rw-r--r-- | core/DataTable/Filter/SafeDecodeLabel.php | 2 | ||||
-rw-r--r-- | core/Tracker.php | 14 |
3 files changed, 9 insertions, 8 deletions
diff --git a/core/DataTable.php b/core/DataTable.php index f89ddd17d6..078263e646 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -613,7 +613,6 @@ class DataTable if ($label !== false) { $this->rowsIndexByLabel[$label] = count($this->rows) - 1; } - $this->indexNotUpToDate = false; } return $row; } diff --git a/core/DataTable/Filter/SafeDecodeLabel.php b/core/DataTable/Filter/SafeDecodeLabel.php index 3a0f222b04..a535b0164b 100644 --- a/core/DataTable/Filter/SafeDecodeLabel.php +++ b/core/DataTable/Filter/SafeDecodeLabel.php @@ -45,7 +45,7 @@ class SafeDecodeLabel extends Filter $raw = urldecode($value); $value = htmlspecialchars_decode($raw, ENT_QUOTES); if (self::$outputHtml) { - // ENT_IGNORE is not good! + // ENT_IGNORE so that if utf8 string has some errors, we simply discard invalid code unit sequences $style = ENT_QUOTES | ENT_IGNORE; // See changes in 5.4: http://nikic.github.com/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html // Note: at some point we should change ENT_IGNORE to ENT_SUBSTITUTE diff --git a/core/Tracker.php b/core/Tracker.php index 40fcdccbec..893d720c48 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -388,9 +388,10 @@ class Tracker { if ($this->usingBulkTracking) { // when doing bulk tracking we return JSON so the caller will know how many succeeded - $result = array('status' => 'error', 'statistics' => array( - 'tracked' => $this->countOfLoggedRequests - )); + $result = array( + 'status' => 'error', + 'tracked' => $this->countOfLoggedRequests + ); // send error when in debug mode or when authenticated (which happens when doing log importing, if ((isset($GLOBALS['PIWIK_TRACKER_DEBUG']) && $GLOBALS['PIWIK_TRACKER_DEBUG']) || $authenticated) { $result['message'] = $this->getMessageFromException($e); @@ -448,9 +449,10 @@ class Tracker protected function end() { if($this->usingBulkTracking) { - $result = array('status' => 'success', 'statistics' => array( - 'tracked' => $this->countOfLoggedRequests - )); + $result = array( + 'status' => 'success', + 'tracked' => $this->countOfLoggedRequests + ); $this->sendHeader('Content-Type: application/json'); echo Common::json_encode($result); exit; |