[support] Proper use of tokens (D7)
Ms. Nancy Wichmann
nan_wich at bellsouth.net
Thu Jan 17 14:43:39 UTC 2013
I have been trying to work with a [popular] contributed module. I have found a few things that were less than well converted to D7. One that I am trying to decide whether or not to fix is in hook_tokens(). In this hook, the second parameter indicates which token replacements are being requested. This implementation still returns ALL token values, as one did in D6. If you look, for example, at system_tokens(), it looks like the "correct" function would return only the requested tokens. Returning them all should still work, but I am concerned that at some point in the future this might become an error.
Do you think a significant overhaul in this module should be done, or is it okay to leave it as is and return all possible token replacements?
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130117/f93eb209/attachment.html
More information about the support
mailing list