From 5ebdfdc4bb3e8c02c9ba98e2d30367a0c48dbac7 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms Date: Wed, 6 Jul 2022 12:28:01 +0000 Subject: use own constructor interface for StandardFile, fixes #1280 Closes #1280 Merge request studip/studip!784 --- lib/filesystem/FileType.php | 8 -------- lib/filesystem/StandardFile.php | 2 +- lib/filesystem/StandardFileInterface.php | 11 +++++++++++ lib/filesystem/UnknownFileType.php | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 lib/filesystem/StandardFileInterface.php diff --git a/lib/filesystem/FileType.php b/lib/filesystem/FileType.php index 60bfa44..003ee85 100644 --- a/lib/filesystem/FileType.php +++ b/lib/filesystem/FileType.php @@ -3,14 +3,6 @@ interface FileType { /** - * StandardFile constructor. - * @param $fileref - * @param null $file : (optional) Is set if fileref and file are both new and not connected with - * each other in the database. - */ - public function __construct($fileref, $file = null); - - /** * Returns the name of the icon shape that shall be used with the FileType implementation. * * @param string $role role of icon diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 3fe3672..5c9b5e8 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -12,7 +12,7 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 * @category Stud.IP */ -class StandardFile implements FileType, ArrayAccess +class StandardFile implements FileType, ArrayAccess, StandardFileInterface { /** diff --git a/lib/filesystem/StandardFileInterface.php b/lib/filesystem/StandardFileInterface.php new file mode 100644 index 0000000..a246550 --- /dev/null +++ b/lib/filesystem/StandardFileInterface.php @@ -0,0 +1,11 @@ +fileref = $fileref; } -- cgit v1.0