summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-01-07 20:55:49 +0000
committerDries Buytaert <dries@buytaert.net>2010-01-07 20:55:49 +0000
commit6dc7e86b805b8d77168e473eeec765313ee3781e (patch)
tree0f520aa2f56733d52db201c3441d20f1252e920c
parent605d450aca348a3d9a9ce0fb7072511483c693e1 (diff)
downloadbrdo-6dc7e86b805b8d77168e473eeec765313ee3781e.tar.gz
brdo-6dc7e86b805b8d77168e473eeec765313ee3781e.tar.bz2
- Patch #677662 by heyrocker: fixed in several hook_token() implementations so that language options get set properly.
-rw-r--r--modules/comment/comment.tokens.inc5
-rw-r--r--modules/node/node.tokens.inc4
-rw-r--r--modules/poll/poll.tokens.inc1
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/comment/comment.tokens.inc b/modules/comment/comment.tokens.inc
index e075c1296..60db70fab 100644
--- a/modules/comment/comment.tokens.inc
+++ b/modules/comment/comment.tokens.inc
@@ -180,11 +180,12 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
// Comment related URLs.
case 'url':
- $replacements[$original] = url('comment/' . $comment->cid, array('absolute' => TRUE, 'fragment' => 'comment-' . $comment->cid));
+ $url_options['fragment'] = 'comment-' . $comment->cid;
+ $replacements[$original] = url('comment/' . $comment->cid, $url_options);
break;
case 'edit-url':
- $replacements[$original] = url('comment/' . $comment->cid . '/edit', array('absolute' => TRUE));
+ $replacements[$original] = url('comment/' . $comment->cid . '/edit', $url_options);
break;
// Default values for the chained tokens handled below.
diff --git a/modules/node/node.tokens.inc b/modules/node/node.tokens.inc
index 06a46310a..a62190dbd 100644
--- a/modules/node/node.tokens.inc
+++ b/modules/node/node.tokens.inc
@@ -163,11 +163,11 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
break;
case 'url':
- $replacements[$original] = url('node/' . $node->nid, array('absolute' => TRUE));
+ $replacements[$original] = url('node/' . $node->nid, $url_options);
break;
case 'edit-url':
- $replacements[$original] = url('node/' . $node->nid . '/edit', array('absolute' => TRUE));
+ $replacements[$original] = url('node/' . $node->nid . '/edit', $url_options);
break;
// Default values for the chained tokens handled below.
diff --git a/modules/poll/poll.tokens.inc b/modules/poll/poll.tokens.inc
index 37d82ab0c..6affdb74a 100644
--- a/modules/poll/poll.tokens.inc
+++ b/modules/poll/poll.tokens.inc
@@ -40,7 +40,6 @@ function poll_token_info() {
* Implements hook_tokens().
*/
function poll_tokens($type, $tokens, array $data = array(), array $options = array()) {
- $url_options = array('absolute' => TRUE);
$sanitize = !empty($options['sanitize']);
$replacements = array();