Commit e000f8d5 authored by KarenS's avatar KarenS

#172127 Remove link and imagefield token code, patch by quicksketch.

parent c4d0fc97
......@@ -150,68 +150,3 @@ if (module_exists('userreference')) {
}
}
}
/**
* These definitions should go in the relevant modules.
*/
if (module_exists('link')) {
function link_token_list($type = 'all') {
if ($type == 'field' || $type == 'all') {
$tokens = array();
$tokens['link']['url'] = t('Link URL');
$tokens['link']['title'] = t('Link title');
$tokens['link']['view'] = t('Formatted HTML link');
return $tokens;
}
}
function link_token_values($type, $object = NULL) {
if ($type == 'field') {
$item = $object[0];
$tokens['url'] = $item['url'];
$tokens['title'] = $item['title'];
$tokens['view'] = $item['view'];
return $tokens;
}
}
}
if (module_exists('imagefield')) {
function imagefield_token_list($type = 'all') {
if ($type == 'field' || $type == 'all') {
$tokens = array();
$tokens['image']['fid'] = t('Image file ID');
$tokens['image']['title'] = t('Image title');
$tokens['image']['alt'] = t('Image alt text');
$tokens['image']['filename'] = t('Image file name');
$tokens['image']['filepath'] = t('Image path');
$tokens['image']['filemime'] = t('Image MIME type');
$tokens['image']['filesize'] = t('Image file size');
$tokens['image']['view'] = t('Fully formatted HTML image tag');
return $tokens;
}
}
function imagefield_token_values($type, $object = NULL) {
if ($type == 'field') {
$item = $object[0];
$tokens['fid'] = $item['fid'];
$tokens['title'] = $item['title'];
$tokens['alt'] = $item['alt'];
$tokens['filename'] = $item['filename'];
$tokens['filepath'] = $item['filepath'];
$tokens['filemime'] = $item['filemime'];
$tokens['filesize'] = $item['filesize'];
$tokens['view'] = $item['view'];
return $tokens;
}
}
}
\ No newline at end of file
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