validate in pmdynaform

This commit is contained in:
Ronald Quenta
2015-10-12 11:35:26 -04:00
parent 83151c81eb
commit 920365b7c0
2 changed files with 2 additions and 2 deletions

View File

@@ -2958,7 +2958,7 @@ class Bootstrap
*/ */
public static function setLanguage() public static function setLanguage()
{ {
$acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $acceptLanguage = isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])?$_SERVER['HTTP_ACCEPT_LANGUAGE']:'en';
if (!defined('SYS_LANG')) { if (!defined('SYS_LANG')) {
$Translations = new \Translation; $Translations = new \Translation;
$translationsTable = $Translations->getTranslationEnvironments(); $translationsTable = $Translations->getTranslationEnvironments();

View File

@@ -452,7 +452,7 @@ class pmDynaform
if (isset($this->fields["STEP_MODE"]) && $this->fields["STEP_MODE"] === "VIEW" && isset($json->mode)) { if (isset($this->fields["STEP_MODE"]) && $this->fields["STEP_MODE"] === "VIEW" && isset($json->mode)) {
$json->mode = "view"; $json->mode = "view";
} }
if ($key === "type" && ($value === "form")) { if ($key === "type" && ($value === "form") && $this->records != null) {
foreach ($this->records as $ri) { foreach ($this->records as $ri) {
if ($json->id === $ri["DYN_UID"] && !isset($json->jsonUpdate)) { if ($json->id === $ri["DYN_UID"] && !isset($json->jsonUpdate)) {
$jsonUpdate = json_decode($ri["DYN_CONTENT"]); $jsonUpdate = json_decode($ri["DYN_CONTENT"]);