From a716ef8c47d3311f1c3fd483f3275ef781e94b42 Mon Sep 17 00:00:00 2001
From: Bob Le Bricodeur <Mr.Bricodage@gmail.com>
Date: Wed, 12 Nov 2014 21:28:27 +0100
Subject: [PATCH] delete configuration option $show_language_bar_selection
 condition is based on the number of languages configured

---
 app/inc/config.inc.php | 3 ---
 bandeaux.php           | 3 ++-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/inc/config.inc.php b/app/inc/config.inc.php
index f702747c..07488aa3 100644
--- a/app/inc/config.inc.php
+++ b/app/inc/config.inc.php
@@ -24,9 +24,6 @@
 	 //use email for polls creation/modification/responses notification
 	 $use_smtp = true;
 	 
-	 //if only one language is allowed in constants.php, $ALLOWED_LANGUAGES, the language selection bar is useless
-	 $show_language_bar_selection = true;
-	 
  /**
  * index.php
  */
diff --git a/bandeaux.php b/bandeaux.php
index b3c02496..dd2e1d35 100644
--- a/bandeaux.php
+++ b/bandeaux.php
@@ -23,10 +23,11 @@ include_once __DIR__ . '/app/inc/init.php';
 // bandeaux de titre
 function bandeau_titre($titre)
 {
+	global $ALLOWED_LANGUAGES;
     $img = ( IMAGE_TITRE ) ? '<img src="'. Utils::get_server_name(). IMAGE_TITRE. '" alt="'.NOMAPPLICATION.'">' : '';
     echo '
     <header role="banner">';
-    if(config_get('show_language_bar_selection')){
+    if(count($ALLOWED_LANGUAGES)>1){ 
 		echo '<form method="post" action="#">
             <div class="input-group input-group-sm pull-right col-md-2 col-xs-4">
                 <select name="lang" class="form-control" title="'. _("Select the language") .'" >' . liste_lang() . '</select>
-- 
GitLab