librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1461] Use the actually selected language for the lang


From: Michael Sheldon
Subject: [Librefm-commits] [1461] Use the actually selected language for the language array, this supports the automatically detected languages and $_COOKIE['lang'] ( previously only $_GET['lang'] was used because $_COOKIE['lang'] has ".UTF-8 " appended to it)
Date: Sun, 10 May 2009 09:54:10 +0000

Revision: 1461
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1461
Author:   elleo
Date:     2009-05-10 09:54:09 +0000 (Sun, 10 May 2009)
Log Message:
-----------
Use the actually selected language for the language array, this supports the 
automatically detected languages and $_COOKIE['lang'] (previously only 
$_GET['lang'] was used because $_COOKIE['lang'] has ".UTF-8" appended to it)

Modified Paths:
--------------
    trunk/nixtape/templating.php

Modified: trunk/nixtape/templating.php
===================================================================
--- trunk/nixtape/templating.php        2009-05-10 09:32:46 UTC (rev 1460)
+++ trunk/nixtape/templating.php        2009-05-10 09:54:09 UTC (rev 1461)
@@ -54,10 +54,8 @@
 $smarty->cache_dir = $install_path. '/cache/';
 
 $current_lang = preg_replace('/.UTF-8/', '', $current_lang);
-
 $smarty->assign('current_lang', $current_lang);
-$smarty->assign('lang_selector_array',
-       array((isset($_GET['lang'])?$_GET['lang']:$_COOKIE['lang']) => 1));
+$smarty->assign('lang_selector_array', array(($current_lang) => 1));
 $smarty->assign('base_url', $base_url);
 $smarty->assign('this_page', $_SERVER['REQUEST_URI']);
 $smarty->assign('this_page_absolute',





reply via email to

[Prev in Thread] Current Thread [Next in Thread]