Merged in luisfernandosl/processmaker/PM-2035 (pull request #2058)

PM-2254 "Designer>Designer BPMN>Input Documents..." SOLVED
This commit is contained in:
Julio Cesar Laura Avendaño
2015-04-30 19:36:21 -04:00
3 changed files with 11 additions and 5 deletions

View File

@@ -89,10 +89,10 @@ try {
}
//Validating the format of the allowed extentions
//Allowed Types has to have this format -> *.pdf, *.docx or *.* to all.
//Allowed Types has to have this format -> *.pdf, .xls, *.docx, *.* or .* to all.
$allowedTypes = explode(", ", $aData['INP_DOC_TYPE_FILE']);
foreach ($allowedTypes as $types => $val) {
if((preg_match('/^\*\.?[a-zA-Z0-9]{2,15}$/', $val)) || ($val == '*.*')){
if ((preg_match("/^.*\.?[a-zA-Z0-9]{2,15}$/", $val)) || ($val == "*.*") || ($val == ".*")) {
}else {
$message = G::LoadTranslation( 'ID_UPLOAD_ERR_WRONG_ALLOWED_EXTENSION_FORMAT' );
G::SendMessageText( $message, "ERROR" );