summaryrefslogtreecommitdiff
path: root/modules/comment/comment.tokens.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-10-10 13:37:11 +0000
committerDries Buytaert <dries@buytaert.net>2009-10-10 13:37:11 +0000
commit15b24127b5abb1c66fb5a7579a07e00b571174b0 (patch)
tree0fb8cddc92f3a86c65d40a4be58d5dbcb43a020a /modules/comment/comment.tokens.inc
parentdb53d99659801c539f1fa813af38bf65803ab8f2 (diff)
downloadbrdo-15b24127b5abb1c66fb5a7579a07e00b571174b0.tar.gz
brdo-15b24127b5abb1c66fb5a7579a07e00b571174b0.tar.bz2
- Patch #122098 by Damien Tournoud, catch, mdixoncm: split comment.timestamp into 'created' and 'changed' columns, just like for nodes.
Diffstat (limited to 'modules/comment/comment.tokens.inc')
-rw-r--r--modules/comment/comment.tokens.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/comment/comment.tokens.inc b/modules/comment/comment.tokens.inc
index 05b060a6a..3f5590ee6 100644
--- a/modules/comment/comment.tokens.inc
+++ b/modules/comment/comment.tokens.inc
@@ -200,7 +200,11 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
break;
case 'created':
- $replacements[$original] = format_date($comment->timestamp, 'medium', '', NULL, $language_code);
+ $replacements[$original] = format_date($comment->created, 'medium', '', NULL, $language_code);
+ break;
+
+ case 'changed':
+ $replacements[$original] = format_date($comment->changed, 'medium', '', NULL, $language_code);
break;
case 'node':
@@ -217,7 +221,7 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
}
if ($date_tokens = token_find_with_prefix($tokens, 'created')) {
- $replacements += token_generate('date', $date_tokens, array('date' => $comment->timestamp), $options);
+ $replacements += token_generate('date', $date_tokens, array('date' => $comment->created), $options);
}
if (($parent_tokens = token_find_with_prefix($tokens, 'parent')) && $parent = comment_load($comment->pid)) {