Commit b159408f authored by yched's avatar yched

#932680 by Dave Reid: Token integration : allow using of Token API's new $options param

parent 70bc6acc
......@@ -6,9 +6,10 @@ CCK 6.x-2.x
- #863226 by KarenS: make sure we have a function that will return inactive instances when other instances of the same field are still active.
- #887742 by yched: fix notices in _content_get_formatter() in some Views
- #736440 by yched, dhthwy: fix memory leaks on long running migration scripts (e.g. migrate.module)
- #705512 by cha0s, roderick: 'add more' button - fix PHP5.3 compatibility
- #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
- #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
CCK 6.x-2.8
===========
......
......@@ -21,7 +21,7 @@ function token_content_build_modes() {
}
// Two helper functions that generate appropriate tokens for CCK-added fields.
function content_token_values($type, $object = NULL) {
function content_token_values($type, $object = NULL, $options = array()) {
$tokens = array();
if ($type == 'node') {
// Prevent against invalid 'nodes' built by broken 3rd party code.
......@@ -43,7 +43,7 @@ function content_token_values($type, $object = NULL) {
$items = $node->{$field['field_name']};
$function = $field_types[$field['type']]['module'] . '_token_values';
if (!empty($items) && function_exists($function)) {
$token_values = $function('field', $items);
$token_values = $function('field', $items, $options);
foreach ($token_values as $token => $value) {
$tokens[$field['field_name'] .'-'. $token] = $value;
}
......@@ -92,7 +92,7 @@ if (module_exists('nodereference')) {
}
}
function nodereference_token_values($type, $object = NULL) {
function nodereference_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
......@@ -121,7 +121,7 @@ if (module_exists('number')) {
}
}
function number_token_values($type, $object = NULL) {
function number_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
......@@ -145,7 +145,7 @@ if (module_exists('text')) {
}
}
function text_token_values($type, $object = NULL) {
function text_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
......@@ -171,7 +171,7 @@ if (module_exists('userreference')) {
}
}
function userreference_token_values($type, $object = NULL) {
function userreference_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
......
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