diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-13 19:35:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-13 19:35:16 +0000 |
commit | dc3df675906d2a0723e43c7ddfab56d46167eeed (patch) | |
tree | 1fccb2d587fd2262d238d6456effa752665cb25a /modules/taxonomy/taxonomy.module | |
parent | 81efba930fa1a27de15392d450dc12b10cdc7e15 (diff) | |
download | brdo-dc3df675906d2a0723e43c7ddfab56d46167eeed.tar.gz brdo-dc3df675906d2a0723e43c7ddfab56d46167eeed.tar.bz2 |
- Small bugfix and small cleanup. Patch by Marco.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index e484dad27..cee760d4f 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -87,7 +87,7 @@ function taxonomy_save_vocabulary($edit) { $data = array("name" => $edit["name"], "types" => @implode(",", $edit["types"]), "description" => $edit["description"], "multiple" => $edit["multiple"], "required" => $edit["required"], "hierarchy" => $edit["hierarchy"], "relations" => $edit["relations"], "weight" => $edit["weight"]); if ($edit["vid"] && $edit["name"]) { - db_query("UPDATE vocabulary SET ". _prepare_update($data) ." WHERE vid = '". check_query($edit["vid"]) ."'"); + db_query("UPDATE vocabulary SET ". _prepare_update($data) ." WHERE vid = '%d'", $edit["vid"]); module_invoke_all("taxonomy", "update", "vocabulary", $edit); $message = t("updated vocabulary '%name'.", array("%name" => $edit["name"])); } @@ -95,7 +95,7 @@ function taxonomy_save_vocabulary($edit) { $message = taxonomy_del_vocabulary($edit["vid"]); } else { - $data["vid"] = db_next_id("vocabulary"); + $data["vid"] = $edit["vid"] = db_next_id("vocabulary"); 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"])); |