diff --git a/plugins/content_types/rocketship_link.inc b/plugins/content_types/rocketship_link.inc index 28d8dec..cbbebbc 100644 --- a/plugins/content_types/rocketship_link.inc +++ b/plugins/content_types/rocketship_link.inc @@ -13,7 +13,7 @@ $plugin = array( 'edit form' => 'rocketship_link_form', 'render callback' => 'rocketship_link_render', 'admin info' => 'rocketship_link_admin_info', - 'required context' => new ctools_context_optional(t('Terms'), 'terms'), + 'required context' => new ctools_context_optional(t('Term'), 'entity:taxonomy_term'), ); /** @@ -39,17 +39,11 @@ function rocketship_link_form($form, &$form_state) { * Renders the Rocketship link panel. */ function rocketship_link_render($subtype, $conf, $panel_args, $context = NULL) { - $operator = isset($context->operator) ? $context->operator : 'and'; $tags = array(); - if (!empty($context->tids)) { - foreach ($context->tids as $tid) { - if (empty($tags[$tid])) { - $term = taxonomy_term_load($tid); - $tags[$tid] = $term->name; - } - } + if (!empty($context) && !empty($context->data) && is_object($context->data)) { + $tags[$context->data->tid] = $context->data->name; } - $path = rocketship_get_issue_path($tags, $operator); + $path = rocketship_get_issue_path($tags); $block = new stdClass(); diff --git a/rocketship.install b/rocketship.install index 2899d5b..68e2668 100644 --- a/rocketship.install +++ b/rocketship.install @@ -23,6 +23,7 @@ function rocketship_install() { ); taxonomy_vocabulary_save($vocabulary); } + variable_set('rocketship_tags_vid', $vocabulary->vid); $tags = array('patch (to be ported)', '6.x-dev', '7.x-dev', 'fixed', 'closed (duplicate)', 'closed (won\'t fix)', 'closed (works as designed)', diff --git a/rocketship.views_default.inc b/rocketship.views_default.inc index 08be7cc..4ca82e0 100644 --- a/rocketship.views_default.inc +++ b/rocketship.views_default.inc @@ -64,9 +64,7 @@ function rocketship_views_default_views() { $handler->display->display_options['arguments']['tid']['validate_options']['vocabularies'] = array( 'rocketship_tags' => 'rocketship_tags', ); - $handler->display->display_options['arguments']['tid']['validate_options']['type'] = 'tids'; $handler->display->display_options['arguments']['tid']['validate']['fail'] = 'empty'; - $handler->display->display_options['arguments']['tid']['break_phrase'] = TRUE; $handler->display->display_options['filter_groups']['operator'] = 'OR'; /* Filter criterion: Content: Priority (rocketship_priority) */ $handler->display->display_options['filters']['rocketship_priority_value']['id'] = 'rocketship_priority_value'; @@ -118,7 +116,7 @@ function rocketship_views_default_views() { $handler->display->display_options['argument_input'] = array( 'tid' => array( 'type' => 'context', - 'context' => 'terms.tids', + 'context' => 'entity:taxonomy_term.tid', 'context_optional' => 0, 'panel' => '0', 'fixed' => '',