Commit 317b381c authored by yched's avatar yched

#986612 by Dave Reid: Token integration - fix variable name clash (harmless in normal cases)

parent ab1ab8c1
......@@ -9,9 +9,11 @@ CCK 6.x-2.x
- #705512 by cha0s, roderick: 'add more' button - fix PHP 5.3 compatibility
- #894880 by yched: fix notices in check_plain() when rendering empty 'plain text' values
- #728472 by Darren Oh: Ensure the module's preprocess functions run first
- #932680 by Dave Reid: Token integration : allow using of Token API's new $options param
- #932680 by Dave Reid: Token integration - allow using of Token API's new $options param
- #986612 by Dave Reid: Token integration - fix variable name clash (harmless in normal cases)
- #435520 by yched, sun: Fix text fields rendered as 'n/a' in some cases
CCK 6.x-2.8
===========
......
......@@ -30,7 +30,7 @@ function content_token_values($type, $object = NULL, $options = array()) {
// incoming $object causes memory leak issues on long-running scripts such
// as migrations. See http://drupal.org/node/736440.
$node = drupal_clone($object);
$type = content_types($node->type);
$content_type = content_types($node->type);
$node->build_mode = 'token';
$node->content = array();
content_view($node);
......@@ -39,7 +39,7 @@ function content_token_values($type, $object = NULL, $options = array()) {
content_alter($node);
$field_types = _content_field_types();
foreach ($type['fields'] as $field) {
foreach ($content_type['fields'] as $field) {
$items = $node->{$field['field_name']};
$function = $field_types[$field['type']]['module'] . '_token_values';
if (!empty($items) && function_exists($function)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment