File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66};
77use Xmf \Request ;
88
9-
10-
119/** @var Helper $helper */
1210/** @var LanguageHandler $languageHandler */
1311
@@ -126,12 +124,11 @@ public static function langDetect($str = '', $envType = '')
126124 }
127125
128126 /**
129- * @return string
127+ * @return string|bool
130128 */
131129 public static function detectLang ()
132130 {
133131 global $ _SERVER ;
134-
135132 // if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
136133 if (Request::hasVar ('HTTP_ACCEPT_LANGUAGE ' , 'SERVER ' )) {
137134 $ HTTP_ACCEPT_LANGUAGE = Request::getString ('HTTP_ACCEPT_LANGUAGE ' , '' , 'SERVER ' );
@@ -166,7 +163,7 @@ public static function detectLang()
166163 $ lang = static ::langDetect ($ HTTP_USER_AGENT , 2 );
167164 }
168165 // 3. If we catch a valid language, configure it
169- if (!empty ($ lang )) {
166+ if (!empty ($ lang )) {
170167 $ xoops_lang = isset ($ available_languages [$ lang ][1 ])?:'' ;
171168 }
172169
You can’t perform that action at this time.
0 commit comments