phpBB

Code Changes

File: includes/functions.php

  Unmodified   Added   Modified   Removed
Line 2703Line 2703
		}

// Determine first occurrence, since in values the equal sign is allowed

		}

// Determine first occurrence, since in values the equal sign is allowed

		$key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))));

		$key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))), ENT_COMPAT);

		$value = trim(substr($line, $delim_pos + 1));

if (in_array($value, array('off', 'false', '0')))

		$value = trim(substr($line, $delim_pos + 1));

if (in_array($value, array('off', 'false', '0')))

Line 2720Line 2720
		}
else if (($value[0] == "'" && $value[strlen($value) - 1] == "'") || ($value[0] == '"' && $value[strlen($value) - 1] == '"'))
{

		}
else if (($value[0] == "'" && $value[strlen($value) - 1] == "'") || ($value[0] == '"' && $value[strlen($value) - 1] == '"'))
{

			$value = htmlspecialchars(substr($value, 1, strlen($value)-2));

			$value = htmlspecialchars(substr($value, 1, strlen($value)-2), ENT_COMPAT);

		}
else
{

		}
else
{

			$value = htmlspecialchars($value);

			$value = htmlspecialchars($value, ENT_COMPAT);

		}

$parsed_items[$key] = $value;

		}

$parsed_items[$key] = $value;

Line 2757Line 2757
	foreach ($backtrace as $trace)
{
// Strip the current directory from path

	foreach ($backtrace as $trace)
{
// Strip the current directory from path

		$trace['file'] = (empty($trace['file'])) ? '(not given by php)' : htmlspecialchars(phpbb_filter_root_path($trace['file']));

		$trace['file'] = (empty($trace['file'])) ? '(not given by php)' : htmlspecialchars(phpbb_filter_root_path($trace['file']), ENT_COMPAT);

		$trace['line'] = (empty($trace['line'])) ? '(not given by php)' : $trace['line'];

// Only show function arguments for include etc.

		$trace['line'] = (empty($trace['line'])) ? '(not given by php)' : $trace['line'];

// Only show function arguments for include etc.

Line 2765Line 2765
		$argument = '';
if (!empty($trace['args'][0]) && in_array($trace['function'], array('include', 'require', 'include_once', 'require_once')))
{

		$argument = '';
if (!empty($trace['args'][0]) && in_array($trace['function'], array('include', 'require', 'include_once', 'require_once')))
{

			$argument = htmlspecialchars(phpbb_filter_root_path($trace['args'][0]));

			$argument = htmlspecialchars(phpbb_filter_root_path($trace['args'][0]), ENT_COMPAT);

		}

$trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];

		}

$trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];

Line 2775Line 2775
		$output .= '<b>FILE:</b> ' . $trace['file'] . '<br />';
$output .= '<b>LINE:</b> ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '<br />';


		$output .= '<b>FILE:</b> ' . $trace['file'] . '<br />';
$output .= '<b>LINE:</b> ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '<br />';


		$output .= '<b>CALL:</b> ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']);

		$output .= '<b>CALL:</b> ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function'], ENT_COMPAT);

		$output .= '(' . (($argument !== '') ? "'$argument'" : '') . ')<br />';
}
$output .= '</div>';

		$output .= '(' . (($argument !== '') ? "'$argument'" : '') . ')<br />';
}
$output .= '</div>';

Line 3240Line 3240
	{
if ($phpbb_filesystem)
{

	{
if ($phpbb_filesystem)
{

			$root_path = $phpbb_filesystem->realpath(dirname(__FILE__) . '/../');

			$root_path = $phpbb_filesystem->realpath(__DIR__ . '/../');

		}
else
{
$filesystem = new \phpbb\filesystem\filesystem();

		}
else
{
$filesystem = new \phpbb\filesystem\filesystem();

			$root_path = $filesystem->realpath(dirname(__FILE__) . '/../');

			$root_path = $filesystem->realpath(__DIR__ . '/../');

		}
}


		}
}


Line 4049Line 4049
		'S_ENABLE_FEEDS_TOPICS_ACTIVE'	=> ($config['feed_topics_active']) ? true : false,
'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false,


		'S_ENABLE_FEEDS_TOPICS_ACTIVE'	=> ($config['feed_topics_active']) ? true : false,
'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false,


		'S_LOAD_UNREADS'			=> ($config['load_unreads_search'] && ($config['load_anon_lastread'] || $user->data['is_registered'])) ? true : false,

		'S_LOAD_UNREADS'			=> (bool) $config['load_unreads_search'] && ($config['load_anon_lastread'] || !empty($user->data['is_registered'])),


'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),



'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),


Line 4405Line 4405
	}
else
{

	}
else
{

		return 'mailto:' . htmlspecialchars($config['board_contact']);

		return 'mailto:' . htmlspecialchars($config['board_contact'], ENT_COMPAT);

	}
}


	}
}