From 1c83d517410a013aba23bb44e4620cff7d9e9824 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 14 Apr 2005 19:37:11 +0000 Subject: - Patch by Adrian: postgresql fixes --- modules/taxonomy/taxonomy.module | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 19528d167..355877d6f 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -130,9 +130,8 @@ function taxonomy_form_vocabulary($edit = array()) { } function taxonomy_save_vocabulary($edit) { - if (!$edit['nodes']) { - $edit['nodes'] = array(); - } + $edit['nodes'] = ($edit['nodes']) ? $edit['nodes'] : array(); + $edit['weight'] = ($edit['weight']) ? $edit['weight'] : 0; $data = array('name' => $edit['name'], 'description' => $edit['description'], 'help' => $edit['help'], 'multiple' => $edit['multiple'], 'required' => $edit['required'], 'hierarchy' => $edit['hierarchy'], 'relations' => $edit['relations'], 'tags' => $edit['tags'], 'weight' => $edit['weight'], 'module' => isset($edit['module']) ? $edit['module'] : 'taxonomy'); if ($edit['vid'] && $edit['name']) { -- cgit v1.2.3