phpBB

Code Changes

File: includes/functions_posting.php

  Unmodified   Added   Modified   Removed
Line 66Line 66
		* @event core.generate_smilies_count_sql_before
* @var int forum_id Forum where smilies are generated
* @var array sql_ary Array with the SQL query

		* @event core.generate_smilies_count_sql_before
* @var int forum_id Forum where smilies are generated
* @var array sql_ary Array with the SQL query

 
		* @var string	base_url	URL for the "More smilies" link and its pagination

		* @since 3.2.9-RC1

		* @since 3.2.9-RC1

 
		* @changed 3.2.10-RC1 Added base_url

		*/
$vars = [
'forum_id',
'sql_ary',

		*/
$vars = [
'forum_id',
'sql_ary',

 
			'base_url',

		];
extract($phpbb_dispatcher->trigger_event('core.generate_smilies_count_sql_before', compact($vars)));


		];
extract($phpbb_dispatcher->trigger_event('core.generate_smilies_count_sql_before', compact($vars)));


Line 109Line 112

if ($mode == 'window')
{


if ($mode == 'window')
{

		$sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height, MIN(smiley_order) AS min_smiley_order
FROM ' . SMILIES_TABLE . '
GROUP BY smiley_url, smiley_width, smiley_height
ORDER BY min_smiley_order';







































		$sql_ary = [
'SELECT' => 's.smiley_url, MIN(s.emotion) AS emotion, MIN(s.code) AS code, s.smiley_width, s.smiley_height, MIN(s.smiley_order) AS min_smiley_order',
'FROM' => [
SMILIES_TABLE => 's',
],
'GROUP_BY' => 's.smiley_url, s.smiley_width, s.smiley_height',
'ORDER_BY' => $db->sql_quote('min_smiley_order'),
];
}
else
{
$sql_ary = [
'SELECT' => 's.*',
'FROM' => [
SMILIES_TABLE => 's',
],
'WHERE' => 's.display_on_posting = 1',
'ORDER_BY' => 's.smiley_order',
];
}

/**
* Modify the SQL query that fetches the smilies
*
* @event core.generate_smilies_modify_sql
* @var string mode Smiley mode, either window or inline
* @var int forum_id Forum where smilies are generated, or 0 if composing a private message
* @var array sql_ary Array with SQL query data
* @since 3.2.10-RC1
* @since 3.3.1-RC1
*/
$vars = [
'mode',
'forum_id',
'sql_ary',
];
extract($phpbb_dispatcher->trigger_event('core.generate_smilies_modify_sql', compact($vars)));

$sql = $db->sql_build_query('SELECT', $sql_ary);

if ($mode == 'window')
{

		$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
}
else
{

		$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
}
else
{

		$sql = 'SELECT *
FROM ' . SMILIES_TABLE . '
WHERE display_on_posting = 1
ORDER BY smiley_order';

 
		$result = $db->sql_query($sql, 3600);
}


		$result = $db->sql_query($sql, 3600);
}


Line 139Line 176
	*
* @event core.generate_smilies_modify_rowset
* @var string mode Smiley mode, either window or inline

	*
* @event core.generate_smilies_modify_rowset
* @var string mode Smiley mode, either window or inline

	* @var int		forum_id	Forum where smilies are generated

	* @var int		forum_id	Forum where smilies are generated, or 0 if composing a private message

	* @var array	smilies		Smiley rows fetched from the database
* @since 3.2.9-RC1
*/

	* @var array	smilies		Smiley rows fetched from the database
* @since 3.2.9-RC1
*/

Line 152Line 189

