At OpenScholar, we're using og_tasks to automate common standard site structures when virtual sites are created. A virtual site is an organic group and a spaces preset. We want to ensure that only specified tasks from our spaces presets features export are available to these group nodes.

To do that, we're submitting a patch to modify the behavior of og_tasks_get_all_tasks() when spaces is enabled and tasks are included in the entity's preset. If these conditions are met, then only the specified tasks are added to the return value.

Comments

baisong’s picture

Status: Active » Needs review
StatusFileSize
new0 bytes

Patch attached.

baisong’s picture

StatusFileSize
new736 bytes

Oops, try again

baisong’s picture

StatusFileSize
new990 bytes

This patch additionally makes preset tasks required if the preset provides an array of task keys.

baisong’s picture

StatusFileSize
new993 bytes

Fixed syntax error.

baisong’s picture

StatusFileSize
new991 bytes

Fixing logic error.

Allows "og_tasks" => array() in exports to prevent any tasks from being run.

baisong’s picture

StatusFileSize
new967 bytes

An even better solution for the patch in #5

baisong’s picture

StatusFileSize
new967 bytes

ignore