drupal_get_destination()
drupal/includes/common.inc, line 124
Prepare a destination query string for use in combination with drupal_goto(). Used to direct the user back to the referring page after completing a form.
@see drupal_goto()
function drupal_get_destination() {
$destination[] = $_GET['q'];
$params = array('from', 'sort', 'order');
foreach ($params as $param) {
if (isset($_GET[$param])) {
$destination[] = "$param=". $_GET[$param];
}
}
return 'destination='. urlencode(implode('&', $destination));
}