-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[com_content] Fix layout in category link #20200
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,10 +79,8 @@ public static function getCategoryRoute($catid, $language = 0) | |
$link .= '&lang=' . $language; | ||
} | ||
|
||
$jinput = JFactory::getApplication()->input; | ||
$layout = $jinput->get('layout'); | ||
|
||
if ($layout !== '') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's just a cosmetic suggestion. Instead of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, I somehow did not even think. Done |
||
$layout = JFactory::getApplication()->input->get('layout', '', 'string'); | ||
if (!empty($layout)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add blank line above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
{ | ||
$link .= '&layout=' . $layout; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO 'cmd' should be better than 'string'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if CMD layout was
templatelayout
and bug still alive if stringtemplate:layout
this bug was on my site =)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the layout can contain colon, then yes, I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@csthomas You were not wrong, just a filter designed for parameters why ignores the colon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern for CMD is
$pattern = '/[^A-Z0-9_\.-]/i';
.There could be a two options: add colon to filter code or replace colon to dot in layout.
The same as work for
task=controller.method
.At now you do not have an option, stay with string.