| ILIAS
    Release_4_1_x_branch Revision 61804
    | 
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 | |
| ilFileDataMail ($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 () | |
| 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 | |
| storeUploadedFile ($a_http_post_file) | |
| store uploaded file in filesystem | |
| 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) | |
| __initAttachmentMaxSize () | |
| _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 | |
| $mail_maxsize_attach | |
This class handles all operations on files (attachments) in directory ilias_data/mail.
Definition at line 14 of file class.ilFileDataMail.php.
| ilFileDataMail::__deleteAttachmentDirectory | ( | $a_rel_path | ) | 
Definition at line 508 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::__initAttachmentMaxSize | ( | ) | 
Definition at line 514 of file class.ilFileDataMail.php.
Referenced by ilFileDataMail().
 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 532 of file class.ilFileDataMail.php.
References $ilDB, $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 172 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 450 of file class.ilFileDataMail.php.
References $ilDB, $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 428 of file class.ilFileDataMail.php.
References $file.
| ilFileDataMail::checkReadWrite | ( | ) | 
check if directory is writable overwritten method from base class private
Definition at line 198 of file class.ilFileDataMail.php.
Referenced by ilFileDataMail().
 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 289 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 475 of file class.ilFileDataMail.php.
References $ilDB, 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 353 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 137 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 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 94 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:
 Here is the call graph for this function:| ilFileDataMail::getMailPath | ( | ) | 
get mail path public
Definition at line 82 of file class.ilFileDataMail.php.
References $mail_path.
Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathByMD5Filename(), and storeUploadedFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 388 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 226 of file class.ilFileDataMail.php.
References $file, $files, $rest, and ilFormat\formatDate().
Referenced by getUserFilesData().
 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::getUploadLimit | ( | ) | 
Definition at line 72 of file class.ilFileDataMail.php.
| ilFileDataMail::getUserFilesData | ( | ) | 
get all attachments of a specific user public
Definition at line 214 of file class.ilFileDataMail.php.
References $files, and getUnsentFiles().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::ilFileDataMail | ( | $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 39 of file class.ilFileDataMail.php.
References __initAttachmentMaxSize(), checkReadWrite(), ilFileData\getPath(), and ilFileData\ilFileData().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::initDirectory | ( | ) | 
init directory overwritten method public
Definition at line 57 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 305 of file class.ilFileDataMail.php.
Referenced by 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 408 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 365 of file class.ilFileDataMail.php.
References saveFile().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilFileDataMail::storeUploadedFile | ( | $a_http_post_file | ) | 
store uploaded file in filesystem
| array | HTTP_POST_FILES public | 
Definition at line 258 of file class.ilFileDataMail.php.
References 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 340 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 320 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:| ilFileDataMail::$mail_maxsize_attach | 
Definition at line 30 of file class.ilFileDataMail.php.
| ilFileDataMail::$mail_path | 
Definition at line 28 of file class.ilFileDataMail.php.
Referenced by getMailPath().
| ilFileDataMail::$user_id | 
Definition at line 21 of file class.ilFileDataMail.php.
Referenced by _lookupDiskUsageOfUser().