From dc5843bd30a614cb074f70750ba2f631e61f8cb8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 15 Feb 2007 11:40:19 +0000 Subject: - Patch #111347 by Steven: refactor url() and l(). --- modules/node/node.module | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index cc9a3cf6f..98eae0e42 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -922,7 +922,7 @@ function node_search($op = 'search', $keys = NULL) { $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), @@ -1530,7 +1530,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)); @@ -1764,7 +1764,7 @@ function node_feed($nodes = 0, $channel = array()) { 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; @@ -1798,7 +1798,7 @@ function node_feed($nodes = 0, $channel = array()) { 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': @@ -2128,7 +2128,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; } @@ -2348,7 +2348,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 = ''; -- cgit v1.2.3