Merged in HOR-3700-HJQQ (pull request #5976)

HOR-3700-HJQQ

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
jonathan Quispe
2017-08-17 18:06:47 +00:00
committed by Julio Cesar Laura Avendaño
3 changed files with 5 additions and 4 deletions

View File

@@ -414,8 +414,7 @@ class WebEntry
$fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n";
$fileContent .= "\$G_PUBLISH = new Publisher();\n";
$fileContent .= "G::LoadClass(\"pmDynaform\");\n";
$fileContent .= "\$a = new pmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $dynaFormUid . "\"));\n";
$fileContent .= "\$a = new PmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $dynaFormUid . "\"));\n";
$fileContent .= "if (\$a->isResponsive()) {\n";
$fileContent .= " \$a->printWebEntry(\"" . $fileName . "Post.php\");\n";
$fileContent .= "} else {\n";

View File

@@ -456,11 +456,11 @@ class WebEntryEvent
$this->arrayFieldNameForException["userUid"]);
}
if ($arrayData["WE_TYPE"] === "SINGLE" && empty($arrayData["DYN_UID"])) {
if ((empty($arrayData["WE_TYPE"]) || $arrayData["WE_TYPE"] === "SINGLE") && empty($arrayData["DYN_UID"])) {
throw new Exception(G::LoadTranslation("ID_SELECT_DYNAFORM_USE_IN_CASE"));
}
if ($arrayData["WE_CALLBACK"] === "CUSTOM" && empty($arrayData["WE_CALLBACK_URL"])) {
if (isset($arrayData["WE_CALLBACK"]) && $arrayData["WE_CALLBACK"] === "CUSTOM" && empty($arrayData["WE_CALLBACK_URL"])) {
throw new Exception(G::LoadTranslation("ID_ENTER_VALID_URL"));
}
} catch (Exception $e) {

View File

@@ -814,6 +814,8 @@ if (substr( SYS_COLLECTION, 0, 8 ) === 'gulliver') {
echo $message;
die();
} else {
//Backward compatibility: Preload PmDynaform for old generated webentry files.
class_exists('PmDynaform');
\Bootstrap::registerMonologPhpUploadExecution('phpExecution', 200, 'Php Execution', $phpFile);
}