Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/cms/html/behavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public static function tooltip($selector = '.hasTip', $params = array())
$opt['showDelay'] = (isset($params['showDelay'])) ? (int) $params['showDelay'] : null;
$opt['hideDelay'] = (isset($params['hideDelay'])) ? (int) $params['hideDelay'] : null;
$opt['className'] = (isset($params['className'])) ? $params['className'] : null;
$opt['fixed'] = (isset($params['fixed']) && ($params['fixed'])) ? true : false;
$opt['fixed'] = (isset($params['fixed']) && ($params['fixed']));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove parentheses in ($params['fixed']). Also the outside parentheses can be removed in this line and the other lines too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed. Thanks. Have found one or two other improvements as well. Commit follows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out, some of the other improvements, were already in other PR's which have not been merged yet. It would be good to get the other improvements merged, too.

$opt['onShow'] = (isset($params['onShow'])) ? '\\' . $params['onShow'] : null;
$opt['onHide'] = (isset($params['onHide'])) ? '\\' . $params['onHide'] : null;

Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public static function startAccordion($selector = 'myAccordian', $params = array

// Setup options object
$opt['parent'] = isset($params['parent']) ? ($params['parent'] == true ? '#' . $selector : $params['parent']) : false;
$opt['toggle'] = isset($params['toggle']) ? (boolean) $params['toggle'] : ($opt['parent'] === false || isset($params['active']) ? false : true);
$opt['toggle'] = isset($params['toggle']) ? (boolean) $params['toggle'] : !($opt['parent'] === false || isset($params['active']));
$onShow = isset($params['onShow']) ? (string) $params['onShow'] : null;
$onShown = isset($params['onShown']) ? (string) $params['onShown'] : null;
$onHide = isset($params['onHide']) ? (string) $params['onHide'] : null;
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/html/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected static function loadBehavior($group, $params = array())
$opt['descriptionSelector'] = "dd.tabs";

// When use storage is set and value is false - By default we allow to use storage
$opt['useStorage'] = (isset($params['useCookie']) && !$params['useCookie']) ? false : true;
$opt['useStorage'] = !(isset($params['useCookie']) && !$params['useCookie']);

$options = JHtml::getJSObject($opt);

Expand Down