mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-24 09:30:34 +01:00
[ticket/15253] Fix code
PHPBB3-15253
This commit is contained in:
parent
a01d33b1fa
commit
436410761d
@ -96,11 +96,6 @@ function phpbb_check_hash($password, $hash)
|
||||
*/
|
||||
function phpbb_clean_path($path)
|
||||
{
|
||||
if (!class_exists('\phpbb\filesystem\helper'))
|
||||
{
|
||||
require($phpbb_root_path . 'phpbb/filesystem/helper.' . $phpEx);
|
||||
}
|
||||
|
||||
return \phpbb\filesystem\helper::clean_path($path);
|
||||
}
|
||||
|
||||
@ -443,11 +438,6 @@ function phpbb_is_writable($file)
|
||||
*/
|
||||
function phpbb_is_absolute($path)
|
||||
{
|
||||
if (!class_exists('\phpbb\filesystem\helper'))
|
||||
{
|
||||
require($phpbb_root_path . 'phpbb/filesystem/helper.' . $phpEx);
|
||||
}
|
||||
|
||||
return \phpbb\filesystem\helper::is_absolute_path($path);
|
||||
}
|
||||
|
||||
@ -458,11 +448,6 @@ function phpbb_is_absolute($path)
|
||||
*/
|
||||
function phpbb_realpath($path)
|
||||
{
|
||||
if (!class_exists('\phpbb\filesystem\helper'))
|
||||
{
|
||||
require($phpbb_root_path . 'phpbb/filesystem/helper.' . $phpEx);
|
||||
}
|
||||
|
||||
return \phpbb\filesystem\helper::realpath($path);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,6 @@ use Symfony\Component\Filesystem\Filesystem as symfony_filesystem;
|
||||
|
||||
class helper
|
||||
{
|
||||
|
||||
/**
|
||||
* @var \Symfony\Component\Filesystem\Filesystem
|
||||
*/
|
||||
@ -234,7 +233,7 @@ class helper
|
||||
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
|
||||
}
|
||||
|
||||
trim ($path, '/');
|
||||
trim($path, '/');
|
||||
$path_parts = explode('/', $path);
|
||||
$resolved = array();
|
||||
$resolved_path = $prefix;
|
||||
@ -366,7 +365,7 @@ class helper
|
||||
}
|
||||
}
|
||||
|
||||
return ($return_array) ? $resolved : $resolved_path;
|
||||
return $return_array ? $resolved : $resolved_path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user