function drupal_get_destination

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 common.inc drupal_get_destination()
cle7 common.inc drupal_get_destination()
elmsmedia7 common.inc drupal_get_destination()
icor7 common.inc drupal_get_destination()
meedjum_blog7 common.inc drupal_get_destination()
mooc7 common.inc drupal_get_destination()

Prepares a 'destination' URL query parameter for use with drupal_goto().

Used to direct the user back to the referring page after completing a form. By default the current URL is returned. If a destination exists in the previous request, that destination is returned. As such, a destination can persist across multiple pages.

Return value

An associative array containing the key:

  • destination: The path provided via the destination query string or, if not available, the current path.

See also

current_path()

drupal_goto()

Related topics

97 calls to drupal_get_destination()
admin_menu_links_icon in sites/all/modules/ulmus/admin_menu/admin_menu.inc
Build icon menu links; mostly containing maintenance helpers.
admin_menu_page_build in sites/all/modules/ulmus/admin_menu/admin_menu.module
Implements hook_page_build().
aurora_form_system_theme_settings_alter in sites/all/themes/ulmus/aurora/theme-settings.php
Implements hook_form_system_theme_settings_alter() function.
bakery_translated_menu_link_alter in sites/all/modules/ulmus/bakery/bakery.module
Implements hook_translated_menu_link_alter().
boxes_block_view in sites/all/modules/ulmus/boxes/boxes.module
Implements hook_block_view().

... See full list

1 string reference to 'drupal_get_destination'
views_ajax in sites/all/modules/ulmus/views/includes/ajax.inc
Menu callback to load a view via AJAX.

File

includes/common.inc, line 525
Common functions that many Drupal modules will need to reference.

Code

function drupal_get_destination() {
  $destination = &drupal_static(__FUNCTION__);

  if (isset($destination)) {
    return $destination;
  }

  if (isset($_GET['destination'])) {
    $destination = array('destination' => $_GET['destination']);
  }
  else {
    $path = $_GET['q'];
    $query = drupal_http_build_query(drupal_get_query_parameters());
    if ($query != '') {
      $path .= '?' . $query;
    }
    $destination = array('destination' => $path);
  }
  return $destination;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.