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:
@@ -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__ . '/../');
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user