Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking if the lang_code was already set in POST #6400

Merged
merged 1 commit into from
Mar 16, 2015

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Mar 11, 2015

If Joomla is requested via POST, we might have already a language defined via the URL and thus don't need to fall back on the cookie value.

Example:
Request via POST to "index.php" => No language given, falling back to cookie or default language
Request via POST to "index.php?lang=en" => Language given, no need to fall back to something else
Request via POST to "/en/component/content/42" => Language given, no need to fall back to something else

Without this path, the last 2 examples will fall back to the default language.

@aruttkamp
Copy link

tested - ok


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6400.

@zero-24
Copy link
Contributor

zero-24 commented Mar 14, 2015

RTC based on testing by @aruttkamp and @kolvar Thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6400.

@infograf768
Copy link
Member

let's wait the cookie issue is solved to look at this one again.

@Hackwar
Copy link
Member Author

Hackwar commented Mar 16, 2015

Why? Should we stop looking at issues in JForm, too, because of the cookie issue? Those 2 are completely different topics.

@infograf768
Copy link
Member

they may be, but it is likely that the languagefilter code will be changed in an important way to solve the cookie issue. Therefore this would have, if still necessary, to be adapted.

@Hackwar
Copy link
Member Author

Hackwar commented Mar 16, 2015

The proposal by @Bakual does not touch this code.

@Bakual
Copy link
Contributor

Bakual commented Mar 16, 2015

What I wonder is if the whole if clause makes sense. The comment says we don't care about language, but we actually do care now. Or am I wrong?

@gwsdesk
Copy link

gwsdesk commented Mar 16, 2015

@test works4me . I cannot judge if sense or not. The tests of PR by Bakual were successful (2/3 tests). I tested this now with #6452 installed and this still works4me

@Hackwar
Copy link
Member Author

Hackwar commented Mar 16, 2015

The comment might have to be adapted.

@Kubik-Rubik
Copy link
Member

Works as described, thanks @Hackwar!

Kubik-Rubik added a commit that referenced this pull request Mar 16, 2015
Checking if the lang_code was already set in POST
@Kubik-Rubik Kubik-Rubik merged commit 3444f1c into joomla:staging Mar 16, 2015
@Kubik-Rubik Kubik-Rubik added this to the Joomla! 3.4.1 milestone Mar 16, 2015
@ghost
Copy link

ghost commented Mar 16, 2015

The $lang_code could be not initialised in your check yet.
So shouldn't it be:

if (!isset($lang_code))

@Hackwar Hackwar deleted the patch-42 branch March 16, 2015 14:55
@Kubik-Rubik
Copy link
Member

@nonumber Thank you for the catch, fixed with: #6458

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.

None yet

8 participants