From fbd1057a178e7d695f69bc84a15641b0e39b3e02 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Thu, 14 Dec 2017 08:51:56 +0100 Subject: [PATCH] Minor - show "complete_name_with_username" in message form - Format code --- main/messages/new_message.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main/messages/new_message.php b/main/messages/new_message.php index 198ed57066..491f5794bd 100755 --- a/main/messages/new_message.php +++ b/main/messages/new_message.php @@ -66,9 +66,9 @@ function show_compose_to_any($user_id) function show_compose_reply_to_message($message_id, $receiver_id) { - $table_message = Database::get_main_table(TABLE_MESSAGE); + $table = Database::get_main_table(TABLE_MESSAGE); $query = "SELECT user_sender_id - FROM $table_message + FROM $table WHERE user_receiver_id = ".intval($receiver_id)." AND id='".intval($message_id)."';"; $result = Database::query($query); $row = Database::fetch_array($result, 'ASSOC'); @@ -79,7 +79,7 @@ function show_compose_reply_to_message($message_id, $receiver_id) } $userInfo = api_get_user_info($row['user_sender_id']); $default['users'] = array($row['user_sender_id']); - $html = manageForm($default, null, $userInfo['complete_name']); + $html = manageForm($default, null, $userInfo['complete_name_with_username']); return $html; } @@ -98,10 +98,10 @@ function show_compose_to_user($receiver_id) /** * @param $default * @param null $select_from_user_list - * @param null $sent_to + * @param string $sent_to * @return string */ -function manageForm($default, $select_from_user_list = null, $sent_to = null) +function manageForm($default, $select_from_user_list = null, $sent_to = '') { $group_id = isset($_REQUEST['group_id']) ? intval($_REQUEST['group_id']) : null; $message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null; @@ -169,8 +169,8 @@ function manageForm($default, $select_from_user_list = null, $sent_to = null) if (isset($_GET['re_id'])) { $message_reply_info = MessageManager::get_message_by_id($_GET['re_id']); $default['title'] = get_lang('MailSubjectReplyShort')." ".$message_reply_info['title']; - $form->addElement('hidden', 're_id', intval($_GET['re_id'])); - $form->addElement('hidden', 'save_form', 'save_form'); + $form->addHidden('re_id', intval($_GET['re_id'])); + $form->addHidden('save_form', 'save_form'); // Adding reply mail $user_reply_info = api_get_user_info($message_reply_info['user_sender_id']);