From 02c9cec29805a790fa82a3c61ab6fd9242e96e55 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 17 May 2003 20:34:55 +0000 Subject: [PATCH] fixed display_fullname for missing parts of the name merged kneckes ldap-change too --- phpgwapi/inc/class.common.inc.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 126202219f..f9afa11447 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -426,20 +426,27 @@ $a[] = $firstname; } + $name = ''; switch($display) { case 'all': - $name = '['.$lid.'] '; + if ($lid) + { + $name = '['.$lid.'] '; + } // fall-through case 'lastname': $name .= implode(', ',$a); break; case 'firstall': - $name = $firstname . ' ' . $lastname . ' ['.$lid.']'; - break; + if ($lid) + { + $name = ' ['.$lid.']'; + } + // fall-through case 'firstname': default: - $name = $firstname . ' ' . $lastname; + $name = $firstname . ' ' . $lastname . $name; break; } return $name; @@ -1785,17 +1792,17 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info' */ function encrypt_password($password) { - if($GLOBALS['phpgw_info']['server']['ldap_encryption_type'] == 'DES') + if (strtolower($GLOBALS['phpgw_info']['server']['ldap_encryption_type']) == 'des') { $salt = $this->randomstring(2); $e_password = $this->des_cryptpasswd($password, $salt); } - if($GLOBALS['phpgw_info']['server']['ldap_encryption_type'] == 'MD5') + elseif (strtolower($GLOBALS['phpgw_info']['server']['ldap_encryption_type']) == 'md5') { $salt = $this->randomstring(8); $e_password = $this->md5_cryptpasswd($password, $salt); } - if($GLOBALS['phpgw_info']['server']['ldap_encryption_type'] == 'SHA') + elseif(strtolower($GLOBALS['phpgw_info']['server']['ldap_encryption_type']) == 'sha') { if(@function_exists('mhash')) {