mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
0c41f681b8
commit
3965ac5237
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user