apps/activity/lib/FilesHooks.php
/**
	 * Sharing a file or folder via link/public
	 *
	 * @param int $fileSource File ID that is being shared
	 * @param string $itemType File type that is being shared (file or folder)
	 * @param string $linkOwner
	 */
Sharing a file or folder via link/public
@param int $fileSource File ID that is being shared
@param string $itemType File type that is being shared (file or folder)
@param string $linkOwner
Sharing a file or folder via link / public @param int $fileSource File ID that is being shared @param string $itemType File type that is being shared ( file or folder ) @param string $linkOwner
protected function shareByLink($fileSource, $itemType, $linkOwner) {
		$this->view->chroot('/' . $linkOwner . '/files');
		try {
			$path = $this->view->getPath($fileSource);
		} catch (NotFoundException $e) {
			return;
		}
		$this->shareNotificationForOriginalOwners($linkOwner, 'reshared_link_by', '', $fileSource, $itemType);
		$this->addNotificationsForUser(
			$linkOwner, 'shared_link_self', [[$fileSource => $path]],
			(int) $fileSource, $path, $itemType === 'file',
			$this->userSettings->getUserSetting($linkOwner, 'stream', Files_Sharing::TYPE_SHARED),
			$this->userSettings->getUserSetting($linkOwner, 'email', Files_Sharing::TYPE_SHARED) ? $this->userSettings->getUserSetting($linkOwner, 'setting', 'batchtime') : 0
		);
	}
protected function shareByLink ( $ fileSource , $ itemType , $ linkOwner ) { $ this -> view -> chroot ( '/' . $ linkOwner . '/files' ) ; try { $ path = $ this -> view -> getPath ( $ fileSource ) ; } catch ( NotFoundException $ e ) { return ; } $ this -> shareNotificationForOriginalOwners ( $ linkOwner , 'reshared_link_by' , '' , $ fileSource , $ itemType ) ; $ this -> addNotificationsForUser ( $ linkOwner , 'shared_link_self' , [ [ $ fileSource => $ path ] ] , ( int ) $ fileSource , $ path , $ itemType === 'file' , $ this -> userSettings -> getUserSetting ( $ linkOwner , 'stream' , Files_Sharing :: TYPE_SHARED ) , $ this -> userSettings -> getUserSetting ( $ linkOwner , 'email' , Files_Sharing :: TYPE_SHARED ) ? $ this -> userSettings -> getUserSetting ( $ linkOwner , 'setting' , 'batchtime' ) : 0 ) ; }
Sharing a file or folder via link/public
 @param int $fileSource File ID that is being shared
 @param string $itemType File type that is being shared (file or folder)
 @param string $linkOwner
Sharing a file or folder via link / public @param int $fileSource File ID that is being shared @param string $itemType File type that is being shared ( file or folder ) @param string $linkOwner