adding validations while importing pm file
This commit is contained in:
@@ -23,9 +23,10 @@
|
|||||||
*/
|
*/
|
||||||
ini_set( 'max_execution_time', '0' );
|
ini_set( 'max_execution_time', '0' );
|
||||||
|
|
||||||
$ext = pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION);
|
if (isset($_FILES["PROCESS_FILENAME"])) {
|
||||||
|
$ext = pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION);
|
||||||
|
|
||||||
if ($ext == "pmx") {
|
if ($ext == "pmx") {
|
||||||
$importer = new \ProcessMaker\Importer\XmlImporter();
|
$importer = new \ProcessMaker\Importer\XmlImporter();
|
||||||
$importer->setSourceFromGlobals("PROCESS_FILENAME");
|
$importer->setSourceFromGlobals("PROCESS_FILENAME");
|
||||||
$importer->setData("usr_uid", $_SESSION['USER_LOGGED']);
|
$importer->setData("usr_uid", $_SESSION['USER_LOGGED']);
|
||||||
@@ -56,6 +57,7 @@ if ($ext == "pmx") {
|
|||||||
|
|
||||||
echo json_encode($result);
|
echo json_encode($result);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reservedWordsSqlValidate ($data)
|
function reservedWordsSqlValidate ($data)
|
||||||
|
|||||||
Reference in New Issue
Block a user