@@ -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 | |