You are here

function _termcase_update_term_synonyms in Termcase 6

Update the term synonyms in the database

2 calls to _termcase_update_term_synonyms()
termcase_taxonomy in ./termcase.module
Implementation of hook_taxonomy().
_termcase_update_all_terms in ./termcase.module
Helper function to loop through all terms in the specified vocabulary and apply the case formatting to each of them

File

./termcase.module, line 277
The Termcase module gives you the option to specify specific case-formatting on terms.

Code

function _termcase_update_term_synonyms($tid, $case = TERMCASE_NONE) {
  $synonyms = taxonomy_get_synonyms($tid);
  if (sizeof($synonyms) > 0) {
    foreach ($synonyms as $synonym) {
      db_query("UPDATE {term_synonym} SET name = '%s' WHERE tid = %d and name = '%s'", _termcase_convert_string_to_case($synonym, $case), $tid, $synonym);
    }
  }
}