phpBB

Code Changes

File: includes/ucp/ucp_pm_viewfolder.php

  Unmodified   Added   Modified   Removed
Line 31Line 31
	$submit_export = (isset($_POST['submit_export'])) ? true : false;

$folder_info = get_pm_from($folder_id, $folder, $user->data['user_id']);

	$submit_export = (isset($_POST['submit_export'])) ? true : false;

$folder_info = get_pm_from($folder_id, $folder, $user->data['user_id']);

 

add_form_key('ucp_pm_view_folder');


if (!$submit_export)
{


if (!$submit_export)
{

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


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


		$color_rows = array('marked', 'replied');

		$color_rows = array('message_reported', 'marked', 'replied');


$_module = new p_master();
$_module->list_modules('ucp');


$_module = new p_master();
$_module->list_modules('ucp');

Line 114Line 116
		);

// Okay, lets dump out the page ...

		);

// Okay, lets dump out the page ...

		if (sizeof($folder_info['pm_list']))

		if (count($folder_info['pm_list']))

		{
$address_list = array();


		{
$address_list = array();


Line 138Line 140
				$row_indicator = '';
foreach ($color_rows as $var)
{

				$row_indicator = '';
foreach ($color_rows as $var)
{

					if (($var != 'friend' && $var != 'foe' && $row['pm_' . $var])

					if (($var !== 'friend' && $var !== 'foe' && $row[($var === 'message_reported') ? $var : "pm_{$var}"])

						||

						||

						(($var == 'friend' || $var == 'foe') && isset(${$var}[$row['author_id']]) && ${$var}[$row['author_id']]))

						(($var === 'friend' || $var === 'foe') && isset(${$var}[$row['author_id']]) && ${$var}[$row['author_id']]))

					{
$row_indicator = $var;
break;

					{
$row_indicator = $var;
break;

Line 196Line 198
		$export_type = $request->variable('export_option', '');
$enclosure = $request->variable('enclosure', '');
$delimiter = $request->variable('delimiter', '');

		$export_type = $request->variable('export_option', '');
$enclosure = $request->variable('enclosure', '');
$delimiter = $request->variable('delimiter', '');

 

if (!check_form_key('ucp_pm_view_folder'))
{
trigger_error('FORM_INVALID');
}


if ($export_type == 'CSV' && ($delimiter === '' || $enclosure === ''))
{


if ($export_type == 'CSV' && ($delimiter === '' || $enclosure === ''))
{

Line 236Line 243
				$_types = array('u', 'g');
foreach ($_types as $ug_type)
{

				$_types = array('u', 'g');
foreach ($_types as $ug_type)
{

					if (isset($address_temp[$message_id][$ug_type]) && sizeof($address_temp[$message_id][$ug_type]))

					if (isset($address_temp[$message_id][$ug_type]) && count($address_temp[$message_id][$ug_type]))

					{
if (!isset($address[$message_id][$ug_type]))
{

					{
if (!isset($address[$message_id][$ug_type]))
{

Line 269Line 276

// There is the chance that all recipients of the message got deleted. To avoid creating
// exports without recipients, we add a bogus "undisclosed recipient".


// There is the chance that all recipients of the message got deleted. To avoid creating
// exports without recipients, we add a bogus "undisclosed recipient".

				if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
!(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))

				if (!(isset($address[$message_id]['g']) && count($address[$message_id]['g'])) &&
!(isset($address[$message_id]['u']) && count($address[$message_id]['u'])))

				{
$address[$message_id]['u'] = array();
$address[$message_id]['u']['to'] = array();

				{
$address[$message_id]['u'] = array();
$address[$message_id]['u']['to'] = array();