phpBB

Code Changes

File: includes/mcp/mcp_forum.php

  Unmodified   Added   Modified   Removed
Line 96Line 96
	$pagination = $phpbb_container->get('pagination');

$selected_ids = '';

	$pagination = $phpbb_container->get('pagination');

$selected_ids = '';

	if (sizeof($post_id_list) && $action != 'merge_topics')

	if (count($post_id_list) && $action != 'merge_topics')

	{
foreach ($post_id_list as $num => $post_id)
{
$selected_ids .= '&post_id_list[' . $num . ']=' . $post_id;
}
}

	{
foreach ($post_id_list as $num => $post_id)
{
$selected_ids .= '&post_id_list[' . $num . ']=' . $post_id;
}
}

	else if (sizeof($topic_id_list) && $action == 'merge_topics')

	else if (count($topic_id_list) && $action == 'merge_topics')

	{
foreach ($topic_id_list as $num => $topic_id)
{

	{
foreach ($topic_id_list as $num => $topic_id)
{

Line 221Line 221
	$db->sql_freeresult($result);

// If there is more than one page, but we have no topic list, then the start parameter is... erm... out of sync

	$db->sql_freeresult($result);

// If there is more than one page, but we have no topic list, then the start parameter is... erm... out of sync

	if (!sizeof($topic_list) && $forum_topics && $start > 0)

	if (!count($topic_list) && $forum_topics && $start > 0)

	{
redirect($url . "&i=$id&action=$action&mode=$mode");
}

// Get topic tracking info

	{
redirect($url . "&i=$id&action=$action&mode=$mode");
}

// Get topic tracking info

	if (sizeof($topic_list))

	if (count($topic_list))

	{
if ($config['load_db_lastread'])
{

	{
if ($config['load_db_lastread'])
{

Line 358Line 358
{
global $db, $user, $phpbb_log, $request;


{
global $db, $user, $phpbb_log, $request;


	if (!sizeof($topic_ids))

	if (!count($topic_ids))

	{
trigger_error('NO_TOPIC_SELECTED');
}

	{
trigger_error('NO_TOPIC_SELECTED');
}

Line 389Line 389
	}
$db->sql_freeresult($result);


	}
$db->sql_freeresult($result);


	$msg = (sizeof($topic_ids) == 1) ? $user->lang['TOPIC_RESYNC_SUCCESS'] : $user->lang['TOPICS_RESYNC_SUCCESS'];

	$msg = (count($topic_ids) == 1) ? $user->lang['TOPIC_RESYNC_SUCCESS'] : $user->lang['TOPICS_RESYNC_SUCCESS'];


$redirect = $request->variable('redirect', $user->data['session_page']);



$redirect = $request->variable('redirect', $user->data['session_page']);


Line 406Line 406
{
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request, $phpbb_dispatcher;


{
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request, $phpbb_dispatcher;


	if (!sizeof($topic_ids))

	if (!count($topic_ids))

	{
$template->assign_var('MESSAGE', $user->lang['NO_TOPIC_SELECTED']);
return;

	{
$template->assign_var('MESSAGE', $user->lang['NO_TOPIC_SELECTED']);
return;

Line 421Line 421

$all_topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');



$all_topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');


	if (!sizeof($all_topic_data) || empty($all_topic_data[$to_topic_id]))

	if (!count($all_topic_data) || empty($all_topic_data[$to_topic_id]))

	{
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
return;

	{
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
return;

Line 440Line 440
	$post_id_list	= $request->variable('post_id_list', array(0));
$start = $request->variable('start', 0);


	$post_id_list	= $request->variable('post_id_list', array(0));
$start = $request->variable('start', 0);


	if (!sizeof($post_id_list) && sizeof($topic_ids))

	if (!count($post_id_list) && count($topic_ids))

	{
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '

	{
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '

Line 455Line 455
		$db->sql_freeresult($result);
}


		$db->sql_freeresult($result);
}


	if (!sizeof($post_id_list))

	if (!count($post_id_list))

	{
$template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
return;

	{
$template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
return;