Active
Project:
Contact Redirect
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2011 at 14:48 UTC
Updated:
21 Aug 2015 at 13:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dj1999 commentedSorry, this is latest :)
Comment #2
Bronislovas commentedThank you. Working as expected. Nice ;)
Comment #3
KeyboardCowboyI guess I should have looked before I created my own patch, but this should update 6.x-1.0-beta1 to 7.x-dev.
Comment #4
hargobindHere's my review of these patches.
I prefer the approach in comment #3. In comparison to the patch in #1, it includes form validation on the Admin page, performs a cleaner db_add_field() on install and db_drop_field() on uninstall. It also performs check_plain() when retrieving the redirect value from the DB which prevents XSS attacks.
The only thing I don't agree with is on Line 22:
$redirect_value = drupal_get_path_alias($redirect_value);Aliases tend to change, so it's better to just keep the URL that the user entered originally. This isn't a deal breaker, but I'd personally prefer to see that line (and the surrounding if {} statement) removed. Otherwise, I'd say this is ready to roll into a 7.x release.
Thank you KeyboardCowboy!
Comment #5
beefheartfan commentedI tried using the patch from #3 above, and it was causing problems when used with the Contact Forms module (http://drupal.org/project/contact_forms). Because the Contact Redirect module is overwriting the original submit function the fields that Contact Forms adds are never saved.
The better way to do this would be to use hook_schema_alter to add the redirect field to the contact table.
I have attached a new patch based on #3 with this new functionality. I also added a couple updates to the .install file to cleanly add/remove the redirect field when installing/uninstalling the module.
I hope this helps to get a 7.x release of this module available to the masses.
Comment #6
Prancz_Adam commentedHello,
Will it be available as a standalone module or just as a patch? Will it be the part of the core?
Becouse it is very usefull.
Thanks
Adam