From 7773c537cc63fcf8eee92f58eb582d7f356fcc7f Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 27 Nov 2011 22:03:34 +0000 Subject: [PATCH] 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 --- model/PFAHandler.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/model/PFAHandler.php b/model/PFAHandler.php index b2f0053a..2ccc4306 100644 --- a/model/PFAHandler.php +++ b/model/PFAHandler.php @@ -207,7 +207,7 @@ class PFAHandler { # get list of fields to display $extrafrom = ""; 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['extrafrom'] != '') $extrafrom = $extrafrom . " " . $row['extrafrom'] . "\n"; @@ -245,9 +245,15 @@ class PFAHandler { } } + $db_result = $this->read_from_db_postprocess($db_result); return $db_result; } + protected function read_from_db_postprocess($db_result) { + return $db_result; + } + + /** * get the values of an item * @param array or string $condition