phpBB

Code Changes

File: includes/mcp/mcp_topic.php

  Unmodified   Added   Modified   Removed
Line 36Line 36
	$topic_id = $request->variable('t', 0);
$topic_info = phpbb_get_topic_data(array($topic_id), false, true);


	$topic_id = $request->variable('t', 0);
$topic_info = phpbb_get_topic_data(array($topic_id), false, true);


	if (!sizeof($topic_info))

	if (!count($topic_info))

	{
trigger_error('TOPIC_NOT_EXIST');
}

	{
trigger_error('TOPIC_NOT_EXIST');
}

Line 97Line 97
		include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);


		include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);


		if (!sizeof($post_id_list))

		if (!count($post_id_list))

		{
trigger_error('NO_POST_SELECTED');
}

		{
trigger_error('NO_POST_SELECTED');
}

Line 172Line 172

// Grab extensions
$attachments = array();


// Grab extensions
$attachments = array();

	if ($topic_info['topic_attachment'] && sizeof($post_id_list))

	if ($topic_info['topic_attachment'] && count($post_id_list))

	{
// Get attachments...
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))

	{
// Get attachments...
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))

Line 326Line 326
		{
$to_topic_info = phpbb_get_topic_data(array($to_topic_id), 'm_merge');


		{
$to_topic_info = phpbb_get_topic_data(array($to_topic_id), 'm_merge');


			if (!sizeof($to_topic_info))

			if (!count($to_topic_info))

			{
$to_topic_id = 0;
}

			{
$to_topic_id = 0;
}

Line 408Line 408
	$forum_id		= $request->variable('forum_id', 0);
$start = $request->variable('start', 0);


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


	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;

Line 422Line 422
	$post_id = $post_id_list[0];
$post_info = phpbb_get_post_data(array($post_id));


	$post_id = $post_id_list[0];
$post_info = phpbb_get_post_data(array($post_id));


	if (!sizeof($post_info))

	if (!count($post_info))

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

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

Line 446Line 446

$forum_info = phpbb_get_forum_data(array($to_forum_id), 'f_post');



$forum_info = phpbb_get_forum_data(array($to_forum_id), 'f_post');


	if (!sizeof($forum_info))

	if (!count($forum_info))

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

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

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


			$db->sql_freeresult($result);
}


		if (!sizeof($post_id_list))

		if (!count($post_id_list))

		{
trigger_error('NO_POST_SELECTED');
}

		{
trigger_error('NO_POST_SELECTED');
}

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


		}
$db->sql_freeresult($result);


		if (sizeof($sql_ary))

		if (count($sql_ary))

		{
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary);
}

		{
$db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary);
}

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


		}
$db->sql_freeresult($result);


		if (sizeof($sql_ary))

		if (count($sql_ary))

		{
$db->sql_multi_insert(BOOKMARKS_TABLE, $sql_ary);
}

		{
$db->sql_multi_insert(BOOKMARKS_TABLE, $sql_ary);
}

Line 690Line 690

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



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


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

	if (!count($topic_data) || empty($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 707Line 707
	$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))

	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;