BUG 9897 I add validation
I add validation to function uploadDoc in alfresco functions
This commit is contained in:
@@ -282,6 +282,12 @@ function getFolderChildren($alfrescoServerUrl, $folderId, $user, $pwd) {
|
||||
*
|
||||
*/
|
||||
function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docType, $user, $pwd, $path = '') {
|
||||
if (!(file_exists($fileSource)))
|
||||
{
|
||||
G::SendTemporalMessage('ID_FILE_PLUGIN_NOT_EXISTS', 'error', 'labels', null, null, array('pluginFile' => $fileSource));
|
||||
G::header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||
die;
|
||||
}
|
||||
$filep = fopen($fileSource,"r");
|
||||
$fileLength = filesize($fileSource);
|
||||
$fileContent = fread($filep,$fileLength);
|
||||
|
||||
Reference in New Issue
Block a user