? flag_action-events.patch
Index: flag.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.inc,v
retrieving revision 1.1.2.30
diff -u -p -r1.1.2.30 flag.inc
--- flag.inc	14 Mar 2009 06:13:54 -0000	1.1.2.30
+++ flag.inc	8 Sep 2009 01:40:32 -0000
@@ -399,14 +399,12 @@ class flag_flag {
     $flagged = $this->_is_flagged($content_id, $uid);
     if ($action == 'unflag' && $flagged) {
       $this->_unflag($content_id, $uid);
-      // Let other modules perform actions.
-      module_invoke_all('flag', 'unflag', $this, $content_id, $account);
     }
     elseif ($action == 'flag' && !$flagged) {
       $this->_flag($content_id, $uid);
-      // Let other modules perform actions.
-      module_invoke_all('flag', 'flag', $this, $content_id, $account);
     }
+    // Let other modules perform actions.
+    module_invoke_all('flag', $action, $this, $content_id, $account);
 
     return TRUE;
   }
