Needs review
Project:
Taxorole
Version:
5.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
13 Dec 2007 at 09:26 UTC
Updated:
15 Jun 2008 at 19:11 UTC
I have a vocabulary with the terms AAA, BBB, CCC, DDD which I want to use as roles. If I uncheck "Prefix role with vocabulary name" in the Taxorole settings, it doesn't create the roles correctly. Instead of having the roles AAA, BBB, CCC, DDD in creates AAA, AAABBB, AAABBBCCC, AAABBBCCCDDD.
To resolve this, change
drupal_set_message(t('Created role ').$newrole.'.');
to
drupal_set_message(t('Created role ').$newrole.'.');
unset($newrole);
on line 143.
Comments
Comment #1
mandclu commentedWouldn't it make more sense to unset $newrole at line 148, at the end of the foreach loop? Otherwise you run the risk of adding blank categories to mass contact.
Comment #2
kmargar commentedDone, patch committed, thanks.
Comment #3
afox commentedStill does it in 2.x -version. The unset is in a wrong place:
Now:
Should be:
This way it works for those who don't have mass_contact -module enabled.