|
@@ 278-282 (lines=5) @@
|
| 275 |
|
$initiatorUser = $this->userManager->get($initiator); |
| 276 |
|
$ownerDisplayName = ($ownerUser instanceof IUser) ? $ownerUser->getDisplayName() : $owner; |
| 277 |
|
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; |
| 278 |
|
if ($owner === $initiator) { |
| 279 |
|
$subject = (string)$this->l->t('%s shared »%s« with you', array($ownerDisplayName, $filename)); |
| 280 |
|
} else { |
| 281 |
|
$subject = (string)$this->l->t('%s shared »%s« with you on behalf of %s', array($ownerDisplayName, $filename, $initiatorDisplayName)); |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
$message = $this->mailer->createMessage(); |
| 285 |
|
|
|
@@ 291-295 (lines=5) @@
|
| 288 |
|
$emailTemplate->addHeader(); |
| 289 |
|
$emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]), false); |
| 290 |
|
|
| 291 |
|
if ($owner === $initiator) { |
| 292 |
|
$text = $this->l->t('%s shared »%s« with you.', [$ownerDisplayName, $filename]); |
| 293 |
|
} else { |
| 294 |
|
$text= $this->l->t('%s shared »%s« with you on behalf of %s.', [$ownerDisplayName, $filename, $initiator]); |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
$emailTemplate->addBodyText( |
| 298 |
|
$text . ' ' . $this->l->t('Click the button below to open it.'), |