Commit 214c899a authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1908837: Setting $releaseuser correctly



When archiving a collection

Change-Id: I4c978de93e04dcdedc328f5d31f8dc13d9208159
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 746b06f7
...@@ -1433,6 +1433,7 @@ class Collection { ...@@ -1433,6 +1433,7 @@ class Collection {
View::_db_release($viewids, $this->owner, $this->submittedgroup); View::_db_release($viewids, $this->owner, $this->submittedgroup);
db_commit(); db_commit();
$releaseuser = optional_userobj($releaseuser);
handle_event('releasesubmission', array('releaseuser' => $releaseuser, handle_event('releasesubmission', array('releaseuser' => $releaseuser,
'id' => $this->get('id'), 'id' => $this->get('id'),
'hostname' => $this->submittedhost, 'hostname' => $this->submittedhost,
...@@ -1443,7 +1444,6 @@ class Collection { ...@@ -1443,7 +1444,6 @@ class Collection {
// (though I'm not sure why) // (though I'm not sure why)
// if the method is called in an upgrade and we dont have a release user // if the method is called in an upgrade and we dont have a release user
if (!defined('INSTALLER') && $this->submittedgroup) { if (!defined('INSTALLER') && $this->submittedgroup) {
$releaseuser = optional_userobj($releaseuser);
$releaseuserdisplay = display_name($releaseuser, $this->owner); $releaseuserdisplay = display_name($releaseuser, $this->owner);
$releaseuserid = ($releaseuser instanceof User) ? $releaseuser->get('id') : $releaseuser->id; $releaseuserid = ($releaseuser instanceof User) ? $releaseuser->get('id') : $releaseuser->id;
$submitinfo = $this->submitted_to(); $submitinfo = $this->submitted_to();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment