| ILIAS
    Release_4_4_x_branch Revision 61816
    | 
This class handles all operations on files (attachments) in directory ilias_data/mail. More...
 Inheritance diagram for ilFileDataMail:
 Inheritance diagram for ilFileDataMail: Collaboration 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. | |
| initDirectory () | |
| init directory overwritten method  public | |
| getUploadLimit () | |
| getAttachmentsTotalSizeLimit () | |
| getMailPath () | |
| get mail path  public | |
| getAttachmentPathByMD5Filename ($a_filename, $a_mail_id) | |
| get the path of a specific attachment | |
| getAttachmentPath ($a_filename, $a_mail_id) | |
| get the path of a specific attachment | |
| adoptAttachments ($a_attachments, $a_mail_id) | |
| adopt attachments (in case of forwarding a mail) | |
| checkReadWrite () | |
| check if directory is writable overwritten method from base class  private | |
| getUserFilesData () | |
| get all attachments of a specific user  public | |
| getUnsentFiles () | |
| get all files which are not sent find them in directory data/mail/  private | |
| storeAsAttachment ($a_filename, $a_content) | |
| Store content as attachment. | |
| storeUploadedFile ($file) | |
| copyAttachmentFile ($a_abs_path, $a_new_name) | |
| Copy files in mail directory. | |
| rotateFiles ($a_path) | |
| rotate files with same name recursive method | |
| unlinkFiles ($a_filenames) | |
| unlink files: expects an array of filenames e.g. | |
| unlinkFile ($a_filename) | |
| unlink one uploaded file expects a filename e.g 'foo' | |
| getAbsolutePath ($a_path) | |
| get absolute path of filename | |
| saveFiles ($a_mail_id, $a_attachments) | |
| save all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... | |
| saveFile ($a_mail_id, $a_attachment) | |
| save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... | |
| checkFilesExist ($a_files) | |
| check if files exist | |
| assignAttachmentsToDirectory ($a_mail_id, $a_sent_mail_id) | |
| assign attachments to mail directory | |
| deassignAttachmentFromDirectory ($a_mail_id) | |
| dassign attachments from mail directory | |
| __deleteAttachmentDirectory ($a_rel_path) | |
| _lookupDiskUsageOfUser ($user_id) | |
| Returns the number of bytes used on the harddisk for mail attachments, by the user with the specified user id. | |
|  Public Member Functions inherited from ilFileData | |
| ilFileData () | |
| Constructor class bas constructor and read path of directory from ilias.ini setup an mail object  public. | |
| checkPath ($a_path) | |
| check if path exists and is writable | |
| getPath () | |
| get Path  public | |
|  Public Member Functions inherited from ilFile | |
| ilFile () | |
| Constructor get ilias object  public. | |
| deleteTrailingSlash ($a_path) | |
| delete trailing slash of path variables | |
| Static Public Member Functions | |
| static | getStorage ($a_mail_id, $a_usr_id) | 
| Data Fields | |
| $user_id | |
| $mail_path | |
| Protected Member Functions | |
| initAttachmentMaxUploadSize () | |
| Protected Attributes | |
| $mail_max_upload_file_size | |
This class handles all operations on files (attachments) in directory ilias_data/mail.
Class ilFileDataMail
Definition at line 17 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 45 of file class.ilFileDataMail.php.
References checkReadWrite(), ilFileData\getPath(), and initAttachmentMaxUploadSize().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) | 
Definition at line 548 of file class.ilFileDataMail.php.
References ilUtil\delDir().
Referenced by deassignAttachmentFromDirectory().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::_lookupDiskUsageOfUser | ( | $user_id | ) | 
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 600 of file class.ilFileDataMail.php.
References $lng, $row, $size, $user_id, DB_FETCHMODE_ASSOC, ilUtil\dirsize(), and ilUtil\getDataDir().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::adoptAttachments | ( | $a_attachments, | |
| $a_mail_id | |||
| ) | 
adopt attachments (in case of forwarding a mail)
| array | attachments | 
| integer | mail_id public | 
Definition at line 195 of file class.ilFileDataMail.php.
References $file, ilFile\$path, getAttachmentPath(), and getMailPath().
 Here is the call graph for this function:
 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 public | 
