This patch resolves a couple different issues:

1) The form is not properly built in the messaging_sendto_js() callback, meaning that form values such as node are not available. I copied the code at http://drupal.org/node/331941 so hopefully it's correct (or at least more correct).

2) sms_validate_number() is not called correctly. This function returns any error messages so you want to check that it returns nothing, not that it returns TRUE. Also in the next line, there was a typo, $number should be $destination.

CommentFileSizeAuthor
messaging_sendto.patch2.25 KBmfb

Comments

David Goode’s picture

Hey,

Sorry everybody, I've had finals for the past month so I haven't been working on this project nearly as much as I should have :-( I'm done now though, and I'll review this ASAP.

Thanks,
David

David Goode’s picture

Status: Needs review » Closed (fixed)

committed