Public Member Functions | |
| copyAndRenameFile ($sourceFileId, $sourceRevision, $destType, $destFileId=null) | |
| copyPublicFile ($url, $mimeType, $fileId=null, $overwrite=true) | |
| copySubmissionFile ($url, $mimeType, $fileId=null, $overwrite=true) | |
| copySuppFile ($url, $mimeType, $fileId=null, $overwrite=true) | |
| copyToDirectorFile ($fileId, $revision=null, $destFileId=null) | |
| copyToLayoutFile ($fileId, $revision=null) | |
| copyToReviewFile ($fileId, $revision=null, $destFileId=null) | |
| deleteFile ($fileId, $revision=null) | |
| deletePaperTree () | |
| downloadFile ($fileId, $revision=null, $inline=false) | |
| & | generateDummyFile (&$paper) |
| generateFilename (&$paperFile, $type, $originalName) | |
| & | getFile ($fileId, $revision=null) |
| handleCopy ($url, $mimeType, $type, $fileId=null, $overwrite=false) | |
| handleUpload ($fileName, $type, $fileId=null, $overwrite=false) | |
| handleWrite ($fileName, &$contents, $mimeType, $type, $fileId=null, $overwrite=false) | |
| PaperFileManager ($paperId) | |
| readFile ($fileId, $revision=null, $output=false) | |
| removePriorRevisions ($fileId, $revision) | |
| typeToPath ($type) | |
| uploadDirectorDecisionFile ($fileName, $fileId=null) | |
| uploadLayoutFile ($fileName, $fileId=null, $overwrite=true) | |
| uploadPublicFile ($fileName, $fileId=null, $overwrite=true) | |
| uploadReviewFile ($fileName, $fileId=null) | |
| uploadSubmissionFile ($fileName, $fileId=null, $overwrite=false) | |
| uploadSubmissionNoteFile ($fileName, $fileId=null, $overwrite=true) | |
| uploadSuppFile ($fileName, $fileId=null, $overwrite=true) | |
| viewFile ($fileId, $revision=null) | |
| writePublicFile ($fileName, &$contents, $mimeType, $fileId=null, $overwrite=true) | |
| writeSubmissionFile ($fileName, &$contents, $mimeType, $fileId=null, $overwrite=true) | |
| writeSuppFile ($fileName, &$contents, $mimeType, $fileId=null, $overwrite=true) | |
Public Attributes | |
| $filesDir | |
| $paper | |
| $paperId | |
Paper directory structure: [paper id]/note [paper id]/public [paper id]/submission [paper id]/submission/original [paper id]/submission/review [paper id]/submission/director [paper id]/submission/layout [paper id]/supp
Definition at line 38 of file PaperFileManager.inc.php.
| PaperFileManager.copyAndRenameFile | ( | $ | sourceFileId, | |
| $ | sourceRevision, | |||
| $ | destType, | |||
| $ | destFileId = null | |||
| ) |
Copies an existing PaperFile and renames it.
| $sourceFileId | int | |
| $sourceRevision | int | |
| $destType | string | |
| $destFileId | int (optional) |
Definition at line 358 of file PaperFileManager.inc.php.
References typeToPath().
Referenced by copyToDirectorFile(), copyToLayoutFile(), and copyToReviewFile().
| PaperFileManager.copyPublicFile | ( | $ | url, | |
| $ | mimeType, | |||
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Copy a public file.
| $url | string The source URL/filename | |
| $mimeType | string The mime type of the original file | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 181 of file PaperFileManager.inc.php.
References handleCopy().
| PaperFileManager.copySubmissionFile | ( | $ | url, | |
| $ | mimeType, | |||
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Copy a submission file.
| $url | string The source URL/filename | |
| $mimeType | string The mime type of the original file | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 94 of file PaperFileManager.inc.php.
References handleCopy().
| PaperFileManager.copySuppFile | ( | $ | url, | |
| $ | mimeType, | |||
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Copy a supplemental file.
| $url | string The source URL/filename | |
| $mimeType | string The mime type of the original file | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 204 of file PaperFileManager.inc.php.
References handleCopy().
| PaperFileManager.copyToDirectorFile | ( | $ | fileId, | |
| $ | revision = null, |
|||
| $ | destFileId = null | |||
| ) |
Copies an existing file to create a director decision file.
| $fileId | int the file id of the review file. | |
| $revision | int the revision of the review file. | |
| $destFileId | int file ID to copy to |
Definition at line 320 of file PaperFileManager.inc.php.
References copyAndRenameFile().
| PaperFileManager.copyToLayoutFile | ( | $ | fileId, | |
| $ | revision = null | |||
| ) |
Copies an existing file to create a layout file.
| $fileId | int the file id of the layout file. | |
| $revision | int the revision of the layout file. |
Definition at line 330 of file PaperFileManager.inc.php.
References copyAndRenameFile().
| PaperFileManager.copyToReviewFile | ( | $ | fileId, | |
| $ | revision = null, |
|||
| $ | destFileId = null | |||
| ) |
Copies an existing file to create a review file.
| $originalFileId | int the file id of the original file. | |
| $originalRevision | int the revision of the original file. | |
| $destFileId | int the file id of the current review file |
Definition at line 309 of file PaperFileManager.inc.php.
References copyAndRenameFile().
| PaperFileManager.deleteFile | ( | $ | fileId, | |
| $ | revision = null | |||
| ) |
Delete a file by ID. If no revision is specified, all revisions of the file are deleted.
| $fileId | int | |
| $revision | int (optional) |
Definition at line 244 of file PaperFileManager.inc.php.
Referenced by removePriorRevisions().
| PaperFileManager.deletePaperTree | ( | ) |
Delete the entire tree of files belonging to a paper.
Definition at line 270 of file PaperFileManager.inc.php.
| PaperFileManager.downloadFile | ( | $ | fileId, | |
| $ | revision = null, |
|||
| $ | inline = false | |||
| ) |
Download a file.
| $fileId | int the file id of the file to download | |
| $revision | int the revision of the file to download | |
| $inline | print file as inline instead of attachment, optional |
Definition at line 281 of file PaperFileManager.inc.php.
References getFile().
Referenced by viewFile().
| & PaperFileManager.generateDummyFile | ( | &$ | paper | ) |
PRIVATE routine to generate a dummy file. Used in handleUpload.
| $paper | object |
Definition at line 418 of file PaperFileManager.inc.php.
References $paper.
Referenced by handleCopy(), handleUpload(), and handleWrite().
| PaperFileManager.generateFilename | ( | &$ | paperFile, | |
| $ | type, | |||
| $ | originalName | |||
| ) |
PRIVATE routine to generate a filename for a paper file. Sets the filename field in the paperFile to the generated value.
| $paperFile | The paper to generate a filename for | |
| $type | The type of the paper (e.g. as supplied to handleUpload) | |
| $originalName | The name of the original file |
Definition at line 457 of file PaperFileManager.inc.php.
Referenced by handleCopy(), handleUpload(), and handleWrite().
| & PaperFileManager.getFile | ( | $ | fileId, | |
| $ | revision = null | |||
| ) |
Retrieve file information by file ID.
Definition at line 212 of file PaperFileManager.inc.php.
Referenced by downloadFile(), and readFile().
| PaperFileManager.handleCopy | ( | $ | url, | |
| $ | mimeType, | |||
| $ | type, | |||
| $ | fileId = null, |
|||
| $ | overwrite = false | |||
| ) |
PRIVATE routine to copy a paper file and add it to the database.
| $url | original filename/url of the file | |
| $mimeType | string the mime type of the file | |
| $type | string identifying type | |
| $fileId | int ID of an existing file to update | |
| $overwrite | boolean overwrite all previous revisions of the file (revision number is still incremented) |
Definition at line 579 of file PaperFileManager.inc.php.
References generateDummyFile(), generateFilename(), removePriorRevisions(), and typeToPath().
Referenced by copyPublicFile(), copySubmissionFile(), and copySuppFile().
| PaperFileManager.handleUpload | ( | $ | fileName, | |
| $ | type, | |||
| $ | fileId = null, |
|||
| $ | overwrite = false | |||
| ) |
PRIVATE routine to upload the file and add it to the database.
| $fileName | string index into the $_FILES array | |
| $type | string identifying type | |
| $fileId | int ID of an existing file to update | |
| $overwrite | boolean overwrite all previous revisions of the file (revision number is still incremented) |
Definition at line 472 of file PaperFileManager.inc.php.
References generateDummyFile(), generateFilename(), removePriorRevisions(), and typeToPath().
Referenced by uploadDirectorDecisionFile(), uploadLayoutFile(), uploadPublicFile(), uploadReviewFile(), uploadSubmissionFile(), uploadSubmissionNoteFile(), and uploadSuppFile().
| PaperFileManager.handleWrite | ( | $ | fileName, | |
| &$ | contents, | |||
| $ | mimeType, | |||
| $ | type, | |||
| $ | fileId = null, |
|||
| $ | overwrite = false | |||
| ) |
PRIVATE routine to write a paper file and add it to the database.
| $fileName | original filename of the file | |
| $contents | string contents of the file to write | |
| $mimeType | string the mime type of the file | |
| $type | string identifying type | |
| $fileId | int ID of an existing file to update | |
| $overwrite | boolean overwrite all previous revisions of the file (revision number is still incremented) |
Definition at line 527 of file PaperFileManager.inc.php.
References generateDummyFile(), generateFilename(), removePriorRevisions(), and typeToPath().
Referenced by writePublicFile(), writeSubmissionFile(), and writeSuppFile().
| PaperFileManager.PaperFileManager | ( | $ | paperId | ) |
Constructor. Create a manager for handling paper file uploads.
| $paperId | int |
Definition at line 54 of file PaperFileManager.inc.php.
References $paperId.
| PaperFileManager.readFile | ( | $ | fileId, | |
| $ | revision = null, |
|||
| $ | output = false | |||
| ) |
Read a file's contents.
| $output | boolean output the file's contents instead of returning a string |
Definition at line 223 of file PaperFileManager.inc.php.
References getFile().
| PaperFileManager.removePriorRevisions | ( | $ | fileId, | |
| $ | revision | |||
| ) |
PRIVATE routine to remove all prior revisions of a file.
Definition at line 440 of file PaperFileManager.inc.php.
References deleteFile().
Referenced by handleCopy(), handleUpload(), and handleWrite().
| PaperFileManager.typeToPath | ( | $ | type | ) |
Return type path associated with a type code.
| $type | string |
Definition at line 339 of file PaperFileManager.inc.php.
Referenced by copyAndRenameFile(), handleCopy(), handleUpload(), and handleWrite().
| PaperFileManager.uploadDirectorDecisionFile | ( | $ | fileName, | |
| $ | fileId = null | |||
| ) |
Upload a file to the director decision file folder.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int |
Definition at line 114 of file PaperFileManager.inc.php.
References handleUpload().
| PaperFileManager.uploadLayoutFile | ( | $ | fileName, | |
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Upload a track director's layout editing file.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 125 of file PaperFileManager.inc.php.
References handleUpload().
| PaperFileManager.uploadPublicFile | ( | $ | fileName, | |
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Upload a public file.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 147 of file PaperFileManager.inc.php.
References handleUpload().
| PaperFileManager.uploadReviewFile | ( | $ | fileName, | |
| $ | fileId = null | |||
| ) |
Upload a file to the review file folder.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int |
Definition at line 104 of file PaperFileManager.inc.php.
References handleUpload().
| PaperFileManager.uploadSubmissionFile | ( | $ | fileName, | |
| $ | fileId = null, |
|||
| $ | overwrite = false | |||
| ) |
Upload a submission file.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int |
Definition at line 71 of file PaperFileManager.inc.php.
References handleUpload().
| PaperFileManager.uploadSubmissionNoteFile | ( | $ | fileName, | |
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Upload a note file.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 158 of file PaperFileManager.inc.php.
References handleUpload().
| PaperFileManager.uploadSuppFile | ( | $ | fileName, | |
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Upload a supp file.
| $fileName | string the name of the file used in the POST form | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 136 of file PaperFileManager.inc.php.
References handleUpload().
Referenced by SuppFileForm.execute().
| PaperFileManager.viewFile | ( | $ | fileId, | |
| $ | revision = null | |||
| ) |
View a file inline (variant of downloadFile).
Definition at line 298 of file PaperFileManager.inc.php.
References downloadFile().
| PaperFileManager.writePublicFile | ( | $ | fileName, | |
| &$ | contents, | |||
| $ | mimeType, | |||
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Write a public file.
| $fileName | string The original filename | |
| $contents | string The contents to be written to the file | |
| $mimeType | string The mime type of the original file | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 170 of file PaperFileManager.inc.php.
References handleWrite().
| PaperFileManager.writeSubmissionFile | ( | $ | fileName, | |
| &$ | contents, | |||
| $ | mimeType, | |||
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Write a submission file.
| $fileName | string The original filename | |
| $contents | string The contents to be written to the file | |
| $mimeType | string The mime type of the original file | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 83 of file PaperFileManager.inc.php.
References handleWrite().
| PaperFileManager.writeSuppFile | ( | $ | fileName, | |
| &$ | contents, | |||
| $ | mimeType, | |||
| $ | fileId = null, |
|||
| $ | overwrite = true | |||
| ) |
Write a supplemental file.
| $fileName | string The original filename | |
| $contents | string The contents to be written to the file | |
| $mimeType | string The mime type of the original file | |
| $fileId | int | |
| $overwrite | boolean |
Definition at line 193 of file PaperFileManager.inc.php.
References handleWrite().
1.4.7