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:
authorsgiehl <stefan@piwik.org>2013-08-18 03:15:13 +0400
committersgiehl <stefan@piwik.org>2013-08-18 03:15:13 +0400
commitef3a3795470211ae438753738890b01eb2e4ec48 (patch)
tree22720d235f9814a15219af6ec7ef627c0173b0e8 /plugins/LanguagesManager/API.php
parent5f225eac4e7cb3bc1ef13a36b60a3f2215d0662b (diff)
fixes languagesmanager api
Diffstat (limited to 'plugins/LanguagesManager/API.php')
-rw-r--r--plugins/LanguagesManager/API.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/LanguagesManager/API.php b/plugins/LanguagesManager/API.php
index 2c14dcac73..74ae17a4b3 100644
--- a/plugins/LanguagesManager/API.php
+++ b/plugins/LanguagesManager/API.php
@@ -89,16 +89,15 @@ class API
public function getAvailableLanguagesInfo()
{
$data = file_get_contents(PIWIK_INCLUDE_PATH . '/lang/en.json');
- $translations = json_decode($data, true);
- $englishTranslation = $translations;
+ $englishTranslation = json_decode($data, true);
$filenames = $this->getAvailableLanguages();
$languagesInfo = array();
foreach ($filenames as $filename) {
- $data = file_get_contents(PIWIK_INCLUDE_PATH . '/lang/$filename.json');
+ $data = file_get_contents(sprintf('%s/lang/%s.json', PIWIK_INCLUDE_PATH, $filename));
$translations = json_decode($data, true);
$intersect = function($array, $array2) {
- $res = $array();
+ $res = $array;
foreach($array as $module => $keys) {
if(!isset($array2[$module])) {
unset($res[$module]);