Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.615
diff -u -p -r1.615 common.inc
--- includes/common.inc	31 Jan 2007 15:49:22 -0000	1.615
+++ includes/common.inc	6 Feb 2007 11:13:11 -0000
@@ -303,7 +303,7 @@ function drupal_goto($path = '', $query 
     extract(parse_url(urldecode($_REQUEST['edit']['destination'])));
   }
 
-  $url = url($path, $query, $fragment, TRUE);
+  $url = url($path, array('query' => $query, 'fragment' => $fragment, 'absolute' => TRUE));
 
   // Before the redirect, allow modules to react to the end of the page request.
   module_invoke_all('exit', $url);
@@ -663,7 +663,7 @@ function locale_initialize() {
  * - !variable, which indicates that the text should be inserted as-is. This is
  *   useful for inserting variables into things like e-mail.
  *   @code
- *     $message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", NULL, NULL, TRUE)));
+ *     $message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", array('absolute' => TRUE))));
  *   @endcode
  *
  * - @variable, which indicates that the text should be run through check_plain,
@@ -1120,25 +1120,35 @@ function format_date($timestamp, $type =
  * @param $path
  *   The Drupal path being linked to, such as "admin/content/node", or an existing URL
  *   like "http://drupal.org/".
- * @param $query
- *   A query string to append to the link or URL.
- * @param $fragment
- *   A fragment identifier (named anchor) to append to the link. If an existing
- *   URL with a fragment identifier is used, it will be replaced. Note, do not
- *   include the '#'.
- * @param $absolute
- *   Whether to force the output to be an absolute link (beginning with http:).
- *   Useful for links that will be displayed outside the site, such as in an
- *   RSS feed.
+ * @param $options
+ *   An associative array of additional options, with the following keys:
+ *     'query'
+ *       A query string to append to the link, or an array of query key/value
+ *       properties.
+ *     'fragment'
+ *       A fragment identifier (named anchor) to append to the link.
+ *     'absolute' (default FALSE)
+ *       Whether to force the output to be an absolute link (beginning with
+ *       http:). Useful for links that will be displayed outside the site, such
+ *       as in an RSS feed.
+ *     'alias' (default FALSE)
+ *       Whether the given path is an alias already.
  * @return
  *   a string containing a URL to the given path.
  *
  * When creating links in modules, consider whether l() could be a better
  * alternative than url().
  */
-function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
-  if (isset($fragment)) {
-    $fragment = '#'. $fragment;
+function url($path = NULL, $options = array()) {
+  // Merge in defaults
+  $options += array(
+      'fragment' => '',
+      'query' => '',
+      'absolute' => FALSE,
+      'alias' => FALSE,
+    );
+  if ($options['fragment']) {
+    $options['fragment'] = '#'. $options['fragment'];
   }
 
   // Return an external link if $path contains an allowed absolute URL.
@@ -1148,16 +1158,16 @@ function url($path = NULL, $query = NULL
     // Split off the fragment
     if (strpos($path, '#') !== FALSE) {
       list($path, $old_fragment) = explode('#', $path, 2);
-      if (isset($old_fragment) && !isset($fragment)) {
-        $fragment = '#'. $old_fragment;
+      if (isset($old_fragment) && !$options['fragment']) {
+        $options['fragment'] = '#'. $old_fragment;
       }
     }
     // Append the query
-    if (isset($query)) {
-      $path .= (strpos($path, '?') !== FALSE ? '&' : '?') . $query;
+    if ($options['query']) {
+      $path .= (strpos($path, '?') !== FALSE ? '&' : '?') . $options['query'];
     }
     // Reassemble
-    return $path . $fragment;
+    return $path . $options['fragment'];
   }
 
   global $base_url;
@@ -1176,35 +1186,37 @@ function url($path = NULL, $query = NULL
     $clean_url = (bool)variable_get('clean_url', '0');
   }
 
-  $base = ($absolute ? $base_url . '/' : base_path());
+  $base = $options['absolute'] ? $base_url . '/' : base_path();
 
   // The special path '<front>' links to the default front page.
   if (!empty($path) && $path != '<front>') {
-    $path = drupal_get_path_alias($path);
+    if (!$options['alias']) {
+      $path = drupal_get_path_alias($path);
+    }
     $path = drupal_urlencode($path);
     if (!$clean_url) {
-      if (isset($query)) {
-        return $base . $script .'?q='. $path .'&'. $query . $fragment;
+      if ($options['query']) {
+        return $base . $script .'?q='. $path .'&'. $options['query'] . $options['fragment'];
       }
       else {
-        return $base . $script .'?q='. $path . $fragment;
+        return $base . $script .'?q='. $path . $options['fragment'];
       }
     }
     else {
-      if (isset($query)) {
-        return $base . $path .'?'. $query . $fragment;
+      if ($options['query']) {
+        return $base . $path .'?'. $options['query'] . $options['fragment'];
       }
       else {
-        return $base . $path . $fragment;
+        return $base . $path . $options['fragment'];
       }
     }
   }
   else {
-    if (isset($query)) {
-      return $base . $script .'?'. $query . $fragment;
+    if ($options['query']) {
+      return $base . $script .'?'. $options['query'] . $options['fragment'];
     }
     else {
-      return $base . $fragment;
+      return $base . $options['fragment'];
     }
   }
 }
@@ -1237,40 +1249,53 @@ function drupal_attributes($attributes =
  * @param $text
  *   The text to be enclosed with the anchor tag.
  * @param $path
- *   The Drupal path being linked to, such as "admin/content/node". Can be an external
- *   or internal URL.
- *     - If you provide the full URL, it will be considered an
- *   external URL.
- *     - If you provide only the path (e.g. "admin/content/node"), it is considered an
- *   internal link. In this case, it must be a system URL as the url() function
- *   will generate the alias.
- * @param $attributes
- *   An associative array of HTML attributes to apply to the anchor tag.
- * @param $query
- *   A query string to append to the link.
- * @param $fragment
- *   A fragment identifier (named anchor) to append to the link.
- * @param $absolute
- *   Whether to force the output to be an absolute link (beginning with http:).
- *   Useful for links that will be displayed outside the site, such as in an RSS
- *   feed.
- * @param $html
- *   Whether the title is HTML, or just plain-text. For example for making an
- *   image a link, this must be set to TRUE, or else you will see the encoded
- *   HTML.
+ *   The Drupal path being linked to, such as "admin/content/node". Can be an
+ *   external or internal URL.
+ *     - If you provide the full URL, it will be considered an external URL.
+ *     - If you provide only the path (e.g. "admin/content/node"), it is
+ *       considered an internal link. In this case, it must be a system URL
+ *       as the url() function will generate the alias.
+ *     - If you provide a path, and 'alias' is set to TRUE (see below), it is
+ *       used as is.
+ * @param $options
+ *   An associative array of additional options, with the following keys:
+ *     'attributes'
+ *       An associative array of HTML attributes to apply to the anchor tag.
+ *     'query'
+ *       A query string to append to the link, or an array of query key/value
+ *       properties.
+ *     'fragment'
+ *       A fragment identifier (named anchor) to append to the link.
+ *     'absolute' (default FALSE)
+ *       Whether to force the output to be an absolute link (beginning with
+ *       http:). Useful for links that will be displayed outside the site, such
+ *       as in an RSS feed.
+ *     'html' (default FALSE)
+ *       Whether the title is HTML, or just plain-text. For example for making
+ *       an image a link, this must be set to TRUE, or else you will see the
+ *       escaped HTML.
+ *     'alias' (default FALSE)
+ *       Whether the given path is an alias already.
  * @return
  *   an HTML string containing a link to the given path.
  */
-function l($text, $path, $attributes = array(), $query = NULL, $fragment = NULL, $absolute = FALSE, $html = FALSE) {
+function l($text, $path, $options = array()) {
+  // Merge in defaults
+  $options += array(
+      'attributes' => array(),
+      'html' => FALSE,
+    );
+
+  // Append active class
   if ($path == $_GET['q']) {
-    if (isset($attributes['class'])) {
-      $attributes['class'] .= ' active';
+    if (isset($options['attributes']['class'])) {
+      $options['attributes']['class'] .= ' active';
     }
     else {
-      $attributes['class'] = 'active';
+      $options['attributes']['class'] = 'active';
     }
   }
-  return '<a href="'. check_url(url($path, $query, $fragment, $absolute)) .'"'. drupal_attributes($attributes) .'>'. ($html ? $text : check_plain($text)) .'</a>';
+  return '<a href="'. check_url(url($path, $options)) .'"'. drupal_attributes($options['attributes']) .'>'. ($options['html'] ? $text : check_plain($text)) .'</a>';
 }
 
 /**
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.93
diff -u -p -r1.93 file.inc
--- includes/file.inc	31 Jan 2007 15:49:22 -0000	1.93
+++ includes/file.inc	6 Feb 2007 11:13:12 -0000
@@ -35,7 +35,7 @@ function file_create_url($path) {
     case FILE_DOWNLOADS_PUBLIC:
       return $GLOBALS['base_url'] .'/'. file_directory_path() .'/'. str_replace('\\', '/', $path);
     case FILE_DOWNLOADS_PRIVATE:
-      return url('system/files/'. $path, NULL, NULL, TRUE);
+      return url('system/files/'. $path, array('absolute' => TRUE));
   }
 }
 
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.177
diff -u -p -r1.177 form.inc
--- includes/form.inc	31 Jan 2007 15:49:22 -0000	1.177
+++ includes/form.inc	6 Feb 2007 11:13:12 -0000
@@ -1038,7 +1038,7 @@ function theme_fieldset($element) {
     }
   }
 
-  return '<fieldset' . drupal_attributes($element['#attributes']) .'>' . ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . ($element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . $element['#value'] . "</fieldset>\n";
+  return '<fieldset' . drupal_attributes($element['#attributes']) .'>' . ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . $element['#value'] . "</fieldset>\n";
 }
 
 /**
@@ -1401,7 +1401,7 @@ function theme_textfield($element) {
   if ($element['#autocomplete_path']) {
     drupal_add_js('misc/autocomplete.js');
     $class[] = 'form-autocomplete';
-    $extra =  '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], NULL, NULL, TRUE)) .'" disabled="disabled" />';
+    $extra =  '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], array('absolute' => TRUE))) .'" disabled="disabled" />';
   }
   _form_set_class($element, $class);
 
Index: includes/pager.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/pager.inc,v
retrieving revision 1.59
diff -u -p -r1.59 pager.inc
--- includes/pager.inc	15 Oct 2006 19:57:05 -0000	1.59
+++ includes/pager.inc	6 Feb 2007 11:13:13 -0000
@@ -392,7 +392,7 @@ function theme_pager_link($text, $page_n
     }
   }
 
-  return l($text, $_GET['q'], $attributes, count($query) ? implode('&', $query) : NULL);
+  return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => count($query) ? implode('&', $query) : NULL));
 }
 
 /**
Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.44
diff -u -p -r1.44 tablesort.inc
--- includes/tablesort.inc	31 Jan 2007 15:49:22 -0000	1.44
+++ includes/tablesort.inc	6 Feb 2007 11:13:13 -0000
@@ -83,7 +83,7 @@ function tablesort_header($cell, $header
     if (!empty($ts['query_string'])) {
       $ts['query_string'] = '&'. $ts['query_string'];
     }
-    $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('title' => $title), 'sort='. $ts['sort'] .'&order='. urlencode($cell['data']) . $ts['query_string'], NULL, FALSE, TRUE);
+    $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('attributes' => array('title' => $title), 'query' => 'sort='. $ts['sort'] .'&order='. urlencode($cell['data']) . $ts['query_string'], 'html' => TRUE));
 
     unset($cell['field'], $cell['sort']);
   }
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.341
diff -u -p -r1.341 theme.inc
--- includes/theme.inc	6 Feb 2007 08:35:13 -0000	1.341
+++ includes/theme.inc	6 Feb 2007 11:13:14 -0000
@@ -563,19 +563,13 @@ function theme_links($links, $attributes
       }
       $output .= '<li class="'. $extra_class . $class .'">';
 
-      // Is the title HTML?
-      $html = isset($link['html']) && $link['html'];
-
-      // Initialize fragment and query variables.
-      $link['query'] = isset($link['query']) ? $link['query'] : NULL;
-      $link['fragment'] = isset($link['fragment']) ? $link['fragment'] : NULL;
-
       if (isset($link['href'])) {
-        $output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html);
+        // Pass in $link as $options, they share the same keys.
+        $output .= l($link['title'], $link['href'], $link);
       }
       else if ($link['title']) {
-        //Some links are actually not links, but we wrap these in <span> for adding title and class attributes
-        if (!$html) {
+        // Some links are actually not links, but we wrap these in <span> for adding title and class attributes
+        if (empty($link['html'])) {
           $link['title'] = check_plain($link['title']);
         }
         $output .= '<span'. drupal_attributes($link['attributes']) .'>'. $link['title'] .'</span>';
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.327
diff -u -p -r1.327 aggregator.module
--- modules/aggregator/aggregator.module	31 Jan 2007 21:26:55 -0000	1.327
+++ modules/aggregator/aggregator.module	6 Feb 2007 11:13:14 -0000
@@ -1217,7 +1217,7 @@ function aggregator_page_rss() {
 
   $output .= "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
   $output .= "<rss version=\"2.0\">\n";
-  $output .= format_rss_channel(variable_get('site_name', 'Drupal') . ' ' . t('aggregator'), url('aggregator' . $url, NULL, NULL, TRUE), variable_get('site_name', 'Drupal') . ' - ' . t('aggregated feeds') . $title, $items, 'en');
+  $output .= format_rss_channel(variable_get('site_name', 'Drupal') . ' ' . t('aggregator'), url('aggregator' . $url, array('absolute' => TRUE)), variable_get('site_name', 'Drupal') . ' - ' . t('aggregated feeds') . $title, $items, 'en');
   $output .= "</rss>\n";
 
   drupal_set_header('Content-Type: application/rss+xml; charset=utf-8');
@@ -1295,7 +1295,7 @@ function theme_aggregator_feed($feed) {
   $output .= theme('feed_icon', $feed->url) ."\n";
   $output .= $feed->image;
   $output .= '<div class="feed-description">'. aggregator_filter_xss($feed->description) ."</div>\n";
-  $output .= '<div class="feed-url"><em>'. t('URL:') .'</em> '. l($feed->link, $feed->link, array(), NULL, NULL, TRUE) ."</div>\n";
+  $output .= '<div class="feed-url"><em>'. t('URL:') .'</em> '. l($feed->link, $feed->link, array('absolute' => TRUE)) ."</div>\n";
 
   if ($feed->checked) {
     $updated = t('@time ago', array('@time' => format_interval(time() - $feed->checked)));
@@ -1360,7 +1360,7 @@ function theme_aggregator_page_item($ite
 
   $source = '';
   if ($item->ftitle && $item->fid) {
-    $source = l($item->ftitle, "aggregator/sources/$item->fid", array('class' => 'feed-item-source')) . ' -';
+    $source = l($item->ftitle, "aggregator/sources/$item->fid", array('attributes' => array('class' => 'feed-item-source'))) . ' -';
   }
 
   if (date('Ymd', $item->timestamp) == date('Ymd')) {
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.273
diff -u -p -r1.273 blog.module
--- modules/blog/blog.module	31 Jan 2007 15:49:23 -0000	1.273
+++ modules/blog/blog.module	6 Feb 2007 11:13:14 -0000
@@ -85,7 +85,7 @@ function blog_feed_user($uid = 0) {
 
   $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $uid, 0, variable_get('feed_default_items', 10));
   $channel['title'] = $account->name ."'s blog";
-  $channel['link'] = url("blog/$uid", NULL, NULL, TRUE);
+  $channel['link'] = url("blog/$uid", array('absolute' => TRUE));
   $channel['description'] = $term->description;
   node_feed($result, $channel);
 }
@@ -96,7 +96,7 @@ function blog_feed_user($uid = 0) {
 function blog_feed_last() {
   $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
   $channel['title'] = variable_get('site_name', 'Drupal') .' blogs';
-  $channel['link'] = url('blog', NULL, NULL, TRUE);
+  $channel['link'] = url('blog', array('absolute' => TRUE));
   $channel['description'] = $term->description;
   node_feed($result, $channel);
 }
Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.101
diff -u -p -r1.101 blogapi.module
--- modules/blogapi/blogapi.module	24 Jan 2007 14:48:36 -0000	1.101
+++ modules/blogapi/blogapi.module	6 Feb 2007 11:13:15 -0000
@@ -138,7 +138,7 @@ function blogapi_blogger_get_users_blogs
     $types = _blogapi_get_node_types();
     $structs = array();
     foreach ($types as $type) {
-      $structs[] = array('url' => url('blog/' . $user->uid, NULL, NULL, TRUE), 'blogid' => $type, 'blogName' => $user->name . ": " . $type);
+      $structs[] = array('url' => url('blog/' . $user->uid, array('absolute' => TRUE)), 'blogid' => $type, 'blogName' => $user->name . ": " . $type);
     }
     return $structs;
   }
@@ -161,7 +161,7 @@ function blogapi_blogger_get_user_info($
       'firstname' => $name[0],
       'nickname' => $user->name,
       'email' => $user->mail,
-      'url' => url('blog/' . $user->uid, NULL, NULL, TRUE));
+      'url' => url('blog/' . $user->uid, array('absolute' => TRUE)));
   }
   else {
     return blogapi_error($user);
@@ -575,7 +575,7 @@ function blogapi_init() {
     drupal_add_link(array('rel' => 'EditURI',
                           'type' => 'application/rsd+xml',
                           'title' => t('RSD'),
-                          'href' => url('blogapi/rsd', NULL, NULL, TRUE)));
+                          'href' => url('blogapi/rsd', array('absolute' => TRUE))));
   }
 }
 
@@ -583,7 +583,7 @@ function blogapi_rsd() {
   global $base_url;
 
   $xmlrpc = $base_url .'/'. 'xmlrpc.php';
-  $base = url('', NULL, NULL, TRUE);
+  $base = url('', array('absolute' => TRUE));
   $blogid = 1; # until we figure out how to handle multiple bloggers
 
   drupal_set_header('Content-Type: application/rsd+xml; charset=utf-8');
@@ -658,8 +658,8 @@ function _blogapi_get_post($node, $bodie
     'dateCreated' => xmlrpc_date($node->created),
     'title' => $node->title,
     'postid' => $node->nid,
-    'link' => url('node/'.$node->nid, NULL, NULL, TRUE),
-    'permaLink' => url('node/'.$node->nid, NULL, NULL, TRUE),
+    'link' => url('node/'.$node->nid, array('absolute' => TRUE)),
+    'permaLink' => url('node/'.$node->nid, array('absolute' => TRUE)),
   );
   if ($bodies) {
     if ($node->comment == 1) {
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.523
diff -u -p -r1.523 comment.module
--- modules/comment/comment.module	31 Jan 2007 15:49:23 -0000	1.523
+++ modules/comment/comment.module	6 Feb 2007 11:13:16 -0000
@@ -285,7 +285,7 @@ function comment_get_recent($number = 10
 function theme_comment_block() {
   $items = array();
   foreach (comment_get_recent() as $comment) {
-    $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp)));
+    $items[] = l($comment->subject, 'node/'. $comment->nid, array('fragment' => 'comment-'. $comment->cid)) .'<br />'. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp)));
   }
   if ($items) {
     return theme('item_list', $items);
@@ -444,7 +444,7 @@ function comment_nodeapi(&$node, $op, $a
 
     case 'rss item':
       if ($node->comment != COMMENT_NODE_DISABLED) {
-        return array(array('key' => 'comments', 'value' => url('node/'. $node->nid, NULL, 'comments', TRUE)));
+        return array(array('key' => 'comments', 'value' => url('node/'. $node->nid, array('fragment' => 'comments', 'absolute' => TRUE))));
       }
       else {
         return array();
@@ -539,7 +539,7 @@ function comment_admin_settings() {
       COMMENT_ANONYMOUS_MAYNOT_CONTACT => t('Anonymous posters may not enter their contact information'),
       COMMENT_ANONYMOUS_MAY_CONTACT => t('Anonymous posters may leave their contact information'),
       COMMENT_ANONYMOUS_MUST_CONTACT => t('Anonymous posters must leave their contact information')),
-    '#description' => t('This option is enabled when anonymous users have permission to post comments on the <a href="@url">permissions page</a>.', array('@url' => url('admin/user/access', NULL, 'module-comment'))),
+    '#description' => t('This option is enabled when anonymous users have permission to post comments on the <a href="@url">permissions page</a>.', array('@url' => url('admin/user/access', array('fragment' => 'module-comment')))),
   );
   if (!user_access('post comments', user_load(array('uid' => 0)))) {
     $form['posting_settings']['comment_anonymous']['#disabled'] = TRUE;
@@ -719,7 +719,7 @@ function comment_save($edit) {
         comment_invoke_comment($edit, 'update');
 
         // Add an entry to the watchdog log.
-        watchdog('content', t('Comment: updated %subject.', array('%subject' => $edit['subject'])), WATCHDOG_NOTICE, l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
+        watchdog('content', t('Comment: updated %subject.', array('%subject' => $edit['subject'])), WATCHDOG_NOTICE, l(t('view'), 'node/'. $edit['nid'], array('fragment' => 'comment-'. $edit['cid'])));
       }
       else {
         // Check for duplicate comments. Note that we have to use the
@@ -800,7 +800,7 @@ function comment_save($edit) {
         comment_invoke_comment($edit, 'insert');
 
         // Add an entry to the watchdog log.
-        watchdog('content', t('Comment: added %subject.', array('%subject' => $edit['subject'])), WATCHDOG_NOTICE, l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
+        watchdog('content', t('Comment: added %subject.', array('%subject' => $edit['subject'])), WATCHDOG_NOTICE, l(t('view'), 'node/'. $edit['nid'], array('fragment' => 'comment-'. $edit['cid'])));
       }
 
       // Clear the cache so an anonymous user can see his comment being added.
@@ -1188,10 +1188,10 @@ function comment_admin_overview($type = 
   while ($comment = db_fetch_object($result)) {
     $comments[$comment->cid] = '';
     $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
-    $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128)), NULL, 'comment-'. $comment->cid));
+    $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128), 'fragment' => 'comment-'. $comment->cid));
     $form['username'][$comment->cid] = array('#value' => theme('username', $comment));
     $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small'));
-    $form['operations'][$comment->cid] = array('#value' => l(t('edit'), 'comment/edit/'. $comment->cid, array(), $destination));
+    $form['operations'][$comment->cid] = array('#value' => l(t('edit'), 'comment/edit/'. $comment->cid, array('query' => $destination)));
   }
   $form['comments'] = array('#type' => 'checkboxes', '#options' => isset($comments) ? $comments: array());
   $form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
@@ -1227,7 +1227,7 @@ function comment_admin_overview_submit($
         // Allow modules to respond to the updating of a comment.
         comment_invoke_comment($comment, $form_values['operation']);
         // Add an entry to the watchdog log.
-        watchdog('content', t('Comment: updated %subject.', array('%subject' => $comment->subject)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid));
+        watchdog('content', t('Comment: updated %subject.', array('%subject' => $comment->subject)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $comment->nid, array('fragment' => 'comment-'. $comment->cid)));
       }
     }
     cache_clear_all();
@@ -1773,7 +1773,7 @@ function comment_controls_submit($form_i
 
 function theme_comment($comment, $links = array()) {
   $output  = '<div class="comment'. ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') .'">';
-  $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") .' '. theme('mark', $comment->new) ."</div>\n";
+  $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) . ' ' . theme('mark', $comment->new) ."</div>\n";
   $output .= '<div class="credit">'. t('by %a on %b', array('%a' => theme('username', $comment), '%b' => format_date($comment->timestamp))) ."</div>\n";
   $output .= '<div class="body">'. $comment->comment .'</div>';
   $output .= '<div class="links">'. theme('links', $links) .'</div>';
@@ -1783,7 +1783,7 @@ function theme_comment($comment, $links 
 
 function theme_comment_folded($comment) {
   $output  = "<div class=\"comment-folded\">\n";
-  $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") .' '. theme('mark', $comment->new) .'</span> ';
+  $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, array('fragment' => "comment-$comment->cid")) . ' '. theme('mark', $comment->new) .'</span> ';
   $output .= '<span class="credit">'. t('by') .' '. theme('username', $comment) ."</span>\n";
   $output .= "</div>\n";
   return $output;
@@ -1823,10 +1823,10 @@ function theme_comment_post_forbidden($n
     }
 
     if (variable_get('user_register', 1)) {
-      return t('<a href="@login">Login</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', $destination), '@register' => url('user/register', $destination)));
+      return t('<a href="@login">Login</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
     }
     else {
-      return t('<a href="@login">Login</a> to post comments', array('@login' => url('user/login', $destination)));
+      return t('<a href="@login">Login</a> to post comments', array('@login' => url('user/login', array('query' => $destination))));
     }
   }
 }
Index: modules/contact/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.76
diff -u -p -r1.76 contact.module
--- modules/contact/contact.module	31 Jan 2007 15:49:24 -0000	1.76
+++ modules/contact/contact.module	6 Feb 2007 11:13:16 -0000
@@ -16,7 +16,7 @@ function contact_help($section) {
       $output .= '<p>'. t("Users can activate/deactivate their personal contact forms in their account settings. Upon activation, a contact tab will appear in their user profiles. Privileged users such as site administrators are able to contact users even if they have chosen not to enable this feature.") .'</p>';
       $output .= '<p>'. t("Note that the contact tab will not appear when a user views his or her own profile; only when viewing another user's profile, if that user's contact form is enabled.") .'</p>';
       $output .= '<p>'. t('If the menu module is enabled, a menu item linking to the site-wide contact page is added to the navigation block. It is disabled by default, but can be enabled via the <a href="@menu-module">menu management</a> page. Links to the contact page may also be added to the primary and secondary links using the same page.', array('@menu-module' => url('admin/build/menu'))) .'</p>';
-      $output .= '<p>'. t('For more information, please read the configuration and customization handbook page for the <a href="@contact">contact module</a>.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', NULL, NULL, TRUE))) .'</p>';
+      $output .= '<p>'. t('For more information, please read the configuration and customization handbook page for the <a href="@contact">contact module</a>.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', array('absolute' => TRUE)))) .'</p>';
       return $output;
     case 'admin/build/contact':
       $output = '<p>'. t('This page lets you setup <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/build/contact/settings'), '@form' => url('contact'))) .'</p>';
@@ -346,8 +346,8 @@ function contact_mail_user_submit($form_
   $account = user_load(array('uid' => arg(1), 'status' => 1));
   // Compose the body:
   $message[] = "$account->name,";
-  $message[] = t("!name (!name-url) has sent you a message via your contact form (!form-url) at !site.", array('!name' => $user->name, '!name-url' => url("user/$user->uid", NULL, NULL, TRUE), '!form-url' => url($_GET['q'], NULL, NULL, TRUE), '!site' => variable_get('site_name', 'Drupal')));
-  $message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", NULL, NULL, TRUE)));
+  $message[] = t("!name (!name-url) has sent you a message via your contact form (!form-url) at !site.", array('!name' => $user->name, '!name-url' => url("user/$user->uid", array('absolute' => TRUE)), '!form-url' => url($_GET['q'], array('absolute' => TRUE)), '!site' => variable_get('site_name', 'Drupal')));
+  $message[] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", array('absolute' => TRUE))));
   $message[] = t('Message:');
   $message[] = $form_values['message'];
 
@@ -495,7 +495,7 @@ function contact_mail_page_submit($form_
   $from = $form_values['mail'];
 
   // Compose the body:
-  $message[] = t("!name sent a message using the contact form at !form.", array('!name' => $form_values['name'], '!form' => url($_GET['q'], NULL, NULL, TRUE)));
+  $message[] = t("!name sent a message using the contact form at !form.", array('!name' => $form_values['name'], '!form' => url($_GET['q'], array('absolute' => TRUE))));
   $message[] = $form_values['message'];
 
   // Tidy up the body:
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.382
diff -u -p -r1.382 forum.module
--- modules/forum/forum.module	1 Feb 2007 21:44:36 -0000	1.382
+++ modules/forum/forum.module	6 Feb 2007 11:13:17 -0000
@@ -913,7 +913,7 @@ function theme_forum_display($forums, $t
       $output .= '<li>'. t('You are not allowed to post a new forum topic.') .'</li>';
     }
     else {
-      $output .= '<li>'. t('<a href="@login">Login</a> to post a new forum topic.', array('@login' => url('user/login', drupal_get_destination()))) .'</li>';
+      $output .= '<li>'. t('<a href="@login">Login</a> to post a new forum topic.', array('@login' => url('user/login', array('query' => drupal_get_destination())))) .'</li>';
     }
     $output .= '</ul>';
 
@@ -975,7 +975,7 @@ function theme_forum_list($forums, $pare
         $row = array(
           'data' => array(
             array('data' => $description, 'class' => 'forum'),
-            array('data' => $forum->num_topics . ($new_topics ? '<br />'. l(format_plural($new_topics, '1 new', '@count new'), "forum/$forum->tid", NULL, NULL, 'new') : ''), 'class' => 'topics'),
+            array('data' => $forum->num_topics . ($new_topics ? '<br />'. l(format_plural($new_topics, '1 new', '@count new'), "forum/$forum->tid", array('fragment' => 'new')) : ''), 'class' => 'topics'),
             array('data' => $forum->num_posts, 'class' => 'posts'),
             array('data' => _forum_format($forum->last_post), 'class' => 'last-reply'),
           ),
@@ -1016,7 +1016,7 @@ function theme_forum_topic_list($tid, $t
         $rows[] = array(
           array('data' => theme('forum_icon', $topic->new, $topic->num_comments, $topic->comment_mode, $topic->sticky), 'class' => 'icon'),
           array('data' => l($topic->title, "node/$topic->nid"), 'class' => 'topic'),
-          array('data' => $topic->num_comments . ($topic->new_replies ? '<br />'. l(format_plural($topic->new_replies, '1 new', '@count new'), "node/$topic->nid", NULL, NULL, 'new') : ''), 'class' => 'replies'),
+          array('data' => $topic->num_comments . ($topic->new_replies ? '<br />'. l(format_plural($topic->new_replies, '1 new', '@count new'), "node/$topic->nid", array('fragment' => 'new')) : ''), 'class' => 'replies'),
           array('data' => _forum_format($topic), 'class' => 'created'),
           array('data' => _forum_format(isset($topic->last_reply) ? $topic->last_reply : NULL), 'class' => 'last-reply')
         );
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.781
diff -u -p -r1.781 node.module
--- modules/node/node.module	6 Feb 2007 08:16:27 -0000	1.781
+++ modules/node/node.module	6 Feb 2007 11:13:18 -0000
@@ -922,7 +922,7 @@ function node_search($op = 'search', $ke
         $node->body .= module_invoke('taxonomy', 'nodeapi', $node, 'update index');
 
         $extra = node_invoke_nodeapi($node, 'search result');
-        $results[] = array('link' => url('node/'. $item->sid, NULL, NULL, TRUE),
+        $results[] = array('link' => url('node/'. $item->sid, array('absolute' => TRUE)),
                            'type' => node_get_types('name', $node),
                            'title' => $node->title,
                            'user' => theme('username', $node),
@@ -1531,7 +1531,7 @@ function node_admin_nodes() {
     $form['name'][$node->nid] =  array('#value' => node_get_types('name', $node));
     $form['username'][$node->nid] = array('#value' => theme('username', $node));
     $form['status'][$node->nid] =  array('#value' =>  ($node->status ? t('published') : t('not published')));
-    $form['operations'][$node->nid] = array('#value' => l(t('edit'), 'node/'. $node->nid .'/edit', array(), $destination));
+    $form['operations'][$node->nid] = array('#value' => l(t('edit'), 'node/'. $node->nid .'/edit', array('query' => $destination)));
   }
   $form['nodes'] = array('#type' => 'checkboxes', '#options' => $nodes);
   $form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
@@ -1765,7 +1765,7 @@ function node_feed($nodes = 0, $channel 
   while ($node = db_fetch_object($nodes)) {
     // Load the specified node:
     $item = node_load($node->nid);
-    $link = url("node/$node->nid", NULL, NULL, 1);
+    $link = url("node/$node->nid", array('absolute' => TRUE));
 
     if ($item_length != 'title') {
       $teaser = ($item_length == 'teaser') ? TRUE : FALSE;
@@ -1799,7 +1799,7 @@ function node_feed($nodes = 0, $channel 
       case 'teaser':
         $item_text = $item->teaser;
         if ($item->readmore) {
-          $item_text .= '<p>'. l(t('read more'), 'node/'. $item->nid, NULL, NULL, NULL, TRUE) .'</p>';
+          $item_text .= '<p>'. l(t('read more'), 'node/'. $item->nid, array('absolute' => TRUE)) .'</p>';
         }
         break;
       case 'title':
@@ -2129,7 +2129,7 @@ function node_add($type = NULL) {
       if (function_exists($type->module .'_form') && node_access('create', $type->type)) {
         $type_url_str = str_replace('_', '-', $type->type);
         $title = t('Add a new @s.', array('@s' => $type->name));
-        $out = '<dt>'. l(drupal_ucfirst($type->name), "node/add/$type_url_str", array('title' => $title)) .'</dt>';
+        $out = '<dt>'. l(drupal_ucfirst($type->name), "node/add/$type_url_str", array('attributes' => array('title' => $title))) .'</dt>';
         $out .= '<dd>'. filter_xss_admin($type->description) .'</dd>';
         $item[$type->type] = $out;
       }
@@ -2349,7 +2349,7 @@ function node_page_default() {
   $result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));
 
   if (db_num_rows($result)) {
-    $feed_url = url('rss.xml', NULL, NULL, TRUE);
+    $feed_url = url('rss.xml', array('absolute' => TRUE));
     drupal_add_feed($feed_url, variable_get('site_name', 'Drupal') .' '. t('RSS'));
 
     $output = '';
Index: modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.107
diff -u -p -r1.107 path.module
--- modules/path/path.module	31 Jan 2007 15:49:25 -0000	1.107
+++ modules/path/path.module	6 Feb 2007 11:13:18 -0000
@@ -187,7 +187,7 @@ function path_form($edit = '') {
     '#maxlength' => 64,
     '#size' => 45,
     '#description' => t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'),
-    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
   $form['dst'] = array(
     '#type' => 'textfield',
@@ -195,7 +195,7 @@ function path_form($edit = '') {
     '#maxlength' => 64,
     '#size' => 45,
     '#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
-    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
 
   if ($edit['pid']) {
@@ -312,7 +312,7 @@ function path_overview() {
   $rows = array();
   $destination = drupal_get_destination();
   while ($data = db_fetch_object($result)) {
-    $rows[] = array(check_plain($data->dst), check_plain($data->src), l(t('edit'), "admin/build/path/edit/$data->pid", array(), $destination), l(t('delete'), "admin/build/path/delete/$data->pid", array(), $destination));
+    $rows[] = array(check_plain($data->dst), check_plain($data->src), l(t('edit'), "admin/build/path/edit/$data->pid", array('query' => $destination)), l(t('delete'), "admin/build/path/delete/$data->pid", array('query' => $destination)));
   }
 
   if (empty($rows)) {
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.251
diff -u -p -r1.251 statistics.module
--- modules/statistics/statistics.module	31 Jan 2007 15:49:25 -0000	1.251
+++ modules/statistics/statistics.module	6 Feb 2007 11:13:19 -0000
@@ -175,7 +175,7 @@ function statistics_access_log($aid) {
   $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = %d', $aid);
   if ($access = db_fetch_object($result)) {
     $output  = '<table border="1" cellpadding="2" cellspacing="2">';
-    $output .= ' <tr><th>'. t('URL') ."</th><td>". l(url($access->path, NULL, NULL, TRUE), $access->path) ."</td></tr>";
+    $output .= ' <tr><th>'. t('URL') ."</th><td>". l(url($access->path, array('absolute' => TRUE)), $access->path) ."</td></tr>";
     $output .= ' <tr><th>'. t('Title') .'</th><td>'. $access->title .'</td></tr>'; // safe because it comes from drupal_get_title()
     $output .= ' <tr><th>'. t('Referrer') ."</th><td>". ($access->url ? l($access->url, $access->url) : '') ."</td></tr>";
     $output .= ' <tr><th>'. t('Date') .'</th><td>'. format_date($access->timestamp, 'large') .'</td></tr>';
@@ -317,7 +317,7 @@ function statistics_top_visitors() {
   $rows = array();
   while ($account = db_fetch_object($result)) {
     $qs = drupal_get_destination();
-    $ban_link = $account->aid ? l(t('unban'), "admin/user/rules/delete/$account->aid", array(), $qs) : l(t('ban'), "admin/user/rules/add/$account->hostname/host", array(), $qs);
+    $ban_link = $account->aid ? l(t('unban'), "admin/user/rules/delete/$account->aid", array('query' => $qs)) : l(t('ban'), "admin/user/rules/add/$account->hostname/host", array('query' => $qs));
     $rows[] = array($account->hits, ($account->uid ? theme('username', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link);
   }
 
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.448
diff -u -p -r1.448 system.module
--- modules/system/system.module	4 Feb 2007 21:20:50 -0000	1.448
+++ modules/system/system.module	6 Feb 2007 11:13:21 -0000
@@ -565,7 +565,7 @@ function system_site_information_setting
     '#default_value' => variable_get('site_frontpage', 'node'),
     '#size' => 40,
     '#description' => t('The home page displays content from this relative URL. If unsure, specify "node".'),
-    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
 
   return system_settings_form($form);
@@ -603,7 +603,7 @@ function system_error_reporting_settings
     '#default_value' => variable_get('site_403', ''),
     '#size' => 40,
     '#description' => t('This page is displayed when the requested document is denied to the current user. If unsure, specify nothing.'),
-    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
 
   $form['site_404'] = array(
@@ -612,7 +612,7 @@ function system_error_reporting_settings
     '#default_value' =>  variable_get('site_404', ''),
     '#size' => 40,
     '#description' => t('This page is displayed when no other content matches the requested document. If unsure, specify nothing.'),
-    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q=')
+    '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
 
   $form['error_level'] = array(
@@ -2139,7 +2139,7 @@ function confirm_form($form, $question, 
     $fragment = isset($path['fragment']) ? $path['fragment'] : NULL;
     $path = isset($path['path']) ? $path['path'] : NULL;
   }
-  $cancel = l($no ? $no : t('Cancel'), $path, array(), $query, $fragment);
+  $cancel = l($no ? $no : t('Cancel'), $path, array('query' => $query, 'fragment' => $fragment));
 
   drupal_set_title($question);
   $form['#attributes'] = array('class' => 'confirmation');
@@ -2250,7 +2250,7 @@ function theme_admin_block_content($cont
   if (system_admin_compact_mode()) {
     $output = '<ul class="menu">';
     foreach ($content as $item) {
-      $output .= '<li class="leaf">'. l($item['title'], $item['path'], array('title' => $item['description'])) .'</li>';
+      $output .= '<li class="leaf">'. l($item['title'], $item['path'], array('attributes' => array('title' => $item['description']))) .'</li>';
     }
     $output .= '</ul>';
   }
@@ -2305,7 +2305,7 @@ function system_get_module_admin_tasks($
 
   // Check for permissions.
   if (module_hook($module, 'perm') && $admin_access) {
-    $admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/access', NULL, NULL, 'module-'. $module);
+    $admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/access', array('fragment' => 'module-'. $module));
   }
 
   // Check for menu items that are admin links.
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.337
diff -u -p -r1.337 taxonomy.module
--- modules/taxonomy/taxonomy.module	31 Jan 2007 21:26:56 -0000	1.337
+++ modules/taxonomy/taxonomy.module	6 Feb 2007 11:13:22 -0000
@@ -191,7 +191,7 @@ function taxonomy_overview_terms($vocabu
     if (($start_from && ($start_from * $page_increment) >= $total_entries) || ($displayed_count == $page_increment)) {
       continue;
     }
-    $rows[] = array(str_repeat('--', $term->depth) .' '. l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array(), $destination));
+    $rows[] = array(str_repeat('--', $term->depth) . ' ' . l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array('query' => $destination)));
     $displayed_count++; // we're counting tids displayed
   }
 
@@ -241,12 +241,12 @@ function taxonomy_form_vocabulary($edit 
     '#title' => t('Hierarchy'),
     '#default_value' => $edit['hierarchy'],
     '#options' => array(t('Disabled'), t('Single'), t('Multiple')),
-    '#description' => t('Allows <a href="@help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))),
+    '#description' => t('Allows <a href="@help-url">a tree-like hierarchy</a> between terms of this vocabulary.', array('@help-url' => url('admin/help/taxonomy', array('absolute' => TRUE)))),
   );
   $form['relations'] = array('#type' => 'checkbox',
     '#title' => t('Related terms'),
     '#default_value' => $edit['relations'],
-    '#description' => t('Allows <a href="@help-url">related terms</a> in this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))),
+    '#description' => t('Allows <a href="@help-url">related terms</a> in this vocabulary.', array('@help-url' => url('admin/help/taxonomy', array('absolute' => TRUE)))),
   );
   $form['tags'] = array('#type' => 'checkbox',
     '#title' => t('Free tagging'),
@@ -397,10 +397,11 @@ function taxonomy_form_term($vocabulary,
     $exclude[] = $edit['tid'];
 
     if ($vocabulary->hierarchy == 1) {
+      $form['parent'] = _taxonomy_term_select(t('Parent'), 'parent', $parent, $vocabulary_id, l(t('Parent term'), 'admin/help/taxonomy', array('fragment' => 'parent')) .'.', 0, '<'. t('root') .'>', $exclude);
       $form['parent'] = _taxonomy_term_select(t('Parent'), 'parent', $parent, $vocabulary->vid, l(t('Parent term'), 'admin/help/taxonomy', NULL, NULL, 'parent') .'.', 0, '<'. t('root') .'>', $exclude);
     }
     elseif ($vocabulary->hierarchy == 2) {
-      $form['parent'] = _taxonomy_term_select(t('Parents'), 'parent', $parent, $vocabulary->vid, l(t('Parent terms'), 'admin/help/taxonomy', NULL, NULL, 'parent') .'.', 1, '<'. t('root') .'>', $exclude);
+      $form['parent'] = _taxonomy_term_select(t('Parents'), 'parent', $parent, $vocabulary_id, l(t('Parent terms'), 'admin/help/taxonomy', array('fragment' => 'parent')) .'.', 1, '<'. t('root') .'>', $exclude);
     }
   }
 
@@ -412,7 +413,7 @@ function taxonomy_form_term($vocabulary,
     '#type' => 'textarea',
     '#title' => t('Synonyms'),
     '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])),
-    '#description' => t('<a href="@help-url">Synonyms</a> of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms'))));
+    '#description' => t('<a href="@help-url">Synonyms</a> of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', array('absolute' => TRUE)))));
   $form['weight'] = array(
     '#type' => 'weight',
     '#title' => t('Weight'),
@@ -1368,7 +1369,7 @@ function taxonomy_term_page($str_tids = 
 
         case 'feed':
           $term = taxonomy_get_term($tids[0]);
-          $channel['link'] = url('taxonomy/term/'. $str_tids .'/'. $depth, NULL, NULL, TRUE);
+          $channel['link'] = url('taxonomy/term/'. $str_tids .'/'. $depth, array('absolute' => TRUE));
           $channel['title'] = variable_get('site_name', 'Drupal') .' - '. $title;
           $channel['description'] = $term->description;
 
@@ -1419,7 +1420,7 @@ function taxonomy_rss_item($node) {
   foreach ($node->taxonomy as $term) {
     $output[] = array('key'   => 'category',
                       'value' => check_plain($term->name),
-                      'attributes' => array('domain' => url('taxonomy/term/'. $term->tid, NULL, NULL, TRUE)));
+                      'attributes' => array('domain' => url('taxonomy/term/'. $term->tid, array('absolute' => TRUE))));
   }
   return $output;
 }
Index: modules/tracker/tracker.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.module,v
retrieving revision 1.144
diff -u -p -r1.144 tracker.module
--- modules/tracker/tracker.module	24 Jan 2007 14:48:36 -0000	1.144
+++ modules/tracker/tracker.module	6 Feb 2007 11:13:22 -0000
@@ -103,7 +103,7 @@ function tracker_page($uid = 0) {
 
       if ($new = comment_num_new($node->nid)) {
         $comments .= '<br />';
-        $comments .= l(format_plural($new, '1 new', '@count new'), "node/$node->nid", NULL, NULL, 'new');
+        $comments .= l(format_plural($new, '1 new', '@count new'), "node/$node->nid", array('fragment' => 'new'));
       }
     }
 
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.152
diff -u -p -r1.152 upload.module
--- modules/upload/upload.module	31 Jan 2007 15:49:26 -0000	1.152
+++ modules/upload/upload.module	6 Feb 2007 11:13:22 -0000
@@ -795,7 +795,7 @@ function _upload_form($node) {
     $form['new']['upload'] = array('#type' => 'file', '#title' => t('Attach new file'), '#size' => 40);
     $form['new']['attach'] = array('#type' => 'button', '#value' => t('Attach'), '#name' => 'attach', '#id' => 'attach-button');
     // The class triggers the js upload behaviour.
-    $form['attach-url'] = array('#type' => 'hidden', '#value' => url('upload/js', NULL, NULL, TRUE), '#attributes' => array('class' => 'upload'));
+    $form['attach-url'] = array('#type' => 'hidden', '#value' => url('upload/js', array('absolute' => TRUE)), '#attributes' => array('class' => 'upload'));
   }
 
   // Needed for JS
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.753
diff -u -p -r1.753 user.module
--- modules/user/user.module	2 Feb 2007 15:25:25 -0000	1.753
+++ modules/user/user.module	6 Feb 2007 11:13:23 -0000
@@ -440,7 +440,7 @@ function user_search($op = 'search', $ke
         $keys = preg_replace('!\*+!', '%', $keys);
         $result = pager_query("SELECT * FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
         while ($account = db_fetch_object($result)) {
-          $find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, NULL, NULL, TRUE));
+          $find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, array('absolute' => TRUE)));
         }
         return $find;
       }
@@ -478,7 +478,7 @@ function user_user($type, &$edit, &$user
 
 function user_login_block() {
   $form = array(
-    '#action' => url($_GET['q'], drupal_get_destination()),
+    '#action' => url($_GET['q'], array('query' => drupal_get_destination())),
     '#id' => 'user-login-form',
     '#base' => 'user_login',
   );
@@ -964,7 +964,7 @@ function user_auth_help_links() {
   $links = array();
   foreach (module_list() as $module) {
     if (module_hook($module, 'auth')) {
-      $links[] = l(module_invoke($module, 'info', 'name'), 'user/help', array(), NULL, $module);
+      $links[] = l(module_invoke($module, 'info', 'name'), 'user/help', array('fragment' => $module));
     }
   }
   return $links;
@@ -1157,7 +1157,7 @@ function user_pass_submit($form_id, $for
   $from = variable_get('site_mail', ini_get('sendmail_from'));
 
   // Mail one time login URL and instructions.
-  $variables = array('!username' => $account->name, '!site' => variable_get('site_name', 'Drupal'), '!login_url' => user_pass_reset_url($account), '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen('http://')), '!mailto' => $account->mail, '!date' => format_date(time()), '!login_uri' => url('user', NULL, NULL, TRUE), '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE));
+  $variables = array('!username' => $account->name, '!site' => variable_get('site_name', 'Drupal'), '!login_url' => user_pass_reset_url($account), '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen('http://')), '!mailto' => $account->mail, '!date' => format_date(time()), '!login_uri' => url('user', array('absolute' => TRUE)), '!edit_uri' => url('user/'. $account->uid .'/edit', array('absolute' => TRUE)));
   $subject = _user_mail_text('pass_subject', $variables);
   $body = _user_mail_text('pass_body', $variables);
   $mail_success = drupal_mail('user-pass', $account->mail, $subject, $body, $from);
@@ -1233,7 +1233,7 @@ function user_pass_reset($uid, $timestam
 
 function user_pass_reset_url($account) {
   $timestamp = time();
-  return url("user/reset/$account->uid/$timestamp/".user_pass_rehash($account->pass, $timestamp, $account->login), NULL, NULL, TRUE);
+  return url("user/reset/$account->uid/$timestamp/".user_pass_rehash($account->pass, $timestamp, $account->login), array('absolute' => TRUE));
 }
 
 function user_pass_rehash($password, $timestamp, $login) {
@@ -1331,7 +1331,7 @@ function user_register_submit($form_id, 
   $account = user_save('', array_merge($form_values, $merge_data));
   watchdog('user', t('New user: %name %email.', array('%name' => $name, '%email' => '<'. $mail .'>')), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $account->uid .'/edit'));
 
-  $variables = array('!username' => $name, '!site' => variable_get('site_name', 'Drupal'), '!password' => $pass, '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen('http://')), '!mailto' => $mail, '!date' => format_date(time()), '!login_uri' => url('user', NULL, NULL, TRUE), '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), '!login_url' => user_pass_reset_url($account));
+  $variables = array('!username' => $name, '!site' => variable_get('site_name', 'Drupal'), '!password' => $pass, '!uri' => $base_url, '!uri_brief' => substr($base_url, strlen('http://')), '!mailto' => $mail, '!date' => format_date(time()), '!login_uri' => url('user', array('absolute' => TRUE)), '!edit_uri' => url('user/'. $account->uid .'/edit', array('absolute' => TRUE)), '!login_url' => user_pass_reset_url($account));
 
   // The first user may login immediately, and receives a customized welcome e-mail.
   if ($account->uid == 1) {
@@ -2134,7 +2134,7 @@ function user_admin_account() {
     $form['roles'][$account->uid][0] = array('#value' => theme('item_list', $users_roles));
     $form['member_for'][$account->uid] = array('#value' => format_interval(time() - $account->created));
     $form['last_access'][$account->uid] =  array('#value' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never'));
-    $form['operations'][$account->uid] = array('#value' => l(t('edit'), "user/$account->uid/edit", array(), $destination));
+    $form['operations'][$account->uid] = array('#value' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination)));
   }
   $form['accounts'] = array(
     '#type' => 'checkboxes',
Index: modules/watchdog/watchdog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/watchdog/watchdog.module,v
retrieving revision 1.169
diff -u -p -r1.169 watchdog.module
--- modules/watchdog/watchdog.module	31 Jan 2007 15:49:26 -0000	1.169
+++ modules/watchdog/watchdog.module	6 Feb 2007 11:13:24 -0000
@@ -142,7 +142,7 @@ function watchdog_overview() {
         $icons[$watchdog->severity],
         t($watchdog->type),
         format_date($watchdog->timestamp, 'small'),
-        l(truncate_utf8($watchdog->message, 56, TRUE, TRUE), 'admin/logs/event/'. $watchdog->wid, array(), NULL, NULL, FALSE, TRUE),
+        l(truncate_utf8($watchdog->message, 56, TRUE, TRUE), 'admin/logs/event/'. $watchdog->wid, array('html' => TRUE)),
         theme('username', $watchdog),
         $watchdog->link,
       ),
