diff options
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/App/IAppManager.php | 2 | ||||
-rw-r--r-- | lib/public/AppFramework/Http/Attribute/RequestHeader.php | 24 | ||||
-rw-r--r-- | lib/public/Files/Folder.php | 11 | ||||
-rw-r--r-- | lib/public/IAppConfig.php | 2 | ||||
-rw-r--r-- | lib/public/IPreview.php | 4 | ||||
-rw-r--r-- | lib/public/Route/IRoute.php | 4 |
6 files changed, 23 insertions, 24 deletions
diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php index 67ef2d796be..6eae870216f 100644 --- a/lib/public/App/IAppManager.php +++ b/lib/public/App/IAppManager.php @@ -57,7 +57,7 @@ interface IAppManager { * @return array<string, string> * @since 32.0.0 */ - public function getAppInstalledVersions(): array; + public function getAppInstalledVersions(bool $onlyEnabled = false): array; /** * Returns the app icon or null if none is found diff --git a/lib/public/AppFramework/Http/Attribute/RequestHeader.php b/lib/public/AppFramework/Http/Attribute/RequestHeader.php index c9327eec4c0..1d0fbbfa0c3 100644 --- a/lib/public/AppFramework/Http/Attribute/RequestHeader.php +++ b/lib/public/AppFramework/Http/Attribute/RequestHeader.php @@ -21,30 +21,14 @@ use Attribute; #[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] class RequestHeader { /** - * @param string $name The name of the request header - * @param string $description The description of the request header + * @param lowercase-string $name The name of the request header + * @param non-empty-string $description The description of the request header + * @param bool $indirect Allow indirect usage of the header for example in a middleware. Enabling this turns off the check which ensures that the header must be referenced in the controller method. */ public function __construct( protected string $name, protected string $description, + protected bool $indirect = false, ) { } - - /** - * @return string The name of the request header. - * - * @since 32.0.0 - */ - public function getName(): string { - return $this->name; - } - - /** - * @return string The description of the request header. - * - * @since 32.0.0 - */ - public function getDescription(): string { - return $this->description; - } } diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index 3128a17c10c..a35d2d78bc9 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -199,4 +199,15 @@ interface Folder extends Node { * @since 9.1.0 */ public function getRecent($limit, $offset = 0); + + /** + * Verify if the given path is valid and allowed from this folder. + * + * @param string $path the path from this folder + * @param string $fileName + * @param bool $readonly Check only if the path is allowed for read-only access + * @throws InvalidPathException + * @since 32.0.0 + */ + public function verifyPath($fileName, $readonly = false): void; } diff --git a/lib/public/IAppConfig.php b/lib/public/IAppConfig.php index f4210793476..fcc528fe11f 100644 --- a/lib/public/IAppConfig.php +++ b/lib/public/IAppConfig.php @@ -514,5 +514,5 @@ interface IAppConfig { * @return array<string, string> * @since 32.0.0 */ - public function getAppInstalledVersions(): array; + public function getAppInstalledVersions(bool $onlyEnabled = false): array; } diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php index 5a2bcde69f1..3c9eadd4577 100644 --- a/lib/public/IPreview.php +++ b/lib/public/IPreview.php @@ -92,10 +92,12 @@ interface IPreview { * Check if a preview can be generated for a file * * @param \OCP\Files\FileInfo $file + * @param string|null $mimeType To force a given mimetype for the file * @return bool * @since 8.0.0 + * @since 32.0.0 - isAvailable($mimeType) added the $mimeType argument to the signature */ - public function isAvailable(\OCP\Files\FileInfo $file); + public function isAvailable(\OCP\Files\FileInfo $file, ?string $mimeType = null); /** * Generates previews of a file diff --git a/lib/public/Route/IRoute.php b/lib/public/Route/IRoute.php index fffd4b9c1a1..7dba6225aff 100644 --- a/lib/public/Route/IRoute.php +++ b/lib/public/Route/IRoute.php @@ -34,8 +34,9 @@ interface IRoute { * it is called directly * * @param string $file - * @return void + * @return $this * @since 7.0.0 + * @deprecated 32.0.0 Use a proper controller instead */ public function actionInclude($file); @@ -70,6 +71,7 @@ interface IRoute { * This function is called with $class set to a callable or * to the class with $function * @since 7.0.0 + * @deprecated 32.0.0 Use a proper controller instead */ public function action($class, $function = null); |