From ef05419c2f05ff341019e626a910a6f4a6d19af3 Mon Sep 17 00:00:00 2001 From: Franck Deroche Date: Mon, 7 Nov 2011 17:53:35 +0100 Subject: [PATCH] bug #684608: Convert new taxonomy settings name The settings got renamed in the 6.x-2.x branch according to the convention used there, but this means that they now longer match the one used in the 3.x branch. This patch adds a convert_options method to views_plugin_argument_default_taxonomy_tid to map the 6.x-2.x names to the one in the branch --- .../views_plugin_argument_default_taxonomy_tid.inc | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc index ee88fb2..4e3118e 100644 --- a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc +++ b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc @@ -16,6 +16,17 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d return $options; } + function convert_options(&$options) { + $names = array_keys($this->option_definition()); + $old_prefix = 'default_taxonomy_tid'; + foreach ($names as $name) { + if (!isset($options[$name]) && isset($this->argument->options[$old_prefix . '_' . $name])) { + $options[$name] = $this->argument->options[$old_prefix . '_' . $name]; + } + } + } + + function options_form(&$form, &$form_state) { $form['term_page'] = array( '#type' => 'checkbox', -- 1.7.7.2