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:
Diffstat (limited to 'plugins/API/Renderer/Json2.php')
-rw-r--r--plugins/API/Renderer/Json2.php17
1 files changed, 1 insertions, 16 deletions
diff --git a/plugins/API/Renderer/Json2.php b/plugins/API/Renderer/Json2.php
index 898fe6a9ce..bd27810fb8 100644
--- a/plugins/API/Renderer/Json2.php
+++ b/plugins/API/Renderer/Json2.php
@@ -11,23 +11,8 @@ namespace Piwik\Plugins\API\Renderer;
use Piwik\Piwik;
/**
- * Correct API output renderer for JSON. Includes bug fixes for bugs in the old JSON API
- * format.
+ * Left here for Backward compatibility in Piwik 3.X+ for all users who correctly used format=json2 during Piwik 2.X
*/
class Json2 extends Json
{
- public function renderArray($array)
- {
- $result = parent::renderArray($array);
-
- // if $array is a simple associative array, remove the JSON root array that is added by renderDataTable
- if (!empty($array)
- && Piwik::isAssociativeArray($array)
- && !Piwik::isMultiDimensionalArray($array)
- ) {
- $result = substr($result, 1, strlen($result) - 2);
- }
-
- return $result;
- }
} \ No newline at end of file