Skip to content

Commit

Permalink
MINOR: notify file obejct after uploading
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@73668 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Saophalkun Ponlu authored and Sam Minnee committed Feb 2, 2011
1 parent 5bec1d7 commit 99129cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/AssetAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ function doUpload($data, $form) {
foreach($newFiles as $newFile) {
$fileIDs[] = $newFile;
$fileObj = DataObject::get_one('File', "`File`.ID=$newFile");
// notify file object after uploading
if (method_exists($fileObj, 'onAfterUpload')) $fileObj->onAfterUpload();
$fileNames[] = $fileObj->Name;
}

Expand Down

0 comments on commit 99129cf

Please sign in to comment.