Откуда мод взялся - не помню
Но тем не менее -
stylesprosilvertemplatemerge_posts_confirm.html
includesmcpmcp_topic.php
$topic_info = get_topic_data(array($topic_id));
$topic_info = $topic_info[$topic_id];
$merge_posts_reason = utf8_normalize_nfc(request_var('merge_posts_reason', '', true));
send_pm_to_posts_authors($post_id_list,$merge_posts_reason,$subject);
confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields);
confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields,'merge_posts_confirm.html');
if (confirm_box(true))
{
$to_forum_id = $topic_data['forum_id'];
move_posts($post_id_list, $to_topic_id);
$merge_posts_reason = utf8_normalize_nfc(request_var('merge_posts_reason', '', true));
send_pm_to_posts_authors($post_id_list,$merge_posts_reason,$topic_data['topic_title']);
confirm_box(false, 'MERGE_POSTS', $s_hidden_fields);
confirm_box(false, 'MERGE_POSTS', $s_hidden_fields,'merge_posts_confirm.html');
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
}
function send_pm_to_posts_authors($post_ids, $merge_posts_reason, $topic_title_to)
{
global $db, $user, $phpbb_root_path,$phpEx;
$sql = 'SELECT poster_id, min(post_id) post_id
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('post_id', $post_ids). '
GROUP BY poster_id';
$result = $db->sql_query($sql);
$list_to_pm = array();
while ($row = $db->sql_fetchrow($result))
{
$list_to_pm[$row['post_id']] = array('u' => array($row['poster_id'] => 'to'));
}
$db->sql_freeresult($result);
if (sizeof($list_to_pm))
{
include_once($phpbb_root_path . 'common.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
$allow_bbcode = $allow_smilies = true;
$allow_urls = true;
$message = '';
foreach ($list_to_pm as $post_id => $poster_data)
{
$post_url = generate_board_url()."/viewtopic.$phpEx?p=$post_id#p$post_id";
$message = sprintf($user->lang['PM_POSTS_MERGE'] , $topic_title_to, $merge_posts_reason,$post_url);
generate_text_for_storage($message, $uid, $bitfield, $m_flags, $allow_bbcode, $allow_urls, $allow_smilies);
$pm_data = array(
'address_list' => $poster_data,
'from_user_id' => $user->data['user_id'],
'from_user_ip' => $user->data['user_ip'],
'from_username' => $user->data['username'],
'enable_sig' => true,
'enable_bbcode' => $allow_bbcode,
'enable_smilies' => $allow_smilies,
'enable_urls' => $allow_urls,
'icon_id' => 0,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'message' => $message,
);
$subject = $user->lang['PM_POSTS_MERGE_TITLE'];
submit_pm('post', $subject, $pm_data, false);
}
unset($list_to_pm);
}
}
languagerumcp.php
'MERGE_POSTS' => 'Перенести сообщения',
'MERGE_POSTS_REASON' => 'Укажите причину переноса сообщений',
'PM_REPORT_CLOSED_SUCCESS' => 'Выбранная жалоба на личное сообщение успешно закрыта.',
'PM_POSTS_MERGE_TITLE' => 'Ваши сообщения перенесены!',
'PM_POSTS_MERGE' => 'Ваши сообщения перенесены в тему «%s».<br /> Причина переноса: «%s».
Вернуться в 450 модов движка форумов phpBB (до версии 3.0.14)