diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-10-22 13:03:32 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-10-22 13:03:32 +0000 |
commit | 742410aafdf3d85ec3f0060e5c9fd1d09ee71672 (patch) | |
tree | 94bb8a1c027c4aad144eb6870c6de7b96c8162cd /modules/taxonomy.module | |
parent | 90e5e355cb9fe0186d70c8ebde8c7a7bc1324ea4 (diff) | |
download | brdo-742410aafdf3d85ec3f0060e5c9fd1d09ee71672.tar.gz brdo-742410aafdf3d85ec3f0060e5c9fd1d09ee71672.tar.bz2 |
- Bugfix: prefix not prepended to sequences. Fixes bug #3639.
Make sure to write:
db_next_id({table}_field);
instead of:
db_next_id(table_field);
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r-- | modules/taxonomy.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 64ec1c8a0..86ff7ae6c 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -101,7 +101,7 @@ function taxonomy_save_vocabulary($edit) { $message = taxonomy_del_vocabulary($edit["vid"]); } else { - $data["vid"] = $edit["vid"] = db_next_id("vocabulary_vid"); + $data["vid"] = $edit["vid"] = db_next_id("{vocabulary}_vid"); db_query("INSERT INTO {vocabulary} ". _prepare_insert($data, 1) ." VALUES ". _prepare_insert($data, 2)); module_invoke_all("taxonomy", "insert", "vocabulary", $edit); $message = t("created new vocabulary '%name'.", array("%name" => $edit["name"])); @@ -194,7 +194,7 @@ function taxonomy_save_term($edit) { return taxonomy_del_term($edit["tid"]); } else { - $edit["tid"] = db_next_id("term_data_tid"); + $edit["tid"] = db_next_id("{term_data}_tid"); $data = array("tid" => $edit["tid"], "name" => $edit["name"], "description" => $edit["description"], "vid" => $edit["vid"], "weight" => $edit["weight"]); db_query("INSERT INTO {term_data} ". _prepare_insert($data, 1) ." VALUES ". _prepare_insert($data, 2)); module_invoke_all("taxonomy", "insert", "term", $edit); |