BUG 5449 Importación de un Proceso/error al importar archivo diferente.

Added a way to check if the upload file is a .pm file
This commit is contained in:
Carlos Pacha
2011-09-08 09:20:03 -04:00
parent e9cd3c801e
commit f195fdff70

View File

@@ -46,6 +46,11 @@
G::uploadFile($tempName, $path, $filename );
}
}
//we check if the file is a pm file
$aExtPmfile= explode('.', $filename);
if($aExtPmfile[sizeof($aExtPmfile)-1]!='pm') {
throw ( new Exception ( G::LoadTranslation( 'ID_NOT_PM_FILE' )) );
}
$oData = $oProcess->getProcessData ( $path . $filename );