Changeset 434 for trunk/forms.php
- Timestamp:
- Oct 12, 2012, 9:03:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forms.php
r433 r434 26 26 ); 27 27 foreach($this->Definition['Items'] as $Index => $Item) 28 if(!array_key_exists($Item['Type'], $FormTypes) or 29 (array_key_exists($Item['Type'], $FormTypes) and ($FormTypes[$Item['Type']]['Type'] != 'ManyToOne'))) 28 30 { 29 31 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; … … 64 66 if($Context != '') $Context = $Context.'-'; 65 67 foreach($this->Definition['Items'] as $Index => $Item) 68 if(!array_key_exists($Item['Type'], $FormTypes) or 69 (array_key_exists($Item['Type'], $FormTypes) and ($FormTypes[$Item['Type']]['Type'] != 'ManyToOne'))) 66 70 { 67 71 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default']; … … 154 158 function LoadValuesFromDatabase($Id) 155 159 { 156 global $Database ;160 global $Database, $FormTypes; 157 161 158 162 $DbResult = $Database->query('SELECT T.* FROM '.$this->Definition['Table'].' AS T WHERE T.Id='.$Id); 159 163 $DbRow = $DbResult->fetch_array(); 160 164 foreach($this->Definition['Items'] as $Index => $Item) 165 if(!array_key_exists($Item['Type'], $FormTypes) or 166 (array_key_exists($Item['Type'], $FormTypes) and ($FormTypes[$Item['Type']]['Type'] != 'ManyToOne'))) 161 167 { 162 168 $this->Values[$Index] = $DbRow[$Index];
Note:
See TracChangeset
for help on using the changeset viewer.