/[drupal]/contributions/sandbox/alex_b/mtk/crud/taxonomy.inc
ViewVC logotype

Contents of /contributions/sandbox/alex_b/mtk/crud/taxonomy.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Thu Aug 7 17:25:17 2008 UTC (15 months, 3 weeks ago) by alexb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -0 lines
File MIME type: text/x-php
Add version string.
1 <?php
2 // $Id:$
3
4 /**
5 * Wrapper for taxonomy_save_term.
6 * Checks whether term name exists.
7 */
8 function mtk_taxonomy_save_term(&$form_values) {
9 if ($tid = db_result(db_query('SELECT tid FROM {term_data} WHERE vid = %d AND name = "%s"', $form_values['vid'], $form_values['name']))) {
10 $form_values['tid'] = $tid;
11 }
12 taxonomy_save_term($form_values);
13 }

  ViewVC Help
Powered by ViewVC 1.1.2