Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 8d3618f

Browse files
author
Michael Grauer
committed
BUG: refs #0349. Forced a refresh on a possibly stale item.
1 parent eee51d2 commit 8d3618f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/controllers/components/UploadComponent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,12 @@ public function createNewRevision($userDao, $name, $path, $item_revision, $chang
359359
$bitstreamDao->setAssetstoreId($tmpBitstreamDao->getAssetstoreId());
360360
}
361361
$itemRevisionModel->addBitstream($itemRevisionDao, $bitstreamDao);
362+
// now that we have updated the itemRevision, the item may be stale
363+
$item = $itemModel->load($item_revision[0]);
362364

363365
$this->getLogger()->info(__METHOD__." Upload ok :".$path);
364366
Zend_Registry::get('notifier')->notifyEvent("EVENT_CORE_UPLOAD_FILE", array($itemRevisionDao->getItem()->toArray(), $itemRevisionDao->toArray()));
367+
365368
return $item;
366369
}//end
367370
} // end class UploadComponent

0 commit comments

Comments
 (0)