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:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-12 02:50:35 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-12 02:50:35 +0400
commit23ad82a8ea00a080922dfdb3b0ac9a018bfd3c7b (patch)
treed2e0e084e6f7cdf6439967253fbb9172c42db3d2 /plugins/UserCountry
parentf52c1e83aef857b6cf073f1f9fb00c6982f8d7d2 (diff)
some more reports, bugfixes, migrations to new structure
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r--plugins/UserCountry/Reports/GetCity.php6
-rw-r--r--plugins/UserCountry/Reports/GetContinent.php6
-rw-r--r--plugins/UserCountry/Reports/GetCountry.php6
-rw-r--r--plugins/UserCountry/Reports/GetRegion.php6
-rw-r--r--plugins/UserCountry/UserCountry.php50
5 files changed, 12 insertions, 62 deletions
diff --git a/plugins/UserCountry/Reports/GetCity.php b/plugins/UserCountry/Reports/GetCity.php
index 0cd0acb390..51f9a3baa3 100644
--- a/plugins/UserCountry/Reports/GetCity.php
+++ b/plugins/UserCountry/Reports/GetCity.php
@@ -19,7 +19,7 @@ class GetCity extends Base
parent::init();
$this->dimension = new City();
$this->name = Piwik::translate('UserCountry_City');
- $this->documentation = ''; // TODO
+ $this->documentation = Piwik::translate('UserCountry_getCityDocumentation') . '<br/>' . $this->getGeoIPReportDocSuffix();
$this->metrics = array('nb_visits', 'nb_uniq_visitors', 'nb_actions');
$this->order = 8;
$this->widgetTitle = Piwik::translate('UserCountry_WidgetLocation')
@@ -30,8 +30,8 @@ class GetCity extends Base
{
$view->config->show_exclude_low_population = false;
$view->config->show_goals = true;
- $view->config->documentation = Piwik::translate('UserCountry_getCityDocumentation') . '<br/>' . $this->getGeoIPReportDocSuffix();
- $view->config->addTranslation('label', Piwik::translate('UserCountry_City'));
+ $view->config->documentation = $this->documentation;
+ $view->config->addTranslation('label', $this->dimension->getName());
$view->requestConfig->filter_limit = 5;
diff --git a/plugins/UserCountry/Reports/GetContinent.php b/plugins/UserCountry/Reports/GetContinent.php
index 1c0c0c35f1..129c740555 100644
--- a/plugins/UserCountry/Reports/GetContinent.php
+++ b/plugins/UserCountry/Reports/GetContinent.php
@@ -19,7 +19,7 @@ class GetContinent extends Base
parent::init();
$this->dimension = new Continent();
$this->name = Piwik::translate('UserCountry_Continent');
- $this->documentation = ''; // TODO
+ $this->documentation = Piwik::translate('UserCountry_getContinentDocumentation');
$this->metrics = array('nb_visits', 'nb_uniq_visitors', 'nb_actions');
$this->order = 6;
$this->widgetTitle = Piwik::translate('UserCountry_WidgetLocation')
@@ -34,8 +34,8 @@ class GetContinent extends Base
$view->config->show_offset_information = false;
$view->config->show_pagination_control = false;
$view->config->show_limit_control = false;
- $view->config->documentation = Piwik::translate('UserCountry_getContinentDocumentation');
- $view->config->addTranslation('label', Piwik::translate('UserCountry_Continent'));
+ $view->config->documentation = $this->documentation;
+ $view->config->addTranslation('label', $this->dimension->getName());
}
}
diff --git a/plugins/UserCountry/Reports/GetCountry.php b/plugins/UserCountry/Reports/GetCountry.php
index 3c022a1a85..0043c6a33c 100644
--- a/plugins/UserCountry/Reports/GetCountry.php
+++ b/plugins/UserCountry/Reports/GetCountry.php
@@ -20,7 +20,7 @@ class GetCountry extends Base
parent::init();
$this->dimension = new Country();
$this->name = Piwik::translate('UserCountry_Country');
- $this->documentation = ''; // TODO
+ $this->documentation = Piwik::translate('UserCountry_getCountryDocumentation');
$this->metrics = array('nb_visits', 'nb_uniq_visitors', 'nb_actions');
$this->order = 5;
$this->widgetTitle = Piwik::translate('UserCountry_WidgetLocation')
@@ -31,8 +31,8 @@ class GetCountry extends Base
{
$view->config->show_goals = true;
$view->config->show_exclude_low_population = false;
- $view->config->addTranslation('label', Piwik::translate('UserCountry_Country'));
- $view->config->documentation = Piwik::translate('UserCountry_getCountryDocumentation');
+ $view->config->addTranslation('label', $this->dimension->getName());
+ $view->config->documentation = $this->documentation;
$view->requestConfig->filter_limit = 5;
diff --git a/plugins/UserCountry/Reports/GetRegion.php b/plugins/UserCountry/Reports/GetRegion.php
index 174d14b96b..071f6ce326 100644
--- a/plugins/UserCountry/Reports/GetRegion.php
+++ b/plugins/UserCountry/Reports/GetRegion.php
@@ -19,7 +19,7 @@ class GetRegion extends Base
parent::init();
$this->dimension = new Region();
$this->name = Piwik::translate('UserCountry_Region');
- $this->documentation = ''; // TODO
+ $this->documentation = Piwik::translate('UserCountry_getRegionDocumentation') . '<br/>' . $this->getGeoIPReportDocSuffix();
$this->metrics = array('nb_visits', 'nb_uniq_visitors', 'nb_actions');
$this->order = 7;
$this->widgetTitle = Piwik::translate('UserCountry_WidgetLocation')
@@ -30,8 +30,8 @@ class GetRegion extends Base
{
$view->config->show_exclude_low_population = false;
$view->config->show_goals = true;
- $view->config->documentation = Piwik::translate('UserCountry_getRegionDocumentation') . '<br/>' . $this->getGeoIPReportDocSuffix();
- $view->config->addTranslation('label', Piwik::translate('UserCountry_Region'));
+ $view->config->documentation = $this->documentation;
+ $view->config->addTranslation('label', $this->dimension->getName());
$view->requestConfig->filter_limit = 5;
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index 410a7f5696..2517290158 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -37,7 +37,6 @@ class UserCountry extends \Piwik\Plugin
{
$hooks = array(
'Goals.getReportsWithGoalMetrics' => 'getReportsWithGoalMetrics',
- 'API.getReportMetadata' => 'getReportMetadata',
'API.getSegmentDimensionMetadata' => 'getSegmentsMetadata',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
@@ -213,55 +212,6 @@ class UserCountry extends \Piwik\Plugin
);
}
- public function getReportMetadata(&$reports)
- {
- $metrics = array(
- 'nb_visits' => Piwik::translate('General_ColumnNbVisits'),
- 'nb_uniq_visitors' => Piwik::translate('General_ColumnNbUniqVisitors'),
- 'nb_actions' => Piwik::translate('General_ColumnNbActions'),
- );
-
- $reports[] = array(
- 'category' => Piwik::translate('General_Visitors'),
- 'name' => Piwik::translate('UserCountry_Country'),
- 'module' => 'UserCountry',
- 'action' => 'getCountry',
- 'dimension' => Piwik::translate('UserCountry_Country'),
- 'metrics' => $metrics,
- 'order' => 5,
- );
-
- $reports[] = array(
- 'category' => Piwik::translate('General_Visitors'),
- 'name' => Piwik::translate('UserCountry_Continent'),
- 'module' => 'UserCountry',
- 'action' => 'getContinent',
- 'dimension' => Piwik::translate('UserCountry_Continent'),
- 'metrics' => $metrics,
- 'order' => 6,
- );
-
- $reports[] = array(
- 'category' => Piwik::translate('General_Visitors'),
- 'name' => Piwik::translate('UserCountry_Region'),
- 'module' => 'UserCountry',
- 'action' => 'getRegion',
- 'dimension' => Piwik::translate('UserCountry_Region'),
- 'metrics' => $metrics,
- 'order' => 7,
- );
-
- $reports[] = array(
- 'category' => Piwik::translate('General_Visitors'),
- 'name' => Piwik::translate('UserCountry_City'),
- 'module' => 'UserCountry',
- 'action' => 'getCity',
- 'dimension' => Piwik::translate('UserCountry_City'),
- 'metrics' => $metrics,
- 'order' => 8,
- );
- }
-
public function getReportsWithGoalMetrics(&$dimensions)
{
$dimensions = array_merge($dimensions, array(