phpBB

Code Changes

File: includes/ucp/ucp_attachments.php

  Unmodified   Added   Modified   Removed
Line 38Line 38
		$delete		= (isset($_POST['delete'])) ? true : false;
$delete_ids = array_keys($request->variable('attachment', array(0)));


		$delete		= (isset($_POST['delete'])) ? true : false;
$delete_ids = array_keys($request->variable('attachment', array(0)));


		if ($delete && sizeof($delete_ids))

		if ($delete && count($delete_ids))

		{
// Validate $delete_ids...
$sql = 'SELECT attach_id

		{
// Validate $delete_ids...
$sql = 'SELECT attach_id

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


			$db->sql_freeresult($result);
}


		if ($delete && sizeof($delete_ids))

		if ($delete && count($delete_ids))

		{
$s_hidden_fields = array(
'delete' => 1

		{
$s_hidden_fields = array(
'delete' => 1

Line 75Line 75
				unset($attachment_manager);

meta_refresh(3, $this->u_action);

				unset($attachment_manager);

meta_refresh(3, $this->u_action);

				$message = ((sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');

				$message = ((count($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');

				trigger_error($message);
}
else
{

				trigger_error($message);
}
else
{

				confirm_box(false, (sizeof($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields));

				confirm_box(false, (count($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields));

			}
}


			}
}