Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
array_unshift($form['#submit'], 'taxonomy_single_tag_submit');
This string is located in foreach section, and in the case of having more than 1 vocabularies it causes the multiply calls of taxonomy_single_tag_submit.
As result, if term name matches this condition:
if (strpos($term_name, ',') !== FALSE || strpos($term_name, '"') !== FALSE)
we getting the term name enclosed with quotes.
Comment | File | Size | Author |
---|---|---|---|
#2 | taxonomy_single_tag-1463802.patch | 1.22 KB | quotesBro |
taxonomy_single_tag.module.patch | 782 bytes | quotesBro |
Comments
Comment #1
arhak CreditAttribution: arhak commentedI would prefer to flag an auxiliary variable to TRUE within the
if (in_array($vid, $vids_single_tag)) {
to be checked outside the
foreach
then, perform the
array_unshift($form['#submit'], 'taxonomy_single_tag_submit');
only once,rather than being checking each iteration whether the submission handler was already unshifted or not
Comment #2
quotesBro CreditAttribution: quotesBro commentedYou're right, the previous patch's code was pretty ugly; I'm attaching a new one.
Comment #3
quotesBro CreditAttribution: quotesBro commentedComment #4
arhak CreditAttribution: arhak commentedI didn't test it, just read it and looks good to go
if you tested it, then commit it
you were granted with repository access
Comment #5
quotesBro CreditAttribution: quotesBro commentedcommited: http://drupalcode.org/project/taxonomy_single_tag.git/commit/7c774dd
Comment #6
quotesBro CreditAttribution: quotesBro commentedComment #7
arhak CreditAttribution: arhak commentedgranted with "Administer releases"
so, whenever you feel its time for another relesease..