Split from #421888: Clean og_form_add_og_audience() and make it an API function.
This will make og_form_add_og_audience() more API, as it will not be dependent on the URL.

Comments

amitaibu’s picture

StatusFileSize
new1.37 KB
moshe weitzman’s picture

Status: Needs review » Needs work

Sorry for the delay. Looks like a good idea, but needs work. Try this:

Try to create a group post by clicking on a link in the details block. For example, node/add/page?gids[]=2. Then try to uncheck group 2 so that no groups are selected. You can't - seems that 2 is always selected.

amitaibu’s picture

Status: Needs work » Needs review
StatusFileSize
new1.46 KB

Patch checks user didn't already select groups.

moshe weitzman’s picture

Status: Needs review » Needs work

I am still seeing the behavior I described in #2

amitaibu’s picture

weird, I tested it before submitting. Anyway, sorry, I'll re-check.

amitaibu’s picture

@moshe,
I've re-checked patch from #3 and it seems to work properly:
node/add/story?gids[]=1
- Uncheck all groups
- Check all groups
- Check only other group.

Is there another scenario I'm missing?

amitaibu’s picture

Status: Needs work » Needs review
StatusFileSize
new5.02 KB

Patch with small fix to accept multiple gids + tests.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Committed. Thanks.

truyenle’s picture

I have a situation in which try to create a group post by clicking on a link in the details block. However, the url don't have gids[] values something like node/add/page?gids[]=. Any Glue for this. I am using Drupal 6.16 and og 6.x-2.1.

Many thanks
Truyen

amitaibu’s picture

Status: Reviewed & tested by the community » Fixed

@truyenle,

Please open another issue, as this isn't related to this (closed) issue.

truyenle’s picture

OK, thank you Amitaibu. Here it is http://drupal.org/node/804528.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.