|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Nextcloud - Gallery |
|
4
|
|
|
* |
|
5
|
|
|
* This file is licensed under the Affero General Public License version 3 or |
|
6
|
|
|
* later. See the COPYING file. |
|
7
|
|
|
* |
|
8
|
|
|
* @author Olivier Paroz <[email protected]> |
|
9
|
|
|
* |
|
10
|
|
|
* @copyright Olivier Paroz 2017 |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace OCA\Gallery\Controller; |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* Class FilesPublicController |
|
17
|
|
|
* |
|
18
|
|
|
* Note: Type casting only works if the "@param" parameters are also included in this class as |
|
19
|
|
|
* their not yet inherited |
|
20
|
|
|
* |
|
21
|
|
|
* @package OCA\Gallery\Controller |
|
22
|
|
|
*/ |
|
23
|
|
|
class FilesPublicController extends FilesController { |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* @PublicPage |
|
27
|
|
|
* |
|
28
|
|
|
* Returns a exif of picture |
|
29
|
|
|
* |
|
30
|
|
|
* @param string $location a path picture |
|
|
|
|
|
|
31
|
|
|
* @return array |
|
32
|
|
|
*/ |
|
33
|
|
|
public function exif($fileId) { |
|
34
|
|
|
return parent::exif($fileId); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @PublicPage |
|
39
|
|
|
* |
|
40
|
|
|
* Returns a list of all images from the folder the link gives access to |
|
41
|
|
|
* |
|
42
|
|
|
* @inheritDoc |
|
43
|
|
|
* |
|
44
|
|
|
* @param string $location a path representing the current album in the app |
|
45
|
|
|
* @param string $features the list of supported features |
|
46
|
|
|
* @param string $etag the last known etag in the client |
|
47
|
|
|
* @param string $mediatypes the list of supported media types |
|
48
|
|
|
*/ |
|
49
|
|
|
public function getList($location, $features, $etag, $mediatypes) { |
|
50
|
|
|
return parent::getList($location, $features, $etag, $mediatypes); |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @PublicPage |
|
55
|
|
|
* @NoCSRFRequired |
|
56
|
|
|
* |
|
57
|
|
|
* Sends the file matching the fileId |
|
58
|
|
|
* |
|
59
|
|
|
* @inheritDoc |
|
60
|
|
|
* |
|
61
|
|
|
* @param int $fileId the ID of the file we want to download |
|
62
|
|
|
* @param string|null $filename |
|
63
|
|
|
*/ |
|
64
|
|
|
public function download($fileId, $filename = null) { |
|
65
|
|
|
return parent::download($fileId, $filename); |
|
66
|
|
|
} |
|
67
|
|
|
} |
|
68
|
|
|
|
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.