Skip to content
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

fix(groups): Hide group profile fields that don't have a value #8040

Merged
merged 2 commits into from Mar 10, 2015

Conversation

juho-jaakkola
Copy link
Member

No description provided.

// The group profile displays all profile fields that have a value.
// We don't want to display fields with empty string value, so we
// prevent it getting saved by setting the value to null.
$input[$shortname] = null;
Copy link
Member

Choose a reason for hiding this comment

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

Does setting to null actually remove metadata?

Copy link
Member

Choose a reason for hiding this comment

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

I think we just handle this where we copy $input to metadata. If it's empty string, deleteMetadata() instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

What do you think about using delete or unset() until #8042 is resolved?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

Juho Jaakkola added 2 commits March 9, 2015 09:34
The group profile displays all profile fields that have a value.
We don't want to display fields with empty string value, so we
now remove the metadata completely.
@juho-jaakkola
Copy link
Member Author

Updated to use deleteMetadata()

@mrclay
Copy link
Member

mrclay commented Mar 9, 2015

LGTM

jdalsem added a commit that referenced this pull request Mar 10, 2015
fix(groups): Hide group profile fields that don't have a value
@jdalsem jdalsem merged commit aa25757 into Elgg:1.10 Mar 10, 2015
@juho-jaakkola juho-jaakkola deleted the empty_group_profile_strings branch March 10, 2015 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants