diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-11-14 06:45:35 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-11-14 06:45:35 +0300 |
commit | a91388d2b1b3c60733ce19f35a4675a1ba6467df (patch) | |
tree | 77256a0a24b6085541d73ba19f277fe88a7d0866 /plugins/Dashboard | |
parent | c7295c121b94489edf2800c6b220ee86e7b4c496 (diff) |
Replaced usage of deprecated Common::json_encode to json_encode
Diffstat (limited to 'plugins/Dashboard')
-rw-r--r-- | plugins/Dashboard/Controller.php | 10 | ||||
-rw-r--r-- | plugins/Dashboard/Dashboard.php | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php index c7a89a75a5..4c7d0c53f4 100644 --- a/plugins/Dashboard/Controller.php +++ b/plugins/Dashboard/Controller.php @@ -39,7 +39,7 @@ class Controller extends \Piwik\Plugin\Controller $view = new View($template); $this->setGeneralVariablesView($view); - $view->availableWidgets = Common::json_encode(WidgetsList::get()); + $view->availableWidgets = json_encode(WidgetsList::get()); $view->availableLayouts = $this->getAvailableLayouts(); $view->dashboardId = Common::getRequestVar('idDashboard', 1, 'int'); @@ -75,7 +75,7 @@ class Controller extends \Piwik\Plugin\Controller $this->checkTokenInUrl(); Json::sendHeaderJSON(); - return Common::json_encode(WidgetsList::get()); + return json_encode(WidgetsList::get()); } public function getDashboardLayout($checkToken = true) @@ -148,7 +148,7 @@ class Controller extends \Piwik\Plugin\Controller $dashboards = $this->dashboard->getAllDashboards($login); Json::sendHeaderJSON(); - return Common::json_encode($dashboards); + return json_encode($dashboards); } /** @@ -175,7 +175,7 @@ class Controller extends \Piwik\Plugin\Controller $nextId = $this->getModel()->createNewDashboardForUser($login, $name, $layout); Json::sendHeaderJSON(); - return Common::json_encode($nextId); + return json_encode($nextId); } public function copyDashboardToUser() @@ -197,7 +197,7 @@ class Controller extends \Piwik\Plugin\Controller $nextId = $this->getModel()->createNewDashboardForUser($user, $name, $layout); Json::sendHeaderJSON(); - return Common::json_encode($nextId); + return json_encode($nextId); } } diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php index 1ff5a98182..a0a12985c3 100644 --- a/plugins/Dashboard/Dashboard.php +++ b/plugins/Dashboard/Dashboard.php @@ -193,12 +193,12 @@ class Dashboard extends \Piwik\Plugin $layout = str_replace("\\\"", "\"", $layout); $layout = str_replace("\n", "", $layout); - return Common::json_decode($layout, $assoc = false); + return json_decode($layout, $assoc = false); } public function encodeLayout($layout) { - return Common::json_encode($layout); + return json_encode($layout); } public function getJsFiles(&$jsFiles) |