From 946dd4a08e8b96d216b03e1f63259ce17d2a22eb Mon Sep 17 00:00:00 2001 From: mattpiwik <matthieu.aubry@gmail.com> Date: Thu, 13 Oct 2011 22:53:49 +0000 Subject: [PATCH] * Build * bug in calendar click * Better legends for ecommerce graphs git-svn-id: http://dev.piwik.org/svn/trunk@5295 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- misc/svn-props-to-set-new-files.svnprops | Bin 0 -> 78 bytes plugins/CoreHome/templates/broadcast.js | 2 +- plugins/Goals/Controller.php | 20 +++++++++++++------- plugins/ImageGraph/API.php | 5 ++++- plugins/ImageGraph/Controller.php | 2 +- plugins/ImageGraph/ImageGraphObject.php | 2 +- tests/core/ReleaseCheckList.test.php | 4 ++-- 7 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 misc/svn-props-to-set-new-files.svnprops diff --git a/misc/svn-props-to-set-new-files.svnprops b/misc/svn-props-to-set-new-files.svnprops new file mode 100644 index 0000000000000000000000000000000000000000..ce426024667b770d8af1aedb76caea5fb3198c10 GIT binary patch literal 78 zcmZQ#U|^5};$ns}hCBu<hE#@ph8zZ6Aisp6639wrU<1nLC6;8CrAi>F%Ld9+GL!>V O7cry&RWkwQJW~Mov<;~M literal 0 HcmV?d00001 diff --git a/plugins/CoreHome/templates/broadcast.js b/plugins/CoreHome/templates/broadcast.js index 73bbf733c7..0bf144033b 100644 --- a/plugins/CoreHome/templates/broadcast.js +++ b/plugins/CoreHome/templates/broadcast.js @@ -325,7 +325,7 @@ broadcast.getParamValue = function (param, url) } var value = url.substring(startStr + param.length +1,endStr); // sanitize values - var value = value.replace(/[^,0-9a-zA-Z]/gi, ''); + var value = value.replace(/[^_%\-,0-9a-zA-Z]/gi, ''); return value; } else { diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php index d01ec7717a..7350462a3c 100644 --- a/plugins/Goals/Controller.php +++ b/plugins/Goals/Controller.php @@ -297,17 +297,23 @@ class Piwik_Goals_Controller extends Piwik_Controller } $view = $this->getLastUnitGraph($this->pluginName, __FUNCTION__, 'Goals.get'); $view->setParametersToModify(array('idGoal' => $idGoal)); + + $nameToLabel = $this->goalColumnNameToLabel; + if($idGoal == Piwik_Archive::LABEL_ECOMMERCE_ORDER) + { + $nameToLabel['nb_conversions'] = 'General_EcommerceOrders'; + } + elseif($idGoal == Piwik_Archive::LABEL_ECOMMERCE_CART) + { + $nameToLabel['nb_conversions'] = Piwik_Translate('General_VisitsWith', Piwik_Translate('Goals_AbandonedCart')); + $nameToLabel['conversion_rate'] = $nameToLabel['nb_conversions']; + $nameToLabel['revenue'] = Piwik_Translate('Goals_LeftInCart', Piwik_Translate('Goals_ColumnRevenue')); + $nameToLabel['items'] = Piwik_Translate('Goals_LeftInCart', Piwik_Translate('Goals_Products')); + } foreach($columns as $columnName) { $columnTranslation = ''; - - $nameToLabel = $this->goalColumnNameToLabel; - if($idGoal == Piwik_Archive::LABEL_ECOMMERCE_ORDER - && $columnName == 'nb_conversions') - { - $nameToLabel[$columnName] = 'General_EcommerceOrders'; - } // find the right translation for this column, eg. find 'revenue' if column is Goal_1_revenue foreach($nameToLabel as $metric => $metricTranslation) { diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php index 1d78db7eaa..26fd150f87 100644 --- a/plugins/ImageGraph/API.php +++ b/plugins/ImageGraph/API.php @@ -4,7 +4,7 @@ * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * @version 0.3.3_a + * @version $Id$ * * @category Piwik_Plugins * @package Piwik_ImageGraph @@ -356,9 +356,12 @@ class Piwik_ImageGraph_API $path = PIWIK_INCLUDE_PATH."/tmp/".$fileName; $graph->Render($path); return $path; + case self::GRAPH_OUTPUT_INLINE: default: $graph->Stroke(); + exit; + break; } } diff --git a/plugins/ImageGraph/Controller.php b/plugins/ImageGraph/Controller.php index 13b0d2c1a7..6ef980ab60 100644 --- a/plugins/ImageGraph/Controller.php +++ b/plugins/ImageGraph/Controller.php @@ -4,7 +4,7 @@ * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * @version 0.2.6_a + * @version $Id$ * * @category Piwik_Plugins * @package Piwik_ImageGraph diff --git a/plugins/ImageGraph/ImageGraphObject.php b/plugins/ImageGraph/ImageGraphObject.php index 9296207ed6..b6f83f7ee3 100644 --- a/plugins/ImageGraph/ImageGraphObject.php +++ b/plugins/ImageGraph/ImageGraphObject.php @@ -4,7 +4,7 @@ * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * @version 0.3.3_a + * @version $Id$ * * @category Piwik_Plugins * @package Piwik_ImageGraph diff --git a/tests/core/ReleaseCheckList.test.php b/tests/core/ReleaseCheckList.test.php index 56514593f0..334f01db48 100644 --- a/tests/core/ReleaseCheckList.test.php +++ b/tests/core/ReleaseCheckList.test.php @@ -127,7 +127,7 @@ class Test_Piwik_ReleaseCheckList extends UnitTestCase } // skip files with these file extensions - if(preg_match('/\.(bmp|fdf|gif|deflate|gz|ico|jar|jpg|p12|pdf|png|rar|swf|vsd|z|zip)$/', $file)) + if(preg_match('/\.(bmp|fdf|gif|deflate|gz|ico|jar|jpg|p12|pdf|png|rar|swf|vsd|z|zip|ttf)$/', $file)) { continue; } @@ -178,7 +178,7 @@ class Test_Piwik_ReleaseCheckList extends UnitTestCase } $contents = file_get_contents($file); - $this->assertTrue(strpos($contents, '$Id: '.basename($file).' ') !== false, $file ." no Id: keyword"); + $this->assertTrue(strpos($contents, '$Id: ') !== false, $file ." no Id: keyword"); } /* -- GitLab