Changeset 17069
- Timestamp:
- Jul 25, 2012, 10:26:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/plugins/language_switch/language_switch.inc.php
r15923 r17069 88 88 function language_controler_flags() 89 89 { 90 global $user, $template, $conf ;90 global $user, $template, $conf, $page; 91 91 92 92 $available_lang = get_languages(); … … 98 98 99 99 $url_starting = get_query_string_diff(array('lang')); 100 100 101 if ($page['section'] == 'additional_page' and isset($page['additional_page'])) 102 { 103 $base_url = make_index_url(array('section'=>'page')).'/'.(isset($page['additional_page']['permalink']) ? $page['additional_page']['permalink'] : $page['additional_page']['id']); 104 } 105 else 106 { 107 $base_url = duplicate_index_url(); 108 } 109 101 110 foreach ($available_lang as $code => $displayname) 102 111 { 112 103 113 $qlc = array ( 104 'url' => add_url_params( duplicate_index_url(), array('lang'=> $code)),114 'url' => add_url_params($base_url, array('lang'=> $code)), 105 115 'alt' => ucwords($displayname), 106 116 'title' => substr($displayname, 0, -4), // remove [FR] or [RU]
Note: See TracChangeset
for help on using the changeset viewer.