aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-09-08 10:50:05 +0000
committerplegall <plg@piwigo.org>2011-09-08 10:50:05 +0000
commit9ebf049b69ce1ea0a586b12c2a08b5b7578026ab (patch)
treeb745ad2575cf360b3807f8433db065b97ba58521 /plugins
parentff46db430bd2aa265c16bbd6ff17e0bae710d332 (diff)
back merge r12103 on LanguageSwitch, this should be another commit, this coding is not finished yet
git-svn-id: http://piwigo.org/svn/trunk@12104 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_switch/flags.tpl2
-rw-r--r--plugins/language_switch/language_switch.inc.php16
2 files changed, 7 insertions, 11 deletions
diff --git a/plugins/language_switch/flags.tpl b/plugins/language_switch/flags.tpl
index 3add5c1a2..9bf88dba6 100644
--- a/plugins/language_switch/flags.tpl
+++ b/plugins/language_switch/flags.tpl
@@ -19,7 +19,7 @@
{foreach from=$lang_switch.flags key=code item=flag name=f}
<li>
- <a rel="nofollow" href="{$flag.url}">
+ <a rel="nofollow" href="{$SCRIPT_NAME}{$flag.url}">
<img class="flags" src="{$flag.img}" alt="{$flag.alt}" title="{$flag.alt}"/> {$flag.title}
</a>
</li>
diff --git a/plugins/language_switch/language_switch.inc.php b/plugins/language_switch/language_switch.inc.php
index 3f782e1f7..a1d85a4ca 100644
--- a/plugins/language_switch/language_switch.inc.php
+++ b/plugins/language_switch/language_switch.inc.php
@@ -100,19 +100,15 @@ UPDATE '.USER_INFOS_TABLE.'
}
$url_starting = get_query_string_diff(array('lang'));
-
- echo htmlspecialchars($url_starting).'<br>';
foreach ($available_lang as $code => $displayname)
{
- $qlc = array (
- // 'url' => duplicate_index_url().'&amp;lang='.$code,
- 'url' => add_url_params(duplicate_index_url(), array('lang'=> $code)),
- // 'url' => str_replace(
- // array('=&amp;','?&amp;'),
- // array('&amp;','?'),
- // add_url_params($url_starting, array('lang'=> $code))
- // ),
+ $qlc = array (
+ 'url' => str_replace(
+ array('=&amp;','?&amp;'),
+ array('&amp;','?'),
+ add_url_params($url_starting, array('lang'=> $code))
+ ),
'alt' => ucwords($displayname),
'title' => substr($displayname, 0, -4), // remove [FR] or [RU]
'img' => get_root_url().'language/'.$code.'/'.$code.'.jpg',