ILIAS
release_8 Revision v8.19
|
This class handles all operations on files (attachments) in directory ilias_data/mail. More...
Public Member Functions | |
__construct (int $a_user_id=0) | |
initDirectory () | |
getUploadLimit () | |
getAttachmentsTotalSizeLimit () | |
getMailPath () | |
getAbsoluteAttachmentPoolPathPrefix () | |
getAttachmentPathAndFilenameByMd5Hash (string $md5FileHash, int $mailId) | |
getAttachmentPath (string $a_filename, int $a_mail_id) | |
adoptAttachments (array $a_attachments, int $a_mail_id) | |
Adopt attachments (in case of forwarding a mail) More... | |
checkReadWrite () | |
getUserFilesData () | |
storeAsAttachment (string $a_filename, string $a_content) | |
storeUploadedFile (array $file) | |
copyAttachmentFile (string $a_abs_path, string $a_new_name) | |
Copy files in mail directory. More... | |
unlinkFiles (array $a_filenames) | |
unlinkFile (string $a_filename) | |
getAbsoluteAttachmentPoolPathByFilename (string $fileName) | |
Resolves a path for a passed filename in regards of a user's mail attachment pool, meaning attachments not being sent. More... | |
saveFiles (int $a_mail_id, array $a_attachments) | |
Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... More... | |
saveFile (int $a_mail_id, string $a_attachment) | |
Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... More... | |
checkFilesExist (array $a_files) | |
assignAttachmentsToDirectory (int $a_mail_id, int $a_sent_mail_id) | |
deassignAttachmentFromDirectory (int $a_mail_id) | |
deliverAttachmentsAsZip (string $basename, int $mailId, array $files=[], bool $isDraft=false) | |
![]() | |
__construct () | |
checkPath (string $a_path) | |
getPath () | |
![]() | |
deleteTrailingSlash (string $a_path) | |
delete trailing slash of path variables More... | |
Static Public Member Functions | |
static | getStorage (int $a_mail_id, int $a_usr_id) |
Data Fields | |
int | $user_id |
string | $mail_path |
Protected Member Functions | |
initAttachmentMaxUploadSize () | |
Protected Attributes | |
int | $mail_max_upload_file_size |
Filesystem | $tmpDirectory |
Filesystem | $storageDirectory |
ilDBInterface | $db |
ILIAS | $ilias |
![]() | |
string | $path |
Private Member Functions | |
getAttachmentPathByMailId (int $mailId) | |
rotateFiles (string $a_path) | |
deleteAttachmentDirectory (string $a_rel_path) | |
This class handles all operations on files (attachments) in directory ilias_data/mail.
Definition at line 30 of file class.ilFileDataMail.php.
ilFileDataMail::__construct | ( | int | $a_user_id = 0 | ) |
Definition at line 40 of file class.ilFileDataMail.php.
References $DIC, ILIAS\GlobalScreen\Provider\__construct(), checkReadWrite(), ilFileData\getPath(), initAttachmentMaxUploadSize(), and MAILPATH.
ilFileDataMail::adoptAttachments | ( | array | $a_attachments, |
int | $a_mail_id | ||
) |
Adopt attachments (in case of forwarding a mail)
string[] | $a_attachments | |
int | $a_mail_id |
Definition at line 161 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPath(), and getMailPath().
ilFileDataMail::assignAttachmentsToDirectory | ( | int | $a_mail_id, |
int | $a_sent_mail_id | ||
) |
Definition at line 404 of file class.ilFileDataMail.php.
ilFileDataMail::checkFilesExist | ( | array | $a_files | ) |
ilFileDataMail::checkReadWrite | ( | ) |
Definition at line 173 of file class.ilFileDataMail.php.
Referenced by __construct().
ilFileDataMail::copyAttachmentFile | ( | string | $a_abs_path, |
string | $a_new_name | ||
) |
Copy files in mail directory.
This is used for sending ILIAS generated mails with attachments
string | $a_abs_path | |
string | $a_new_name |
Definition at line 288 of file class.ilFileDataMail.php.
References getMailPath().
ilFileDataMail::deassignAttachmentFromDirectory | ( | int | $a_mail_id | ) |
Definition at line 418 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, deleteAttachmentDirectory(), ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
|
private |
Definition at line 457 of file class.ilFileDataMail.php.
References ilFileUtils\delDir().
Referenced by deassignAttachmentFromDirectory().
ilFileDataMail::deliverAttachmentsAsZip | ( | string | $basename, |
int | $mailId, | ||
array | $files = [] , |
||
bool | $isDraft = false |
||
) |
ILIAS |
Definition at line 589 of file class.ilFileDataMail.php.
References ilFile\$path, $source, ilFileDelivery\deliverFileAttached(), getAbsoluteAttachmentPoolPathByFilename(), ilFileUtils\getASCIIFilename(), getAttachmentPathByMailId(), ilFileUtils\getValidFilename(), ilFileUtils\ilTempnam(), MAILPATH, and ilFileUtils\zip().
ilFileDataMail::getAbsoluteAttachmentPoolPathByFilename | ( | string | $fileName | ) |
Resolves a path for a passed filename in regards of a user's mail attachment pool, meaning attachments not being sent.
string | $fileName |
Definition at line 335 of file class.ilFileDataMail.php.
References getAbsoluteAttachmentPoolPathPrefix().
Referenced by deliverAttachmentsAsZip().
ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 91 of file class.ilFileDataMail.php.
Referenced by getAbsoluteAttachmentPoolPathByFilename().
ilFileDataMail::getAttachmentPath | ( | string | $a_filename, |
int | $a_mail_id | ||
) |
Definition at line 144 of file class.ilFileDataMail.php.
References ilFile\$path, getAttachmentPathByMailId(), and getMailPath().
Referenced by adoptAttachments().
ilFileDataMail::getAttachmentPathAndFilenameByMd5Hash | ( | string | $md5FileHash, |
int | $mailId | ||
) |
OutOfBoundsException |
Definition at line 100 of file class.ilFileDataMail.php.
References ilFile\$path, $res, ilFileUtils\getDir(), and getMailPath().
Referenced by ilMailFolderGUI\deliverFile().
|
private |
Definition at line 131 of file class.ilFileDataMail.php.
References $query.
Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().
ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 76 of file class.ilFileDataMail.php.
ilFileDataMail::getMailPath | ( | ) |
Definition at line 86 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathAndFilenameByMd5Hash(), initAttachmentMaxUploadSize(), storeAsAttachment(), and storeUploadedFile().
|
static |
Definition at line 356 of file class.ilFileDataMail.php.
ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 71 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
ilFileDataMail::getUserFilesData | ( | ) |
Definition at line 191 of file class.ilFileDataMail.php.
|
protected |
Definition at line 462 of file class.ilFileDataMail.php.
References Vendor\Package\$e, $ilDB, ilFile\$path, $query, $res, getMailPath(), and ILIAS\Repository\int().
Referenced by __construct().
ilFileDataMail::initDirectory | ( | ) |
Definition at line 60 of file class.ilFileDataMail.php.
References ilFileData\getPath(), and MAILPATH.
|
private |
Definition at line 295 of file class.ilFileDataMail.php.
References ilFileUtils\rename().
Referenced by storeAsAttachment(), and storeUploadedFile().
ilFileDataMail::saveFile | ( | int | $a_mail_id, |
string | $a_attachment | ||
) |
Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
int | $a_mail_id | |
string | $a_attachment |
Definition at line 371 of file class.ilFileDataMail.php.
Referenced by saveFiles().
ilFileDataMail::saveFiles | ( | int | $a_mail_id, |
array | $a_attachments | ||
) |
Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
int | $a_mail_id | id of mail in sent box |
string[] | $a_attachments to save |
Definition at line 345 of file class.ilFileDataMail.php.
References saveFile().
ilFileDataMail::storeAsAttachment | ( | string | $a_filename, |
string | $a_content | ||
) |
Definition at line 223 of file class.ilFileDataMail.php.
References $name, ilFileUtils\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
Referenced by ilSoapUtils\distributeMails().
ilFileDataMail::storeUploadedFile | ( | array | $file | ) |
array{name:string,tmp_name:string} | $file |
Definition at line 267 of file class.ilFileDataMail.php.
References ilFileUtils\_sanitizeFilemame(), getMailPath(), ilFileUtils\moveUploadedFile(), and rotateFiles().
ilFileDataMail::unlinkFile | ( | string | $a_filename | ) |
Definition at line 320 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
ilFileDataMail::unlinkFiles | ( | array | $a_filenames | ) |
string[] | $a_filenames Filenames to delete |
Definition at line 309 of file class.ilFileDataMail.php.
References unlinkFile().
|
protected |
Definition at line 37 of file class.ilFileDataMail.php.
|
protected |
Definition at line 38 of file class.ilFileDataMail.php.
|
protected |
Definition at line 34 of file class.ilFileDataMail.php.
Referenced by getUploadLimit().
string ilFileDataMail::$mail_path |
Definition at line 33 of file class.ilFileDataMail.php.
Referenced by getMailPath().
|
protected |
Definition at line 36 of file class.ilFileDataMail.php.
|
protected |
Definition at line 35 of file class.ilFileDataMail.php.
int ilFileDataMail::$user_id |
Definition at line 32 of file class.ilFileDataMail.php.
Referenced by getUserFilesData().