if (count($smilies))
{


if (count($smilies))
{

		$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();

		$root_path = $phpbb_path_helper->get_web_root_path();


foreach ($smilies as $row)
{


foreach ($smilies as $row)
{

Line 183Line 220
	* @var	string	mode			Mode of the smilies: window|inline
* @var int forum_id The forum ID we are currently in
* @var bool display_link Shall we display the "more smilies" link?

	* @var	string	mode			Mode of the smilies: window|inline
* @var int forum_id The forum ID we are currently in
* @var bool display_link Shall we display the "more smilies" link?

 
	* @var string	base_url		URL for the "More smilies" link and its pagination

	* @since 3.1.0-a1

	* @since 3.1.0-a1

 
	* @changed 3.2.10-RC1 Added base_url

	*/

	*/

	$vars = array('mode', 'forum_id', 'display_link');






	$vars = [
'mode',
'forum_id',
'display_link',
'base_url',
];

	extract($phpbb_dispatcher->trigger_event('core.generate_smilies_after', compact($vars)));

if ($mode == 'inline' && $display_link)

	extract($phpbb_dispatcher->trigger_event('core.generate_smilies_after', compact($vars)));

if ($mode == 'inline' && $display_link)

Line 212Line 256
*/
function update_post_information($type, $ids, $return_update_sql = false)
{

*/
function update_post_information($type, $ids, $return_update_sql = false)
{

	global $db;

	global $db, $phpbb_dispatcher;


if (empty($ids))
{


if (empty($ids))
{

Line 296Line 340

if (count($last_post_ids))
{


if (count($last_post_ids))
{

		$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE p.poster_id = u.user_id
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
$result = $db->sql_query($sql);





		$sql_ary = array(
'SELECT' => 'p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour',
'FROM' => array(
POSTS_TABLE => 'p',
USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('p.post_id', $last_post_ids) . '
AND p.poster_id = u.user_id',
);





 
		/**
* Event to modify the SQL array to get the post and user data from all last posts
*
* @event core.update_post_info_modify_posts_sql
* @var string type The table being updated (forum or topic)
* @var array sql_ary SQL array to get some of the last posts' data
* @since 3.3.5-RC1
*/
$vars = [
'type',
'sql_ary',
];
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars)));
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));

$rowset = array();

		while ($row = $db->sql_fetchrow($result))
{

		while ($row = $db->sql_fetchrow($result))
{

 
			$rowset[] = $row;

			$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];

			$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];

Line 312Line 377
			$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
}
$db->sql_freeresult($result);

			$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
}
$db->sql_freeresult($result);

 

/**
* Event to modify the update_sql array to add new update data for forum or topic last posts
*
* @event core.update_post_info_modify_sql
* @var string type The table being updated (forum or topic)
* @var array rowset Array with the posts data
* @var array update_sql Array with SQL data to update the forums or topics table with
* @since 3.3.5-RC1
*/
$vars = [
'type',
'rowset',
'update_sql',
];
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars)));
unset($rowset);

	}
unset($empty_forums, $ids, $last_post_ids);


	}
unset($empty_forums, $ids, $last_post_ids);


Line 338Line 420
*/
function posting_gen_topic_icons($mode, $icon_id)
{

*/
function posting_gen_topic_icons($mode, $icon_id)
{

	global $phpbb_root_path, $config, $template, $cache;

	global $phpbb_root_path, $phpbb_path_helper, $config, $template, $cache;


// Grab icons
$icons = $cache->obtain_icons();


// Grab icons
$icons = $cache->obtain_icons();

Line 350Line 432

if (count($icons))
{


if (count($icons))
{

		$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;

		$root_path = $phpbb_path_helper->get_web_root_path();


foreach ($icons as $id => $data)
{


foreach ($icons as $id => $data)
{

Line 497Line 579
				// WBMP
case IMAGETYPE_WBMP:
$new_type = ($format & IMG_WBMP) ? IMG_WBMP : false;

				// WBMP
case IMAGETYPE_WBMP:
$new_type = ($format & IMG_WBMP) ? IMG_WBMP : false;

 
				break;

// WEBP
case IMAGETYPE_WEBP:
$new_type = ($format & IMG_WEBP) ? IMG_WEBP : false;

				break;
}
}
else
{

				break;
}
}
else
{

			$new_type = array();
$go_through_types = array(IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP);

			$new_type = [];
$go_through_types = [IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP, IMG_WEBP];


foreach ($go_through_types as $check_type)
{


foreach ($go_through_types as $check_type)
{

Line 514Line 601
			}
}


			}
}


		return array(

		return [

			'gd'		=> ($new_type) ? true : false,
'format' => $new_type,
'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1

			'gd'		=> ($new_type) ? true : false,
'format' => $new_type,
'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1

		);

		];

	}


	}


	return array('gd' => false);

	return ['gd' => false];

}

