Index: modules/forum.module =================================================================== RCS file: /cvs/drupal/drupal/modules/forum.module,v retrieving revision 1.260 diff -u -F^f -r1.260 forum.module --- modules/forum.module 1 Aug 2005 05:14:05 -0000 1.260 +++ modules/forum.module 18 Aug 2005 04:49:42 -0000 @@ -94,7 +94,7 @@ function forum_admin() { $edit['name'] = 0; } case t('Submit'): - list($status, $object) = array_values(taxonomy_save_term($edit)); + $status = taxonomy_save_term($edit); if (arg(3) == 'container') { $containers = variable_get('forum_containers', array()); $containers[] = $edit['tid']; @@ -290,8 +290,9 @@ function _forum_get_vid() { // Check to see if a forum vocabulary exists $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE module='%s'", 'forum')); if (!$vid) { - list($status, $object) = array_values(taxonomy_save_vocabulary(array('name' => 'Forums', 'multiple' => 0, 'required' => 1, 'hierarchy' => 1, 'relations' => 0, 'module' => 'forum', 'nodes' => array('forum')))); - $vid = $object['vid']; + $edit = array('name' => 'Forums', 'multiple' => 0, 'required' => 1, 'hierarchy' => 1, 'relations' => 0, 'module' => 'forum', 'nodes' => array('forum'))) + taxonomy_save_vocabulary($edit); + $vid = $edit['vid']; } variable_set('forum_nav_vocabulary', $vid); } Index: modules/taxonomy.module =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v retrieving revision 1.217 diff -u -F^f -r1.217 taxonomy.module --- modules/taxonomy.module 25 Jul 2005 04:55:37 -0000 1.217 +++ modules/taxonomy.module 18 Aug 2005 04:49:43 -0000 @@ -136,7 +136,7 @@ function taxonomy_form_vocabulary($edit return form($form); } -function taxonomy_save_vocabulary($edit) { +function taxonomy_save_vocabulary(&$edit) { $edit['nodes'] = ($edit['nodes']) ? $edit['nodes'] : array(); $edit['weight'] = ($edit['weight']) ? $edit['weight'] : 0; @@ -165,7 +165,7 @@ function taxonomy_save_vocabulary($edit) cache_clear_all(); - return array('status' => $status, 'object' => $edit); + return $status; } function taxonomy_del_vocabulary($vid) { @@ -251,7 +251,7 @@ function taxonomy_form_term($edit = arra return form($form); } -function taxonomy_save_term($edit) { +function taxonomy_save_term(&$edit) { if ($edit['tid'] && $edit['name']) { $data = array('name' => $edit['name'], 'description' => $edit['description'], 'weight' => $edit['weight']); @@ -307,7 +307,7 @@ function taxonomy_save_term($edit) { cache_clear_all(); - return array('status' => $status, 'object' => $edit); + return $status; } function taxonomy_del_term($tid) { @@ -608,8 +608,9 @@ function taxonomy_node_save($nid, $terms } if (!$typed_term_tid) { - list($status, $object) = array_values(taxonomy_save_term(array('vid' => $vid, 'name' => $typed_term))); - $typed_term_tid = $object['tid']; + $edit = array('vid' => $vid, 'name' => $typed_term); + $status = taxonomy_save_term($edit); + $typed_term_tid = $edit['tid']; } db_query('INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)', $nid, $typed_term_tid); @@ -1160,8 +1161,7 @@ function taxonomy_admin() { } case t('Submit'): if (arg(3) == 'vocabulary') { - list($status, $object) = array_values(taxonomy_save_vocabulary($edit)); - switch ($status) { + switch (taxonomy_save_vocabulary($edit)) { case SAVED_NEW: drupal_set_message(t('Created new vocabulary %name.', array('%name' => theme('placeholder', $edit['name'])))); break; @@ -1174,8 +1174,7 @@ function taxonomy_admin() { } } else { - list($status, $object) = array_values(taxonomy_save_term($edit)); - switch ($status) { + switch (taxonomy_save_term($edit)) { case SAVED_NEW: drupal_set_message(t('Created new term %term.', array('%term' => theme('placeholder', $edit['name'])))); break;