phpBB

Code Changes

File: phpbb/filesystem/filesystem.php

  Unmodified   Added   Modified   Removed
Line 171Line 171
				continue;
}


				continue;
}


			if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '.' && $filtered[sizeof($filtered) - 1] !== '..')

			if ($part === '..' && !empty($filtered) && $filtered[count($filtered) - 1] !== '.' && $filtered[count($filtered) - 1] !== '..')

			{
array_pop($filtered);
}

			{
array_pop($filtered);
}

Line 671Line 671
				else if (function_exists('debug_backtrace'))
{
$call_stack = debug_backtrace(0);

				else if (function_exists('debug_backtrace'))
{
$call_stack = debug_backtrace(0);

					$this->working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[sizeof($call_stack) - 1]['file']));

					$this->working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[count($call_stack) - 1]['file']));

				}
else
{

				}
else
{

Line 683Line 683
					//$dir_parts = explode(DIRECTORY_SEPARATOR, __DIR__);
//$namespace_parts = explode('\\', trim(__NAMESPACE__, '\\'));


					//$dir_parts = explode(DIRECTORY_SEPARATOR, __DIR__);
//$namespace_parts = explode('\\', trim(__NAMESPACE__, '\\'));


					//$namespace_part_count = sizeof($namespace_parts);

					//$namespace_part_count = count($namespace_parts);


// Check if we still loading from root
//if (array_slice($dir_parts, -$namespace_part_count) === $namespace_parts)


// Check if we still loading from root
//if (array_slice($dir_parts, -$namespace_part_count) === $namespace_parts)

Line 807Line 807
				array_pop($resolved);
$resolved_path = false;
}

				array_pop($resolved);
$resolved_path = false;
}

			else if ($path_part === '..' && !empty($resolved) && !in_array($resolved[sizeof($resolved) - 1], array('.', '..')))

			else if ($path_part === '..' && !empty($resolved) && !in_array($resolved[count($resolved) - 1], array('.', '..')))

			{
array_pop($resolved);
$resolved_path = false;

			{
array_pop($resolved);
$resolved_path = false;