Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.x-dev
Component:
Code - Taxonomy
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2009 at 01:40 UTC
Updated:
14 Mar 2010 at 18:20 UTC
Hey,
please correct me, if I am wrong, but should $form_state be really passed by reference? (it creates trouble for me, when using the functions from a custom module.
Index: hierarchical_select/modules/hs_taxonomy.module
===================================================================
--- hierarchical_select/modules/hs_taxonomy.module (revision 1003)
+++ hierarchical_select/modules/hs_taxonomy.module (working copy)
@@ -227,7 +227,7 @@
/**
* Implementation of hook_form_alter().
*/
-function hs_taxonomy_form_alter(&$form, &$form_state, $form_id) {
+function hs_taxonomy_form_alter(&$form, $form_state, $form_id) {
// Change the term selection of nodes. Only affects hierarchical
// vocabularies.
if (isset($form['type']) && isset($form['#node']) && (variable_get('taxonomy_override_selector', FALSE)) && $form['type']['#value'] .'_node_form' == $form_id) {
Comments
Comment #1
wim leersInteresting. I suppose that's indeed not needed. Probably a typo or copy/paste error.
If you can confirm everything keeps working for you, I'll commit it.
Comment #2
digi24 commentedIt works for me and my users.
I haven't tested it in a setup with multiple hs forms, but as far as I can see, the function is not altering any $form_state data, its only checking for preview, so it should not make any difference.
Setting to "needs review" in case someone else would like to check too, but in my opinion it can be committed.
Comment #3
wim leersSorry for the late commit … but now I finally did! :) This was extremely minor anyway :)
http://drupal.org/cvs?commit=335080