PFAHandler.php - read_from_db():

- also include column in SELECT if display_in_form != 0
- call read_from_db_postprocess() hook before returning data


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1287 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 13 years ago
parent 0f0b7d336c
commit 7773c537cc

@ -207,7 +207,7 @@ class PFAHandler {
# get list of fields to display # get list of fields to display
$extrafrom = ""; $extrafrom = "";
foreach($this->struct as $key=>$row) { foreach($this->struct as $key=>$row) {
if ( $row['display_in_list'] != 0 && $row['not_in_db'] == 0 ) { if ( ($row['display_in_list'] != 0 || $row['display_in_form'] != 0) && $row['not_in_db'] == 0 ) {
if ($row['select'] != '') $key = $row['select']; if ($row['select'] != '') $key = $row['select'];
if ($row['extrafrom'] != '') $extrafrom = $extrafrom . " " . $row['extrafrom'] . "\n"; if ($row['extrafrom'] != '') $extrafrom = $extrafrom . " " . $row['extrafrom'] . "\n";
@ -245,9 +245,15 @@ class PFAHandler {
} }
} }
$db_result = $this->read_from_db_postprocess($db_result);
return $db_result; return $db_result;
} }
protected function read_from_db_postprocess($db_result) {
return $db_result;
}
/** /**
* get the values of an item * get the values of an item
* @param array or string $condition * @param array or string $condition

Loading…
Cancel
Save