depwl9992 / anomalyjobs

Automatically exported from code.google.com/p/anomalyjobs
0 stars 0 forks source link

HOOK redundancy #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The TRIG_ADD trigger calls HOOK_<code> for all of the job actions, which
would include HOOK_APR, HOOK_DNY, HOOK_COM, and HOOK_DEL.

However, the +job/approve command has its own HOOK_APPROVE called; same
with +job/deny --> HOOK_DENY, +job/complete --> HOOK_COMPLETE, and
+job/delete --> HOOK_DELETE.

The versions passing through TRIG_ADD include a third parameter (bucket dbref).

It seems then, that the HOOK_APPROVE, _DENY, _COMPLETE, and _DELETE hooks
are redundant.  The question is, should they be removed?  I was thinking
they might be there for backwards compatibility, but the buckets-as-parents
went in with Jobs 5, and they have the TRIG_ADD version.

If we do keep both versions, we should update the full versions to use a
third argument as well.

Original issue reported on code.google.com by widdis@gmail.com on 13 Feb 2010 at 6:29

GoogleCodeExporter commented 9 years ago
Further research shows these were probably a (well intended) translation from 
the 4.4
HOOK_APPROVE_<bucket> variant, but unneeded with the addition of the HOOK_%3 
trigger
in TRIG_ADD.

Original comment by widdis@gmail.com on 13 Feb 2010 at 8:05

GoogleCodeExporter commented 9 years ago
Removed in r313, along with script check and README notes for anyone who might 
have
done it the undocumented duplicate way.

Original comment by widdis@gmail.com on 27 Feb 2010 at 1:27