? 251595-3-taxonomy_get_tree_indexed_by_tid.patch
? 259103
? 259368-2.patch
? 259368-3.patch
? 328781-drupal-log-behave_4.patch
? 331180_0.patch
? admin_content_node_0.patch
? block-module-db-rewrite.patch
? cron_error.patch
? cron_error.patch.1
? d6.sql
? d7.timezone31.patch
? file_329226_6.patch
? form_23.patch
? http_case_insensitive_fields.patch
? input_format_1.patch
? jquery_124_update.patch
? js_filter_xss.patch
? module-list-2.patch
? multiple_load.patch
? multiple_load2.patch
? multiple_load3.patch
? multiple_load_3.patch
? multiple_load_4.patch
? multiple_load_6.patch
? multiple_load_7.patch
? node-content_type_overview-302120-19.patch
? node_multiple_load.patch
? node_multiple_load.test
? node_multiple_load_2.patch
? pluggable-pass-259103-40.patch
? schema_test.patch
? search_result_node_info_10.patch
? simple.patch
? simpletest_message_filtering_06.patch
? taxonomy-trim_0.patch
? taxonomy-trim_1.patch
? taxonomy_get_tree_tid.patch
? term_hooks_update.patch
? term_multiple_load_0.patch
? term_objects.patch
? update_d6_d7_2.patch
? vocabulary_hooks.patch
? whoops.patch
? whoops.patch.1
? whoops_with_a_test.patch
? includes/.bootstrap.inc.swp
? modules/node/node.sql_search.inc
? modules/simpletest/tests/mail.test
? modules/simpletest/tests/schema.test
? modules/taxonomy/multiple_load2.patch
? modules/user/user.sql_search.inc
? sites/all/modules
? sites/default/files
? sites/default/settings.php
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.35
diff -u -p -r1.35 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	5 Nov 2008 14:08:11 -0000	1.35
+++ modules/taxonomy/taxonomy.admin.inc	8 Nov 2008 22:47:09 -0000
@@ -461,7 +461,7 @@ function taxonomy_overview_terms_submit(
 
   // Build a list of all terms that need to be updated on previous pages.
   $weight = 0;
-  $term = (array)$tree[0];
+  $term = (array)array_shift($tree);
   while ($term['tid'] != $form['#first_tid']) {
     if ($term['parents'][0] == 0 && $term['weight'] != $weight) {
       $term['parent'] = $term['parents'][0];
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.439
diff -u -p -r1.439 taxonomy.module
--- modules/taxonomy/taxonomy.module	7 Nov 2008 18:52:18 -0000	1.439
+++ modules/taxonomy/taxonomy.module	8 Nov 2008 22:47:18 -0000
@@ -827,9 +827,9 @@ function taxonomy_get_children($tid, $vi
  *   The number of levels of the tree to return. Leave NULL to return all levels.
  *
  * @return
- *   An array of all term objects in the tree. Each term object is extended
- *   to have "depth" and "parents" attributes in addition to its normal ones.
- *   Results are statically cached.
+ *   An array of all term objects in the tree, indexed by taxonomy ID (tid).
+ *   Each term object is extended to have "depth" and "parents" attributes in
+ *   addition to its normal ones. Results are statically cached.
  */
 function taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
   static $children, $parents, $terms;
@@ -859,10 +859,10 @@ function taxonomy_get_tree($vid, $parent
         // The "parent" attribute is not useful, as it would show one parent only.
         unset($term->parent);
         $term->parents = $parents[$vid][$child];
-        $tree[] = $term;
+        $tree[$term->tid] = $term;
 
         if (!empty($children[$vid][$child])) {
-          $tree = array_merge($tree, taxonomy_get_tree($vid, $child, $depth, $max_depth));
+          $tree += taxonomy_get_tree($vid, $child, $depth, $max_depth);
         }
       }
     }
