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:
Diffstat (limited to 'plugins/UserLanguage/UserLanguage.php')
-rw-r--r--plugins/UserLanguage/UserLanguage.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/UserLanguage/UserLanguage.php b/plugins/UserLanguage/UserLanguage.php
index be892d4196..7bb409a5e3 100644
--- a/plugins/UserLanguage/UserLanguage.php
+++ b/plugins/UserLanguage/UserLanguage.php
@@ -22,7 +22,8 @@ class UserLanguage extends \Piwik\Plugin
public function registerEvents()
{
return array(
- 'Live.getAllVisitorDetails' => 'extendVisitorDetails'
+ 'Live.getAllVisitorDetails' => 'extendVisitorDetails',
+ 'Request.getRenamedModuleAndAction' => 'renameUserSettingsModuleAndAction',
);
}
@@ -44,4 +45,11 @@ class UserLanguage extends \Piwik\Plugin
$out .= '<h2 piwik-enriched-headline>' . Piwik::translate('UserLanguage_BrowserLanguage') . '</h2>';
$out .= FrontController::getInstance()->fetchDispatch('UserLanguage', 'getLanguage');
}
-} \ No newline at end of file
+
+ public function renameUserSettingsModuleAndAction(&$module, &$action)
+ {
+ if ($module == 'UserSettings' && ($action == 'getLanguage' || $action == 'getLanguageCode')) {
+ $module = 'UserLanguage';
+ }
+ }
+}