There is a bug on line 113 of user_relationships_api/user_relationships_api.module:
elseif ($type = 'relationship') {
$tokens['user_relationships_api'] = array(
'requestee' => t('The user who approved the connnection request.'),
'relationship-name' => t('The relationship name (singular form)'),
);
Note how the elseif will always be true, as it is assigning the string 'relationship' rather than comparing to the variable. The '==' comparison operator should be used instead. The bug results in user_relationships tokens ALWAYS being returned, even if they have not been requested. This corrupts more sophisticated uses of the Token module.
I checked to see if the CVS repository had a fixed version in the dev branch, but the CVS browser didn't even have this file in the listing. Something's amiss with that, as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | user_relationshipa_api_token_list.patch | 703 bytes | jcmarco |
Comments
Comment #1
ajayg commentedComment #2
jcmarco commentedThe patch for this typo
Comment #3
alex.k commentedCommitted http://drupal.org/cvs?commit=452946
Thanks all!