Avoid null column showing on groups search page #22724
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Avoid null column showing on groups search page.
Before
Currently, if you setup a child group (e.g. a mailing group) and then try to view that group, an extra column is shown with the text content "null". For example, as seen on dmaster:
After
The extra "null" column does not appear:
Technical Details
The group search page had some JavaScript checking whether "0" or "1" were truthy. As both were strings both were truthy. Therefore, now a proper boolean is used which works correctly.
Comments
I belive the extra column is intended to show the organisation in a multisite setup. I don't have such a site to hand to test with, so whilst I'm reasonably confident it might be nice for someone to sense-check it all looks good from that angle.
I've also removed the
empty()
check whilst I'm here as it's problamatic with the new escaping mode.$showOrgInfo
appears to always be set to eithertrue
orfalse
.