auto-format all files; add table-definitions to test-bootstrap file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -20,26 +20,22 @@
|
||||
/**
|
||||
* Returns correct user salutation, either "Firstname Name" or "Company"
|
||||
*
|
||||
* @param array An array with keys firstname, name and company
|
||||
* @param
|
||||
* array An array with keys firstname, name and company
|
||||
* @return string The correct salutation
|
||||
*
|
||||
*
|
||||
* @author Florian Lippert <flo@syscp.org>
|
||||
*/
|
||||
|
||||
function getCorrectUserSalutation($userinfo)
|
||||
{
|
||||
$returnval = '';
|
||||
|
||||
if(isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company']))
|
||||
{
|
||||
|
||||
if (isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company'])) {
|
||||
// Always prefer firstname name
|
||||
|
||||
if($userinfo['company'] != '' && $userinfo['name'] == '' && $userinfo['firstname'] == '')
|
||||
{
|
||||
if ($userinfo['company'] != '' && $userinfo['name'] == '' && $userinfo['firstname'] == '') {
|
||||
$returnval = $userinfo['company'];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$returnval = $userinfo['firstname'] . ' ' . $userinfo['name'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user