|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
This class handles all operations on files (attachments) in directory ilias_data/mail. More...
Inheritance diagram for ilFileDataMail:
Collaboration diagram for ilFileDataMail: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 @access public More... | |
| getUploadLimit () | |
| getAttachmentsTotalSizeLimit () | |
| getMailPath () | |
| get mail path @access 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 @access private More... | |
| getUserFilesData () | |
| get all attachments of a specific user @access 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 @access public. More... | |
| checkPath ($a_path) | |
| check if path exists and is writable More... | |
| getPath () | |
| get Path @access public More... | |
Public Member Functions inherited from ilFile | |
| __construct () | |
| Constructor get ilias object @access 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 @access public |
Definition at line 46 of file class.ilFileDataMail.php.
References checkReadWrite(), and initAttachmentMaxUploadSize().
Here is the call graph for this function:| ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) |
Definition at line 544 of file class.ilFileDataMail.php.
References ilUtil\delDir().
Referenced by deassignAttachmentFromDirectory().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 596 of file class.ilFileDataMail.php.
References $ilDB, $lng, $row, $size, $user_id, ilUtil\dirsize(), ilDBConstants\FETCHMODE_ASSOC, and ilUtil\getDataDir().
Referenced by ilObjMailAccess\_lookupDiskUsageOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileDataMail::adoptAttachments | ( | $a_attachments, | |
| $a_mail_id | |||
| ) |
adopt attachments (in case of forwarding a mail)
| array | attachments |
| integer | mail_id @access public |
Definition at line 204 of file class.ilFileDataMail.php.
References $file, ilFile\$path, getAttachmentPath(), and getMailPath().
Here is the call graph for this function:| ilFileDataMail::assignAttachmentsToDirectory | ( | $a_mail_id, | |
| $a_sent_mail_id | |||
| ) |
assign attachments to mail directory
| integer | mail_id |
| integer | key for directory assignment @access public |
Definition at line 486 of file class.ilFileDataMail.php.
References $ilDB, $res, and getStorage().
Here is the call graph for this function:| ilFileDataMail::checkFilesExist | ( | $a_files | ) |
check if files exist
| array | filenames to check @access public |
Definition at line 464 of file class.ilFileDataMail.php.
References $file.
| ilFileDataMail::checkReadWrite | ( | ) |
check if directory is writable overwritten method from base class @access private
Definition at line 230 of file class.ilFileDataMail.php.
Referenced by __construct().
Here is the caller graph for this function:| 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 @access public |
Definition at line 337 of file class.ilFileDataMail.php.
References getMailPath().
Here is the call graph for this function:| ilFileDataMail::deassignAttachmentFromDirectory | ( | $a_mail_id | ) |
dassign attachments from mail directory
| integer | mail_id @access public |
Definition at line 511 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $res, $row, __deleteAttachmentDirectory(), and ilDBConstants\FETCHMODE_OBJECT.
Here is the call graph for this function:| ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix | ( | ) |
Definition at line 114 of file class.ilFileDataMail.php.
Referenced by getAbsolutePath().
Here is the caller graph for this function:| ilFileDataMail::getAbsolutePath | ( | $fileName | ) |
get absolute path of filename
| string | relative path @access public |
Definition at line 401 of file class.ilFileDataMail.php.
References getAbsoluteAttachmentPoolPathPrefix().
Here is the call graph for this function:| ilFileDataMail::getAttachmentPath | ( | $a_filename, | |
| $a_mail_id | |||
| ) |
get the path of a specific attachment
| string | filename |
| integer | mail_id @access public |
Definition at line 169 of file class.ilFileDataMail.php.
References $ilDB, ilFile\$path, $query, $row, and getMailPath().
Referenced by adoptAttachments().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileDataMail::getAttachmentPathByMD5Filename | ( | $a_filename, | |
| $a_mail_id | |||
| ) |
get the path of a specific attachment
| string | md5 encrypted filename |
| integer | mail_id @access public |
Definition at line 126 of file class.ilFileDataMail.php.
References $file, $files, $ilDB, ilFile\$path, $query, $row, ilUtil\getDir(), and getMailPath().
Here is the call graph for this function:| ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) |
Definition at line 90 of file class.ilFileDataMail.php.
| ilFileDataMail::getMailPath | ( | ) |
get mail path @access public
Definition at line 106 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathByMD5Filename(), storeAsAttachment(), and storeUploadedFile().
Here is the caller graph for this function:
|
static |
Definition at line 424 of file class.ilFileDataMail.php.
Referenced by assignAttachmentsToDirectory(), and saveFile().
Here is the caller graph for this function:| ilFileDataMail::getUploadLimit | ( | ) |
Definition at line 82 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
Here is the caller graph for this function:| ilFileDataMail::getUserFilesData | ( | ) |
get all attachments of a specific user @access public
Definition at line 246 of file class.ilFileDataMail.php.
|
protected |
Definition at line 554 of file class.ilFileDataMail.php.
References PREG_SPLIT_DELIM_CAPTURE.
Referenced by __construct().
Here is the caller graph for this function:| ilFileDataMail::initDirectory | ( | ) |
init directory overwritten method @access public
Definition at line 63 of file class.ilFileDataMail.php.
References ilFileData\getPath().
Here is the call graph for this function:| ilFileDataMail::rotateFiles | ( | $a_path | ) |
rotate files with same name recursive method
| string | filename @access private |
Definition at line 353 of file class.ilFileDataMail.php.
References rotateFiles().
Referenced by rotateFiles(), storeAsAttachment(), and storeUploadedFile().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 @access public |
Definition at line 444 of file class.ilFileDataMail.php.
References getStorage().
Referenced by saveFiles().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 411 of file class.ilFileDataMail.php.
References saveFile().
Here is the call graph for this function:| ilFileDataMail::storeAsAttachment | ( | $a_filename, | |
| $a_content | |||
| ) |
Store content as attachment.
| object | $a_filename | |
| object | $a_content |
Definition at line 290 of file class.ilFileDataMail.php.
References $a_content, ilUtil\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
Here is the call graph for this function:| ilFileDataMail::storeUploadedFile | ( | $file | ) |
| array | $file |
Definition at line 318 of file class.ilFileDataMail.php.
References $file, ilUtil\_sanitizeFilemame(), getMailPath(), ilUtil\moveUploadedFile(), and rotateFiles().
Here is the call graph for this function:| ilFileDataMail::unlinkFile | ( | $a_filename | ) |
unlink one uploaded file expects a filename e.g 'foo'
| string | filename to delete @access public |
Definition at line 388 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
Here is the caller graph for this function:| ilFileDataMail::unlinkFiles | ( | $a_filenames | ) |
unlink files: expects an array of filenames e.g.
array('foo','bar')
| array | filenames to delete @access public |
Definition at line 368 of file class.ilFileDataMail.php.
References $file, and unlinkFile().
Here is the call graph for this function:
|
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().