? 184524.patch
? filter_administration_2_.patch
? new_taxonomy_1.diff
? taxonomy-trim_1.patch
? taxonomy_get_parents_all-217676-1.patch
? taxonomy_get_synomyms_better.patch
? taxonomy_get_tree_flush_static_vars.patch
? taxonomy_get_tree_indexed_by_tid.d7.patch
? taxonomy_page_increment.patch
? taxonomy_vocabulary_load.patch
? taxonomy_vocabulary_load.patch.1
? trim_term_vocab.patch
? up_terms_per_page.patch
? vocabulary_load_fixes.patch
? sites/default/files
? sites/default/settings.php
Index: modules/forum/forum.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.test,v
retrieving revision 1.4
diff -u -p -r1.4 forum.test
--- modules/forum/forum.test	19 Sep 2008 20:25:02 -0000	1.4
+++ modules/forum/forum.test	22 Sep 2008 00:20:09 -0000
@@ -118,9 +118,7 @@ class ForumTestCase extends DrupalWebTes
   function editForumTaxonomy() {
     // Backup forum taxonomy.
     $vid = variable_get('forum_nav_vocabulary', '');
-    // This function returns NULL (the cache value is false).
-//    $original_settings = taxonomy_vocabulary_load($vid);
-    $original_settings = db_fetch_array(db_query('SELECT v.* FROM {vocabulary} v WHERE v.vid = %d', $vid));
+    $original_settings = taxonomy_vocabulary_load($vid);
 
     // Generate a random name/description.
     $title = $this->randomName(10);
@@ -134,20 +132,20 @@ class ForumTestCase extends DrupalWebTes
     );
 
     // Edit the vocabulary.
-    $this->drupalPost('admin/content/taxonomy/' . $vid . '/edit', $edit, t('Save'));
+    $this->drupalPost('admin/content/taxonomy/' . $vid, $edit, t('Save'));
     $this->assertResponse(200);
     $this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary was edited'));
 
     // Grab the newly edited vocabulary.
-    $cur_settings = db_fetch_array(db_query('SELECT v.* FROM {vocabulary} v WHERE v.vid = %d', $vid));
+    $cur_settings = taxonomy_vocabulary_load($vid, TRUE);
 
     // Make sure we actually edited the vocabulary properly.
-    $this->assertTrue($cur_settings['name'] == $title, 'The name was updated');
-    $this->assertTrue($cur_settings['description'] == $description, 'The description was updated');
+    $this->assertTrue($cur_settings->name == $title, 'The name was updated');
+    $this->assertTrue($cur_settings->description == $description, 'The description was updated');
 
     // Restore the name/description.
-    $title = $original_settings['name'];
-    $description = $original_settings['description'];
+    $title = $original_settings->name;
+    $description = $original_settings->description;
     $description = ($description == NULL) ? '' : $description;
 
     $edit = array(
@@ -161,14 +159,12 @@ class ForumTestCase extends DrupalWebTes
     $this->drupalPost('admin/content/taxonomy/' . $vid . 'edit', $edit, t('Save'));
     $this->assertResponse(200);
     $this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary was edited'));
-/*
     // Verify original forum taxonomy.
-    $original_settings = (array) $original_settings;
-    taxonomy_save_vocabulary($original_settings); // This fails because taxonomy_vocabulary_load returns NULL.
-    $cur_settings = db_fetch_array(db_query('SELECT v.* FROM {vocabulary} v WHERE v.vid = %d', $vid));
-    $this->assertTrue($cur_settings['name'] == $original_settings['name'], 'The name was restored');
-    $this->assertTrue(!isset($cur_settings['description']), 'The description was restored');
-*/
+    $original = (array) $original_settings;
+    taxonomy_save_vocabulary($original);
+    $cur_settings = taxonomy_vocabulary_load($vid);
+    $this->assertTrue($cur_settings->name == $original_settings->name, 'The name was restored');
+    $this->assertTrue(!isset($cur_settings->description), 'The description was restored');
   }
 
   /**
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.427
diff -u -p -r1.427 taxonomy.module
--- modules/taxonomy/taxonomy.module	19 Sep 2008 20:25:03 -0000	1.427
+++ modules/taxonomy/taxonomy.module	22 Sep 2008 00:20:10 -0000
@@ -991,10 +991,12 @@ function taxonomy_get_term_by_name($name
  *   The vocabulary object with all of its metadata, if exists, FALSE otherwise.
  *   Results are statically cached.
  */
-function taxonomy_vocabulary_load($vid) {
-  static $vocabularies = array();
+function taxonomy_vocabulary_load($vid, $reset = FALSE) {
+  if (!$reset) {
+    static $vocabularies = array();
+  }
 
-  if (!isset($vocabularies[$vid])) {
+  if (empty($vocabularies[$vid])) {
     // Initialize so if this vocabulary does not exist, we have
     // that cached, and we will not try to load this later.
     $vocabularies[$vid] = FALSE;
