MINOR don't show invalid version links (from r88147)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89181 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-10-15 22:24:09 +00:00
parent 0c41f681b8
commit 3965ac5237
1 changed files with 4 additions and 2 deletions

View File

@ -134,11 +134,13 @@ class CheckboxSetField extends OptionsetField {
*/
function saveInto(DataObject $record) {
$fieldname = $this->name ;
var_dump($this);die();
if($fieldname && $record && ($record->has_many($fieldname) || $record->many_many($fieldname))) {
$idList = array();
if($this->value) foreach($this->value as $id => $bool) {
if($bool) $idList[] = $id;
if($bool) {
$idList[] = $id;
}
}
$record->$fieldname()->setByIDList($idList);
} elseif($fieldname && $record) {