-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Cleanups, fixes and a bit of optimizations for site/components batch #3 #12292
Changes from 1 commit
fe3b1cb
5c98de1
13f5fee
c0b68fc
acd28f7
e32aabd
2d966e2
0e94075
876073b
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 |
---|---|---|
|
@@ -286,7 +286,6 @@ protected function getReturnPage() | |
*/ | ||
protected function postSaveHook(JModelLegacy $model, $validData = array()) | ||
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. Can we remove this? 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. Do you mean revert the removal? 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. forget it this is inhreited from https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/controller/form.php#L527 |
||
{ | ||
return; | ||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,9 +180,7 @@ public static function buildVotingQuery($params = null) | |
$join = ''; | ||
} | ||
|
||
$results = array ('select' => $select, 'join' => $join); | ||
|
||
return $results; | ||
return array ('select' => $select, 'join' => $join); | ||
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. can we remove the space here? |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,7 +187,7 @@ protected function populateState($ordering = null, $direction = null) | |
$this->setState('list.start', $app->input->get('limitstart', 0, 'uint')); | ||
|
||
// Set limit for query. If list, use parameter. If blog, add blog parameters for limit. | ||
if (($app->input->get('layout') == 'blog') || $params->get('layout_type') == 'blog') | ||
if (($app->input->get('layout') === 'blog') || $params->get('layout_type') === 'blog') | ||
{ | ||
$limit = $params->get('num_leading_articles') + $params->get('num_intro_articles') + $params->get('num_links'); | ||
$this->setState('list.links', $params->get('num_links')); | ||
|
@@ -457,9 +457,10 @@ public function &getChildren() | |
{ | ||
$params = $this->getState()->get('params'); | ||
|
||
if ($params->get('orderby_pri') == 'alpha' || $params->get('orderby_pri') == 'ralpha') | ||
$orderByPri = $params->get('orderby_pri'); | ||
if ($orderByPri === 'alpha' || $orderByPri === 'ralpha') | ||
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. cs: can we have an aempty line before the if statement? 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. of course :) |
||
{ | ||
$this->_children = ArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') == 'alpha') ? 1 : (-1)); | ||
$this->_children = ArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') === 'alpha') ? 1 : (-1)); | ||
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. why are we getting |
||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,17 +179,15 @@ public function getReturnPage() | |
public function save($data) | ||
{ | ||
// Associations are not edited in frontend ATM so we have to inherit them | ||
if (JLanguageAssociations::isEnabled() && !empty($data['id'])) | ||
if (JLanguageAssociations::isEnabled() && !empty($data['id']) | ||
&& $associations = JLanguageAssociations::getAssociations('com_content', '#__content', 'com_content.item', $data['id'])) | ||
{ | ||
if ($associations = JLanguageAssociations::getAssociations('com_content', '#__content', 'com_content.item', $data['id'])) | ||
{ | ||
foreach ($associations as $tag => $associated) | ||
{ | ||
$associations[$tag] = (int) $associated->id; | ||
} | ||
|
||
$data['associations'] = $associations; | ||
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. if you remove one if block you should remove one tab inside the if. 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. Noted as in other PR |
||
} | ||
} | ||
|
||
return parent::save($data); | ||
|
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.
Just kill the entire function. It will fall back to
JControllerForm
https://github.com/frankmayer/joomla-cms/blob/c0b68fcdf7735dbd4d86aaf24d87dfab9b53db8a/libraries/legacy/controller/form.php#L520There 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.
Yes, you are right. I didn't follow the trail, there. Thanks