phpBB

Code Changes

File: includes/ucp/ucp_pm_options.php

  Unmodified   Added   Modified   Removed
Line 29Line 29
	// Change "full folder" setting - what to do if folder is full
if (isset($_POST['fullfolder']))
{

	// Change "full folder" setting - what to do if folder is full
if (isset($_POST['fullfolder']))
{

		check_form_key('ucp_pm_options', $config['form_token_lifetime'], $redirect_url);





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


		$full_action = request_var('full_action', 0);

$set_folder_id = 0;

		$full_action = request_var('full_action', 0);

$set_folder_id = 0;

Line 326Line 330
			if ($row)
{
trigger_error('RULE_ALREADY_DEFINED');

			if ($row)
{
trigger_error('RULE_ALREADY_DEFINED');

 
			}

// Prevent users from flooding the rules table
$sql = 'SELECT COUNT(rule_id) AS num_rules
FROM ' . PRIVMSGS_RULES_TABLE . '
WHERE user_id = ' . (int) $user->data['user_id'];
$result = $db->sql_query($sql);
$num_rules = (int) $db->sql_fetchfield('num_rules');
$db->sql_freeresult($result);

if ($num_rules >= 5000)
{
trigger_error('RULE_LIMIT_REACHED');

			}

$sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary);
$db->sql_query($sql);


			}

$sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary);
$db->sql_query($sql);


			// Update users message rules

			// Set the user_message_rules bit

			$sql = 'UPDATE ' . USERS_TABLE . '
SET user_message_rules = 1
WHERE user_id = ' . $user->data['user_id'];

			$sql = 'UPDATE ' . USERS_TABLE . '
SET user_message_rules = 1
WHERE user_id = ' . $user->data['user_id'];

Line 378Line 395
			$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);


			$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);


			// Update users message rules

			// Unset the user_message_rules bit

			if (!$row)
{
$sql = 'UPDATE ' . USERS_TABLE . '

			if (!$row)
{
$sql = 'UPDATE ' . USERS_TABLE . '