diff --git a/common_config.php b/common_config.php index 0feca52..9222f7d 100644 --- a/common_config.php +++ b/common_config.php @@ -69,7 +69,7 @@ if($language!=='en'){ function print_langs(){ global $I, $L; echo "$I[language]: "; - $query=preg_replace('/(&?lang=[a-z_\-]*)/i', '', $_SERVER['QUERY_STRING']); + $query=ltrim(preg_replace('/&?lang=[a-z_\-]*/i', '', $_SERVER['QUERY_STRING']), '&'); foreach($L as $code=>$name){ if($query===''){ $uri="?lang=$code";