From 436410761ddd917a5bad5f7284cd11299e48389b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Wed, 28 Jun 2017 13:33:19 +0200 Subject: [PATCH] [ticket/15253] Fix code PHPBB3-15253 --- phpBB/includes/functions_compatibility.php | 15 --------------- phpBB/phpbb/filesystem/helper.php | 5 ++--- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index e1ff4004ff..6104ed7f60 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -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); } diff --git a/phpBB/phpbb/filesystem/helper.php b/phpBB/phpbb/filesystem/helper.php index 6dd58008dc..ec684ee396 100644 --- a/phpBB/phpbb/filesystem/helper.php +++ b/phpBB/phpbb/filesystem/helper.php @@ -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; } /**