projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1121ea
)
Support boolean fields alias checkboxes
author
Joey Schulze
<joey@infodrom.org>
Thu, 25 Feb 2010 16:11:09 +0000
(17:11 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Thu, 25 Feb 2010 16:11:09 +0000
(17:11 +0100)
ajax/ajax.php
patch
|
blob
|
history
diff --git
a/ajax/ajax.php
b/ajax/ajax.php
index
a0580ad
..
a709a03
100644
(file)
--- a/
ajax/ajax.php
+++ b/
ajax/ajax.php
@@
-13,8
+13,10
@@
function fetch($mask)
$row = pg_fetch_assoc($sth);
- foreach ($mask['edit']['list'] as $field => $info)
- if (array_key_exists('format', $info))
+ foreach ($mask['edit'] as $field => $info)
+ if ($info['type'] == 'boolean')
+ $row[$field] = $row[$field]?true:false;
+ elseif (array_key_exists('format', $info))
$row[$field] = sprintf($info['format'], $row[$field]);
return $row;