Browse Source

Merge pull request #403 from ilosada/7272

7272
Yannick Warnier 10 years ago
parent
commit
4483a76cad
2 changed files with 4 additions and 3 deletions
  1. 2 1
      main/inc/lib/banner.lib.php
  2. 2 2
      main/inc/lib/plugin.class.php

+ 2 - 1
main/inc/lib/banner.lib.php

@@ -116,7 +116,8 @@ function get_tabs() {
             if (api_get_setting($tab['variable'], $tab['subkey']) == 'true') {
                 if (!empty($tab['comment']) && $tab['comment'] !== 'ShowTabsComment') {
                     $navigation[$tab['subkey']]['url'] = $tab['comment'];
-                    $navigation[$tab['subkey']]['title'] = $tab['title'];
+                    // $tab['title'] value must be included in trad4all.inc.php
+                    $navigation[$tab['subkey']]['title'] = get_lang($tab['title']);
                     $navigation[$tab['subkey']]['key'] = $tab['subkey'];
                 }
             }

+ 2 - 2
main/inc/lib/plugin.class.php

@@ -653,7 +653,7 @@ class Plugin
         $pluginName = strtolower($langString);
         $pluginUrl = 'plugin/'.$pluginName.'/'.$filePath;
         if ($showTab === 'true') {
-            $tabAdded = $this->addTab($this->get_lang($langString), $pluginUrl);
+            $tabAdded = $this->addTab($langString, $pluginUrl);
             if ($tabAdded) {
                 // The page must be refreshed to show the recently created tab
                 echo "<script>location.href = '".Security::remove_XSS($_SERVER['REQUEST_URI'])."';</script>";
@@ -663,7 +663,7 @@ class Plugin
             $conditions = array(
                 'where' => array(
                     "variable = 'show_tabs' AND title = ? AND comment = ? " => array(
-                        $this->get_lang($langString),
+                        $langString,
                         $pluginUrl
                     )
                 )