http://api.drupal.org/api/function/actions_get_all_actions/7
* Compare with actions_list() which gathers actions by invoking
* hook_action_info(). The two are synchronized by visiting
* /admin/structure/actions (when actions.module is enabled) which runs
* actions_synchronize().
This description contains several errors:
1. the path is /admin/settings/actions
2. actions module does not exists, the functionality is part of the system module
3. the two functions are never really synchronized, because configurable actions are not stored in the db until user creates them. The results of these two functions (actions_get_all_actions, actions_list) are always different. http://api.drupal.org/api/function/actions_synchronize/7
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 539716-D6.patch | 1.62 KB | jhodgdon |
| #6 | 539716-2.patch | 1.37 KB | pp |
| #4 | 539716.patch | 1.19 KB | pp |
Comments
Comment #1
pasqualle.
Comment #2
lyaunzbe commentedIf the two functions cannot be synchronized, does this mean the second sentence of the description becomes irrelevant and should be removed completely?
Comment #3
pp commentedI correct it.
Comment #4
pp commentedHere it is.
pp
Comment #5
jhodgdonThis needs some work...
a) Current coding standards: first sentence should be "Retrieves ..." not "Retrieve..."
b) I think the "Compare with actions_list()" wording should still be there.
How about something like this:
Retrieves all action instances from the database.
Compare with actions_list(), which gathers actions by invoking hook_action_info(). The actions returned by this function and the actions returned by actions_list() are partially synchronized. Non-configurable actions from hook_action_info() implementations are put into the database when actions_synchronize() is called, which happens when /admin/settings/actions is visited. Configurable actions are not added to the database until they are configured in the user interface, in which case a database row is created for each configuration of each action.
Comment #6
pp commentedThank you!
I think it is correct and better than mine. Create a new patch. Please review again.
Comment #7
jhodgdonThe patch looks good to me, but since I wrote the text, I'll leave it to someone else to review.
Comment #8
arianek commentedPatch applied cleanly to HEAD, I have reviewed formatting looks good, I'm not advance enough to review the code. Verb tense on "Compare" in 2nd sentence is questionable - should it be "Compares"? Not sure if it's telling the user to compare, or if this is something the code is doing.
Comment #9
jhodgdonThe 2nd sentence is telling the user that they can compare this function to another function, so the verb tense, I believe, is correct. Could be re-worded if it is confusing, though.
Comment #10
jhodgdonI've just attached a patch to fix this at #525540: trigger.module and includes/actions.inc need overhaul. Please do not review the patch above any more.
Comment #11
arianek commentedit's a little confusing to me, but i don't really understand the functions, so i don't think i'm one to suggest alternate wordings!
Comment #12
arianek commentedresetting to active
Comment #13
jhodgdonThis was fixed in Drupal 7 along with #525540: trigger.module and includes/actions.inc need overhaul.
So this is now just a Drupal 6 issue.
Comment #14
jhodgdonHere is a patch to fix up the doc for Drupal 6 for this function.
Comment #15
arianek commentedhey this D6 patch looks good to me - can we get another +1 of approval and get this committed?
Comment #16
jhodgdonOn doc patches, I think two people looking at it (reviewer and author) is usually enough to mark it RTBC.
Comment #17
gábor hojtsy@jhodgdon: ok, found those mentioned changes in http://drupal.org/files/issues/drupal.actions.92.patch Committed this to Drupal 6, thanks.