From 448b6a7d49bd98f73c4000287d6121ba26c94a63 Mon Sep 17 00:00:00 2001 From: DinHere Date: Sun, 3 Dec 2017 21:56:46 +0200 Subject: [PATCH] [ticket/15392] Remove not needed realpath() PHPBB3-15392 --- phpBB/develop/namespacify.php | 9 ++++----- phpBB/develop/rename_interfaces.php | 4 ++-- phpBB/includes/functions.php | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/phpBB/develop/namespacify.php b/phpBB/develop/namespacify.php index 447e87905e..b6414d57a4 100644 --- a/phpBB/develop/namespacify.php +++ b/phpBB/develop/namespacify.php @@ -20,10 +20,10 @@ // die("Please read the first lines of this script for instructions on how to enable it"); -$namespace_dir = realpath(__DIR__ . '/../phpbb/'); -$code_dir = realpath(__DIR__ . '/../'); -$test_dir = realpath(__DIR__ . '/../../tests/'); -$config_dir = realpath(__DIR__ . '/../config/'); +$namespace_dir = __DIR__ . '/../phpbb/'; +$code_dir = __DIR__ . '/../'; +$test_dir = __DIR__ . '/../../tests/'; +$config_dir = __DIR__ . '/../config/'; function map_class_name($old_class_name, $code_dir) { @@ -191,4 +191,3 @@ foreach ($iterator as $file) file_put_contents($file->getPathname(), $code); } } - diff --git a/phpBB/develop/rename_interfaces.php b/phpBB/develop/rename_interfaces.php index 90bf9cc205..f0dcf0be96 100644 --- a/phpBB/develop/rename_interfaces.php +++ b/phpBB/develop/rename_interfaces.php @@ -20,8 +20,8 @@ // die("Please read the first lines of this script for instructions on how to enable it"); -$code_dir = realpath(__DIR__ . '/../'); -$test_dir = realpath(__DIR__ . '/../../tests/'); +$code_dir = __DIR__ . '/../'; +$test_dir = __DIR__ . '/../../tests/'; $iterator = new \AppendIterator(); $iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($code_dir))); $iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($test_dir))); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 06ff2eca84..1206f42caf 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3240,12 +3240,12 @@ function phpbb_filter_root_path($errfile) { if ($phpbb_filesystem) { - $root_path = $phpbb_filesystem->realpath(__DIR__ . '/../'); + $root_path = $phpbb_filesystem-> __DIR__ . '/../'; } else { $filesystem = new \phpbb\filesystem\filesystem(); - $root_path = $filesystem->realpath(__DIR__ . '/../'); + $root_path = $filesystem-> __DIR__ . '/../'; } }