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

[ticket/16345] Small improvements

PHPBB3-16346
This commit is contained in:
rubencm
2020-06-07 02:15:35 +00:00
parent 3cceeb45bf
commit 774c609c4a
284 changed files with 1380 additions and 835 deletions

View File

@@ -20,11 +20,11 @@ class filesystem_exception extends runtime_exception
/**
* Constructor
*
* @param string $message The Exception message to throw (must be a language variable).
* @param string $filename The file that caused the error.
* @param array $parameters The parameters to use with the language var.
* @param \Exception $previous The previous runtime_exception used for the runtime_exception chaining.
* @param integer $code The Exception code.
* @param string $message The Exception message to throw (must be a language variable).
* @param string $filename The file that caused the error.
* @param array $parameters The parameters to use with the language var.
* @param \Exception|null $previous The previous runtime_exception used for the runtime_exception chaining.
* @param integer $code The Exception code.
*/
public function __construct($message = '', $filename = '', $parameters = array(), \Exception $previous = null, $code = 0)
{

View File

@@ -31,7 +31,7 @@ class filesystem implements filesystem_interface
/**
* Stores current working directory
*
* @var string|bool current working directory or false if it cannot be recovered
* @var string|bool|null current working directory or false if it cannot be recovered
*/
protected $working_directory;

View File

@@ -177,14 +177,14 @@ interface filesystem_interface
/**
* Mirrors a directory to another.
*
* @param string $origin_dir The origin directory
* @param string $target_dir The target directory
* @param \Traversable $iterator A Traversable instance
* @param array $options An array of boolean options
* Valid options are:
* - $options['override'] Whether to override an existing file on copy or not (see copy())
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink())
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
* @param string $origin_dir The origin directory
* @param string $target_dir The target directory
* @param \Traversable|null $iterator A Traversable instance
* @param array $options An array of boolean options
* Valid options are:
* - $options['override'] Whether to override an existing file on copy or not (see copy())
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink())
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
*
* @throws \phpbb\filesystem\exception\filesystem_exception When the file cannot be copied.
* The filename which triggered the error can be

View File

@@ -233,7 +233,7 @@ class helper
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
}
trim($path, '/');
//$path = trim($path, '/'); // TODO: Check this
$path_parts = explode('/', $path);
$resolved = array();
$resolved_path = $prefix;