IMPROVEMENT

This commit is contained in:
Roly Rudy Gutierrez Pinto
2015-02-25 11:13:30 -04:00
parent b7fbaffc64
commit c1c254f5ce

View File

@@ -29,9 +29,11 @@ class pmDynaform
$dynContent = G::json_decode($this->record["DYN_CONTENT"]);
if (isset($dynContent->items)) {
$this->items = $dynContent->items[0]->items;
for($i=0; $i<count($this->items); $i++){
for($j=0; $j<count($this->items[$i]); $j++){
if($this->items[$i][$j]->required == 1){
$n = count($this->items);
for ($i = 0; $i < $n; $i++) {
$m = count($this->items[$i]);
for ($j = 0; $j < $m; $j++) {
if (isset($this->items[$i][$j]->required) && $this->items[$i][$j]->required == 1) {
array_push($this->arrayFieldRequired, $this->items[$i][$j]->name);
}
}
@@ -77,7 +79,7 @@ class pmDynaform
}
//query
$arrayVariable = array();
if ($row["VAR_DBCONNECTION"] !== "none") {
if ($row["VAR_DBCONNECTION"] !== "none" && $row["VAR_SQL"] !== "") {
$cnn = Propel::getConnection($row["VAR_DBCONNECTION"]);
$stmt = $cnn->createStatement();
$rs = $stmt->executeQuery(\G::replaceDataField($row["VAR_SQL"], $arrayVariable), \ResultSet::FETCHMODE_NUM);