Multiple values
andypost - March 10, 2009 - 19:47
| Project: | NodeReferrer |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
If anyone can help to decide - which is right?
<?php
/**
* Implementation of hook_widget_info().
*/
function nodereferrer_widget_info() {
return array(
'nodereferrer_list' => array(
'label' => t('Read-Only List'),
'field types' => array('nodereferrer'),
- 'multiple values' => CONTENT_HANDLE_MODULE,
+ 'multiple values' => CONTENT_HANDLE_CORE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_NONE,
),
),
);
}
?><?php
/**
* Implementation of hook_content_is_empty
*/
function nodereferrer_content_is_empty($item, $field) {
- return FALSE;
+ return TRUE;
}
?>
#1
On #2, are you fixing content_is_empty to one or the other because it is arbitrary and useless for this module?
#2
I dont know exactly - docs tell me nothing
#3
Regarding the multiple values I think in this case it doesn't matter, because its not displayed in the form, but to be save I would define it as CONTENT_HANDLE_MODULE.
In the second function, if you always return TRUE, the field should theoretically always save NULL. I think it should make no difference neither, but computed_field always return false.
#4
Something related: http://drupal.org/node/347712#comment-1429530
#5
So I leave first sentence as is but second should change to
<?phpreturn TRUE;
?>
I make this changes at next commit
#6
Fixed http://drupal.org/cvs?commit=194918
So removed multiple setting because is not needed
#7
Automatically closed -- issue fixed for 2 weeks with no activity.