I'm using the node gallery module in Drupal 6, and I'm having some trouble modifying it to suit my needs. When the manage images form is submitted, the function node_gallery_manage_images_submit is called. At the bottom of the function is this code:
$form_state['redirect'] = 'node/'. $gid;
I need to change the URL of that to 'my_url' instead of node/123. Using the form_alter I can set
$form['#action'] = 'my_url'; and when the form is submitted it goes to that page. But the module does a lot of image processing before then, so I have to use the redirect after that's all done. I also tried
$form_state['#redirect'] = 'my_url'; but that did nothing. Replacing $form_state with $form does nothing either. Can anyone please help me out? I'm pretty new to Drupal forms and this is the first time I've really had to work with them. I know there has to be some way to do it, I just can't figure out how.