From a607738c61531544653fb9893674fb6db5cb0375 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 20 Apr 2010 12:16:34 +0000 Subject: [PATCH] "missing order account_fullname for sql" --- phpgwapi/inc/class.accounts_sql.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index fa9b134259..89de3a9b7d 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -328,7 +328,14 @@ class accounts_sql 'account_lastname' => 'n_family', 'account_email' => 'contact_email', ); - if (isset($order2contact[$order])) $order = $order2contact[$order]; + + // fetch order of account_fullname from common::display_fullname + if (strpos($order,'account_fullname') !== false) + { + $order = str_replace('account_fullname',preg_replace('/[ ,]+/',',',str_replace(array('[',']'),'', + common::display_fullname('account_lid','account_firstname','account_lastname'))),$order); + } + $order = str_replace(array_keys($order2contact),array_values($order2contact),$order); if ($sort) $order .= ' '.$sort; switch($_type)