@@ -37,7 +37,6 @@ |
||
| 37 | 37 | private $capabilitites; |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | - * @param IL10N $l |
|
| 41 | 40 | * @param IURLGenerator $url |
| 42 | 41 | */ |
| 43 | 42 | public function __construct(IL10N $l10n, IURLGenerator $url, Capabilities $capabilities) { |
@@ -104,7 +104,6 @@ discard block |
||
| 104 | 104 | * @param string $appName |
| 105 | 105 | * @param string $userId |
| 106 | 106 | * @param IConfig $config |
| 107 | - * @param Factory $appDataFactory |
|
| 108 | 107 | * @param IURLGenerator $urlGenerator |
| 109 | 108 | * @param IRootFolder $rootFolder |
| 110 | 109 | * @param IL10N $l |
@@ -148,6 +147,9 @@ discard block |
||
| 148 | 147 | } |
| 149 | 148 | } |
| 150 | 149 | |
| 150 | + /** |
|
| 151 | + * @param string $userId |
|
| 152 | + */ |
|
| 151 | 153 | public function setUserId($userId) { |
| 152 | 154 | $this->userId = $userId; |
| 153 | 155 | } |
@@ -323,6 +325,9 @@ discard block |
||
| 323 | 325 | })); |
| 324 | 326 | } |
| 325 | 327 | |
| 328 | + /** |
|
| 329 | + * @param string $type |
|
| 330 | + */ |
|
| 326 | 331 | public function getAllFormatted($type) { |
| 327 | 332 | if (!array_key_exists($type, self::$tplTypes)) { |
| 328 | 333 | return []; |
@@ -457,6 +462,9 @@ discard block |
||
| 457 | 462 | ]; |
| 458 | 463 | } |
| 459 | 464 | |
| 465 | + /** |
|
| 466 | + * @param integer $fileId |
|
| 467 | + */ |
|
| 460 | 468 | public function isTemplate($fileId) { |
| 461 | 469 | $empty = $this->getEmpty(); |
| 462 | 470 | $system = $this->getSystem(); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | * |
| 58 | 58 | * @param string $appName |
| 59 | 59 | * @param IRequest $request |
| 60 | - * @param L10N $l10n |
|
| 60 | + * @param IL10N $l10n |
|
| 61 | 61 | * @param TemplateManager $manager |
| 62 | 62 | * @param IPreview $preview |
| 63 | 63 | */ |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * @param $uid |
|
| 51 | - * @param $fileid |
|
| 50 | + * @param string $uid |
|
| 51 | + * @param integer $fileid |
|
| 52 | 52 | * @return Asset |
| 53 | 53 | */ |
| 54 | 54 | public function newAsset($uid, $fileid) { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * @param $token |
|
| 67 | + * @param string $token |
|
| 68 | 68 | * @return Asset |
| 69 | 69 | * @throws DoesNotExistException |
| 70 | 70 | */ |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @param $mimetype |
|
| 36 | + * @param string $mimetype |
|
| 37 | 37 | * @return array |
| 38 | 38 | * @throws \Exception |
| 39 | 39 | */ |
@@ -126,6 +126,7 @@ |
||
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * @param File $item |
| 129 | + * @param \OCA\Richdocuments\Db\Direct $direct |
|
| 129 | 130 | * @return string|null |
| 130 | 131 | * @throws NotFoundException |
| 131 | 132 | * @throws InvalidPathException |
@@ -40,6 +40,9 @@ discard block |
||
| 40 | 40 | $this->config = $config; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @return string |
|
| 45 | + */ |
|
| 43 | 46 | public function getAppNamespace($key) { |
| 44 | 47 | if (strpos($key, 'watermark_') === 0) { |
| 45 | 48 | return self::WATERMARK_APP_NAMESPACE; |
@@ -61,7 +64,7 @@ discard block |
||
| 61 | 64 | } |
| 62 | 65 | |
| 63 | 66 | /** |
| 64 | - * @param $key |
|
| 67 | + * @param string $key |
|
| 65 | 68 | * @return array |
| 66 | 69 | */ |
| 67 | 70 | public function getAppValueArray($key) { |
@@ -215,6 +215,9 @@ discard block |
||
| 215 | 215 | return new JSONResponse($response); |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | + /** |
|
| 219 | + * @param Wopi $wopi |
|
| 220 | + */ |
|
| 218 | 221 | private function setFederationFileInfo($wopi, $response) { |
| 219 | 222 | $remoteUserId = $wopi->getGuestDisplayname(); |
| 220 | 223 | $cloudID = \OC::$server->getCloudIdManager()->resolveCloudId($remoteUserId); |
@@ -235,6 +238,10 @@ discard block |
||
| 235 | 238 | return $response; |
| 236 | 239 | } |
| 237 | 240 | |
| 241 | + /** |
|
| 242 | + * @param boolean $isPublic |
|
| 243 | + * @param string $userId |
|
| 244 | + */ |
|
| 238 | 245 | private function shouldWatermark($isPublic, $userId, $fileId, Wopi $wopi) { |
| 239 | 246 | if ($this->config->getAppValue(AppConfig::WATERMARK_APP_NAMESPACE, 'watermark_enabled', 'no') === 'no') { |
| 240 | 247 | return false; |
@@ -202,6 +202,9 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | + /** |
|
| 206 | + * @param string $shareToken |
|
| 207 | + */ |
|
| 205 | 208 | public function updateToRemoteToken(Wopi $wopi, $shareToken, $remoteServer, $remoteServerToken, $remoteWopi) { |
| 206 | 209 | $uid = $remoteWopi['editorUid'] . '@' . $remoteServer; |
| 207 | 210 | $wopi->setEditorUid($shareToken); |
@@ -213,6 +216,10 @@ discard block |
||
| 213 | 216 | return $wopi; |
| 214 | 217 | } |
| 215 | 218 | |
| 219 | + /** |
|
| 220 | + * @param string $userId |
|
| 221 | + * @param integer $targetFileId |
|
| 222 | + */ |
|
| 216 | 223 | public function getTokenForTemplate(File $templateFile, $userId, $targetFileId, $direct = false) { |
| 217 | 224 | $owneruid = $userId; |
| 218 | 225 | $editoruid = $userId; |