the function
zeitgeist_form_alter
should be renamed to
zeitgeist_form_search_form_alter
so its only called when this specific form is used.
with the actual version the hook is matches on every form on your site.

gruss peter

Comments

fgm’s picture

Assigned: Unassigned » fgm

Confirmed

avpaderno’s picture

Title: little performance issue » Implement hook_form_FORM_ID_alter(), rather than hook_form_alter()
Category: bug » task

To rename zeitgeist_form_alter() is not enough, as zeitgeist_form_search_form_alter() would also require parameters that are different from the original function used.

Then, to use hook_form_alter() is not even a bug; it's simply code that has not been adapted to the new hooks made available from Drupal 6, but the old hook is still available, nor it has been reported as deprecated from the Drupal documentation.

fgm’s picture

Status: Active » Needs review

I'm inclined to set "won't fix" because there is no obvious interest in having the two alters done in separate functions especially after today's changes.

Any other opinion (look at version 1.9.6.5 of zeitgeist.module) ?

avpaderno’s picture

Status: Closed (won't fix) » Needs review

It doesn't make any substantial differences, to keep the code as it is now.
I would say that to use one hook or the other is a question of coding preferences; maybe it would make a difference if the module would execute a long chain of IFs to differentiate the executed code basing on the form ID.

fgm’s picture

Status: Needs review » Closed (won't fix)

OK, then.

Status: Needs review » Closed (won't fix)