? .entity.patch.swp
? .path_default.patch.swp
? 1
? 106559-alias-whitelist-automatic-alternative.patch
? 106559-alias-whitelist-automatic_1.patch
? 370454-simplify-page-caching.patch
? 439148-5.patch
? 470398
? 473652-optimize-file-get-mimetype.patch
? 473652-optimize-file-get-mimetype.patch.1
? ab.txt
? admin.patch
? admin.png
? admin_12.patch
? admin_role_fix.patch
? bar.patch
? block.patch
? block_26.patch
? body-as-field-372743-146.patch
? body-as-field-372743-150.patch
? body-as-field-372743-158.patch
? cache_get_multiple-333171-39.patch
? d7-garland-comment-links.patch
? default.patch
? drupal.path_.inc_.patch
? empty.patch
? entity.patch
? entityloading_frh_TESTS_DISABLED_3.patch
? entityloading_frh_TESTS_DISABLED_3_1.patch
? file_get_mimetype.png
? file_get_mimetype_loop.patch
? foo.patch
? mapping.patch
? menu.png
? multiple_load_conversion_4.patch
? node_page_default_43.patch
? path.patch
? path_28.patch
? path_default.patch
? path_whitelist_1.patch
? sanitize.patch
? sanitize_0.patch
? sanitize_3.patch
? smileys.png
? sun_review.patch
? switch_1.patch
? taxonomy.patch
? taxonomy_fieldable.patch
? term_path.patch
? term_path_2.patch
? tracker_17.patch
? updates.txt
? user_node_load.patch
? user_node_load_0.patch
? vertical-tabs.css_.patch
? vertical-tabs.css__0.patch
? vocabulary.patch
? vocabulary.png
? includes/file.mimetypes.inc
? modules/field/.field.attach.inc.swp
? modules/taxonomy/.taxonomy.module.rej.swp
? modules/tracker/.tracker.pages.inc.swp
? modules/tracker/tracker.install
? modules/translation/translation.api.php
? sites/all/modules/contrib
? 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.53
diff -u -p -r1.53 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	4 Jun 2009 03:33:29 -0000	1.53
+++ modules/taxonomy/taxonomy.admin.inc	4 Jun 2009 22:08:53 -0000
@@ -672,6 +672,8 @@ function taxonomy_form_term(&$form_state
     '#default_value' => $edit['description'],
     '#description' => t('A description of the term. To be displayed on taxonomy/term pages and RSS feeds.'));
 
+  field_attach_form('taxonomy_term', (object) $edit,  $form_state);
+
   $form['advanced'] = array(
     '#type' => 'fieldset',
     '#title' => t('Advanced options'),
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.476
diff -u -p -r1.476 taxonomy.module
--- modules/taxonomy/taxonomy.module	3 Jun 2009 19:34:53 -0000	1.476
+++ modules/taxonomy/taxonomy.module	4 Jun 2009 22:08:54 -0000
@@ -19,6 +19,35 @@ function taxonomy_perm() {
 }
 
 /**
+ * Implement hook_fieldable().
+ */
+function taxonomy_fieldable_info() {
+  $return = array(
+    'term' => array(
+      'name' => t('Taxonomy term'),
+      'id key' => 'tid',
+      // @TODO 'bundle key' => 'vid',
+    ),
+  );
+  return $return;
+}
+
+/**
+ * Implement hook_field_build_modes();
+ *
+ * @TODO: build mode for display as a field (when attached to nodes etc.).
+ */
+function taxonomy_field_build_modes($obj_type) {
+  $modes = array();
+  if ($obj_type == 'term') {
+    $modes = array(
+      'full' => t('Taxonomy term page'),
+    );
+  }
+  return $modes;
+}
+
+/**
  * Implement hook_theme().
  */
 function taxonomy_theme() {
@@ -353,12 +382,16 @@ function taxonomy_term_save($term) {
     $term->name = trim($term->name);
   }
 
+  field_attach_presave('term', $term);
+
   if (!empty($term->tid) && $term->name) {
     $status = drupal_write_record('taxonomy_term_data', $term, 'tid');
+    field_attach_insert('term', $term);
     module_invoke_all('taxonomy_term_insert', $term);
   }
   else {
     $status = drupal_write_record('taxonomy_term_data', $term);
+    field_attach_update('term', $term);
     module_invoke_all('taxonomy_term_update', $term);
   }
 
@@ -1358,9 +1391,14 @@ function taxonomy_term_load_multiple($ti
       }
     }
     $queried_terms = $query->execute()->fetchAllAssoc('tid');
-    // Invoke hook_taxonomy_term_load() on the terms loaded from the database
-    // and add them to the static cache.
+
     if (!empty($queried_terms)) {
+
+      // Attach fields.
+      field_attach_load('term', $queried_terms);
+
+      // Invoke hook_taxonomy_term_load() and add the term objects to the
+      // static cache.
       foreach (module_implements('taxonomy_term_load') as $module) {
         $function = $module . '_taxonomy_term_load';
         $function($queried_terms);
Index: modules/taxonomy/taxonomy.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.pages.inc,v
retrieving revision 1.28
diff -u -p -r1.28 taxonomy.pages.inc
--- modules/taxonomy/taxonomy.pages.inc	24 May 2009 17:39:35 -0000	1.28
+++ modules/taxonomy/taxonomy.pages.inc	4 Jun 2009 22:08:54 -0000
@@ -50,9 +50,11 @@ function taxonomy_term_page($terms, $dep
           drupal_add_css(drupal_get_path('module', 'taxonomy') . '/taxonomy.css');
 
           $build = array();
-          // Only display the description if we have a single term, to avoid clutter and confusion.
+          // Only display fields if we have a single term, to avoid clutter and
+          // confusion.
           if (count($tids) == 1) {
             $term = taxonomy_term_load($tids[0]);
+            $build += field_attach_view('taxonomy_term', $term);
             if (!empty($term->description)) {
               $build['term_description'] = array(
                 '#markup' => filter_xss_admin($term->description),
