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

CommentFileSizeAuthor
#14 539716-D6.patch1.62 KBjhodgdon
#6 539716-2.patch1.37 KBpp
#4 539716.patch1.19 KBpp

Comments

pasqualle’s picture

Issue tags: +Needs backport to D6

.

lyaunzbe’s picture

If the two functions cannot be synchronized, does this mean the second sentence of the description becomes irrelevant and should be removed completely?

pp’s picture

Assigned: Unassigned » pp

I correct it.

pp’s picture

Assigned: pp » Unassigned
Status: Active » Needs review
StatusFileSize
new1.19 KB

Here it is.

 * The actions have two type configurable and non-configurable.
 * The non-configurable action will get into the database when
 * /admin/settings/actions is visited. This runs actions_synchronize().
 * The configurable action will get into the database when user sets up
 * ones. Each and every configuration creates a new row in the database.
 * If you need all type of actions use actions_list() which gathers actions
 * by invoking hook_action_info().

pp

jhodgdon’s picture

Status: Needs review » Needs work

This 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.

pp’s picture

Status: Needs work » Needs review
StatusFileSize
new1.37 KB

Thank you!

I think it is correct and better than mine. Create a new patch. Please review again.

jhodgdon’s picture

The patch looks good to me, but since I wrote the text, I'll leave it to someone else to review.

arianek’s picture

Patch 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.

jhodgdon’s picture

The 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.

jhodgdon’s picture

Status: Needs review » Active

I'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.

arianek’s picture

Status: Active » Needs review

it'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!

arianek’s picture

Status: Needs review » Active

resetting to active

jhodgdon’s picture

Version: 7.x-dev » 6.x-dev

This 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.

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new1.62 KB

Here is a patch to fix up the doc for Drupal 6 for this function.

arianek’s picture

hey this D6 patch looks good to me - can we get another +1 of approval and get this committed?

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

On doc patches, I think two people looking at it (reviewer and author) is usually enough to mark it RTBC.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

@jhodgdon: ok, found those mentioned changes in http://drupal.org/files/issues/drupal.actions.92.patch Committed this to Drupal 6, thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Needs backport to D6

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