|
|
|
@ -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']); |
|
|
|
|