/**

}

/**

Line 614Line 701

case IMG_WBMP:
$image = @imagecreatefromwbmp($source);


case IMG_WBMP:
$image = @imagecreatefromwbmp($source);

 
				break;

case IMG_WEBP:
$image = @imagecreatefromwebp($source);

				break;
}


				break;
}


Line 665Line 756

case IMG_WBMP:
imagewbmp($new_image, $destination);


case IMG_WBMP:
imagewbmp($new_image, $destination);

 
				break;

case IMG_WEBP:
imagewebp($new_image, $destination);

				break;
}


				break;
}


Line 683Line 778

try
{


try
{

		$phpbb_filesystem->phpbb_chmod($destination, CHMOD_READ | CHMOD_WRITE);

		$phpbb_filesystem->phpbb_chmod($destination, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE);

	}
catch (\phpbb\filesystem\exception\filesystem_exception $e)
{

	}
catch (\phpbb\filesystem\exception\filesystem_exception $e)
{

Line 719Line 814

/**
* Generate inline attachment entry


/**
* Generate inline attachment entry

 
 *
* @param array $attachment_data The attachment data
* @param string $filename_data The filename data (filecomment)
* @param bool $show_attach_box Whether to show the attach box
* @param mixed $forum_id The forum id to check or false if private message
* @return int

*/

*/

function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)

function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false)

{

{

	global $template, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;



	global $template, $cache, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;

$allowed_attachments = array_keys($cache->obtain_attach_extensions($forum_id)['_allowed_']);


// Some default template variables


// Some default template variables

	$template->assign_vars(array(
'S_SHOW_ATTACH_BOX' => $show_attach_box,
'S_HAS_ATTACHMENTS' => count($attachment_data),
'FILESIZE' => $config['max_filesize'],
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
));
















	$default_vars = [
'S_SHOW_ATTACH_BOX' => $show_attach_box,
'S_HAS_ATTACHMENTS' => count($attachment_data),
'FILESIZE' => $config['max_filesize'],
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? '.' . implode(',.', $allowed_attachments) : '',
];

/**
* Modify default attachments template vars
*
* @event core.modify_default_attachments_template_vars
* @var array allowed_attachments Array containing allowed attachments data
* @var array default_vars Array containing default attachments template vars
* @since 3.3.6-RC1
*/
$vars = ['allowed_attachments', 'default_vars'];
extract($phpbb_dispatcher->trigger_event('core.modify_default_attachments_template_vars', compact($vars)));

$template->assign_vars($default_vars);


if (count($attachment_data))
{


if (count($attachment_data))
{

Line 879Line 997
			$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;

$link_topic = true;

			$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;

$link_topic = true;

			$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id']);

			$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);

			$title = $topic_rows[$draft['topic_id']]['topic_title'];


			$title = $topic_rows[$draft['topic_id']]['topic_title'];


			$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);

			$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);

		}
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
{

		}
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
{

Line 1102Line 1220
		$post_subject = censor_text($post_subject);

$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];

		$post_subject = censor_text($post_subject);

$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];

		$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");

		$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");


$l_deleted_message = '';
if ($row['post_visibility'] == ITEM_DELETED)


$l_deleted_message = '';
if ($row['post_visibility'] == ITEM_DELETED)

Line 1135Line 1253
			'POST_AUTHOR'			=> get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),


			'POST_AUTHOR'			=> get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),


			'S_HAS_ATTACHMENTS'	=> (!empty($attachments[$row['post_id']])) ? true : false,
'S_FRIEND' => ($row['friend']) ? true : false,
'S_IGNORE_POST' => ($row['foe']) ? true : false,
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,

			'S_HAS_ATTACHMENTS'	=> !empty($attachments[$row['post_id']]),
