mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
fix PHP Notice: Undefined index: HTTP_ACCEPT_LANGUAGE
This commit is contained in:
@@ -67,8 +67,7 @@ $debug = 0; // Set this to 1 if you are looking f
|
|||||||
// LimeSurvey developers: Set this to 3 to circumvent the restriction to remove the installation directory and full access to standard templates
|
// LimeSurvey developers: Set this to 3 to circumvent the restriction to remove the installation directory and full access to standard templates
|
||||||
// or to change the password. If you set it to 3 then PHP STRICT warnings will be shown additionally.
|
// or to change the password. If you set it to 3 then PHP STRICT warnings will be shown additionally.
|
||||||
|
|
||||||
$defaultlang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
$defaultlang = isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) : DEFAULT_LOCALE;
|
||||||
if (empty($defaultlang)) $defaultlang = DEFAULT_LOCALE;
|
|
||||||
|
|
||||||
$defaulttemplate = "quexs";
|
$defaulttemplate = "quexs";
|
||||||
$siteadminemail = "quexs@acspri.org.au";
|
$siteadminemail = "quexs@acspri.org.au";
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ function TQ_($msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$locale = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
$locale = isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) : DEFAULT_LOCALE;
|
||||||
if (empty($locale)) $locale = DEFAULT_LOCALE;
|
|
||||||
T_setlocale(LC_MESSAGES, $locale);
|
T_setlocale(LC_MESSAGES, $locale);
|
||||||
T_bindtextdomain($locale, dirname(__FILE__)."/locale");
|
T_bindtextdomain($locale, dirname(__FILE__)."/locale");
|
||||||
T_bind_textdomain_codeset($locale, 'UTF-8');
|
T_bind_textdomain_codeset($locale, 'UTF-8');
|
||||||
|
|||||||
Reference in New Issue
Block a user