apps/activity/lib/FilesHooks.php
/**
	 * Manage sharing events
	 * @param array $params The hook params
	 */
Manage sharing events
@param array $params The hook params
Manage sharing events @param array $params The hook params
public function share($params) {
		if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
			if ((int) $params['shareType'] === Share::SHARE_TYPE_USER) {
				$this->shareWithUser($params['shareWith'], (int) $params['fileSource'], $params['itemType'], $params['fileTarget']);
			} else if ((int) $params['shareType'] === Share::SHARE_TYPE_GROUP) {
				$this->shareWithGroup($params['shareWith'], (int) $params['fileSource'], $params['itemType'], $params['fileTarget'], (int) $params['id']);
			} else if ((int) $params['shareType'] === Share::SHARE_TYPE_LINK) {
				$this->shareByLink((int) $params['fileSource'], $params['itemType'], $params['uidOwner']);
			}
		}
	}
public function share ( $ params ) { if ( $ params [ 'itemType' ] === 'file' || $ params [ 'itemType' ] === 'folder' ) { if ( ( int ) $ params [ 'shareType' ] === Share :: SHARE_TYPE_USER ) { $ this -> shareWithUser ( $ params [ 'shareWith' ] , ( int ) $ params [ 'fileSource' ] , $ params [ 'itemType' ] , $ params [ 'fileTarget' ] ) ; } else if ( ( int ) $ params [ 'shareType' ] === Share :: SHARE_TYPE_GROUP ) { $ this -> shareWithGroup ( $ params [ 'shareWith' ] , ( int ) $ params [ 'fileSource' ] , $ params [ 'itemType' ] , $ params [ 'fileTarget' ] , ( int ) $ params [ 'id' ] ) ; } else if ( ( int ) $ params [ 'shareType' ] === Share :: SHARE_TYPE_LINK ) { $ this -> shareByLink ( ( int ) $ params [ 'fileSource' ] , $ params [ 'itemType' ] , $ params [ 'uidOwner' ] ) ; } } }
Manage sharing events
 @param array $params The hook params
Manage sharing events @param array $params The hook params