How can I tell if tags have changed?

mattdm

Joined: 2005-07-22
Posts: 181
Posted: Wed, 2012-08-08 03:08

In my Write Exif module, I detect if the title or description has changed by listening for item_updated events and comparing $original and $new.

But, if I look at the tags there, I only see the old ones. Too early. The tags module triggers item_related_update, but apparently once for every tag, and with only the new list, not original and (final) new.

Is there something better I could be doing?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2012-09-13 00:04

Hm. You can listen for item_updated and stash away the changes in a static variable, then when the item_related_update comes along you know that the tags are updated and you can update the exif. Will that work for you?
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!