|
TYPO3 API
SVNRelease
|


Public Member Functions | |
| start ($fileCmds) | |
| init_actionPerms ($setup) | |
| processData () | |
| printLogErrorMessages ($redirect= '') | |
| getErrorMessages () | |
| findRecycler ($theFile) | |
| writeLog ($action, $error, $details_nr, $details, $data) | |
| func_delete ($cmds) | |
| func_copy ($cmds) | |
| func_move ($cmds) | |
| func_rename ($cmds) | |
| func_newfolder ($cmds) | |
| func_newfile ($cmds) | |
| func_edit ($cmds) | |
| func_upload ($cmds) | |
| func_unzip ($cmds) | |
Public Attributes | |
| $maxCopyFileSize = 10000 | |
| $maxMoveFileSize = 10000 | |
| $maxUploadFileSize = 10000 | |
| $unzipPath = '' | |
| $dontCheckForUnique = 0 | |
| $actionPerms | |
| $recyclerFN = '_recycler_' | |
| $useRecycler = 1 | |
| $PHPFileFunctions = 0 | |
| $dont_use_exec_commands = 0 | |
| $internalUploadMap = array() | |
| $lastError = '' | |
Definition at line 94 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::findRecycler | ( | $ | theFile | ) |
Goes back in the path and checks in each directory if a folder named $this->recyclerFN (usually '_recycler_') is present. If a folder in the tree happens to be a _recycler_-folder (which means that we're deleting something inside a _recycler_-folder) this is ignored
| string | Takes a valid Path ($theFile) |
Definition at line 334 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_basicFileFunctions\cleanDirectoryName(), t3lib_basicFileFunctions\isPathValid(), and t3lib_div\split_fileref().
Referenced by func_delete().
| t3lib_extFileFunctions::func_copy | ( | $ | cmds | ) |
Copying files and folders (action=2)
| array | $cmds,['data'] | is the file/folder to copy. $cmds['target'] is the path where to copy to. $cmds['altName'] (boolean): If set, another filename is found in case the target already exists |
Definition at line 469 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkIfAllowed(), t3lib_basicFileFunctions\checkIfFullAccess(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_utility_Command\exec(), t3lib_div\fixPermissions(), t3lib_basicFileFunctions\getUniqueName(), t3lib_basicFileFunctions\is_directory(), t3lib_div\isFirstPartOfStr(), t3lib_basicFileFunctions\isPathValid(), and t3lib_div\split_fileref().
Referenced by processData().
| t3lib_extFileFunctions::func_delete | ( | $ | cmds | ) |
Deleting files and folders (action=4)
| array | $cmds,['data'] | is the file/folder to delete |
Definition at line 384 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkPathAgainstMounts(), findRecycler(), func_move(), t3lib_basicFileFunctions\is_directory(), t3lib_basicFileFunctions\isPathValid(), and t3lib_div\rmdir().
Referenced by processData().
| t3lib_extFileFunctions::func_edit | ( | $ | cmds | ) |
Editing textfiles or folders (action=9)
| array | $cmds,['data'] | is the new content. $cmds['target'] is the target (file or dir) |
Definition at line 877 of file class.t3lib_extfilefunc.php.
References $content, $GLOBALS, t3lib_basicFileFunctions\checkIfAllowed(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_div\inList(), t3lib_div\split_fileref(), and t3lib_div\writeFile().
Referenced by processData().
| t3lib_extFileFunctions::func_move | ( | $ | cmds | ) |
Moving files and folders (action=3)
| array | $cmds,['data'] | is the file/folder to move. $cmds['target'] is the path where to move to. $cmds['altName'] (boolean): If set, another filename is found in case the target already exists |
Definition at line 588 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkIfAllowed(), t3lib_basicFileFunctions\checkIfFullAccess(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_utility_Command\exec(), t3lib_basicFileFunctions\getUniqueName(), t3lib_basicFileFunctions\is_directory(), t3lib_div\isFirstPartOfStr(), t3lib_basicFileFunctions\isPathValid(), and t3lib_div\split_fileref().
Referenced by func_delete(), and processData().
| t3lib_extFileFunctions::func_newfile | ( | $ | cmds | ) |
This creates a new file. (action=8)
| array | $cmds,['data'] | is the new filename. $cmds['target'] is the path where to create it |
Definition at line 822 of file class.t3lib_extfilefunc.php.
References $GLOBALS, t3lib_basicFileFunctions\checkFileNameLen(), t3lib_basicFileFunctions\checkIfAllowed(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_basicFileFunctions\cleanFileName(), t3lib_div\inList(), t3lib_basicFileFunctions\is_directory(), t3lib_div\split_fileref(), and t3lib_div\writeFile().
Referenced by processData().
| t3lib_extFileFunctions::func_newfolder | ( | $ | cmds | ) |
This creates a new folder. (action=6)
| array | $cmds,['data'] | is the foldername. $cmds['target'] is the path where to create it. |
Definition at line 778 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkFileNameLen(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_basicFileFunctions\cleanFileName(), t3lib_basicFileFunctions\is_directory(), and t3lib_div\mkdir().
Referenced by processData().
| t3lib_extFileFunctions::func_rename | ( | $ | cmds | ) |
Renaming files or foldes (action=5)
| array | $cmds,['data'] | is the new name. $cmds['target'] is the target (file or dir). |
Definition at line 710 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkFileNameLen(), t3lib_basicFileFunctions\checkIfAllowed(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_basicFileFunctions\cleanFileName(), and t3lib_div\split_fileref().
Referenced by processData().
| t3lib_extFileFunctions::func_unzip | ( | $ | cmds | ) |
Unzipping file (action=7) This is permitted only if the user has fullAccess or if the file resides
| array | $cmds,['data'] | is the zip-file. $cmds['target'] is the target directory. If not set we'll default to the same directory as the file is in. |
Definition at line 980 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkIfFullAccess(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_utility_Command\exec(), t3lib_basicFileFunctions\is_directory(), and t3lib_div\split_fileref().
Referenced by processData().
| t3lib_extFileFunctions::func_upload | ( | $ | cmds | ) |
Upload of files (action=1)
| array | $cmds,['data'] | is the ID-number (points to the global var that holds the filename-ref ($_FILES['upload_'.$id]['name']). $cmds['target'] is the target directory, $cmds['charset'] is the the character set of the file name (utf-8 is needed for JS-interaction) |
Definition at line 923 of file class.t3lib_extfilefunc.php.
References t3lib_basicFileFunctions\checkIfAllowed(), t3lib_basicFileFunctions\checkPathAgainstMounts(), t3lib_basicFileFunctions\cleanFileName(), t3lib_basicFileFunctions\getUniqueName(), t3lib_basicFileFunctions\is_directory(), t3lib_div\split_fileref(), and t3lib_div\upload_copy_move().
Referenced by processData().
| t3lib_extFileFunctions::getErrorMessages | ( | ) |
Adds log error messages from the previous file operations of this script instance to the FlashMessageQueue
Definition at line 303 of file class.t3lib_extfilefunc.php.
References $GLOBALS, $res, $row, t3lib_FlashMessageQueue\addMessage(), t3lib_message_AbstractMessage\ERROR, and t3lib_div\makeInstance().
Referenced by printLogErrorMessages().
| t3lib_extFileFunctions::init_actionPerms | ( | $ | setup | ) |
Sets up permission to perform file/directory operations. See below or the be_user-table for the significance of the various bits in $setup.
| integer | File permission integer from BE_USER OR'ed with permissions of back-end groups this user is a member of |
Definition at line 170 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::printLogErrorMessages | ( | $ | redirect = '' | ) |
Adds log error messages from the operations of this script instance to the FlashMessageQueue
| string | Redirect URL (for creating link in message) |
Definition at line 292 of file class.t3lib_extfilefunc.php.
References getErrorMessages().
| t3lib_extFileFunctions::processData | ( | ) |
Processing the command array in $this->fileCmdMap
Definition at line 204 of file class.t3lib_extfilefunc.php.
References $GLOBALS, func_copy(), func_delete(), func_edit(), func_move(), func_newfile(), func_newfolder(), func_rename(), func_unzip(), func_upload(), and t3lib_div\getUserObj().
| t3lib_extFileFunctions::start | ( | $ | fileCmds | ) |
Initialization of the class
| array | The $file array with the commands to execute. See "TYPO3 Core API" document |
Definition at line 140 of file class.t3lib_extfilefunc.php.
References $GLOBALS, and t3lib_div\getMaxUploadFileSize().
| t3lib_extFileFunctions::writeLog | ( | $ | action, |
| $ | error, | ||
| $ | details_nr, | ||
| $ | details, | ||
| $ | data | ||
| ) |
Logging file operations
| integer | The action number. See the functions in the class for a hint. Eg. edit is '9', upload is '1' ... |
| integer | The severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin) |
| integer | This number is unique for every combination of $type and $action. This is the error-message number, which can later be used to translate error messages. |
| string | This is the default, raw error message in english |
| array | Array with special information that may go into $details by "%s" marks / sprintf() when the log is shown |
Definition at line 363 of file class.t3lib_extfilefunc.php.
References $GLOBALS.
| t3lib_extFileFunctions::$actionPerms |
Array(
'deleteFile' => 0,
'deleteFolder' => 0,
'deleteFolderRecursively' => 0,
'moveFile' => 0,
'moveFolder' => 0,
'copyFile' => 0,
'copyFolder' => 0,
'newFolder' => 0,
'newFile' => 0,
'editFile' => 0,
'unzipFile' => 0,
'uploadFile' => 0,
'renameFile' => 0,
'renameFolder' => 0
)
Definition at line 104 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$dont_use_exec_commands = 0 |
Definition at line 126 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$dontCheckForUnique = 0 |
Definition at line 102 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$internalUploadMap = array() |
Definition at line 129 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$lastError = '' |
Definition at line 131 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$maxCopyFileSize = 10000 |
Definition at line 98 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$maxMoveFileSize = 10000 |
Definition at line 99 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$maxUploadFileSize = 10000 |
Definition at line 100 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$PHPFileFunctions = 0 |
Definition at line 125 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$recyclerFN = '_recycler_' |
Definition at line 121 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$unzipPath = '' |
Definition at line 101 of file class.t3lib_extfilefunc.php.
| t3lib_extFileFunctions::$useRecycler = 1 |
Definition at line 122 of file class.t3lib_extfilefunc.php.
1.7.5.1