Commit f0cce5f5 authored by Matthias Hutterer's avatar Matthias Hutterer
Browse files

fixed database columns (#146886) and removed case view in hook_field

parent ce936e4d
...@@ -30,26 +30,13 @@ function email_field_settings($op, $field) { ...@@ -30,26 +30,13 @@ function email_field_settings($op, $field) {
switch ($op) { switch ($op) {
case 'database columns': case 'database columns':
$columns = array( $columns = array(
'email' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), 'email' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => "''"),
); );
return $columns; return $columns;
} }
} }
/**
* Implementation of hook_field().
*/
function email_field($op, &$node, $field, &$node_field, $teaser, $page) {
switch ($op) {
case 'view':
foreach ($node_field as $delta => $item) {
$node_field[$delta]['view'] = content_format($field, $item, 'email', $node);
}
return theme('field', $node, $field, $node_field, $teaser, $page);
}
}
/** /**
* Implementation of hook_field_formatter_info(). * Implementation of hook_field_formatter_info().
* *
......
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