Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.611 diff -u -F^f -r1.611 common.inc --- includes/common.inc 10 Jan 2007 23:30:07 -0000 1.611 +++ includes/common.inc 27 Jan 2007 00:01:23 -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,38 @@ 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']; + } + if (is_array($options['query'])) { + $options['query'] = drupal_query_string_encode($options['query']); } // Return an external link if $path contains an allowed absolute URL. @@ -1148,16 +1161,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 +1189,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 '' links to the default front page. if (!empty($path) && $path != '') { - $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 +1252,56 @@ 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()) { + print_r(func_get_args()); + // Merge in defaults + $options += array( + 'attributes' => array(), + 'absolute' => FALSE, + 'html' => FALSE, + 'alias' => 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 ''. ($html ? $text : check_plain($text)) .''; + return ''. ($options['html'] ? $text : check_plain($text)) .''; } /** Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.90 diff -u -F^f -r1.90 file.inc --- includes/file.inc 5 Jan 2007 05:32:22 -0000 1.90 +++ includes/file.inc 27 Jan 2007 00:01:23 -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.174 diff -u -F^f -r1.174 form.inc --- includes/form.inc 15 Jan 2007 04:09:40 -0000 1.174 +++ includes/form.inc 27 Jan 2007 00:01:23 -0000 @@ -1378,7 +1378,7 @@ function theme_textfield($element) { if ($element['#autocomplete_path']) { drupal_add_js('misc/autocomplete.js'); $class[] = 'form-autocomplete'; - $extra = ''; + $extra = ''; } _form_set_class($element, $class); Index: includes/menu.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/menu.inc,v retrieving revision 1.146 diff -u -F^f -r1.146 menu.inc --- includes/menu.inc 14 Jan 2007 01:37:48 -0000 1.146 +++ includes/menu.inc 27 Jan 2007 00:01:23 -0000 @@ -190,7 +190,7 @@ * It will already have been translated by the locale system. * - 'path' - The Drupal path to the menu item. A link to a particular item * can thus be constructed with - * l($item['title'], $item['path'], array('title' => $item['description'])). + * l($item['title'], $item['path'], array('attributes' => array('title' => $item['description']))). * - 'children' - A linear list of the menu ID's of this item's children. * * Menu ID 0 is the "root" of the menu. The children of this item are the @@ -698,7 +698,7 @@ function theme_menu_item($mid, $children * @ingroup themeable */ function theme_menu_item_link($item, $link_item) { - return l($item['title'], $link_item['path'], !empty($item['description']) ? array('title' => $item['description']) : array(), isset($item['query']) ? $item['query'] : NULL); + return l($item['title'], $link_item['path'], array('attributes' => !empty($item['description']) ? array('title' => $item['description']) : array(), 'query' => isset($item['query']) ? $item['query'] : NULL)); } /** @@ -926,7 +926,7 @@ function theme_menu_links($links) { if (stristr($index, 'active')) { $output .= ' class="active"'; } - $output .= ">". l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']) ."\n"; + $output .= ">". l($link['title'], $link['href'], array('attributes' => $link['attributes'], 'query' => $link['query'], 'fragment' => $link['fragment'])) ."\n"; } $output .= ''; Index: includes/pager.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/pager.inc,v retrieving revision 1.59 diff -u -F^f -r1.59 pager.inc --- includes/pager.inc 15 Oct 2006 19:57:05 -0000 1.59 +++ includes/pager.inc 27 Jan 2007 00:01:23 -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.43 diff -u -F^f -r1.43 tablesort.inc --- includes/tablesort.inc 1 Dec 2006 08:50:33 -0000 1.43 +++ includes/tablesort.inc 27 Jan 2007 00:01:23 -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.337 diff -u -F^f -r1.337 theme.inc --- includes/theme.inc 11 Jan 2007 03:36:06 -0000 1.337 +++ includes/theme.inc 27 Jan 2007 00:01:23 -0000 @@ -563,19 +563,13 @@ function theme_links($links, $attributes } $output .= '
  • '; - // 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 for adding title and class attributes - if (!$html) { + if (!isset($link['html']) || !$link['html']) { $link['title'] = check_plain($link['title']); } $output .= ''. $link['title'] .''; Index: modules/aggregator/aggregator.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v retrieving revision 1.324 diff -u -F^f -r1.324 aggregator.module --- modules/aggregator/aggregator.module 26 Dec 2006 10:28:12 -0000 1.324 +++ modules/aggregator/aggregator.module 27 Jan 2007 00:01:23 -0000 @@ -1217,7 +1217,7 @@ function aggregator_page_rss() { $output .= "\n"; $output .= "\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 .= "\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 .= '
    '. aggregator_filter_xss($feed->description) ."
    \n"; - $output .= '
    '. t('URL:') .' '. l($feed->link, $feed->link, array(), NULL, NULL, TRUE) ."
    \n"; + $output .= '
    '. t('URL:') .' '. l($feed->link, $feed->link, array('absolute' => TRUE)) ."
    \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.271 diff -u -F^f -r1.271 blog.module --- modules/blog/blog.module 10 Dec 2006 20:34:02 -0000 1.271 +++ modules/blog/blog.module 27 Jan 2007 00:01:23 -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.100 diff -u -F^f -r1.100 blogapi.module --- modules/blogapi/blogapi.module 5 Jan 2007 19:05:54 -0000 1.100 +++ modules/blogapi/blogapi.module 27 Jan 2007 00:01:23 -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); @@ -558,7 +558,7 @@ function blogapi_menu($may_cache) { 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)))); } if ($may_cache) { @@ -597,7 +597,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'); @@ -672,8 +672,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.520 diff -u -F^f -r1.520 comment.module --- modules/comment/comment.module 3 Jan 2007 11:32:38 -0000 1.520 +++ modules/comment/comment.module 27 Jan 2007 00:01:23 -0000 @@ -278,7 +278,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) .'
    '. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp))); + $items[] = l($comment->subject, 'node/'. $comment->nid, array('fragment' => 'comment-'. $comment->cid)) .'
    '. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp))); } if ($items) { return theme('item_list', $items); @@ -437,7 +437,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(); @@ -532,7 +532,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 permissions page.', 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 permissions page.', 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; @@ -712,7 +712,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 @@ -792,7 +792,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. @@ -1183,7 +1183,7 @@ function comment_admin_overview($type = $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128)), NULL, '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' => $comments); $form['pager'] = array('#value' => theme('pager', NULL, 50, 0)); @@ -1219,7 +1219,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(); @@ -1765,7 +1765,7 @@ function comment_controls_submit($form_i function theme_comment($comment, $links = array()) { $output = '
    '; - $output .= '
    '. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ' ' . theme('mark', $comment->new) ."
    \n"; + $output .= '
    '. l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) . ' ' . theme('mark', $comment->new) ."
    \n"; $output .= '
    '. t('by %a on %b', array('%a' => theme('username', $comment), '%b' => format_date($comment->timestamp))) ."
    \n"; $output .= '
    '. $comment->comment .'
    '; $output .= ''; @@ -1775,7 +1775,7 @@ function theme_comment($comment, $links function theme_comment_folded($comment) { $output = "
    \n"; - $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ' '. theme('mark', $comment->new) .' '; + $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, array('fragment' => "comment-$comment->cid")) . ' '. theme('mark', $comment->new) .' '; $output .= ''. t('by') .' '. theme('username', $comment) ."\n"; $output .= "
    \n"; return $output; @@ -1815,10 +1815,10 @@ function theme_comment_post_forbidden($n } if (variable_get('user_register', 1)) { - return t('Login or register to post comments', array('@login' => url('user/login', $destination), '@register' => url('user/register', $destination))); + return t('Login or register to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination)))); } else { - return t('Login to post comments', array('@login' => url('user/login', $destination))); + return t('Login 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.74 diff -u -F^f -r1.74 contact.module --- modules/contact/contact.module 10 Jan 2007 15:17:51 -0000 1.74 +++ modules/contact/contact.module 27 Jan 2007 00:01:24 -0000 @@ -16,7 +16,7 @@ function contact_help($section) { $output .= '

    '. 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.") .'

    '; $output .= '

    '. 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.") .'

    '; $output .= '

    '. 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 menu management 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'))) .'

    '; - $output .= '

    '. t('For more information, please read the configuration and customization handbook page for the contact module.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', NULL, NULL, TRUE))) .'

    '; + $output .= '

    '. t('For more information, please read the configuration and customization handbook page for the contact module.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', array('absolute' => TRUE)))) .'

    '; return $output; case 'admin/build/contact': $output = '

    '. t('This page lets you setup your site-wide contact form. 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 settings page, 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'))) .'

    '; @@ -360,8 +360,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']; @@ -509,7 +509,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.375 diff -u -F^f -r1.375 forum.module --- modules/forum/forum.module 10 Jan 2007 15:17:51 -0000 1.375 +++ modules/forum/forum.module 27 Jan 2007 00:01:24 -0000 @@ -911,7 +911,7 @@ function theme_forum_display($forums, $t $output .= '
  • '. t('You are not allowed to post a new forum topic.') .'
  • '; } else { - $output .= '
  • '. t('Login to post a new forum topic.', array('@login' => url('user/login', drupal_get_destination()))) .'
  • '; + $output .= '
  • '. t('Login to post a new forum topic.', array('@login' => url('user/login', array('query' => drupal_get_destination())))) .'
  • '; } $output .= ''; @@ -972,7 +972,7 @@ function theme_forum_list($forums, $pare $rows[] = array( array('data' => $description, 'class' => 'forum'), - array('data' => $forum->num_topics . ($new_topics ? '
    '. l(format_plural($new_topics, '1 new', '@count new'), "forum/$forum->tid", NULL, NULL, 'new') : ''), 'class' => 'topics'), + array('data' => $forum->num_topics . ($new_topics ? '
    '. 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')); } @@ -1007,7 +1007,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 ? '
    '. 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 ? '
    '. 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.776 diff -u -F^f -r1.776 node.module --- modules/node/node.module 14 Jan 2007 02:12:29 -0000 1.776 +++ modules/node/node.module 27 Jan 2007 00:01:24 -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), @@ -1556,7 +1556,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)); @@ -1788,7 +1788,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; @@ -1822,7 +1822,7 @@ function node_feed($nodes = 0, $channel case 'teaser': $item_text = $item->teaser; if ($item->readmore) { - $item_text .= '

    '. l(t('read more'), 'node/'. $item->nid, NULL, NULL, NULL, TRUE) .'

    '; + $item_text .= '

    '. l(t('read more'), 'node/'. $item->nid, array('absolute' => TRUE)) .'

    '; } break; case 'title': @@ -2150,7 +2150,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 = '
    '. l(drupal_ucfirst($type->name), "node/add/$type_url_str", array('title' => $title)) .'
    '; + $out = '
    '. l(drupal_ucfirst($type->name), "node/add/$type_url_str", array('attributes' => array('title' => $title))) .'
    '; $out .= '
    '. filter_xss_admin($type->description) .'
    '; $item[$type->type] = $out; } @@ -2370,7 +2370,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.105 diff -u -F^f -r1.105 path.module --- modules/path/path.module 9 Jan 2007 08:34:03 -0000 1.105 +++ modules/path/path.module 27 Jan 2007 00:01:24 -0000 @@ -182,7 +182,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', @@ -190,7 +190,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']) { @@ -306,7 +306,7 @@ function path_overview() { $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 (!$rows) { Index: modules/statistics/statistics.module =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v retrieving revision 1.249 diff -u -F^f -r1.249 statistics.module --- modules/statistics/statistics.module 10 Jan 2007 15:17:51 -0000 1.249 +++ modules/statistics/statistics.module 27 Jan 2007 00:01:24 -0000 @@ -184,7 +184,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 = ''; - $output .= ' "; + $output .= ' "; $output .= ' '; // safe because it comes from drupal_get_title() $output .= ' "; $output .= ' '; @@ -323,7 +323,7 @@ function statistics_top_visitors() { 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.441 diff -u -F^f -r1.441 system.module --- modules/system/system.module 15 Jan 2007 12:03:50 -0000 1.441 +++ modules/system/system.module 27 Jan 2007 00:01:24 -0000 @@ -580,7 +580,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); @@ -618,7 +618,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( @@ -627,7 +627,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( @@ -2149,7 +2149,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'); @@ -2260,7 +2260,7 @@ function theme_admin_block_content($cont if (system_admin_compact_mode()) { $output = ''; } @@ -2313,7 +2313,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.330 diff -u -F^f -r1.330 taxonomy.module --- modules/taxonomy/taxonomy.module 11 Jan 2007 03:29:15 -0000 1.330 +++ modules/taxonomy/taxonomy.module 27 Jan 2007 00:01:24 -0000 @@ -194,7 +194,7 @@ function taxonomy_overview_terms($vid) { 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 } @@ -244,12 +244,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 tree-like hierarchy between terms of this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'hierarchy'))), + '#description' => t('Allows a tree-like hierarchy 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 related terms in this vocabulary.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'related-terms'))), + '#description' => t('Allows related terms in this vocabulary.', array('@help-url' => url('admin/help/taxonomy', array('absolute' => TRUE)))), ); $form['tags'] = array('#type' => 'checkbox', '#title' => t('Free tagging'), @@ -402,10 +402,10 @@ 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', NULL, NULL, 'parent') .'.', 0, '<'. t('root') .'>', $exclude); + $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); } elseif ($vocabulary->hierarchy == 2) { - $form['parent'] = _taxonomy_term_select(t('Parents'), 'parent', $parent, $vocabulary_id, 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); } } @@ -417,7 +417,7 @@ function taxonomy_form_term($vocabulary_ '#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), - '#description' => t('Synonyms of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); + '#description' => t('Synonyms 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'), @@ -1377,7 +1377,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; @@ -1428,7 +1428,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.143 diff -u -F^f -r1.143 tracker.module --- modules/tracker/tracker.module 10 Jan 2007 15:17:51 -0000 1.143 +++ modules/tracker/tracker.module 27 Jan 2007 00:01:24 -0000 @@ -101,7 +101,7 @@ function tracker_page($uid = 0) { if ($new = comment_num_new($node->nid)) { $comments .= '
    '; - $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.148 diff -u -F^f -r1.148 upload.module --- modules/upload/upload.module 15 Jan 2007 11:22:34 -0000 1.148 +++ modules/upload/upload.module 27 Jan 2007 00:01:24 -0000 @@ -800,7 +800,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.745 diff -u -F^f -r1.745 user.module --- modules/user/user.module 11 Jan 2007 08:52:45 -0000 1.745 +++ modules/user/user.module 27 Jan 2007 00:01:24 -0000 @@ -436,7 +436,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; } @@ -474,7 +474,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', ); @@ -869,7 +869,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; @@ -1062,7 +1062,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); @@ -1138,7 +1138,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) { @@ -1236,7 +1236,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) { @@ -2042,7 +2042,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.165 diff -u -F^f -r1.165 watchdog.module --- modules/watchdog/watchdog.module 29 Dec 2006 17:22:20 -0000 1.165 +++ modules/watchdog/watchdog.module 27 Jan 2007 00:01:24 -0000 @@ -137,7 +137,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, ),
    '. t('URL') ."". l(url($access->path, NULL, NULL, TRUE), $access->path) ."
    '. t('URL') ."". l(url($access->path, array('absolute' => TRUE)), $access->path) ."
    '. t('Title') .''. $access->title .'
    '. t('Referrer') ."". ($access->url ? l($access->url, $access->url) : '') ."
    '. t('Date') .''. format_date($access->timestamp, 'large') .'