1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15392] Changed dirname(__FILE__) to __DIR__

Changed dirname(__FILE__) to __DIR__ everywhere

PHPBB3-15392
This commit is contained in:
DinHere
2017-12-03 17:19:59 +02:00
committed by Marc Alexander
parent 66cbf2607b
commit 8c9d26db1f
198 changed files with 373 additions and 373 deletions

View File

@@ -3240,12 +3240,12 @@ function phpbb_filter_root_path($errfile)
{
if ($phpbb_filesystem)
{
$root_path = $phpbb_filesystem->realpath(dirname(__FILE__) . '/../');
$root_path = $phpbb_filesystem->realpath(__DIR__ . '/../');
}
else
{
$filesystem = new \phpbb\filesystem\filesystem();
$root_path = $filesystem->realpath(dirname(__FILE__) . '/../');
$root_path = $filesystem->realpath(__DIR__ . '/../');
}
}

View File

@@ -242,7 +242,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// X-Sendfile - http://blog.lighttpd.net/articles/2006/07/02/x-sendfile
// Lighttpd's X-Sendfile does not support range requests as of 1.4.26
// and always requires an absolute path.
header('X-Sendfile: ' . dirname(__FILE__) . "/../$upload_dir/{$attachment['physical_filename']}");
header('X-Sendfile: ' . __DIR__ . "/../$upload_dir/{$attachment['physical_filename']}");
exit;
}