function agreement_settings_form_get_destination in Agreement 7.2
Get the redirect path based on destination, if it exists.
Parameters
string $default_path: The default path to use if destination does not exist.
Return value
array The path array to use in the link or redirect.
2 calls to agreement_settings_form_get_destination()
- agreement_settings_form in ./
agreement.admin.inc - Agreement settings form.
- agreement_settings_form_submit in ./
agreement.admin.inc - Agreement settings form submit callback.
File
- ./
agreement.admin.inc, line 361 - Agreement administration page callback.
Code
function agreement_settings_form_get_destination($default_path) {
$destination = drupal_get_destination();
$options = array(
'path' => $default_path,
);
if (isset($destination['destination'])) {
$options = drupal_parse_url($destination['destination']);
}
return $options;
}