I have a function that is called by hook-menu item an is accesible from different subpages of the site. This function does not return any html, it just do some database inserts and should redirect user back where he came from.
Well, it could be easily done by adding url args as a parameters to this function and then use drupal_goto() with those arguments. But I'm wondering if there is any drupal function for this. I was trying
drupal_goto(drupal_get_destination()); but it does nothing.