cvs diff: Diffing .
Index: comment_alter_taxonomy.module
===================================================================
RCS file: /Users/wright/drupal/local_repo/contributions/modules/comment_alter_taxonomy/comment_alter_taxonomy.module,v
retrieving revision 1.16
diff -u -p -r1.16 comment_alter_taxonomy.module
--- comment_alter_taxonomy.module	19 Feb 2009 23:58:53 -0000	1.16
+++ comment_alter_taxonomy.module	23 Mar 2009 21:49:38 -0000
@@ -31,17 +31,27 @@ function comment_alter_taxonomy_menu($ma
     'page arguments' => array('comment_alter_taxonomy_admin_settings'),
     'access arguments' => array('administer site configuration'),
   );
+  $legacy = variable_get('comment_alter_taxonomy_legacy_issue_paths', FALSE);
+  if (module_exists('project_issue') && !empty($legacy)) {
+    $items['project/issues/%/term/%'] = array(
+      'title' => 'Issues for a project with a given term',
+      'page callback' => 'comment_alter_taxonomy_legacy_project_issue_redirect',
+      'page arguments' => array(4, 2),
+      'access arguments' => array('access content'),
+      'file' => 'comment_alter_taxonomy_legacy_pages.inc',
+    );
+    $items['project/issues-term/%'] = array(
+      'title' => 'Issues with a given term',
+      'page callback' => 'comment_alter_taxonomy_legacy_project_issue_redirect',
+      'page arguments' => array(2),
+      'access arguments' => array('access content'),
+      'file' => 'comment_alter_taxonomy_legacy_pages.inc',
+    );
+  }
   return $items;
 }
 
 /**
- * Implementation of hook_views_api().
- */
-function comment_alter_taxonomy_views_api() {
-  return array('api' => 2.0);
-}
-
-/**
  * Administration settings form.
  */
 function comment_alter_taxonomy_admin_settings() {
@@ -60,9 +70,35 @@ function comment_alter_taxonomy_admin_se
     '#default_value' => array_filter(variable_get('comment_alter_taxonomy_vocabularies', array())),
   );
 
+  if (module_exists('project_issue')) {
+    $form['project_issue'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Project issue support'),
+      '#collapsible' => TRUE,
+      '#collapsed' => TRUE,
+    );
+    $form['project_issue']['comment_alter_taxonomy_legacy_issue_paths'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Provide support for legacy project issue taxonomy listing paths'),
+      '#default_value' => variable_get('comment_alter_taxonomy_legacy_issue_paths', FALSE),
+    );
+    $form['#submit'][] = 'comment_alter_taxonomy_settings_submit';
+  }
+
   return system_settings_form($form);
 }
 
+function comment_alter_taxonomy_settings_submit($form, $form_state) {
+  $current_value = variable_get('comment_alter_taxonomy_legacy_issue_paths', 'FALSE');
+  $form_value = $form_state['values']['comment_alter_taxonomy_legacy_issue_paths'];
+  if ($current_value != $form_value) {
+    // If the setting changed, record that and force a menu rebuild to ensure
+    // we have the right menu items defined based on the setting.
+    variable_set('comment_alter_taxonomy_legacy_issue_paths', $form_value);
+    menu_rebuild();
+  }
+}
+
 /**
  * Implementation of hook_form_alter().
  */
