1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
syncingattachments.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Mail\Controller;
4
5
use Bitrix\Mail\Helper\MessageAccess;
6
use Bitrix\Mail\Helper\AttachmentHelper;
7
use Bitrix\Main\Engine\Controller;
8
use Bitrix\Main\Loader;
9
10
class
SyncingAttachments
extends
Controller
11
{
12
public
function
resyncAttachmentsAction
(
int
$messageId
,
int
$mailboxId): bool
13
{
14
$currentUserId = $this->getCurrentUser()?->getId();
15
16
if
(is_null($currentUserId) || !Loader::includeModule(
'mail'
) || is_null($currentUserId))
17
{
18
return
false
;
19
}
20
21
if
(!
MessageAccess::isMailboxOwner
($mailboxId, $currentUserId))
22
{
23
return
false
;
24
}
25
26
$messageAttachments =
new
AttachmentHelper
($mailboxId,
$messageId
);
27
28
return
$messageAttachments->update();
29
}
30
}
$messageId
if(! $messageFields||!isset($messageFields['message_id'])||!isset($messageFields['status'])||!CModule::IncludeModule("messageservice")) $messageId
Определения
callback_ismscenter.php:26
Bitrix\Mail\Controller\SyncingAttachments
Определения
syncingattachments.php:11
Bitrix\Mail\Controller\SyncingAttachments\resyncAttachmentsAction
resyncAttachmentsAction(int $messageId, int $mailboxId)
Определения
syncingattachments.php:12
Bitrix\Mail\Helper\AttachmentHelper
Определения
attachmenthelper.php:45
Bitrix\Mail\Helper\MessageAccess\isMailboxOwner
static isMailboxOwner(int $mailboxId, int $userId)
Определения
messageaccess.php:32
Bitrix\Main\Controller
Определения
agreement.php:2
bitrix
modules
mail
lib
controller
syncingattachments.php
Создано системой
1.14.0