Index: diff.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/diff.module,v
retrieving revision 1.15
diff -u -p -r1.15 diff.module
--- diff.module	3 Feb 2007 19:47:58 -0000	1.15
+++ diff.module	5 Feb 2007 03:35:10 -0000
@@ -350,6 +350,9 @@ function _diff_table_body(&$old_node, &$
   drupal_add_css(drupal_get_path('module', 'diff') .'/diff.css', 'module', 'all', FALSE);
   include_once('DiffEngine.php');
   include_once('node.inc');
+  if (module_exists('taxonomy')) {
+    include_once('taxonomy.inc');
+  }
   if (module_exists('upload')) {
     include_once('upload.inc');
   }
Index: taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/taxonomy.inc,v
retrieving revision 1.1
diff -u -p -r1.1 taxonomy.inc
--- taxonomy.inc	31 Jan 2007 17:45:25 -0000	1.1
+++ taxonomy.inc	5 Feb 2007 03:35:10 -0000
@@ -2,13 +2,8 @@
 // $Id: taxonomy.inc,v 1.1 2007/01/31 17:45:25 dww Exp $
 
 /**
- * @file Proposed hook_diff() implementation for taxonomy.
- *
- * Unfortunately, taxonomy doesn't account for revisions! This should
- * be a Bug report/Feature request for 6.0. For now, this file is not
- * included by diff.module, and is just here for reference.
+ * Implementation of hook_diff() for taxonomy.
  */
-
 function taxonomy_diff(&$old_node, &$new_node) {
   $result = array();
   // TODO: make taxonomy by category not only by whole taxonomy?
@@ -20,14 +15,42 @@ function taxonomy_diff(&$old_node, &$new
     }
   }
   if ($new_node->taxonomy) {
-    foreach($new_node->taxonomy as $term) {
-      $new_taxonomy[] = $term->name;
+    foreach($new_node->taxonomy as $id => $entry) {
+      if (is_array($entry)) {
+        // During editing the taxonomy is built up as a list of vocabulary ids as keys
+        // and a list of term ids per array entry.
+        if (is_numeric($id)) {
+          foreach($entry as $tid) {
+            $term = taxonomy_get_term($tid);
+            $new_taxonomy[] = $term->name;
+          }
+        }
+        else {
+          // If the id is not numeric than it has to be 'tags' which denotes freetagging
+          // vocabularies. These are stored as an array which map the vocabulary id to
+          // a string of terms.
+          foreach($entry as $taglist) {
+            // The regular expression is taken from taxonomy.module.
+            preg_match_all('%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x', $taglist, $matches);
+            foreach($matches[1] as $term) {
+              $new_taxonomy[] = $term;
+            }
+          }
+        }
+      }
+      else {
+        // Not during editing the taxonomy list is a list of terms.
+        $new_taxonomy[] = $entry->name;
+      }
     }
   }
   $result[] = array(
     'name' => t('Taxonomy'),
     'old' => $old_taxonomy,
     'new' => $new_taxonomy,
+    'format' => array(
+      'show_header' => false,
+    )
   );
   return $result;
 }
Index: upload.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/upload.inc,v
retrieving revision 1.1
diff -u -p -r1.1 upload.inc
--- upload.inc	31 Jan 2007 17:45:25 -0000	1.1
+++ upload.inc	5 Feb 2007 03:35:10 -0000
@@ -14,8 +14,20 @@ function upload_diff(&$old_node, &$new_n
   }
   $new_files = array();
   if (isset($new_node->files)) {
-    foreach($new_node->files as $file) {
-      $new_files[] = $file->filename;
+    foreach($new_node->files as $key => $file) {
+      if (is_array($file)) {
+        // During editing the files are stored as arrays, not objects.
+        if ($file['remove']) {
+          // It looks better if a blank line is inserted for removed files.
+          $new_files[] = '';
+        }
+        else {
+          $new_files[] = $file['filename'];
+        }
+      }
+      else {
+        $new_files[] = $file->filename;
+      }
     }
   }
   $result[] = array(
