I've been developing a module that builds on the great functionality of the Workflow module. I have a very minor request, I spent some time scoping the Workflow functions on DrupalContrib.org and eventually realized there is no function to get the name of a state based on it's state id.

I looked in the code and the workflow module rarely needs such a function and just queries the db:

db_result(db_query('SELECT state FROM {workflow_states} WHERE sid = %d', $sid));

However, for other modules to work along with the Workflow module it would be appreciated to include such a function.

Thanks for the great module!

Comments

dooug’s picture

StatusFileSize
new2.63 KB

I wrote a patch to the workflow.module to include a workflow_get_state_name function and modified the code elsewhere to use it accordingly.

jvandyk’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Status: Active » Fixed

Committed to 6.x-1.x-dev. Will appear in 6.x-1.4.

Status: Fixed » Closed (fixed)

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