Cleanups, fixes and a bit of optimizations for site/components batch #4#12293
Cleanups, fixes and a bit of optimizations for site/components batch #4#12293rdeutz merged 9 commits intojoomla:stagingfrom frankmayer:site-com_mailto-com_newsfeeds-com_search
Conversation
- com_mailto - com_newsfeeds - com_search Note: This is a single commit bundling all types of changes, since PR #12261 which had detailed commits, was rejected as a whole
components/com_mailto/controller.php
Outdated
|
|
||
| // Build the message to send | ||
| $msg = JText::_('COM_MAILTO_EMAIL_MSG'); | ||
| $link = $link; |
| $levels = $user->getAuthorisedViewLevels(); | ||
|
|
||
| if (!in_array($item->access, $levels) or ((in_array($item->access, $levels) and (!in_array($item->category_access, $levels))))) | ||
| if (!in_array($item->access, $levels) or in_array($item->access, $levels) and (!in_array($item->category_access, $levels))) |
There was a problem hiding this comment.
why not replace the and and or here?
There was a problem hiding this comment.
Slipped through...
There was a problem hiding this comment.
also maybe you need to add one parenthisis here. not sure tough
There was a problem hiding this comment.
Yes, precedence maybe.. I mostly picked low hanging fruit.. That's possibly why this one "slipped through" 😄
|
I have tested this item ✅ successfully on c34e7bf This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12293. |
# Conflicts: # components/com_newsfeeds/helpers/route.php # components/com_newsfeeds/router.php # components/com_newsfeeds/views/categories/tmpl/default_items.php # components/com_newsfeeds/views/category/tmpl/default_items.php # components/com_newsfeeds/views/newsfeed/tmpl/default.php
|
I have tested this item ✅ successfully on 2b4d825 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12293. |
# Conflicts: # components/com_newsfeeds/helpers/route.php # components/com_newsfeeds/views/newsfeed/tmpl/default.php # components/com_newsfeeds/views/newsfeed/view.html.php
|
Fixed some conflicts that had occurred in the meantime. |
| $user = JFactory::getUser(); | ||
|
|
||
| if ($user->get('id') || ($this->input->getMethod() == 'POST' && $vName == 'category' )) | ||
| if ($user->get('id') || ($this->input->getMethod() === 'POST' && $vName === 'category' )) |
There was a problem hiding this comment.
Remove extra space 'category' )).
| // Check for published state if filter set. | ||
|
|
||
| if (((is_numeric($published)) || (is_numeric($archived))) && (($data->published != $published) && ($data->published != $archived))) | ||
| if ((is_numeric($published) || is_numeric($archived)) && (($data->published != $published) && ($data->published != $archived))) |
There was a problem hiding this comment.
Change (($data->published != $published) && ($data->published != $archived)) to $data->published != $published && $data->published != $archived.
components/com_newsfeeds/router.php
Outdated
|
|
||
| // Are we dealing with a newsfeed that is attached to a menu item? | ||
| if (isset($query['view']) && ($mView == $query['view']) and (isset($query['id'])) and ($mId == (int) $query['id'])) | ||
| if (isset($query['view'], $query['id']) && ($mView == $query['view']) && ($mId == (int) $query['id'])) |
There was a problem hiding this comment.
Change && ($mView == $query['view']) && ($mId == (int) $query['id']) to && $mView == $query['view'] && $mId == (int) $query['id'].
|
|
||
| <form action="<?php echo htmlspecialchars(JUri::getInstance()->toString(), ENT_COMPAT, 'UTF-8'); ?>" method="post" name="adminForm" id="adminForm"> | ||
| <?php if ((($this->params->get('filter_field') != 'hide') || ($this->params->get('filter_field') != '0')) || $this->params->get('show_pagination_limit')) :?> | ||
| <?php if ((($this->params->get('filter_field') !== 'hide') || ($this->params->get('filter_field') != '0')) || $this->params->get('show_pagination_limit')) :?> |
| <?php if ((($this->params->get('filter_field') !== 'hide') || ($this->params->get('filter_field') != '0')) || $this->params->get('show_pagination_limit')) :?> | ||
| <fieldset class="filters btn-toolbar"> | ||
| <?php if (($this->params->get('filter_field') != 'hide') || ($this->params->get('filter_field') != '0')) :?> | ||
| <?php if (($this->params->get('filter_field') !== 'hide') || ($this->params->get('filter_field') != '0')) :?> |
| $direction = ' '; | ||
|
|
||
| if ($lang->isRtl() && $myrtl == 0) | ||
| $isRtl= $lang->isRtl(); |
# Conflicts: # components/com_newsfeeds/views/category/tmpl/default_items.php # components/com_search/controller.php # components/com_search/views/search/view.html.php
- Some more changes in updated stuff
|
I have tested this item ✅ successfully on 6cc4c65 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12293. |
andrepereiradasilva
left a comment
There was a problem hiding this comment.
one question with strict compare a integer type with mixed(?) type. please check
the rest seems fine
components/com_newsfeeds/router.php
Outdated
| else | ||
| { | ||
| if ($child->id == (int) $segment) | ||
| if ($child->id === (int) $segment) |
There was a problem hiding this comment.
are you sure the categories child id is a integer?
see https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/categories/categories.php#L722 for instance
There was a problem hiding this comment.
Not sure. Will check. According to the property's docblock it is an integer, but I am not sure if we can trust that. See: https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/categories/categories.php#L395
|
I have tested this item ✅ successfully on 5b88330 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12293. |
|
@franz-wohlkoenig RTC please , thank you |
|
RTC after two successful tests. |
Note: This is a single commit bundling all types of changes, since PR #12261 which had detailed commits, was rejected as a whole