Browse Source
			
			
			Stricter signature
			
				Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
			
			
				pull/339/head
			
			
		 
		
			
				
					
						 Roeland Jago Douma
					
					9 years ago
						Roeland Jago Douma
					
					9 years ago
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: 1E152838F164D13B
				  	
				  
				
			
		
		
		
	
		
			
				 4 changed files with 
9 additions and 
6 deletions
			 
			
		 
		
			
				- 
					
					
					 
					lib/private/Share20/DefaultShareProvider.php
				
- 
					
					
					 
					lib/private/Share20/Manager.php
				
- 
					
					
					 
					lib/public/Share/IManager.php
				
- 
					
					
					 
					lib/public/Share/IShareProvider.php
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -24,6 +24,7 @@ | 
			
		
	
		
			
				
					|  |  |  | namespace OC\Share20; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | use OCP\Files\File; | 
			
		
	
		
			
				
					|  |  |  | use OCP\Files\Folder; | 
			
		
	
		
			
				
					|  |  |  | use OCP\Share\IShareProvider; | 
			
		
	
		
			
				
					|  |  |  | use OC\Share20\Exception\InvalidShare; | 
			
		
	
		
			
				
					|  |  |  | use OC\Share20\Exception\ProviderException; | 
			
		
	
	
		
			
				
					|  |  | @ -454,7 +455,7 @@ class DefaultShareProvider implements IShareProvider { | 
			
		
	
		
			
				
					|  |  |  | 		return $share; | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, $node, $reshares) { | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, Folder $node, $reshares) { | 
			
		
	
		
			
				
					|  |  |  | 		$qb = $this->dbConn->getQueryBuilder(); | 
			
		
	
		
			
				
					|  |  |  | 		$qb->select('*') | 
			
		
	
		
			
				
					|  |  |  | 			->from('share', 's') | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
										
									
								
							
						 
					 
				 
			
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -883,7 +883,7 @@ class Manager implements IManager { | 
			
		
	
		
			
				
					|  |  |  | 		$provider->move($share, $recipientId); | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, Node $node, $reshares = false) { | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, Folder $node, $reshares = false) { | 
			
		
	
		
			
				
					|  |  |  | 		$providers = $this->factory->getAllProviders(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		return array_reduce($providers, function($shares, IShareProvider $provider) use ($userId, $node, $reshares) { | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
										
									
								
							
						 
					 
				 
			
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -22,6 +22,7 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | namespace OCP\Share; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | use OCP\Files\Folder; | 
			
		
	
		
			
				
					|  |  |  | use OCP\Files\Node; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | use OCP\Share\Exceptions\ShareNotFound; | 
			
		
	
	
		
			
				
					|  |  | @ -91,12 +92,12 @@ interface IManager { | 
			
		
	
		
			
				
					|  |  |  | 	 * Get all shares shared by (initiated) by the provided user in a folder. | 
			
		
	
		
			
				
					|  |  |  | 	 * | 
			
		
	
		
			
				
					|  |  |  | 	 * @param string $userId | 
			
		
	
		
			
				
					|  |  |  | 	 * @param Node|null $node | 
			
		
	
		
			
				
					|  |  |  | 	 * @param Folder $node | 
			
		
	
		
			
				
					|  |  |  | 	 * @param bool $reshares | 
			
		
	
		
			
				
					|  |  |  | 	 * @return IShare[] | 
			
		
	
		
			
				
					|  |  |  | 	 * @since 9.2.0 | 
			
		
	
		
			
				
					|  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, Node $node, $reshares = false); | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, Folder $node, $reshares = false); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
		
			
				
					|  |  |  | 	 * Get shares shared by (initiated) by the provided user. | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
										
									
								
							
						 
					 
				 
			
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -22,6 +22,7 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | namespace OCP\Share; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | use OCP\Files\Folder; | 
			
		
	
		
			
				
					|  |  |  | use OCP\Share\Exceptions\ShareNotFound; | 
			
		
	
		
			
				
					|  |  |  | use OCP\Files\Node; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -95,12 +96,12 @@ interface IShareProvider { | 
			
		
	
		
			
				
					|  |  |  | 	 * Get all shares by the given user in a folder | 
			
		
	
		
			
				
					|  |  |  | 	 * | 
			
		
	
		
			
				
					|  |  |  | 	 * @param string $userId | 
			
		
	
		
			
				
					|  |  |  | 	 * @param Node|null $node | 
			
		
	
		
			
				
					|  |  |  | 	 * @param Folder $node | 
			
		
	
		
			
				
					|  |  |  | 	 * @param bool $reshares Also get the shares where $user is the owner instead of just the shares where $user is the initiator | 
			
		
	
		
			
				
					|  |  |  | 	 * @return \OCP\Share\IShare[] | 
			
		
	
		
			
				
					|  |  |  | 	 * @since 9.2.0 | 
			
		
	
		
			
				
					|  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, $node, $reshares); | 
			
		
	
		
			
				
					|  |  |  | 	public function getSharesInFolder($userId, Folder $node, $reshares); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
		
			
				
					|  |  |  | 	 * Get all shares by the given user | 
			
		
	
	
		
			
				
					|  |  | 
 |