MINOR: notify file obejct after uploading

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@73668 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Saophalkun Ponlu 2009-03-26 01:28:18 +00:00 committed by Sam Minnee
parent 5bec1d7088
commit 99129cfadd

View File

@ -234,6 +234,8 @@ JS
foreach($newFiles as $newFile) { foreach($newFiles as $newFile) {
$fileIDs[] = $newFile; $fileIDs[] = $newFile;
$fileObj = DataObject::get_one('File', "`File`.ID=$newFile"); $fileObj = DataObject::get_one('File', "`File`.ID=$newFile");
// notify file object after uploading
if (method_exists($fileObj, 'onAfterUpload')) $fileObj->onAfterUpload();
$fileNames[] = $fileObj->Name; $fileNames[] = $fileObj->Name;
} }