Merged revisions 47611 via svnmerge from

svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r47611 | ischommer | 2008-01-04 19:11:42 +1300 (Fri, 04 Jan 2008) | 1 line
  
  formatting, removed saveInto() (same functionality as parent-class)
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52195 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-04-06 04:05:23 +00:00
parent c0ac37816c
commit 48193739d3

View File

@ -12,16 +12,6 @@
* @subpackage fields-files * @subpackage fields-files
*/ */
class SimpleImageField extends FileField { class SimpleImageField extends FileField {
function saveInto(DataObject $record) {
$fieldName = $this->name;
if($record) $imageField = $record->$fieldName();
if($imageField) $imageField->loadUploaded($this->value);
$idFieldName = $fieldName . 'ID';
if($record) $record->$idFieldName = $imageField->ID;
}
function Field() { function Field() {
$record = $this->form->getRecord(); $record = $this->form->getRecord();
@ -78,5 +68,4 @@ class SimpleImageField_Disabled extends FormField {
return $field; return $field;
} }
} }