? install Index: hierarchical_select.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/hierarchical_select.info,v retrieving revision 1.10 diff -u -p -r1.10 hierarchical_select.info --- hierarchical_select.info 1 Dec 2008 02:21:17 -0000 1.10 +++ hierarchical_select.info 23 Jan 2010 15:53:55 -0000 @@ -2,4 +2,11 @@ name = Hierarchical Select description = Simplifies the selection of one or multiple items in a hierarchical tree. package = Form Elements -core = 6.x +core = 7.x + +files[] = hierarchical_select.module +files[] = hierarchical_select.admin.inc + +scripts[] = hierarchical_select.js +scripts[] = hierarchical_select_cache.js +scripts[] = hierarchical_select_formtoarray.js Index: hierarchical_select.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/hierarchical_select.install,v retrieving revision 1.12 diff -u -p -r1.12 hierarchical_select.install --- hierarchical_select.install 18 Jul 2009 12:02:01 -0000 1.12 +++ hierarchical_select.install 23 Jan 2010 15:53:56 -0000 @@ -14,23 +14,23 @@ function hierarchical_select_install() { // Ensure the Hierarchical Select module runs after the Taxonomy and Content // Taxonomy modules! This should not be necessary to do, but apparently some // idiot module developer is changing the weight of the Taxonomy module... - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'")); - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'content_taxonomy'"))); // Also ensure the Hierarchical Select module runs after the i18ntaxonomy // module. - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'i18ntaxonomy'"))); // Also ensure the Hierarchical Select module runs after the og_vocab module. - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'og_vocab'"))); + + $weight = db_query("SELECT max(weight) FROM {system} WHERE name='taxonomy' or name='content_taxonomy' or name='i18ntaxonomy' or name='og_vocab'")->fetchColumn(0); + // If none of these modules was already enabled, the weight will still be // incorrect. Therefore, let's make the minimum weight of Hierarchical // Select 15. + $weight = max($weight, 15); // Set the weight one higher than the highest weight we've encountered, so // that Hierarchical Select will run after it. $weight++; - db_query("UPDATE {system} SET weight = %d WHERE name = '%s'", $weight, 'hierarchical_select'); + db_query("UPDATE {system} SET weight = %d WHERE name = '%s'", array($weight), 'hierarchical_select'); } @@ -44,8 +44,7 @@ function hierarchical_select_update_1() // Ensure the Hierarchical Select module runs after the Taxonomy and Content // Taxonomy modules! This should not be necessary to do, but apparently some // idiot module developer is changing the weight of the Taxonomy module... - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'")); - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'content_taxonomy'"))); + $weight = db_query("SELECT weight FROM {system} WHERE name='taxonomy' OR name='content_taxonomy'")->fetchColumn(0); $weight++; $ret[] = update_sql("UPDATE {system} SET weight = $weight WHERE name = 'hierarchical_select'"); @@ -56,9 +55,7 @@ function hierarchical_select_update_1() function hierarchical_select_update_2() { $ret = array(); - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'")); - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'content_taxonomy'"))); - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'i18ntaxonomy'"))); + $weight = db_query("SELECT MAX(weight) FROM {system} WHERE name = 'taxonomy' OR name = 'content_taxonomy' OR name='i18ntaxonomy'")->fetchColumn(0); $weight++; $ret[] = update_sql("UPDATE {system} SET weight = $weight WHERE name = 'hierarchical_select'"); @@ -204,13 +201,10 @@ function hierarchical_select_update_8() // Ensure the Hierarchical Select module runs after the Taxonomy and Content // Taxonomy modules! This should not be necessary to do, but apparently some // idiot module developer is changing the weight of the Taxonomy module... - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'")); - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'content_taxonomy'"))); // Also ensure the Hierarchical Select module runs after the i18ntaxonomy // module. - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'i18ntaxonomy'"))); // Also ensure the Hierarchical Select module runs after the og_vocab module. - $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'og_vocab'"))); + $weight = db_query("SELECT max(weight) FROM {system} WHERE name='taxonomy' or name='content_taxonomy' or name='i18ntaxonomy' or name='og_vocab'")->fetchColumn(0); // If none of these modules was already enabled, the weight will still be // incorrect. Therefore, let's make the minimum weight of Hierarchical // Select 15. Index: hierarchical_select.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/hierarchical_select.module,v retrieving revision 1.181 diff -u -p -r1.181 hierarchical_select.module --- hierarchical_select.module 31 Oct 2009 01:33:22 -0000 1.181 +++ hierarchical_select.module 23 Jan 2010 15:53:57 -0000 @@ -88,9 +88,9 @@ function hierarchical_select_form_alter( } /** - * Implementation of hook_elements(). + * Implementation of hook_element_info(). */ -function hierarchical_select_elements() { +function hierarchical_select_element_info() { $type['hierarchical_select'] = array( '#input' => TRUE, '#process' => array('hierarchical_select_process'), @@ -144,11 +144,11 @@ function hierarchical_select_requirement $up_to_date = (end($updates) == $current); - $hierarchical_select_weight = db_result(db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'hierarchical_select'")); + $hierarchical_select_weight = db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'hierarchical_select'")->fetchColumn(0); $core_overriding_modules = array('hs_book', 'hs_menu', 'hs_taxonomy'); $path_errors = array(); foreach ($core_overriding_modules as $module) { - $filename = db_result(db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = '%s'", $module)); + $filename = db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = '%s'", $module)->fetchColumn(0); if (strpos($filename, 'modules/') === 0) { $module_info = drupal_parse_info_file(dirname($filename) ."/$module.info"); $path_errors[] = t('!module', array('!module' => $module_info['name'])); @@ -156,9 +156,9 @@ function hierarchical_select_requirement } $weight_errors = array(); foreach (module_implements('hierarchical_select_root_level') as $module) { - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = '%s'", $module)); + $weight = db_query("SELECT weight FROM {system} WHERE name = '%s'", $module)->fetchColumn(0); if (!($hierarchical_select_weight > $weight)) { - $filename = db_result(db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = '%s'", $module)); + $filename = db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = '%s'", $module)->fetchColumn(0); $module_info = drupal_parse_info_file(dirname($filename) ."/$module.info"); $weight_errors[] = t('!module (!weight)', array('!module' => $module_info['name'], '!weight' => $weight)); } @@ -1275,7 +1275,7 @@ function _hierarchical_select_process_ca // Private functions. /** - * Inherit the default config from Hierarchical Selects' hook_elements(). + * Inherit the default config from Hierarchical Selects' hook_element_info(). * * @param $config * A config array with at least the following settings: @@ -1286,10 +1286,10 @@ function _hierarchical_select_process_ca */ function _hierarchical_select_inherit_default_config($config, $defaults_override = array()) { // Set defaults for unconfigured settings. Get the defaults from our - // hook_elements() implementation. Default properties from this hook are + // hook_element_info() implementation. Default properties from this hook are // applied automatically, but properties inside properties, such as is the // case for Hierarchical Select's #config property, aren't applied. - $type = hierarchical_select_elements(); + $type = hierarchical_select_element_info(); $defaults = $type['hierarchical_select']['#config']; // Don't inherit the module and params settings. unset($defaults['module']); @@ -1331,7 +1331,7 @@ function _hierarchical_select_setup_js(& $url .= $language->prefix . '/'; } - _hierarchical_select_add_js_settings(array('HierarchicalSelect' => array('basePath' => $url, 'getArguments' => drupal_query_string_encode($_GET, array('q')))), $form_state); + _hierarchical_select_add_js_settings(array('HierarchicalSelect' => array('basePath' => $url, 'getArguments' => drupal_get_query_parameters($_GET, array('q')))), $form_state); $js_settings_added = TRUE; } @@ -1762,7 +1762,7 @@ function _hierarchical_select_hierarchy_ $third_case = $dropbox && count($dropbox->lineages) > 0; if (($first_case || $second_case || $third_case) && !count($special_items['none'])) { $option = theme('hierarchical_select_special_option', t('none')); - $hierarchy->levels[0] = array('none' => $option) + $hierarchy->levels[0]; + $hierarchy->levels[0] = array('none' => $option) + array( 0 => $hierarchy->levels[0]); } // Calculate the lineage's depth (starting from 0). Index: modules/hs_content_taxonomy.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_content_taxonomy.info,v retrieving revision 1.3 diff -u -p -r1.3 hs_content_taxonomy.info --- modules/hs_content_taxonomy.info 1 Oct 2009 16:25:13 -0000 1.3 +++ modules/hs_content_taxonomy.info 23 Jan 2010 15:53:57 -0000 @@ -5,4 +5,8 @@ dependencies[] = hierarchical_select dependencies[] = content_taxonomy dependencies[] = hs_taxonomy package = Form Elements -core = 6.x +core = 7.x + +files[] = hs_content_taxonomy.module +files[] = hs_content_taxonomy.admin.inc + Index: modules/hs_flatlist.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_flatlist.info,v retrieving revision 1.3 diff -u -p -r1.3 hs_flatlist.info --- modules/hs_flatlist.info 16 Feb 2009 02:33:51 -0000 1.3 +++ modules/hs_flatlist.info 23 Jan 2010 15:53:57 -0000 @@ -3,4 +3,6 @@ name = Hierarchical Select Flat List description = Allows Hierarchical Select's dropbox to be used for selecting multiple items in a flat list of options. dependencies[] = hierarchical_select package = Form Elements -core = 6.x +core = 7.x +files[] = hs_flatlist.module + Index: modules/hs_menu.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_menu.info,v retrieving revision 1.2 diff -u -p -r1.2 hs_menu.info --- modules/hs_menu.info 1 Dec 2008 02:21:17 -0000 1.2 +++ modules/hs_menu.info 23 Jan 2010 15:53:57 -0000 @@ -4,4 +4,6 @@ description = Use Hierarchical Select fo dependencies[] = hierarchical_select dependencies[] = menu package = Form Elements -core = 6.x +core = 7.x +files[] = hs_menu.module + Index: modules/hs_smallhierarchy.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_smallhierarchy.info,v retrieving revision 1.1 diff -u -p -r1.1 hs_smallhierarchy.info --- modules/hs_smallhierarchy.info 16 Feb 2009 02:37:16 -0000 1.1 +++ modules/hs_smallhierarchy.info 23 Jan 2010 15:53:57 -0000 @@ -3,4 +3,6 @@ name = Hierarchical Select Small Hierarc description = Allows Hierarchical Select to be used for a hardcoded hierarchy. When it becomes to slow, you should move the hierarchy into the database and write a proper implementation. dependencies[] = hierarchical_select package = Form Elements -core = 6.x +core = 7.x +files[] = hs_smallhierarchy.module + Index: modules/hs_taxonomy.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_taxonomy.info,v retrieving revision 1.2 diff -u -p -r1.2 hs_taxonomy.info --- modules/hs_taxonomy.info 1 Dec 2008 02:21:17 -0000 1.2 +++ modules/hs_taxonomy.info 23 Jan 2010 15:53:57 -0000 @@ -4,4 +4,7 @@ description = Use Hierarchical Select fo dependencies[] = hierarchical_select dependencies[] = taxonomy package = Form Elements -core = 6.x +core = 7.x + +files[] = hs_taxonomy.module +files[] = hs_taxonomy.install Index: modules/hs_taxonomy_views.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/hierarchical_select/modules/hs_taxonomy_views.info,v retrieving revision 1.3 diff -u -p -r1.3 hs_taxonomy_views.info --- modules/hs_taxonomy_views.info 15 Aug 2009 10:45:00 -0000 1.3 +++ modules/hs_taxonomy_views.info 23 Jan 2010 15:53:57 -0000 @@ -5,4 +5,8 @@ dependencies[] = hierarchical_select dependencies[] = hs_taxonomy dependencies[] = views package = Form Elements -core = 6.x \ No newline at end of file +core = 7.x + +files[] = hs_taxonomy_view.module +files[] = hs_taxonomy_views_handler_filter_term_node_tid.inc +