ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
This class handles all operations on files (attachments) in directory ilias_data/mail. More...
Public Member Functions | |
__construct ($a_user_id=0) | |
Constructor call base constructors checks if directory is writable and sets the optional user_id. More... | |
initDirectory () | |
init directory overwritten method public More... | |
getUploadLimit () | |
getAttachmentsTotalSizeLimit () | |
getMailPath () | |
get mail path public More... | |
getAbsoluteAttachmentPoolPathPrefix () | |
getAttachmentPathByMD5Filename ($a_filename, $a_mail_id) | |
get the path of a specific attachment More... | |
getAttachmentPath ($a_filename, $a_mail_id) | |
get the path of a specific attachment More... | |
adoptAttachments ($a_attachments, $a_mail_id) | |
adopt attachments (in case of forwarding a mail) More... | |
checkReadWrite () | |
check if directory is writable overwritten method from base class private More... | |
getUserFilesData () | |
get all attachments of a specific user public More... | |
storeAsAttachment ($a_filename, $a_content) | |
Store content as attachment. More... | |
storeUploadedFile ($file) | |
copyAttachmentFile ($a_abs_path, $a_new_name) | |
Copy files in mail directory. More... | |
rotateFiles ($a_path) | |
rotate files with same name recursive method More... | |
unlinkFiles ($a_filenames) | |
unlink files: expects an array of filenames e.g. More... | |
unlinkFile ($a_filename) | |
unlink one uploaded file expects a filename e.g 'foo' More... | |
getAbsolutePath ($fileName) | |
get absolute path of filename More... | |
saveFiles ($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 ($a_mail_id, $a_attachment) | |
save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... More... | |
checkFilesExist ($a_files) | |
check if files exist More... | |
assignAttachmentsToDirectory ($a_mail_id, $a_sent_mail_id) | |
assign attachments to mail directory More... | |
deassignAttachmentFromDirectory ($a_mail_id) | |
dassign attachments from mail directory More... | |
__deleteAttachmentDirectory ($a_rel_path) | |
Public Member Functions inherited from ilFileData | |
__construct () | |
Constructor class bas constructor and read path of directory from ilias.ini setup an mail object public. More... | |
checkPath ($a_path) | |
check if path exists and is writable More... | |
getPath () | |
get Path public More... | |
Public Member Functions inherited from ilFile | |
__construct () | |
Constructor get ilias object public. More... | |
deleteTrailingSlash ($a_path) | |
delete trailing slash of path variables More... | |
Static Public Member Functions | |
static | getStorage ($a_mail_id, $a_usr_id) |
static | _lookupDiskUsageOfUser ($user_id) |
Returns the number of bytes used on the harddisk for mail attachments, by the user with the specified user id. More... | |
Data Fields | |
$user_id | |
$mail_path | |
Data Fields inherited from ilFile | |
$path | |
$ilias | |
Protected Member Functions | |
initAttachmentMaxUploadSize () | |
Protected Attributes | |
$mail_max_upload_file_size | |
This class handles all operations on files (attachments) in directory ilias_data/mail.
Definition at line 18 of file class.ilFileDataMail.php.
ilFileDataMail::__construct | ( | $a_user_id = 0 | ) |
Constructor call base constructors checks if directory is writable and sets the optional user_id.
integereger | user_id public |
Definition at line 46 of file class.ilFileDataMail.php.
References checkReadWrite(), and initAttachmentMaxUploadSize().
ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) |
Definition at line 507 of file class.ilFileDataMail.php.
References ilUtil\delDir().
Referenced by deassignAttachmentFromDirectory().
|
static |
Returns the number of bytes used on the harddisk for mail attachments, by the user with the specified user id.
int | user id. |
Definition at line 559 of file class.ilFileDataMail.php.
References $DIC, $file, $ilDB, ilFile\$path, $query, $res, $row, $size, $user_id, array, ilUtil\dirsize(), ilDBConstants\FETCHMODE_ASSOC, ilUtil\getDataDir(), and getMailPath().
Referenced by ilObjMailAccess\_lookupDiskUsageOfUser().
ilFileDataMail::adoptAttachments | ( | $a_attachments, | |
$a_mail_id | |||
) |
adopt attachments (in case of forwarding a mail)
array | attachments |
integer | mail_id public |
Definition at line 193 of file class.ilFileDataMail.php.
References $file, ilFile\$path, getAttachmentPath(), and getMailPath().
ilFileDataMail::assignAttachmentsToDirectory | ( | $a_mail_id, | |
$a_sent_mail_id | |||
) |
assign attachments to mail directory
integer | mail_id |
integer | key for directory assignment public |
Definition at line 451 of file class.ilFileDataMail.php.
References $ilDB, $res, and array.
ilFileDataMail::checkFilesExist | ( | $a_files | ) |
check if files exist
array | filenames to check public |
Definition at line 432 of file class.ilFileDataMail.php.
References $file.
ilFileDataMail::checkReadWrite | ( | ) |
check if directory is writable overwritten method from base class private
Definition at line 214 of file class.ilFileDataMail.php.
Referenced by __construct().
ilFileDataMail::copyAttachmentFile | ( | $a_abs_path, | |
$a_new_name | |||
) |
Copy files in mail directory.
This is used for sending ILIAS generated mails with attachments
array | Array with files. Absolute path required public |
Definition at line 312 of file class.ilFileDataMail.php.
References getMailPath().
ilFileDataMail::deassignAttachmentFromDirectory | ( | $a_mail_id | ) |
dassign attachments from mail directory
integer | mail_id public |
Definition at line 476 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, $row, __deleteAttachmentDirectory(), array, and ilDBConstants\FETCHMODE_OBJECT.
ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 110 of file class.ilFileDataMail.php.
Referenced by getAbsolutePath().
ilFileDataMail::getAbsolutePath | ( | $fileName | ) |
get absolute path of filename
string | relative path public |
Definition at line 371 of file class.ilFileDataMail.php.
References getAbsoluteAttachmentPoolPathPrefix().
ilFileDataMail::getAttachmentPath | ( | $a_filename, | |
$a_mail_id | |||
) |
get the path of a specific attachment
string | filename |
integer | mail_id public |
Definition at line 161 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $query, $row, and getMailPath().
Referenced by adoptAttachments().
ilFileDataMail::getAttachmentPathByMD5Filename | ( | $a_filename, | |
$a_mail_id | |||
) |
get the path of a specific attachment
string | md5 encrypted filename |
integer | mail_id public |
Definition at line 122 of file class.ilFileDataMail.php.
References $file, $files, $ilDB, ilFile\$path, $query, $row, array, ilUtil\getDir(), and getMailPath().
ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 87 of file class.ilFileDataMail.php.
ilFileDataMail::getMailPath | ( | ) |
get mail path public
Definition at line 102 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by _lookupDiskUsageOfUser(), adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathByMD5Filename(), storeAsAttachment(), and storeUploadedFile().
|
static |
Definition at line 392 of file class.ilFileDataMail.php.
References array.
ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 79 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
ilFileDataMail::getUserFilesData | ( | ) |
|
protected |
Definition at line 517 of file class.ilFileDataMail.php.
References array.
Referenced by __construct().
ilFileDataMail::initDirectory | ( | ) |
init directory overwritten method public
Definition at line 63 of file class.ilFileDataMail.php.
References ilFileData\getPath().
ilFileDataMail::rotateFiles | ( | $a_path | ) |
rotate files with same name recursive method
string | filename private |
Definition at line 328 of file class.ilFileDataMail.php.
Referenced by storeAsAttachment(), and storeUploadedFile().
ilFileDataMail::saveFile | ( | $a_mail_id, | |
$a_attachment | |||
) |
save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
integer | mail id of mail in sent box |
array | filenames to save public |
Definition at line 411 of file class.ilFileDataMail.php.
Referenced by saveFiles().
ilFileDataMail::saveFiles | ( | $a_mail_id, | |
array | $a_attachments | ||
) |
Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...
integer | $a_mail_id | id of mail in sent box |
array | $a_attachments | to save |
Definition at line 381 of file class.ilFileDataMail.php.
References saveFile().
ilFileDataMail::storeAsAttachment | ( | $a_filename, | |
$a_content | |||
) |
Store content as attachment.
object | $a_filename | |
object | $a_content |
Definition at line 268 of file class.ilFileDataMail.php.
References $a_content, $name, ilUtil\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
ilFileDataMail::storeUploadedFile | ( | $file | ) |
array | $file |
Definition at line 293 of file class.ilFileDataMail.php.
References $file, ilUtil\_sanitizeFilemame(), getMailPath(), and rotateFiles().
ilFileDataMail::unlinkFile | ( | $a_filename | ) |
unlink one uploaded file expects a filename e.g 'foo'
string | filename to delete public |
Definition at line 359 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
ilFileDataMail::unlinkFiles | ( | $a_filenames | ) |
unlink files: expects an array of filenames e.g.
array('foo','bar')
array | filenames to delete public |
Definition at line 342 of file class.ilFileDataMail.php.
References $file, and unlinkFile().
|
protected |
Definition at line 37 of file class.ilFileDataMail.php.
Referenced by getUploadLimit().
ilFileDataMail::$mail_path |
Definition at line 32 of file class.ilFileDataMail.php.
Referenced by getMailPath().
ilFileDataMail::$user_id |
Definition at line 25 of file class.ilFileDataMail.php.
Referenced by _lookupDiskUsageOfUser().