mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
c0ac37816c
commit
48193739d3
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user