[support] Rules on update node use same value for $node and $node_unchanged
Michel Morelli
michel at ziobuddalabs.it
Thu Sep 22 12:58:42 UTC 2011
Il 21/09/11 17.15, Carl Wiedemann ha scritto:
> If you're comfortable writing PHP,
yes,
> this should probably be in a custom module leveraging
> hook_node_insert/update (or hook_nodeapi in Drupal 6).
No. hook_nodeapi works on the new node "version" (new data). I need the
old value and the new value.
The work is simple: get "foo" field value from node A via
"nodereference" field, subtract 'bar' field from "old node" and add
'bar' field from "new node" , save the node A with the new value of the
"foo" field.
Sorry for my bad english.
M.
--
Michel 'ZioBudda' Morelli michel at ziobuddalabs.it Sviluppo applicazioni
CMS DRUPAL e web dinamiche (LAMP+Ajax) 0200619074 - 3939890025
(mobile)-- Fax: +39-0291390660 http://www.ziobuddalabs.it Skype: zio_budda
More information about the support
mailing list