'S_FRIEND' => (bool) $row['friend'],
'S_IGNORE_POST' => (bool) $row['foe'],
'L_IGNORE_POST' => $row['foe'] ? $user->lang('POST_BY_FOE', get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'S_POST_DELETED' => $row['post_visibility'] == ITEM_DELETED,

			'L_DELETE_POST'		=> $l_deleted_message,

'POST_SUBJECT' => $post_subject,

			'L_DELETE_POST'		=> $l_deleted_message,

'POST_SUBJECT' => $post_subject,

Line 1151Line 1269
			'POST_TIME'			=> $row['post_time'],
'USER_ID' => $row['user_id'],
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],

			'POST_TIME'			=> $row['post_time'],
'USER_ID' => $row['user_id'],
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],

			'U_MCP_DETAILS'		=> ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',

			'U_MCP_DETAILS'		=> ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;p=' . $row['post_id'], true, $user->session_id) : '',

			'POSTER_QUOTE'		=> ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
);


			'POSTER_QUOTE'		=> ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
);


Line 1227Line 1345
	{
$post_mode = 'delete_first_post';
}

	{
$post_mode = 'delete_first_post';
}

	else if ($data['topic_last_post_id'] == $post_id)

	else if ($data['topic_last_post_id'] <= $post_id)

	{
$post_mode = 'delete_last_post';
}

	{
$post_mode = 'delete_last_post';
}

Line 2355Line 2473
					'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',

					'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',

 
					'notification.type.forum',

				), $notification_data);
break;


				), $notification_data);
break;


Line 2373Line 2492
					'notification.type.bookmark',
'notification.type.topic',
'notification.type.post',

					'notification.type.bookmark',
'notification.type.topic',
'notification.type.post',

 
					'notification.type.forum',

				), $notification_data);
break;
}

				), $notification_data);
break;
}

Line 2443Line 2563
		}
}


		}
}


	$params = $add_anchor = '';



	$params = [];
$add_anchor = '';
$url = "{$phpbb_root_path}viewtopic.$phpEx";


if ($post_visibility == ITEM_APPROVED ||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
{


if ($post_visibility == ITEM_APPROVED ||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
{

		$params .= '&amp;t=' . $data_ary['topic_id'];


 
		if ($mode != 'post')
{

		if ($mode != 'post')
{

			$params .= '&amp;p=' . $data_ary['post_id'];

			$params['p'] = $data_ary['post_id'];

			$add_anchor = '#p' . $data_ary['post_id'];

			$add_anchor = '#p' . $data_ary['post_id'];

 
		}
else
{
$params['t'] = $data_ary['topic_id'];

		}
}
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
{

		}
}
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
{

		$params .= '&amp;t=' . $data_ary['topic_id'];






		$params['t'] = $data_ary['topic_id'];
}
else
{
$url = "{$phpbb_root_path}viewforum.$phpEx";
$params['f'] = $data_ary['forum_id'];

	}


	}


	$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
$url = append_sid($url, 'f=' . $data_ary['forum_id'] . $params) . $add_anchor;

	$url = append_sid($url, $params) . $add_anchor;



$poll = $poll_ary;
$data = $data_ary;


$poll = $poll_ary;
$data = $data_ary;

Line 2524Line 2652
*				- 'topic_last_poster_name'
* - 'topic_last_poster_colour'
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().

*				- 'topic_last_poster_name'
* - 'topic_last_poster_colour'
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().

* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&amptopic_id=2&ampp=3#p3

* @return string An URL to the bumped topic, example: ./viewtopic.php?p=3#p3

*/
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
{

*/
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
{

Line 2613Line 2741
		$post_data['topic_title']
));


		$post_data['topic_title']
));


	$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";

	$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";


return $url;
}


return $url;
}

Line 2744Line 2872
					$delete_reason
));


					$delete_reason
));


				$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";








				if ($next_post_id > 0)
{
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
}
else
{
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id");
}

				$message = $user->lang['POST_DELETED'];

if (!$request->is_ajax())

				$message = $user->lang['POST_DELETED'];

if (!$request->is_ajax())

Line 2785Line 2920
				$s_hidden_fields['delete_permanent'] = '1';
}


				$s_hidden_fields['delete_permanent'] = '1';
}


			confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');

			confirm_box(false, [$l_confirm, 1], build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');

		}
}


		}
}