Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
As proposed at http://drupal.org/node/394586#comment-1637724
So lets remove unnessesary loop and simplify array
Comment | File | Size | Author |
---|---|---|---|
#9 | trigger4.patch | 4.22 KB | andypost |
#6 | trigger3.patch | 4.19 KB | andypost |
#2 | trigger3.patch | 4.19 KB | andypost |
#1 | trigger2.patch | 4.27 KB | andypost |
trigger.patch | 4.13 KB | andypost | |
Comments
Comment #1
andypostHere another fix, but this one require #408434: Actions.inc: fatal error after DBTNG conversion
Comment #2
andypostForget to clean commented code
Comment #3
andypostTaxonomy trigger changed to run without foreach loop so $term as parameter needs to be tested if actions execution change it.
Is chained actions need a fresh copy of object in actions_do()? Suppose needs test because action function can receive arguments by reference.
In old implementation $object was always old not changed.
Comment #4
andyposttrigger the bot
Comment #5
andypostso re-test is needed
Comment #6
andypostre upload same patch
Comment #7
BerdirPatch looks good, seems like a nice simplification. As it was basically my idea, I can't really rtbc it :)
Comment #8
mr.baileysaa
?SELECT aa.aid, a.type FROM {trigger_assignments} aa
if ($action_info['type'] != 'user')
should use$type
instead, as $action_info is not defined.The rest of the patch looks ok to me (visual inspection).
Comment #9
andypostComment #10
andypostups, comment was lost on submit
1)
{trigger_assignments}
alias aa changed to ta2)
$action_info
changed to$type
Suppose
arg() node_load()
should be changed tomenu_get_object()
maybe file another issue for this?Comment #11
mr.baileysLooks great, and makes for more readable code... I think this is good to go.
Comment #12
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Still needs tests so setting to 'needs work'.
Comment #13
andypostAs I write in #3 There should be a ideas - is data hookable or not?
Comment #14
andypostThere's already enough tests for actions and finally they work after #601398: Simpletest does not allow assigning actions to triggers
also commited tests #306540: Orphaned assigned actions still triggered and cannot be removed
and upcoming #721086: Create tests for system actions, clean up token replacement, clean up triggers