Skip to content

added check for missing HTTP_ACCEPT_LANGUAGE and minor change in de translation#334

Open
HonkXL wants to merge 3 commits intosplitbrain:masterfrom
HonkXL:master
Open

added check for missing HTTP_ACCEPT_LANGUAGE and minor change in de translation#334
HonkXL wants to merge 3 commits intosplitbrain:masterfrom
HonkXL:master

Conversation

@HonkXL
Copy link
Copy Markdown

@HonkXL HonkXL commented Oct 30, 2025

Added check for missing HTTP_ACCEPT_LANGUAGE. Some Browsers and Bots are not sendig this header. This results in many errors in the DokuWiki-Log.

minor change in de translation: "Fehlt" changed to "fehlt" to be consistent with the other words that are lowercased.

added a check if HTTP_ACCEPT_LANGUAGE header exists. Some bots and browsers don't send this and this results in error messages in the log
Changed "Fehlt" to "fehlt" to be consistent.
Changed "Fehlt" to "fehlt" to be consistent
global $conf;
$langs = $this->translations;
// Check if HTTP_ACCEPT_LANGUAGE header exists
if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) || empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty() includes the isset check. no need for both.

{
global $conf;
$langs = $this->translations;
// Check if HTTP_ACCEPT_LANGUAGE header exists
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is a bit silly, it basically repeats what the code says

@splitbrain
Copy link
Copy Markdown
Owner

@copilot please review my comments and create a pr fixing them

@splitbrain
Copy link
Copy Markdown
Owner

well, it was worth a try but seems not work. will the issues myself when I get to a computer....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants