|  | 
| 31 | 31 | use OC\Share20\Exception\BackendError; | 
| 32 | 32 | use OCA\DAV\Connector\Sabre\Exception\Forbidden; | 
| 33 | 33 | use OCA\DAV\Connector\Sabre\Node as DavNode; | 
|  | 34 | +use OCA\Files_Sharing\ISharedStorage; | 
|  | 35 | +use OCA\Files_Sharing\SharedStorage; | 
| 34 | 36 | use OCP\Files\Folder; | 
| 35 | 37 | use OCP\Files\Node; | 
| 36 | 38 | use OCP\Files\NotFoundException; | 
| 37 |  | -use OCP\Files\Storage\ISharedStorage; | 
| 38 | 39 | use OCP\IUserSession; | 
| 39 | 40 | use OCP\Share\IManager; | 
| 40 | 41 | use OCP\Share\IShare; | 
| @@ -91,9 +92,9 @@ public function initialize(Server $server) { | 
| 91 | 92 | 		$server->protectedProperties[] = self::SHAREES_PROPERTYNAME; | 
| 92 | 93 | 
 | 
| 93 | 94 | 		$this->server = $server; | 
| 94 |  | -		$this->server->on('propFind', $this->handleGetProperties(...)); | 
| 95 |  | -		$this->server->on('beforeCopy', $this->validateMoveOrCopy(...)); | 
| 96 |  | -		$this->server->on('beforeMove', $this->validateMoveOrCopy(...)); | 
|  | 95 | +		$this->server->on('propFind', [$this, 'handleGetProperties']); | 
|  | 96 | +		$this->server->on('beforeCopy', [$this, 'validateMoveOrCopy']); | 
|  | 97 | +		$this->server->on('beforeMove', [$this, 'validateMoveOrCopy']); | 
| 97 | 98 | 	} | 
| 98 | 99 | 
 | 
| 99 | 100 | 	/** | 
| @@ -264,7 +265,7 @@ public function validateMoveOrCopy(string $source, string $target): bool { | 
| 264 | 265 | 		if ($sourceStorage->instanceOfStorage(ISharedStorage::class)) { | 
| 265 | 266 | 			// source is also a share - check if it is the same share | 
| 266 | 267 | 
 | 
| 267 |  | -			/** @var ISharedStorage $sourceStorage */ | 
|  | 268 | +			/** @var SharedStorage $sourceStorage */ | 
| 268 | 269 | 			$sourceShare = $sourceStorage->getShare(); | 
| 269 | 270 | 			foreach ($targetShares as $targetShare) { | 
| 270 | 271 | 				if ($targetShare->getId() === $sourceShare->getId()) { | 
|  | 
0 commit comments