apps/files_external/lib/config.php
/**
	 * Convert a StorageConfig to the legacy mountPoints array format
	 * There's a lot of extra information in here, to satisfy all of the legacy functions
	 *
	 * @param StorageConfig $storage
	 * @param bool $isPersonal
	 * @return array
	 */
Convert a StorageConfig to the legacy mountPoints array format
There's a lot of extra information in here, to satisfy all of the legacy functions

@param StorageConfig $storage
@param bool $isPersonal
@return array
Convert a StorageConfig to the legacy mountPoints array format There ' s a lot of extra information in here to satisfy all of the legacy functions @param StorageConfig $storage @param bool $isPersonal @return array
private static function prepareMountPointEntry(StorageConfig $storage, $isPersonal) {
		$mountEntry = [];
		$mountEntry['mountpoint'] = substr($storage->getMountPoint(), 1); 
		$mountEntry['class'] = $storage->getBackend()->getIdentifier();
		$mountEntry['backend'] = $storage->getBackend()->getText();
		$mountEntry['authMechanism'] = $storage->getAuthMechanism()->getIdentifier();
		$mountEntry['personal'] = $isPersonal;
		$mountEntry['options'] = self::decryptPasswords($storage->getBackendOptions());
		$mountEntry['mountOptions'] = $storage->getMountOptions();
		$mountEntry['priority'] = $storage->getPriority();
		$mountEntry['applicable'] = [
			'groups' => $storage->getApplicableGroups(),
			'users' => $storage->getApplicableUsers(),
		];
		if (empty($mountEntry['applicable']['groups']) && empty($mountEntry['applicable']['users'])) {
			$mountEntry['applicable']['users'] = ['all'];
		}
		$mountEntry['id'] = $storage->getId();
		return $mountEntry;
	}
private static function prepareMountPointEntry ( StorageConfig $ storage , $ isPersonal ) { $ mountEntry = [ ] ; $ mountEntry [ 'mountpoint' ] = substr ( $ storage -> getMountPoint ( ) , 1 ) ; $ mountEntry [ 'class' ] = $ storage -> getBackend ( ) -> getIdentifier ( ) ; $ mountEntry [ 'backend' ] = $ storage -> getBackend ( ) -> getText ( ) ; $ mountEntry [ 'authMechanism' ] = $ storage -> getAuthMechanism ( ) -> getIdentifier ( ) ; $ mountEntry [ 'personal' ] = $ isPersonal ; $ mountEntry [ 'options' ] = self :: decryptPasswords ( $ storage -> getBackendOptions ( ) ) ; $ mountEntry [ 'mountOptions' ] = $ storage -> getMountOptions ( ) ; $ mountEntry [ 'priority' ] = $ storage -> getPriority ( ) ; $ mountEntry [ 'applicable' ] = [ 'groups' => $ storage -> getApplicableGroups ( ) , 'users' => $ storage -> getApplicableUsers ( ) , ] ; if ( empty ( $ mountEntry [ 'applicable' ] [ 'groups' ] ) && empty ( $ mountEntry [ 'applicable' ] [ 'users' ] ) ) { $ mountEntry [ 'applicable' ] [ 'users' ] = [ 'all' ] ; } $ mountEntry [ 'id' ] = $ storage -> getId ( ) ; return $ mountEntry ; }
Convert a StorageConfig to the legacy mountPoints array format
 There's a lot of extra information in here, to satisfy all of the legacy functions
Convert a StorageConfig to the legacy mountPoints array format There ' s a lot of extra information in here to satisfy all of the legacy functions
// remove leading slash // if mountpoint is applicable to all users the old API expects ['all']