@@ -65,6 +65,9 @@ |
||
| 65 | 65 | $this->timeFactory = $timeFactory; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @return string |
|
| 70 | + */ |
|
| 68 | 71 | public function get() { |
| 69 | 72 | // First check if there is a local valid discovery file |
| 70 | 73 | try { |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | use OCP\Http\Client\IClientService; |
| 29 | 29 | use OCP\IConfig; |
| 30 | 30 | use OCP\IL10N; |
| 31 | -use OCP\Notification\IApp; |
|
| 32 | 31 | |
| 33 | 32 | class DiscoveryManager { |
| 34 | 33 | /** @var IClientService */ |
@@ -24,14 +24,12 @@ |
||
| 24 | 24 | use OC\Files\View; |
| 25 | 25 | use OCA\Richdocuments\Db\Wopi; |
| 26 | 26 | use OCA\Richdocuments\Helper; |
| 27 | -use OCA\Richdocuments\WOPI\Parser; |
|
| 28 | 27 | use OCP\AppFramework\Controller; |
| 29 | 28 | use OCP\AppFramework\Http; |
| 30 | 29 | use OCP\AppFramework\Http\JSONResponse; |
| 31 | 30 | use OCP\Files\File; |
| 32 | 31 | use OCP\Files\IRootFolder; |
| 33 | 32 | use OCP\IRequest; |
| 34 | -use OCP\IUserManager; |
|
| 35 | 33 | use OCP\AppFramework\Http\StreamResponse; |
| 36 | 34 | |
| 37 | 35 | class WopiController extends Controller { |
@@ -28,6 +28,9 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected $loadStatement = 'SELECT * FROM `*PREFIX*richdocuments_wopi` WHERE `token`= ?'; |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param integer $updatable |
|
| 33 | + */ |
|
| 31 | 34 | public function generateFileToken($fileId, $owner, $editor, $version, $updatable, $serverHost) { |
| 32 | 35 | $token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(32, |
| 33 | 36 | \OCP\Security\ISecureRandom::CHAR_LOWER . \OCP\Security\ISecureRandom::CHAR_UPPER . |
@@ -41,6 +41,9 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param string $path |
|
| 46 | + */ |
|
| 44 | 47 | public static function getNewFileName($view, $path, $prepend = ' '){ |
| 45 | 48 | $fileNum = 1; |
| 46 | 49 | |