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!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | workflow_729544_get_state_name_api_1.patch | 2.63 KB | dooug |
Comments
Comment #1
dooug commentedI wrote a patch to the workflow.module to include a workflow_get_state_name function and modified the code elsewhere to use it accordingly.
Comment #2
jvandyk commentedCommitted to 6.x-1.x-dev. Will appear in 6.x-1.4.