diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-12-10 00:50:07 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-12-10 00:50:07 +0300 |
commit | ebced800c0184f5ce93663afab6b0337c3755cbb (patch) | |
tree | fb26c2506d37586ff0d38fb902d63d17701bd883 /plugins/ImageGraph | |
parent | 3d26af780d8fe0e4f7c5824a88b95c4a0d0d25d7 (diff) | |
parent | db36ca384809ea36457a465a3b6d1ecf951b0e26 (diff) |
Merge master into "3.0"
Conflicts:
.travis.yml
CHANGELOG.md
core/Plugin/ControllerAdmin.php
core/Version.php
core/testMinimumPhpVersion.php
plugins/API/API.php
plugins/Actions/Reports/GetPageUrls.php
plugins/AnonymousPiwikUsageMeasurement
plugins/CoreHome/CoreHome.php
plugins/CoreHome/templates/_menu.twig
plugins/CoreVisualizations/javascripts/jqplotEvolutionGraph.js
plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
plugins/Goals/Controller.php
tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
tests/PHPUnit/Integration/Plugin/ManagerTest.php
tests/PHPUnit/System/expected/test_FlattenReports__CustomVariables.getCustomVariables_day.xml
tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html
tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml
tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html
tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__CustomVariables.getCustomVariables_range.xml
tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__CustomVariables.getCustomVariables_range.xml
tests/PHPUnit/System/expected/test_reportLimiting__CustomVariables.getCustomVariables_day.xml
tests/PHPUnit/System/expected/test_reportLimiting_rankingQuery__CustomVariables.getCustomVariables_day.xml
tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_day.xml
tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_week.xml
tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_day.xml
tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_week.xml
tests/UI/expected-ui-screenshots
tests/UI/specs/Overlay_spec.js
tests/UI/specs/UIIntegration_spec.js
Diffstat (limited to 'plugins/ImageGraph')
-rw-r--r-- | plugins/ImageGraph/API.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php index 4e7b466b21..ffdd223d46 100644 --- a/plugins/ImageGraph/API.php +++ b/plugins/ImageGraph/API.php @@ -122,7 +122,8 @@ class API extends \Piwik\Plugin\API $gridColor = API::DEFAULT_GRID_COLOR, $idSubtable = false, $legendAppendMetric = true, - $segment = false + $segment = false, + $idDimension = false ) { Piwik::checkUserHasViewAccess($idSite); @@ -151,6 +152,9 @@ class API extends \Piwik\Plugin\API if (!empty($idGoal)) { $apiParameters = array('idGoal' => $idGoal); } + if (!empty($idDimension)) { + $apiParameters = array('idDimension' => $idDimension); + } // Fetch the metadata for given api-action $parameters = array( 'idSite' => $idSite, @@ -305,6 +309,7 @@ class API extends \Piwik\Plugin\API 'column' => $plottedMetric, 'language' => $languageLoaded, 'idGoal' => $idGoal, + 'idDimension' => $idDimension, 'legendAppendMetric' => $legendAppendMetric, 'labelUseAbsoluteUrl' => false ); @@ -361,6 +366,7 @@ class API extends \Piwik\Plugin\API 'segment' => $segment, 'apiParameters' => false, 'idGoal' => $idGoal, + 'idDimension' => $idDimension, 'language' => $languageLoaded, 'showTimer' => true, 'hideMetricsDoc' => false, @@ -506,7 +512,10 @@ class API extends \Piwik\Plugin\API if ($idGoal != '') { $idGoal = '_' . $idGoal; } - $fileName = self::$DEFAULT_PARAMETERS[$graphType][self::FILENAME_KEY] . '_' . $apiModule . '_' . $apiAction . $idGoal . ' ' . str_replace(',', '-', $date) . ' ' . $idSite . '.png'; + if ($idDimension != '') { + $idDimension = '__' . $idDimension; + } + $fileName = self::$DEFAULT_PARAMETERS[$graphType][self::FILENAME_KEY] . '_' . $apiModule . '_' . $apiAction . $idGoal . $idDimension . ' ' . str_replace(',', '-', $date) . ' ' . $idSite . '.png'; $fileName = str_replace(array(' ', '/'), '_', $fileName); if (!Filesystem::isValidFilename($fileName)) { |