Created
June 22, 2015 12:26
-
-
Save gwillem/8c7f842087f4494629ef to your computer and use it in GitHub Desktop.
Magento patches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php | |
index c698108..6e256bb 100644 | |
--- app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php | |
+++ app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php | |
@@ -444,7 +444,7 @@ class Mage_Adminhtml_Block_Dashboard_Graph extends Mage_Adminhtml_Block_Dashboar | |
} | |
return self::API_URL . '?' . implode('&', $p); | |
} else { | |
- $gaData = urlencode(base64_encode(serialize($params))); | |
+ $gaData = urlencode(base64_encode(json_encode($params))); | |
$gaHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData); | |
$params = array('ga' => $gaData, 'h' => $gaHash); | |
return $this->getUrl('*/*/tunnel', array('_query' => $params)); | |
diff --git app/code/core/Mage/Adminhtml/controllers/DashboardController.php app/code/core/Mage/Adminhtml/controllers/DashboardController.php | |
index eebb471..f9cb8d2 100644 | |
--- app/code/core/Mage/Adminhtml/controllers/DashboardController.php | |
+++ app/code/core/Mage/Adminhtml/controllers/DashboardController.php | |
@@ -92,7 +92,8 @@ class Mage_Adminhtml_DashboardController extends Mage_Adminhtml_Controller_Actio | |
if ($gaData && $gaHash) { | |
$newHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData); | |
if ($newHash == $gaHash) { | |
- if ($params = unserialize(base64_decode(urldecode($gaData)))) { | |
+ $params = json_decode(base64_decode(urldecode($gaData)), true); | |
+ if ($params) { | |
$response = $httpClient->setUri(Mage_Adminhtml_Block_Dashboard_Graph::API_URL) | |
->setParameterGet($params) | |
->setConfig(array('timeout' => 5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment