In extending the workbench_moderation module, it has become necessary for us to allow more than one module to control whether or not to proceed with state alterations on moderation forms.

It would be great if, instead of simply testing whether or not a module type is enabled for moderation, workbench_moderation_form_node_form_alter() called a hook function to determine if it should proceed.

The check on content type could then happen in an implementation of that hook function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

srjosh’s picture

Status: Active » Needs review
FileSize
1.76 KB
srjosh’s picture

Status: Needs review » Needs work

Hmm - seems that that functionality is invoked in more than one place. Better patch forthcoming.

srjosh’s picture

Status: Needs work » Needs review
FileSize
5.64 KB

Try this - it replaces the node-type moderation check with a node-specific check. This node-specific function then runs the check on type, and throws a drupal_alter on the results to allow other modules to manipulate that result if needed.

  • Commit 11929cf on 7.x-1.x by srjosh:
    Issue #2194519 by srjosh: Add and use hook function to determine whether...
srjosh’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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