From 4871ce6820974b109ce34ff63daaef83df1e2698 Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Wed, 1 Jun 2011 10:10:45 -0400
Subject: [PATCH] Issue #1079214 by robertb, drewish, jhodgdon, bfroehle, pillarsdotnet: Fix documentation for drupal_goto.

---
 includes/common.inc |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/includes/common.inc b/includes/common.inc
index c0f2351c37608438dafc5b0af205e8a3ef17fa07..01bc12bd4e35d07de759707905710bf03567b303 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -626,14 +626,15 @@ function drupal_encode_path($path) {
  * This issues an on-site HTTP redirect. The function makes sure the redirected
  * URL is formatted correctly.
  *
- * Usually the redirected URL is constructed from this function's input
- * parameters. However you may override that behavior by setting a
- * destination in either the $_REQUEST-array (i.e. by using
- * the query string of an URI) This is used to direct the user back to
- * the proper page after completing a form. For example, after editing
- * a post on the 'admin/content'-page or after having logged on using the
- * 'user login'-block in a sidebar. The function drupal_get_destination()
- * can be used to help set the destination URL.
+ * If a destination was specified in the current request's URI (i.e.,
+ * $_GET['destination']) then it will override the $path and $options values
+ * passed to this function. This provides the flexibility to build a link to
+ * user/login and override the default redirection so that the user is
+ * redirected to a specific path after logging in:
+ * @code
+ *   $query = array('destination' => "node/$node->nid");
+ *   $link = l(t('Log in'), 'user/login', array('query' => $query));
+ * @endcode
  *
  * Drupal will ensure that messages set by drupal_set_message() and other
  * session data are written to the database before the user is redirected.
-- 
1.7.4.1

