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

Fix for Page Navigation Plugin on User Auth View #5698

Merged
merged 2 commits into from
Jan 13, 2015
Merged

Fix for Page Navigation Plugin on User Auth View #5698

merged 2 commits into from
Jan 13, 2015

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented Jan 13, 2015

Fix for issue: #5685 (see that issue for testing instruction)

The Article Pagination "Prev" & "Next" used the current article's Access Level (with "AND a.access = ' . (int) $row->access)") to navigate among articles within the same Category. That caused problems with Articles from the same Category that had different Access Levels.

This fix checks the User's authorized Access Levels (with "AND a.access IN ('.implode(",", JAccess::getAuthorisedViewLevels($user->id)).') ')" instead.

Note: using "IN" in SQL queries might be slower than "equal". I have not tested this fix on categories with huge numbers of articles!

Fix for issue: #5685

The Article Pagination "Prev" & "Next" used the current article's Access Level (with "AND a.access = ' . (int) $row->access)") to navigate among articles within the same Category. That caused problems with Articles from the same Category that had different Access Levels.

This fix checks the User's authorized Access Levels (with "AND a.access IN ('.implode(",", JAccess::getAuthorisedViewLevels($user->id)).') ')" instead.

Note: using "IN" in SQL queries might be slower than "equal". I have not tested this fix on categories with huge numbers of articles!
@rdeutz
Copy link
Contributor

rdeutz commented Jan 13, 2015

You forget to make spaces before and after "." could you fix that to make travis happy, Thanks :-)

@pe7er
Copy link
Contributor Author

pe7er commented Jan 13, 2015

Ah, I noticed the Travis error but did not know the cause.
Thanks Robert!

Fixed code style (spaces around the concatenating dots).
Travis was not happy with my 1st PR #5698
@Hackwar
Copy link
Member

Hackwar commented Jan 13, 2015

@test successfull

@Kubik-Rubik
Copy link
Member

Thank you @pe7er, this PR fixes the problem.

I will merge the PR and close it!


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

Kubik-Rubik added a commit that referenced this pull request Jan 13, 2015
Fix for Page Navigation Plugin on User Auth View
@Kubik-Rubik Kubik-Rubik merged commit b835d78 into joomla:staging Jan 13, 2015
@pe7er
Copy link
Contributor Author

pe7er commented Jan 13, 2015

Great! Thank you all for testing!

@Kubik-Rubik Kubik-Rubik added this to the Joomla! 3.4.0 milestone Jan 13, 2015
@pe7er pe7er deleted the patch-3 branch November 5, 2015 00:08
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

5 participants