diff options
Diffstat (limited to 'lib/Db/DirectMapper.php')
-rw-r--r-- | lib/Db/DirectMapper.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Db/DirectMapper.php b/lib/Db/DirectMapper.php index e3fa8841..f98b2a40 100644 --- a/lib/Db/DirectMapper.php +++ b/lib/Db/DirectMapper.php @@ -51,18 +51,21 @@ class DirectMapper extends Mapper { } /** - * @param string $uid + * @param string|null $uid * @param int $fileid * @param int $destination * @return Direct */ - public function newDirect($uid, $fileid, $destination = null) { + public function newDirect($uid, $fileid, $destination = null, $share = null, $initiatorHost = null, $initiatorToken = null) { $direct = new Direct(); $direct->setUid($uid); $direct->setFileid($fileid); $direct->setToken($this->random->generate(64, ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER)); $direct->setTimestamp($this->timeFactory->getTime()); $direct->setTemplateDestination($destination); + $direct->setShare($share); + $direct->setInitiatorHost($initiatorHost); + $direct->setInitiatorToken($initiatorToken); $direct = $this->insert($direct); return $direct; |