@@ -488,13 +524,18 @@ function comment_alter_taxonomy_theme() 
  */
 function theme_comment_alter_taxonomy_project_issue_metadata_term($node, $term) {
   if (isset($term->tid)) {
+    $link_options = array();
     if (module_exists('project_issue') && $node->type == 'project_issue') {
-      $path = 'project/issues/'. $node->project_issue['pid'] .'/term/'. $term->tid;
+      $project = node_load($node->project_issue['pid']);
+      $vocabulary = taxonomy_vocabulary_load($term->vid);
+      $identifier = project_issue_views_filter_identifier($vocabulary->name);
+      $path = 'project/issues/search/'. $project->project['uri'];
+      $link_options['query'] = array($identifier => $term->name);
     }
     else {
       $path = taxonomy_term_path($term);
     }
-    return l($term->name, $path);
+    return l($term->name, $path, $link_options);
   }
   else {
     // New free tagging terms won't yet have a tid in the node preview mode
Index: comment_alter_taxonomy.views_default.inc
===================================================================
RCS file: comment_alter_taxonomy.views_default.inc
diff -N comment_alter_taxonomy.views_default.inc
--- comment_alter_taxonomy.views_default.inc	29 Jan 2009 19:19:57 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,942 +0,0 @@
-<?php
-// $Id $
-
-/**
- * @file
- * Provides default views on behalf of the comment_alter_taxonomy module.
- */
-
-/**
- * Implementation of hook_views_default_views().
- */
-function comment_alter_taxonomy_views_default_views() {
-  $views = array();
-
-  if (module_exists('project_issue')) {
-    // ----------------------------------------
-    // Term view across all projects
-    // ----------------------------------------
-    $view = new view;
-    $view->name = 'project_issue_tag_all_projects';
-    $view->description = 'Project issues for all projects by issue tag';
-    $view->tag = 'Project issue';
-    $view->view_php = '';
-    $view->base_table = 'node';
-    $view->is_cacheable = FALSE;
-    $view->api_version = 2;
-    $view->disabled = FALSE;
-    $handler = $view->new_display('default', 'Defaults', 'default');
-    $handler->override_option('relationships', array(
-      'assigned' => array(
-        'label' => 'Assigned user',
-        'required' => 0,
-        'id' => 'assigned',
-        'table' => 'project_issues',
-        'field' => 'assigned',
-        'relationship' => 'none',
-      ),
-      'rid' => array(
-        'label' => 'Version',
-        'required' => 0,
-        'id' => 'rid',
-        'table' => 'project_issues',
-        'field' => 'rid',
-        'relationship' => 'none',
-      ),
-      'pid' => array(
-        'id' => 'pid',
-        'table' => 'project_issues',
-        'field' => 'pid',
-      ),
-    ));
-    $handler->override_option('fields', array(
-      'project_issue_queue' => array(
-        'label' => 'Project',
-        'exclude' => 0,
-        'id' => 'project_issue_queue',
-        'table' => 'node',
-        'field' => 'project_issue_queue',
-        'relationship' => 'pid',
-      ),
-      'title' => array(
-        'label' => 'Summary',
-        'link_to_node' => 1,
-        'exclude' => 0,
-        'id' => 'title',
-        'table' => 'node',
-        'field' => 'title',
-        'relationship' => 'none',
-      ),
-      'sid' => array(
-        'id' => 'sid',
-        'table' => 'project_issues',
-        'field' => 'sid',
-      ),
-      'priority' => array(
-        'id' => 'priority',
-        'table' => 'project_issues',
-        'field' => 'priority',
-      ),
-      'category' => array(
-        'label' => 'Category',
-        'link_to_node' => 0,
-        'exclude' => 0,
-        'id' => 'category',
-        'table' => 'project_issues',
-        'field' => 'category',
-        'relationship' => 'none',
-      ),
-      'comment_count' => array(
-        'label' => 'Replies',
-        'set_precision' => FALSE,
-        'precision' => 0,
-        'decimal' => '.',
-        'separator' => ',',
-        'prefix' => '',
-        'suffix' => '',
-        'exclude' => 0,
-        'id' => 'comment_count',
-        'table' => 'node_comment_statistics',
-        'field' => 'comment_count',
-        'relationship' => 'none',
-      ),
-      'new_comments' => array(
-        'label' => 'New replies',
-        'set_precision' => FALSE,
-        'precision' => 0,
-        'decimal' => '.',
-        'separator' => ',',
-        'prefix' => '',
-        'suffix' => ' new',
-        'link_to_comment' => 1,
-        'no_empty' => 1,
-        'exclude' => 0,
-        'id' => 'new_comments',
-        'table' => 'node',
-        'field' => 'new_comments',
-        'relationship' => 'none',
-      ),
-      'last_comment_timestamp' => array(
-        'label' => 'Last updated',
-        'date_format' => 'time ago',
-        'custom_date_format' => '',
-        'exclude' => 0,
-        'id' => 'last_comment_timestamp',
-        'table' => 'node_comment_statistics',
-        'field' => 'last_comment_timestamp',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'label' => 'Assigned to',
-        'link_to_user' => 1,
-        'exclude' => 0,
-        'id' => 'name',
-        'table' => 'users',
-        'field' => 'name',
-        'relationship' => 'assigned',
-      ),
-    ));
-    $handler->override_option('filters', array(
-      'type' => array(
-        'operator' => 'in',
-        'value' => array(
-          'project_issue' => 'project_issue',
-        ),
-        'group' => '0',
-        'exposed' => FALSE,
-        'expose' => array(
-          'operator' => FALSE,
-          'label' => '',
-        ),
-        'id' => 'type',
-        'table' => 'node',
-        'field' => 'type',
-        'relationship' => 'none',
-      ),
-      'status_extra' => array(
-        'operator' => '=',
-        'value' => '',
-        'group' => '0',
-        'exposed' => FALSE,
-        'expose' => array(
-          'operator' => FALSE,
-          'label' => '',
-        ),
-        'id' => 'status_extra',
-        'table' => 'node',
-        'field' => 'status_extra',
-        'relationship' => 'none',
-      ),
-      'title' => array(
-        'operator' => '=',
-        'value' => '',
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'title_op',
-          'identifier' => 'title',
-          'label' => 'Project',
-          'optional' => 1,
-          'remember' => 0,
-        ),
-        'case' => 0,
-        'id' => 'title',
-        'table' => 'node',
-        'field' => 'title',
-        'relationship' => 'pid',
-      ),
-      'sid' => array(
-        'operator' => 'in',
-        'value' => array(
-          'open' => 'open',
-        ),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'sid_op',
-          'identifier' => 'status',
-          'label' => 'Status',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'sid',
-        'table' => 'project_issues',
-        'field' => 'sid',
-        'relationship' => 'none',
-      ),
-      'priority' => array(
-        'operator' => 'in',
-        'value' => array(),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'priority_op',
-          'identifier' => 'priorities',
-          'label' => 'Priority',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'priority',
-        'table' => 'project_issues',
-        'field' => 'priority',
-        'relationship' => 'none',
-      ),
-      'category' => array(
-        'operator' => 'in',
-        'value' => array(),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'category_op',
-          'identifier' => 'categories',
-          'label' => 'Category',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'category',
-        'table' => 'project_issues',
-        'field' => 'category',
-        'relationship' => 'none',
-      ),
-    ));
-    $handler->override_option('arguments', array(
-      'term_node_tid_depth' => array(
-        'id' => 'term_node_tid_depth',
-        'table' => 'node',
-        'field' => 'term_node_tid_depth',
-        'default_action' => 'not found',
-        'style_plugin' => 'default_summary',
-        'style_options' => array(
-          'count' => TRUE,
-          'override' => FALSE,
-          'items_per_page' => 25,
-        ),
-        'wildcard' => 'all',
-        'wildcard_substitution' => 'All',
-        'title' => 'Project issues tagged with <em>%1</em>',
-        'default_argument_type' => 'fixed',
-        'default_argument' => '',
-        'validate_type' => 'taxonomy_term',
-        'validate_fail' => 'not found',
-        'depth' => '0',
-        'break_phrase' => 1,
-        'relationship' => 'none',
-        'default_argument_fixed' => '',
-        'default_argument_php' => '',
-        'validate_argument_node_type' => array(
-          'album' => 0,
-          'artist' => 0,
-          'book' => 0,
-          'page' => 0,
-          'story' => 0,
-          'track' => 0,
-        ),
-        'validate_argument_vocabulary' => array(
-          '3' => 0,
-          '4' => 0,
-          '1' => 0,
-          '5' => 0,
-          '2' => 0,
-        ),
-        'validate_argument_type' => 'tids',
-        'validate_argument_php' => '',
-      ),
-      'term_node_tid_depth_modifier' => array(
-        'id' => 'term_node_tid_depth_modifier',
-        'table' => 'node',
-        'field' => 'term_node_tid_depth_modifier',
-        'default_action' => 'ignore',
-        'style_plugin' => 'default_summary',
-        'style_options' => array(
-          'count' => TRUE,
-          'override' => FALSE,
-          'items_per_page' => 25,
-        ),
-        'wildcard' => 'all',
-        'wildcard_substitution' => 'All',
-        'title' => '',
-        'default_argument_type' => 'fixed',
-        'default_argument' => '',
-        'validate_type' => 'none',
-        'validate_fail' => 'not found',
-      ),
-    ));
-    $handler->override_option('access', array(
-      'type' => 'none',
-    ));
-    $handler->override_option('title', 'Issues for all projects');
-    $handler->override_option('items_per_page', 50);
-    $handler->override_option('use_pager', '1');
-    $handler->override_option('style_plugin', 'project_issue_table');
-    $handler->override_option('style_options', array(
-      'grouping' => '',
-      'override' => 1,
-      'sticky' => 0,
-      'order' => 'desc',
-      'columns' => array(
-        'project_issue_queue' => 'project_issue_queue',
-        'title' => 'title',
-        'sid' => 'sid',
-        'priority' => 'priority',
-        'category' => 'category',
-        'comment_count' => 'comment_count',
-        'new_comments' => 'comment_count',
-        'last_comment_timestamp' => 'last_comment_timestamp',
-        'name' => 'name',
-      ),
-      'info' => array(
-        'project_issue_queue' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'title' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'sid' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'priority' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'category' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'comment_count' => array(
-          'sortable' => 1,
-          'separator' => '<br />',
-        ),
-        'new_comments' => array(
-          'separator' => '',
-        ),
-        'last_comment_timestamp' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'name' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-      ),
-      'default' => 'last_comment_timestamp',
-    ));
-  
-    $handler = $view->new_display('page', 'Page', 'page_1');
-    $handler->override_option('path', 'project/issues-term/%');
-    $handler->override_option('menu', array(
-      'type' => 'normal',
-      'title' => 'Issues',
-      'weight' => '0',
-      'name' => 'navigation',
-    ));
-    $handler->override_option('tab_options', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-  
-    $handler = $view->new_display('feed', 'Feed', 'feed');
-    $handler->override_option('sorts', array(
-      'last_comment_timestamp' => array(
-        'order' => 'DESC',
-        'granularity' => 'second',
-        'id' => 'last_comment_timestamp',
-        'table' => 'node_comment_statistics',
-        'field' => 'last_comment_timestamp',
-        'override' => array(
-          'button' => 'Use default',
-        ),
-        'relationship' => 'none',
-      ),
-    ));
-    $handler->override_option('style_plugin', 'rss');
-    $handler->override_option('style_options', array(
-      'mission_description' => FALSE,
-      'description' => '',
-    ));
-    $handler->override_option('row_plugin', 'node_rss');
-    $handler->override_option('path', 'project/issues-term/%/%/feed');
-    $handler->override_option('menu', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-      'name' => '',
-    ));
-    $handler->override_option('tab_options', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-    $handler->override_option('displays', array(
-      'page_1' => 'page_1',
-      'default' => 0,
-    ));
-    $handler->override_option('sitename_title', FALSE);
-  
-    $handler = $view->new_display('feed', 'Views 1 feed', 'feed_1');
-    $handler->override_option('items_per_page', 15);
-    $handler->override_option('use_pager', '1');
-    $handler->override_option('row_plugin', 'node_rss');
-    $handler->override_option('row_options', array(
-      'item_length' => 'default',
-    ));
-    $handler->override_option('path', 'project/issues-term/%/feed');
-    $handler->override_option('menu', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-    $handler->override_option('tab_options', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-  
-    $views[$view->name] = $view;
-  
-    // ----------------------------------------
-    // Term view for a specific project
-    // ----------------------------------------
-  
-    $view = new view;
-    $view->name = 'project_issues_tag_by_project';
-    $view->description = 'Project issues by project by issue tag';
-    $view->tag = 'Project issue';
-    $view->view_php = '';
-    $view->base_table = 'node';
-    $view->is_cacheable = FALSE;
-    $view->api_version = 2;
-    $view->disabled = FALSE;
-  
-    $handler = $view->new_display('default', 'Defaults', 'default');
-    $handler->override_option('relationships', array(
-      'assigned' => array(
-        'label' => 'Assigned user',
-        'required' => 0,
-        'id' => 'assigned',
-        'table' => 'project_issues',
-        'field' => 'assigned',
-        'relationship' => 'none',
-      ),
-      'rid' => array(
-        'label' => 'Version',
-        'required' => 0,
-        'id' => 'rid',
-        'table' => 'project_issues',
-        'field' => 'rid',
-        'relationship' => 'none',
-      ),
-    ));
-    $handler->override_option('fields', array(
-      'title' => array(
-        'label' => 'Summary',
-        'link_to_node' => 1,
-        'exclude' => 0,
-        'id' => 'title',
-        'table' => 'node',
-        'field' => 'title',
-        'relationship' => 'none',
-      ),
-      'sid' => array(
-        'id' => 'sid',
-        'table' => 'project_issues',
-        'field' => 'sid',
-      ),
-      'priority' => array(
-        'id' => 'priority',
-        'table' => 'project_issues',
-        'field' => 'priority',
-      ),
-      'category' => array(
-        'label' => 'Category',
-        'link_to_node' => 0,
-        'exclude' => 0,
-        'id' => 'category',
-        'table' => 'project_issues',
-        'field' => 'category',
-        'relationship' => 'none',
-      ),
-      'version' => array(
-        'label' => 'Version',
-        'link_to_node' => 0,
-        'exclude' => 0,
-        'id' => 'version',
-        'table' => 'project_release_nodes',
-        'field' => 'version',
-        'relationship' => 'rid',
-      ),
-      'component' => array(
-        'label' => 'Component',
-        'link_to_node' => 0,
-        'exclude' => 0,
-        'id' => 'component',
-        'table' => 'project_issues',
-        'field' => 'component',
-        'relationship' => 'none',
-      ),
-      'comment_count' => array(
-        'label' => 'Replies',
-        'set_precision' => FALSE,
-        'precision' => 0,
-        'decimal' => '.',
-        'separator' => ',',
-        'prefix' => '',
-        'suffix' => '',
-        'exclude' => 0,
-        'id' => 'comment_count',
-        'table' => 'node_comment_statistics',
-        'field' => 'comment_count',
-        'relationship' => 'none',
-      ),
-      'new_comments' => array(
-        'label' => 'New replies',
-        'set_precision' => FALSE,
-        'precision' => 0,
-        'decimal' => '.',
-        'separator' => ',',
-        'prefix' => '',
-        'suffix' => ' new',
-        'link_to_comment' => 1,
-        'no_empty' => 1,
-        'exclude' => 0,
-        'id' => 'new_comments',
-        'table' => 'node',
-        'field' => 'new_comments',
-        'relationship' => 'none',
-      ),
-      'last_comment_timestamp' => array(
-        'label' => 'Last updated',
-        'date_format' => 'time ago',
-        'custom_date_format' => '',
-        'exclude' => 0,
-        'id' => 'last_comment_timestamp',
-        'table' => 'node_comment_statistics',
-        'field' => 'last_comment_timestamp',
-        'relationship' => 'none',
-      ),
-      'name' => array(
-        'label' => 'Assigned to',
-        'link_to_user' => 1,
-        'exclude' => 0,
-        'id' => 'name',
-        'table' => 'users',
-        'field' => 'name',
-        'relationship' => 'assigned',
-      ),
-    ));
-    $handler->override_option('arguments', array(
-      'pid' => array(
-        'default_action' => 'not found',
-        'style_plugin' => 'default_summary',
-        'style_options' => array(),
-        'wildcard' => '',
-        'wildcard_substitution' => '',
-        'title' => 'Issues for %1',
-        'default_argument_type' => 'fixed',
-        'default_argument' => '',
-        'validate_type' => 'project_nid',
-        'validate_fail' => 'not found',
-        'break_phrase' => 0,
-        'not' => 0,
-        'id' => 'pid',
-        'table' => 'project_issues',
-        'field' => 'pid',
-        'relationship' => 'none',
-        'default_options_div_prefix' => '',
-        'default_argument_user' => 0,
-        'default_argument_fixed' => '',
-        'default_argument_php' => '',
-      ),
-      'term_node_tid_depth' => array(
-        'id' => 'term_node_tid_depth',
-        'table' => 'node',
-        'field' => 'term_node_tid_depth',
-        'default_action' => 'not found',
-        'style_plugin' => 'default_summary',
-        'style_options' => array(
-          'count' => TRUE,
-          'override' => FALSE,
-          'items_per_page' => 25,
-        ),
-        'wildcard' => 'all',
-        'wildcard_substitution' => 'All',
-        'title' => 'Issues for <em>%1</em> tagged with <em>%2</em>',
-        'default_argument_type' => 'fixed',
-        'default_argument' => '',
-        'validate_type' => 'taxonomy_term',
-        'validate_fail' => 'not found',
-        'depth' => '0',
-        'break_phrase' => 1,
-        'relationship' => 'none',
-        'default_argument_fixed' => '',
-        'default_argument_php' => '',
-        'validate_argument_node_type' => array(
-          'album' => 0,
-          'artist' => 0,
-          'book' => 0,
-          'page' => 0,
-          'story' => 0,
-          'track' => 0,
-        ),
-        'validate_argument_vocabulary' => array(
-          '3' => 0,
-          '4' => 0,
-          '1' => 0,
-          '5' => 0,
-          '2' => 0,
-        ),
-        'validate_argument_type' => 'tids',
-        'validate_argument_php' => '',
-      ),
-      'term_node_tid_depth_modifier' => array(
-        'id' => 'term_node_tid_depth_modifier',
-        'table' => 'node',
-        'field' => 'term_node_tid_depth_modifier',
-        'default_action' => 'ignore',
-        'style_plugin' => 'default_summary',
-        'style_options' => array(
-          'count' => TRUE,
-          'override' => FALSE,
-          'items_per_page' => 25,
-        ),
-        'wildcard' => 'all',
-        'wildcard_substitution' => 'All',
-        'title' => '',
-        'default_argument_type' => 'fixed',
-        'default_argument' => '',
-        'validate_type' => 'none',
-        'validate_fail' => 'not found',
-      ),
-    ));
-    $handler->override_option('filters', array(
-      'type' => array(
-        'operator' => 'in',
-        'value' => array(
-          'project_issue' => 'project_issue',
-        ),
-        'group' => '0',
-        'exposed' => FALSE,
-        'expose' => array(
-          'operator' => FALSE,
-          'label' => '',
-        ),
-        'id' => 'type',
-        'table' => 'node',
-        'field' => 'type',
-        'relationship' => 'none',
-      ),
-      'status_extra' => array(
-        'operator' => '=',
-        'value' => '',
-        'group' => '0',
-        'exposed' => FALSE,
-        'expose' => array(
-          'operator' => FALSE,
-          'label' => '',
-        ),
-        'id' => 'status_extra',
-        'table' => 'node',
-        'field' => 'status_extra',
-        'relationship' => 'none',
-      ),
-      'sid' => array(
-        'operator' => 'in',
-        'value' => array(
-          'open' => 'open',
-        ),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'sid_op',
-          'identifier' => 'status',
-          'label' => 'Status',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'sid',
-        'table' => 'project_issues',
-        'field' => 'sid',
-        'relationship' => 'none',
-      ),
-      'priority' => array(
-        'operator' => 'in',
-        'value' => array(),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'priority_op',
-          'identifier' => 'priorities',
-          'label' => 'Priority',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'priority',
-        'table' => 'project_issues',
-        'field' => 'priority',
-        'relationship' => 'none',
-      ),
-      'category' => array(
-        'operator' => 'in',
-        'value' => array(),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'category_op',
-          'identifier' => 'categories',
-          'label' => 'Category',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'category',
-        'table' => 'project_issues',
-        'field' => 'category',
-        'relationship' => 'none',
-      ),
-      'rid' => array(
-        'operator' => 'in',
-        'value' => array(),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'rid_op',
-          'identifier' => 'version',
-          'label' => 'Version',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'rid',
-        'table' => 'project_issues',
-        'field' => 'rid',
-        'relationship' => 'none',
-      ),
-      'component' => array(
-        'operator' => 'in',
-        'value' => array(),
-        'group' => '0',
-        'exposed' => TRUE,
-        'expose' => array(
-          'use_operator' => 0,
-          'operator' => 'component_op',
-          'identifier' => 'component',
-          'label' => 'Component',
-          'optional' => 1,
-          'single' => 1,
-          'remember' => 0,
-          'reduce' => 0,
-        ),
-        'id' => 'component',
-        'table' => 'project_issues',
-        'field' => 'component',
-        'relationship' => 'none',
-      ),
-    ));
-    $handler->override_option('access', array(
-      'type' => 'none',
-    ));
-    $handler->override_option('title', 'Issues by project');
-    $handler->override_option('items_per_page', 50);
-    $handler->override_option('use_pager', '1');
-    $handler->override_option('style_plugin', 'project_issue_table');
-    $handler->override_option('style_options', array(
-      'grouping' => '',
-      'override' => 1,
-      'sticky' => 0,
-      'order' => 'desc',
-      'columns' => array(
-        'title' => 'title',
-        'sid' => 'sid',
-        'priority' => 'priority',
-        'category' => 'category',
-        'version' => 'version',
-        'component' => 'component',
-        'comment_count' => 'comment_count',
-        'new_comments' => 'comment_count',
-        'last_comment_timestamp' => 'last_comment_timestamp',
-        'name' => 'name',
-      ),
-      'info' => array(
-        'title' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'sid' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'priority' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'category' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'version' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'component' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'comment_count' => array(
-          'sortable' => 1,
-          'separator' => '<br />',
-        ),
-        'new_comments' => array(
-          'separator' => '',
-        ),
-        'last_comment_timestamp' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-        'name' => array(
-          'sortable' => 1,
-          'separator' => '',
-        ),
-      ),
-      'default' => 'last_comment_timestamp',
-    ));
-  
-    $handler = $view->new_display('page', 'Page', 'page_1');
-    $handler->override_option('path', 'project/issues/%/term/%');
-    $handler->override_option('menu', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => '0',
-      'name' => '',
-    ));
-    $handler->override_option('tab_options', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-  
-    $handler = $view->new_display('feed', 'Feed', 'feed');
-    $handler->override_option('sorts', array(
-      'last_comment_timestamp' => array(
-        'order' => 'DESC',
-        'granularity' => 'second',
-        'id' => 'last_comment_timestamp',
-        'table' => 'node_comment_statistics',
-        'field' => 'last_comment_timestamp',
-        'override' => array(
-          'button' => 'Use default',
-        ),
-        'relationship' => 'none',
-      ),
-    ));
-    $handler->override_option('style_plugin', 'rss');
-    $handler->override_option('style_options', array(
-      'mission_description' => FALSE,
-      'description' => '',
-    ));
-    $handler->override_option('row_plugin', 'node_rss');
-    $handler->override_option('path', 'project/issues/%/term/%/%/feed');
-    $handler->override_option('menu', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-      'name' => '',
-    ));
-    $handler->override_option('tab_options', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-    $handler->override_option('displays', array(
-      'page_1' => 'page_1',
-      'default' => 0,
-    ));
-    $handler->override_option('sitename_title', FALSE);
-  
-    $handler = $view->new_display('feed', 'Views 1 feed', 'feed_1');
-    $handler->override_option('items_per_page', 15);
-    $handler->override_option('use_pager', '1');
-    $handler->override_option('row_plugin', 'node_rss');
-    $handler->override_option('row_options', array(
-      'item_length' => 'default',
-    ));
-    $handler->override_option('path', 'project/issues/%/term/%/feed');
-    $handler->override_option('menu', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-    $handler->override_option('tab_options', array(
-      'type' => 'none',
-      'title' => '',
-      'weight' => 0,
-    ));
-  
-    $views[$view->name] = $view;
-  }
-
-  return $views;
-}
-
Index: comment_alter_taxonomy_legacy_pages.inc
===================================================================
RCS file: comment_alter_taxonomy_legacy_pages.inc
diff -N comment_alter_taxonomy_legacy_pages.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ comment_alter_taxonomy_legacy_pages.inc	23 Mar 2009 21:30:35 -0000
@@ -0,0 +1,60 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Code used to redirect from the legacy project issue listings for issue tags.
+ */
+
+function comment_alter_taxonomy_legacy_project_issue_redirect($term_id, $project = NULL) {
+
+  // First, find the appropriate taxonomy term given the argument.
+  $issue_vocabularies = taxonomy_get_vocabularies('project_issue');
+  if (is_numeric($term_id)) {
+    $terms[] = taxonomy_get_term($term_id);
+  }
+  else {
+    $terms = taxonomy_get_term_by_name($term_id);
+  }
+  if (empty($terms)) {
+    return drupal_not_found();
+  }
+  $is_issue_term = FALSE;
+  foreach ($terms as $term) {
+    foreach ($issue_vocabularies as $vid => $vocabulary) {
+      if ($term->vid == $vid) {
+        $is_issue_term = TRUE;
+        break;
+      }
+    }
+  }    
+  if (!$is_issue_term) {
+    return drupal_not_found();
+  }
+  $query = array(project_issue_views_filter_identifier($vocabulary->name) => $term->name);
+
+  // If the project argument was set, validate that, too.
+  if (!empty($project)) {
+    if (is_numeric($project)) {
+      $project_uri = project_get_uri_from_nid($project);
+    }
+    else {
+      $project_nid = project_get_nid_from_uri($project);
+      if (!empty($project_nid)) {
+        $project_uri = $project;
+      }
+    }
+    if (empty($project_uri)) {
+      return drupal_not_found();
+    }
+  }
+
+  // Finally, create the appropriate advanced search URL and redirect
+  $url = 'project/issues/search';
+  if (!empty($project_uri)) {
+    $url .= '/' . $project_uri;
+  }
+
+  drupal_goto($url, $query);
+}
+