Definition at line 490 of file class.ilFileDataMail.php.
References $res, and getStorage().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::checkFilesExist | ( | $a_files | ) | 
check if files exist
| array | filenames to check public | 
Definition at line 468 of file class.ilFileDataMail.php.
References $file.
| ilFileDataMail::checkReadWrite | ( | ) | 
check if directory is writable overwritten method from base class private
Definition at line 221 of file class.ilFileDataMail.php.
Referenced by __construct().
 Here is the caller graph for this function:
 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 public | 
Definition at line 329 of file class.ilFileDataMail.php.
References getMailPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::deassignAttachmentFromDirectory | ( | $a_mail_id | ) | 
dassign attachments from mail directory
| integer | mail_id public | 
Definition at line 515 of file class.ilFileDataMail.php.
References ilFile\$path, $res, $row, __deleteAttachmentDirectory(), and DB_FETCHMODE_OBJECT.
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::getAbsolutePath | ( | $a_path | ) | 
get absolute path of filename
| string | relative path public | 
Definition at line 393 of file class.ilFileDataMail.php.
| ilFileDataMail::getAttachmentPath | ( | $a_filename, | |
| $a_mail_id | |||
| ) | 
get the path of a specific attachment
| string | filename | 
| integer | mail_id public | 
Definition at line 160 of file class.ilFileDataMail.php.
References ilFile\$path, $query, $row, and getMailPath().
Referenced by adoptAttachments().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller 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 public | 
Definition at line 117 of file class.ilFileDataMail.php.
References $file, ilFile\$path, $query, $row, ilUtil\getDir(), and getMailPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::getAttachmentsTotalSizeLimit | ( | ) | 
Definition at line 89 of file class.ilFileDataMail.php.
| ilFileDataMail::getMailPath | ( | ) | 
get mail path public
Definition at line 105 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:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 428 of file class.ilFileDataMail.php.
Referenced by assignAttachmentsToDirectory(), and saveFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getUnsentFiles | ( | ) | 
get all files which are not sent find them in directory data/mail/ private
Definition at line 248 of file class.ilFileDataMail.php.
Referenced by getUserFilesData().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getUploadLimit | ( | ) | 
Definition at line 81 of file class.ilFileDataMail.php.
References $mail_max_upload_file_size.
Referenced by storeAsAttachment().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::getUserFilesData | ( | ) | 
get all attachments of a specific user public
Definition at line 237 of file class.ilFileDataMail.php.
References getUnsentFiles().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | protected | 
Definition at line 558 of file class.ilFileDataMail.php.
Referenced by __construct().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::initDirectory | ( | ) | 
init directory overwritten method public
Definition at line 62 of file class.ilFileDataMail.php.
References ilFileData\getPath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::rotateFiles | ( | $a_path | ) | 
rotate files with same name recursive method
| string | filename private | 
Definition at line 345 of file class.ilFileDataMail.php.
Referenced by storeAsAttachment(), and storeUploadedFile().
 Here is the caller 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 public | 
Definition at line 448 of file class.ilFileDataMail.php.
References getStorage().
Referenced by saveFiles().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileDataMail::saveFiles | ( | $a_mail_id, | |
| $a_attachments | |||
| ) | 
save all attachment files 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 405 of file class.ilFileDataMail.php.
References saveFile().
 Here is the call graph for this function:
 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 282 of file class.ilFileDataMail.php.
References ilUtil\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::storeUploadedFile | ( | $file | ) | 
| array | $file | 
Definition at line 310 of file class.ilFileDataMail.php.
References $file, ilUtil\_sanitizeFilemame(), getMailPath(), ilUtil\moveUploadedFile(), and rotateFiles().
 Here is the call graph for this function:
 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 public | 
Definition at line 380 of file class.ilFileDataMail.php.
Referenced by unlinkFiles().
 Here is the caller graph for this function:
 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 public | 
Definition at line 360 of file class.ilFileDataMail.php.
References $file, and unlinkFile().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | protected | 
Definition at line 36 of file class.ilFileDataMail.php.
Referenced by getUploadLimit().
| ilFileDataMail::$mail_path | 
Definition at line 31 of file class.ilFileDataMail.php.
Referenced by getMailPath().
| ilFileDataMail::$user_id | 
Definition at line 24 of file class.ilFileDataMail.php.
Referenced by _lookupDiskUsageOfUser().