boonebgorges/buddypress-docs — pull request #391 by dcavins (2014-03-24 16:17:47+00:00)
Title: Preserve group association and access settings

Hi Boone-

One of my observant users noticed that while editing docs associated with a group that did not belong to her, several doc attributes were being lost on edit--the group association and access settings. Upon looking into it, I realized that the edit form doesn't include sections for users who can't "manage" the doc, but the save routine was expecting values from those fields.

I've added a couple of checks for $_POST value existence and emptiness that take those other situations into account. I left several notes in the code to explain the logic branches; please let me know if you have any questions.

Sorry I didn't notice this problem earlier!