diff options
Diffstat (limited to 'apps/files_external')
318 files changed, 1153 insertions, 10796 deletions
diff --git a/apps/files_external/3rdparty/.gitignore b/apps/files_external/3rdparty/.gitignore deleted file mode 100644 index d086196dec2..00000000000 --- a/apps/files_external/3rdparty/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc. -# SPDX-License-Identifier: AGPL-3.0-only -example.php -.editorconfig -icewind/smb/tests -icewind/smb/install_libsmbclient.sh -icewind/smb/Makefile -icewind/smb/.travis.yml -icewind/smb/.scrutinizer.yml -icewind/smb/example-apache-kerberos.php -icewind/smb/codecov.yml -icewind/streams/tests -icewind/**/example*.php -.github -.php_cs* -psalm.xml diff --git a/apps/files_external/3rdparty/autoload.php b/apps/files_external/3rdparty/autoload.php deleted file mode 100644 index d3359ad45d9..00000000000 --- a/apps/files_external/3rdparty/autoload.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -// autoload.php @generated by Composer - -if (PHP_VERSION_ID < 50600) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, $err); - } elseif (!headers_sent()) { - echo $err; - } - } - trigger_error( - $err, - E_USER_ERROR - ); -} - -require_once __DIR__ . '/composer/autoload_real.php'; - -return ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3::getLoader(); diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json deleted file mode 100644 index 6af1429aa7f..00000000000 --- a/apps/files_external/3rdparty/composer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "files_external/3rdparty", - "description": "3rdparty components for files_external", - "license": "MIT", - "config": { - "vendor-dir": ".", - "optimize-autoloader": true, - "classmap-authoritative": true - }, - "require": { - "icewind/smb": "3.7.0", - "icewind/streams": "0.7.7" - } -} diff --git a/apps/files_external/3rdparty/composer.json.license b/apps/files_external/3rdparty/composer.json.license deleted file mode 100644 index 849ed02ad4b..00000000000 --- a/apps/files_external/3rdparty/composer.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors -SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. -SPDX-License-Identifier: AGPL-3.0-only
\ No newline at end of file diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock deleted file mode 100644 index b0cf919de9c..00000000000 --- a/apps/files_external/3rdparty/composer.lock +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "1b75bb2715ed2dae7d090ae40b9843a2", - "packages": [ - { - "name": "icewind/smb", - "version": "v3.7.0", - "source": { - "type": "git", - "url": "https://github.com/icewind1991/SMB.git", - "reference": "e6904cbe75f678335092f4861c60c656b1a99e84" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/e6904cbe75f678335092f4861c60c656b1a99e84", - "reference": "e6904cbe75f678335092f4861c60c656b1a99e84", - "shasum": "" - }, - "require": { - "icewind/streams": ">=0.7.3", - "php": ">=7.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.57", - "phpunit/phpunit": "^8.5|^9.3.8", - "psalm/phar": "^4.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Icewind\\SMB\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Robin Appelman", - "email": "icewind@owncloud.com" - } - ], - "description": "php wrapper for smbclient and libsmbclient-php", - "support": { - "issues": "https://github.com/icewind1991/SMB/issues", - "source": "https://github.com/icewind1991/SMB/tree/v3.7.0" - }, - "time": "2024-11-11T14:08:34+00:00" - }, - { - "name": "icewind/streams", - "version": "v0.7.7", - "source": { - "type": "git", - "url": "https://github.com/icewind1991/Streams.git", - "reference": "64200fd7cfcc7f550c3c695c48d8fd8bba97fecb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/64200fd7cfcc7f550c3c695c48d8fd8bba97fecb", - "reference": "64200fd7cfcc7f550c3c695c48d8fd8bba97fecb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9" - }, - "type": "library", - "autoload": { - "psr-4": { - "Icewind\\Streams\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Robin Appelman", - "email": "icewind@owncloud.com" - } - ], - "description": "A set of generic stream wrappers", - "support": { - "issues": "https://github.com/icewind1991/Streams/issues", - "source": "https://github.com/icewind1991/Streams/tree/v0.7.7" - }, - "time": "2023-03-16T14:52:25+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": {}, - "prefer-stable": false, - "prefer-lowest": false, - "platform": {}, - "platform-dev": {}, - "plugin-api-version": "2.6.0" -} diff --git a/apps/files_external/3rdparty/composer.lock.license b/apps/files_external/3rdparty/composer.lock.license deleted file mode 100644 index 849ed02ad4b..00000000000 --- a/apps/files_external/3rdparty/composer.lock.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors -SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. -SPDX-License-Identifier: AGPL-3.0-only
\ No newline at end of file diff --git a/apps/files_external/3rdparty/composer/ClassLoader.php b/apps/files_external/3rdparty/composer/ClassLoader.php deleted file mode 100644 index 7824d8f7eaf..00000000000 --- a/apps/files_external/3rdparty/composer/ClassLoader.php +++ /dev/null @@ -1,579 +0,0 @@ -<?php - -/* - * This file is part of Composer. - * - * (c) Nils Adermann <naderman@naderman.de> - * Jordi Boggiano <j.boggiano@seld.be> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Jordi Boggiano <j.boggiano@seld.be> - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ - private $vendorDir; - - // PSR-4 - /** - * @var array<string, array<string, int>> - */ - private $prefixLengthsPsr4 = array(); - /** - * @var array<string, list<string>> - */ - private $prefixDirsPsr4 = array(); - /** - * @var list<string> - */ - private $fallbackDirsPsr4 = array(); - - // PSR-0 - /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array<string, array<string, list<string>>> - */ - private $prefixesPsr0 = array(); - /** - * @var list<string> - */ - private $fallbackDirsPsr0 = array(); - - /** @var bool */ - private $useIncludePath = false; - - /** - * @var array<string, string> - */ - private $classMap = array(); - - /** @var bool */ - private $classMapAuthoritative = false; - - /** - * @var array<string, bool> - */ - private $missingClasses = array(); - - /** @var string|null */ - private $apcuPrefix; - - /** - * @var array<string, self> - */ - private static $registeredLoaders = array(); - - /** - * @param string|null $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); - } - - /** - * @return array<string, list<string>> - */ - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - /** - * @return array<string, list<string>> - */ - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - /** - * @return list<string> - */ - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - /** - * @return list<string> - */ - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - /** - * @return array<string, string> Array of classname => path - */ - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array<string, string> $classMap Class to filename map - * - * @return void - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param list<string>|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void - */ - public function add($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list<string>|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param list<string>|string $paths The PSR-0 base directories - * - * @return void - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list<string>|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - * - * @return void - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - * - * @return void - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - * - * @return void - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. - * - * @return array<string, self> - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } -} diff --git a/apps/files_external/3rdparty/composer/InstalledVersions.php b/apps/files_external/3rdparty/composer/InstalledVersions.php deleted file mode 100644 index 51e734a774b..00000000000 --- a/apps/files_external/3rdparty/composer/InstalledVersions.php +++ /dev/null @@ -1,359 +0,0 @@ -<?php - -/* - * This file is part of Composer. - * - * (c) Nils Adermann <naderman@naderman.de> - * Jordi Boggiano <j.boggiano@seld.be> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list<string> - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list<string> - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints((string) $constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; - } else { - self::$installed = array(); - } - } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } - - return $installed; - } -} diff --git a/apps/files_external/3rdparty/composer/LICENSE b/apps/files_external/3rdparty/composer/LICENSE deleted file mode 100644 index 62ecfd8d004..00000000000 --- a/apps/files_external/3rdparty/composer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/apps/files_external/3rdparty/composer/autoload_classmap.php b/apps/files_external/3rdparty/composer/autoload_classmap.php deleted file mode 100644 index 8ed82b84023..00000000000 --- a/apps/files_external/3rdparty/composer/autoload_classmap.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -// autoload_classmap.php @generated by Composer - -$vendorDir = dirname(__DIR__); -$baseDir = $vendorDir; - -return array( - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'Icewind\\SMB\\ACL' => $vendorDir . '/icewind/smb/src/ACL.php', - 'Icewind\\SMB\\AbstractServer' => $vendorDir . '/icewind/smb/src/AbstractServer.php', - 'Icewind\\SMB\\AbstractShare' => $vendorDir . '/icewind/smb/src/AbstractShare.php', - 'Icewind\\SMB\\AnonymousAuth' => $vendorDir . '/icewind/smb/src/AnonymousAuth.php', - 'Icewind\\SMB\\BasicAuth' => $vendorDir . '/icewind/smb/src/BasicAuth.php', - 'Icewind\\SMB\\Change' => $vendorDir . '/icewind/smb/src/Change.php', - 'Icewind\\SMB\\Exception\\AccessDeniedException' => $vendorDir . '/icewind/smb/src/Exception/AccessDeniedException.php', - 'Icewind\\SMB\\Exception\\AlreadyExistsException' => $vendorDir . '/icewind/smb/src/Exception/AlreadyExistsException.php', - 'Icewind\\SMB\\Exception\\AuthenticationException' => $vendorDir . '/icewind/smb/src/Exception/AuthenticationException.php', - 'Icewind\\SMB\\Exception\\ConnectException' => $vendorDir . '/icewind/smb/src/Exception/ConnectException.php', - 'Icewind\\SMB\\Exception\\ConnectionAbortedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionAbortedException.php', - 'Icewind\\SMB\\Exception\\ConnectionException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionException.php', - 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionRefusedException.php', - 'Icewind\\SMB\\Exception\\ConnectionResetException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionResetException.php', - 'Icewind\\SMB\\Exception\\DependencyException' => $vendorDir . '/icewind/smb/src/Exception/DependencyException.php', - 'Icewind\\SMB\\Exception\\Exception' => $vendorDir . '/icewind/smb/src/Exception/Exception.php', - 'Icewind\\SMB\\Exception\\FileInUseException' => $vendorDir . '/icewind/smb/src/Exception/FileInUseException.php', - 'Icewind\\SMB\\Exception\\ForbiddenException' => $vendorDir . '/icewind/smb/src/Exception/ForbiddenException.php', - 'Icewind\\SMB\\Exception\\HostDownException' => $vendorDir . '/icewind/smb/src/Exception/HostDownException.php', - 'Icewind\\SMB\\Exception\\InvalidArgumentException' => $vendorDir . '/icewind/smb/src/Exception/InvalidArgumentException.php', - 'Icewind\\SMB\\Exception\\InvalidHostException' => $vendorDir . '/icewind/smb/src/Exception/InvalidHostException.php', - 'Icewind\\SMB\\Exception\\InvalidParameterException' => $vendorDir . '/icewind/smb/src/Exception/InvalidParameterException.php', - 'Icewind\\SMB\\Exception\\InvalidPathException' => $vendorDir . '/icewind/smb/src/Exception/InvalidPathException.php', - 'Icewind\\SMB\\Exception\\InvalidRequestException' => $vendorDir . '/icewind/smb/src/Exception/InvalidRequestException.php', - 'Icewind\\SMB\\Exception\\InvalidResourceException' => $vendorDir . '/icewind/smb/src/Exception/InvalidResourceException.php', - 'Icewind\\SMB\\Exception\\InvalidTicket' => $vendorDir . '/icewind/smb/src/Exception/InvalidTicket.php', - 'Icewind\\SMB\\Exception\\InvalidTypeException' => $vendorDir . '/icewind/smb/src/Exception/InvalidTypeException.php', - 'Icewind\\SMB\\Exception\\NoLoginServerException' => $vendorDir . '/icewind/smb/src/Exception/NoLoginServerException.php', - 'Icewind\\SMB\\Exception\\NoRouteToHostException' => $vendorDir . '/icewind/smb/src/Exception/NoRouteToHostException.php', - 'Icewind\\SMB\\Exception\\NotEmptyException' => $vendorDir . '/icewind/smb/src/Exception/NotEmptyException.php', - 'Icewind\\SMB\\Exception\\NotFoundException' => $vendorDir . '/icewind/smb/src/Exception/NotFoundException.php', - 'Icewind\\SMB\\Exception\\OutOfSpaceException' => $vendorDir . '/icewind/smb/src/Exception/OutOfSpaceException.php', - 'Icewind\\SMB\\Exception\\RevisionMismatchException' => $vendorDir . '/icewind/smb/src/Exception/RevisionMismatchException.php', - 'Icewind\\SMB\\Exception\\TimedOutException' => $vendorDir . '/icewind/smb/src/Exception/TimedOutException.php', - 'Icewind\\SMB\\IAuth' => $vendorDir . '/icewind/smb/src/IAuth.php', - 'Icewind\\SMB\\IFileInfo' => $vendorDir . '/icewind/smb/src/IFileInfo.php', - 'Icewind\\SMB\\INotifyHandler' => $vendorDir . '/icewind/smb/src/INotifyHandler.php', - 'Icewind\\SMB\\IOptions' => $vendorDir . '/icewind/smb/src/IOptions.php', - 'Icewind\\SMB\\IServer' => $vendorDir . '/icewind/smb/src/IServer.php', - 'Icewind\\SMB\\IShare' => $vendorDir . '/icewind/smb/src/IShare.php', - 'Icewind\\SMB\\ISystem' => $vendorDir . '/icewind/smb/src/ISystem.php', - 'Icewind\\SMB\\ITimeZoneProvider' => $vendorDir . '/icewind/smb/src/ITimeZoneProvider.php', - 'Icewind\\SMB\\KerberosApacheAuth' => $vendorDir . '/icewind/smb/src/KerberosApacheAuth.php', - 'Icewind\\SMB\\KerberosAuth' => $vendorDir . '/icewind/smb/src/KerberosAuth.php', - 'Icewind\\SMB\\KerberosTicket' => $vendorDir . '/icewind/smb/src/KerberosTicket.php', - 'Icewind\\SMB\\Native\\NativeFileInfo' => $vendorDir . '/icewind/smb/src/Native/NativeFileInfo.php', - 'Icewind\\SMB\\Native\\NativeReadStream' => $vendorDir . '/icewind/smb/src/Native/NativeReadStream.php', - 'Icewind\\SMB\\Native\\NativeServer' => $vendorDir . '/icewind/smb/src/Native/NativeServer.php', - 'Icewind\\SMB\\Native\\NativeShare' => $vendorDir . '/icewind/smb/src/Native/NativeShare.php', - 'Icewind\\SMB\\Native\\NativeState' => $vendorDir . '/icewind/smb/src/Native/NativeState.php', - 'Icewind\\SMB\\Native\\NativeStream' => $vendorDir . '/icewind/smb/src/Native/NativeStream.php', - 'Icewind\\SMB\\Native\\NativeWriteStream' => $vendorDir . '/icewind/smb/src/Native/NativeWriteStream.php', - 'Icewind\\SMB\\Options' => $vendorDir . '/icewind/smb/src/Options.php', - 'Icewind\\SMB\\ServerFactory' => $vendorDir . '/icewind/smb/src/ServerFactory.php', - 'Icewind\\SMB\\StringBuffer' => $vendorDir . '/icewind/smb/src/StringBuffer.php', - 'Icewind\\SMB\\System' => $vendorDir . '/icewind/smb/src/System.php', - 'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php', - 'Icewind\\SMB\\Wrapped\\Connection' => $vendorDir . '/icewind/smb/src/Wrapped/Connection.php', - 'Icewind\\SMB\\Wrapped\\ErrorCodes' => $vendorDir . '/icewind/smb/src/Wrapped/ErrorCodes.php', - 'Icewind\\SMB\\Wrapped\\FileInfo' => $vendorDir . '/icewind/smb/src/Wrapped/FileInfo.php', - 'Icewind\\SMB\\Wrapped\\NotifyHandler' => $vendorDir . '/icewind/smb/src/Wrapped/NotifyHandler.php', - 'Icewind\\SMB\\Wrapped\\Parser' => $vendorDir . '/icewind/smb/src/Wrapped/Parser.php', - 'Icewind\\SMB\\Wrapped\\RawConnection' => $vendorDir . '/icewind/smb/src/Wrapped/RawConnection.php', - 'Icewind\\SMB\\Wrapped\\Server' => $vendorDir . '/icewind/smb/src/Wrapped/Server.php', - 'Icewind\\SMB\\Wrapped\\Share' => $vendorDir . '/icewind/smb/src/Wrapped/Share.php', - 'Icewind\\Streams\\CallbackWrapper' => $vendorDir . '/icewind/streams/src/CallbackWrapper.php', - 'Icewind\\Streams\\CountWrapper' => $vendorDir . '/icewind/streams/src/CountWrapper.php', - 'Icewind\\Streams\\Directory' => $vendorDir . '/icewind/streams/src/Directory.php', - 'Icewind\\Streams\\DirectoryFilter' => $vendorDir . '/icewind/streams/src/DirectoryFilter.php', - 'Icewind\\Streams\\DirectoryWrapper' => $vendorDir . '/icewind/streams/src/DirectoryWrapper.php', - 'Icewind\\Streams\\File' => $vendorDir . '/icewind/streams/src/File.php', - 'Icewind\\Streams\\HashWrapper' => $vendorDir . '/icewind/streams/src/HashWrapper.php', - 'Icewind\\Streams\\IteratorDirectory' => $vendorDir . '/icewind/streams/src/IteratorDirectory.php', - 'Icewind\\Streams\\NullWrapper' => $vendorDir . '/icewind/streams/src/NullWrapper.php', - 'Icewind\\Streams\\Path' => $vendorDir . '/icewind/streams/src/Path.php', - 'Icewind\\Streams\\PathWrapper' => $vendorDir . '/icewind/streams/src/PathWrapper.php', - 'Icewind\\Streams\\ReadHashWrapper' => $vendorDir . '/icewind/streams/src/ReadHashWrapper.php', - 'Icewind\\Streams\\RetryWrapper' => $vendorDir . '/icewind/streams/src/RetryWrapper.php', - 'Icewind\\Streams\\SeekableWrapper' => $vendorDir . '/icewind/streams/src/SeekableWrapper.php', - 'Icewind\\Streams\\Url' => $vendorDir . '/icewind/streams/src/Url.php', - 'Icewind\\Streams\\UrlCallback' => $vendorDir . '/icewind/streams/src/UrlCallback.php', - 'Icewind\\Streams\\Wrapper' => $vendorDir . '/icewind/streams/src/Wrapper.php', - 'Icewind\\Streams\\WrapperHandler' => $vendorDir . '/icewind/streams/src/WrapperHandler.php', - 'Icewind\\Streams\\WriteHashWrapper' => $vendorDir . '/icewind/streams/src/WriteHashWrapper.php', -); diff --git a/apps/files_external/3rdparty/composer/autoload_namespaces.php b/apps/files_external/3rdparty/composer/autoload_namespaces.php deleted file mode 100644 index 3f5c9296251..00000000000 --- a/apps/files_external/3rdparty/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -// autoload_namespaces.php @generated by Composer - -$vendorDir = dirname(__DIR__); -$baseDir = $vendorDir; - -return array( -); diff --git a/apps/files_external/3rdparty/composer/autoload_psr4.php b/apps/files_external/3rdparty/composer/autoload_psr4.php deleted file mode 100644 index 6bed531ed31..00000000000 --- a/apps/files_external/3rdparty/composer/autoload_psr4.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -// autoload_psr4.php @generated by Composer - -$vendorDir = dirname(__DIR__); -$baseDir = $vendorDir; - -return array( - 'Icewind\\Streams\\' => array($vendorDir . '/icewind/streams/src'), - 'Icewind\\SMB\\' => array($vendorDir . '/icewind/smb/src'), -); diff --git a/apps/files_external/3rdparty/composer/autoload_real.php b/apps/files_external/3rdparty/composer/autoload_real.php deleted file mode 100644 index 5eccc1e1cf6..00000000000 --- a/apps/files_external/3rdparty/composer/autoload_real.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -// autoload_real.php @generated by Composer - -class ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3 -{ - private static $loader; - - public static function loadClassLoader($class) - { - if ('Composer\Autoload\ClassLoader' === $class) { - require __DIR__ . '/ClassLoader.php'; - } - } - - /** - * @return \Composer\Autoload\ClassLoader - */ - public static function getLoader() - { - if (null !== self::$loader) { - return self::$loader; - } - - require __DIR__ . '/platform_check.php'; - - spl_autoload_register(array('ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit98fe9b281934250b3a93f69a5ce843b3', 'loadClassLoader')); - - require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::getInitializer($loader)); - - $loader->setClassMapAuthoritative(true); - $loader->register(true); - - return $loader; - } -} diff --git a/apps/files_external/3rdparty/composer/autoload_static.php b/apps/files_external/3rdparty/composer/autoload_static.php deleted file mode 100644 index 75b1adaa17b..00000000000 --- a/apps/files_external/3rdparty/composer/autoload_static.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -// autoload_static.php @generated by Composer - -namespace Composer\Autoload; - -class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3 -{ - public static $prefixLengthsPsr4 = array ( - 'I' => - array ( - 'Icewind\\Streams\\' => 16, - 'Icewind\\SMB\\' => 12, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Icewind\\Streams\\' => - array ( - 0 => __DIR__ . '/..' . '/icewind/streams/src', - ), - 'Icewind\\SMB\\' => - array ( - 0 => __DIR__ . '/..' . '/icewind/smb/src', - ), - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'Icewind\\SMB\\ACL' => __DIR__ . '/..' . '/icewind/smb/src/ACL.php', - 'Icewind\\SMB\\AbstractServer' => __DIR__ . '/..' . '/icewind/smb/src/AbstractServer.php', - 'Icewind\\SMB\\AbstractShare' => __DIR__ . '/..' . '/icewind/smb/src/AbstractShare.php', - 'Icewind\\SMB\\AnonymousAuth' => __DIR__ . '/..' . '/icewind/smb/src/AnonymousAuth.php', - 'Icewind\\SMB\\BasicAuth' => __DIR__ . '/..' . '/icewind/smb/src/BasicAuth.php', - 'Icewind\\SMB\\Change' => __DIR__ . '/..' . '/icewind/smb/src/Change.php', - 'Icewind\\SMB\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AccessDeniedException.php', - 'Icewind\\SMB\\Exception\\AlreadyExistsException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AlreadyExistsException.php', - 'Icewind\\SMB\\Exception\\AuthenticationException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AuthenticationException.php', - 'Icewind\\SMB\\Exception\\ConnectException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectException.php', - 'Icewind\\SMB\\Exception\\ConnectionAbortedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionAbortedException.php', - 'Icewind\\SMB\\Exception\\ConnectionException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionException.php', - 'Icewind\\SMB\\Exception\\ConnectionRefusedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionRefusedException.php', - 'Icewind\\SMB\\Exception\\ConnectionResetException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionResetException.php', - 'Icewind\\SMB\\Exception\\DependencyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/DependencyException.php', - 'Icewind\\SMB\\Exception\\Exception' => __DIR__ . '/..' . '/icewind/smb/src/Exception/Exception.php', - 'Icewind\\SMB\\Exception\\FileInUseException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/FileInUseException.php', - 'Icewind\\SMB\\Exception\\ForbiddenException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ForbiddenException.php', - 'Icewind\\SMB\\Exception\\HostDownException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/HostDownException.php', - 'Icewind\\SMB\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidArgumentException.php', - 'Icewind\\SMB\\Exception\\InvalidHostException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidHostException.php', - 'Icewind\\SMB\\Exception\\InvalidParameterException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidParameterException.php', - 'Icewind\\SMB\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidPathException.php', - 'Icewind\\SMB\\Exception\\InvalidRequestException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidRequestException.php', - 'Icewind\\SMB\\Exception\\InvalidResourceException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidResourceException.php', - 'Icewind\\SMB\\Exception\\InvalidTicket' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidTicket.php', - 'Icewind\\SMB\\Exception\\InvalidTypeException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/InvalidTypeException.php', - 'Icewind\\SMB\\Exception\\NoLoginServerException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NoLoginServerException.php', - 'Icewind\\SMB\\Exception\\NoRouteToHostException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NoRouteToHostException.php', - 'Icewind\\SMB\\Exception\\NotEmptyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NotEmptyException.php', - 'Icewind\\SMB\\Exception\\NotFoundException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/NotFoundException.php', - 'Icewind\\SMB\\Exception\\OutOfSpaceException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/OutOfSpaceException.php', - 'Icewind\\SMB\\Exception\\RevisionMismatchException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/RevisionMismatchException.php', - 'Icewind\\SMB\\Exception\\TimedOutException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/TimedOutException.php', - 'Icewind\\SMB\\IAuth' => __DIR__ . '/..' . '/icewind/smb/src/IAuth.php', - 'Icewind\\SMB\\IFileInfo' => __DIR__ . '/..' . '/icewind/smb/src/IFileInfo.php', - 'Icewind\\SMB\\INotifyHandler' => __DIR__ . '/..' . '/icewind/smb/src/INotifyHandler.php', - 'Icewind\\SMB\\IOptions' => __DIR__ . '/..' . '/icewind/smb/src/IOptions.php', - 'Icewind\\SMB\\IServer' => __DIR__ . '/..' . '/icewind/smb/src/IServer.php', - 'Icewind\\SMB\\IShare' => __DIR__ . '/..' . '/icewind/smb/src/IShare.php', - 'Icewind\\SMB\\ISystem' => __DIR__ . '/..' . '/icewind/smb/src/ISystem.php', - 'Icewind\\SMB\\ITimeZoneProvider' => __DIR__ . '/..' . '/icewind/smb/src/ITimeZoneProvider.php', - 'Icewind\\SMB\\KerberosApacheAuth' => __DIR__ . '/..' . '/icewind/smb/src/KerberosApacheAuth.php', - 'Icewind\\SMB\\KerberosAuth' => __DIR__ . '/..' . '/icewind/smb/src/KerberosAuth.php', - 'Icewind\\SMB\\KerberosTicket' => __DIR__ . '/..' . '/icewind/smb/src/KerberosTicket.php', - 'Icewind\\SMB\\Native\\NativeFileInfo' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeFileInfo.php', - 'Icewind\\SMB\\Native\\NativeReadStream' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeReadStream.php', - 'Icewind\\SMB\\Native\\NativeServer' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeServer.php', - 'Icewind\\SMB\\Native\\NativeShare' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeShare.php', - 'Icewind\\SMB\\Native\\NativeState' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeState.php', - 'Icewind\\SMB\\Native\\NativeStream' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeStream.php', - 'Icewind\\SMB\\Native\\NativeWriteStream' => __DIR__ . '/..' . '/icewind/smb/src/Native/NativeWriteStream.php', - 'Icewind\\SMB\\Options' => __DIR__ . '/..' . '/icewind/smb/src/Options.php', - 'Icewind\\SMB\\ServerFactory' => __DIR__ . '/..' . '/icewind/smb/src/ServerFactory.php', - 'Icewind\\SMB\\StringBuffer' => __DIR__ . '/..' . '/icewind/smb/src/StringBuffer.php', - 'Icewind\\SMB\\System' => __DIR__ . '/..' . '/icewind/smb/src/System.php', - 'Icewind\\SMB\\TimeZoneProvider' => __DIR__ . '/..' . '/icewind/smb/src/TimeZoneProvider.php', - 'Icewind\\SMB\\Wrapped\\Connection' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/Connection.php', - 'Icewind\\SMB\\Wrapped\\ErrorCodes' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/ErrorCodes.php', - 'Icewind\\SMB\\Wrapped\\FileInfo' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/FileInfo.php', - 'Icewind\\SMB\\Wrapped\\NotifyHandler' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/NotifyHandler.php', - 'Icewind\\SMB\\Wrapped\\Parser' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/Parser.php', - 'Icewind\\SMB\\Wrapped\\RawConnection' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/RawConnection.php', - 'Icewind\\SMB\\Wrapped\\Server' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/Server.php', - 'Icewind\\SMB\\Wrapped\\Share' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/Share.php', - 'Icewind\\Streams\\CallbackWrapper' => __DIR__ . '/..' . '/icewind/streams/src/CallbackWrapper.php', - 'Icewind\\Streams\\CountWrapper' => __DIR__ . '/..' . '/icewind/streams/src/CountWrapper.php', - 'Icewind\\Streams\\Directory' => __DIR__ . '/..' . '/icewind/streams/src/Directory.php', - 'Icewind\\Streams\\DirectoryFilter' => __DIR__ . '/..' . '/icewind/streams/src/DirectoryFilter.php', - 'Icewind\\Streams\\DirectoryWrapper' => __DIR__ . '/..' . '/icewind/streams/src/DirectoryWrapper.php', - 'Icewind\\Streams\\File' => __DIR__ . '/..' . '/icewind/streams/src/File.php', - 'Icewind\\Streams\\HashWrapper' => __DIR__ . '/..' . '/icewind/streams/src/HashWrapper.php', - 'Icewind\\Streams\\IteratorDirectory' => __DIR__ . '/..' . '/icewind/streams/src/IteratorDirectory.php', - 'Icewind\\Streams\\NullWrapper' => __DIR__ . '/..' . '/icewind/streams/src/NullWrapper.php', - 'Icewind\\Streams\\Path' => __DIR__ . '/..' . '/icewind/streams/src/Path.php', - 'Icewind\\Streams\\PathWrapper' => __DIR__ . '/..' . '/icewind/streams/src/PathWrapper.php', - 'Icewind\\Streams\\ReadHashWrapper' => __DIR__ . '/..' . '/icewind/streams/src/ReadHashWrapper.php', - 'Icewind\\Streams\\RetryWrapper' => __DIR__ . '/..' . '/icewind/streams/src/RetryWrapper.php', - 'Icewind\\Streams\\SeekableWrapper' => __DIR__ . '/..' . '/icewind/streams/src/SeekableWrapper.php', - 'Icewind\\Streams\\Url' => __DIR__ . '/..' . '/icewind/streams/src/Url.php', - 'Icewind\\Streams\\UrlCallback' => __DIR__ . '/..' . '/icewind/streams/src/UrlCallback.php', - 'Icewind\\Streams\\Wrapper' => __DIR__ . '/..' . '/icewind/streams/src/Wrapper.php', - 'Icewind\\Streams\\WrapperHandler' => __DIR__ . '/..' . '/icewind/streams/src/WrapperHandler.php', - 'Icewind\\Streams\\WriteHashWrapper' => __DIR__ . '/..' . '/icewind/streams/src/WriteHashWrapper.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json deleted file mode 100644 index 275a586f4fb..00000000000 --- a/apps/files_external/3rdparty/composer/installed.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "packages": [ - { - "name": "icewind/smb", - "version": "v3.7.0", - "version_normalized": "3.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/icewind1991/SMB.git", - "reference": "e6904cbe75f678335092f4861c60c656b1a99e84" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/e6904cbe75f678335092f4861c60c656b1a99e84", - "reference": "e6904cbe75f678335092f4861c60c656b1a99e84", - "shasum": "" - }, - "require": { - "icewind/streams": ">=0.7.3", - "php": ">=7.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.57", - "phpunit/phpunit": "^8.5|^9.3.8", - "psalm/phar": "^4.3" - }, - "time": "2024-11-11T14:08:34+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Icewind\\SMB\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Robin Appelman", - "email": "icewind@owncloud.com" - } - ], - "description": "php wrapper for smbclient and libsmbclient-php", - "support": { - "issues": "https://github.com/icewind1991/SMB/issues", - "source": "https://github.com/icewind1991/SMB/tree/v3.7.0" - }, - "install-path": "../icewind/smb" - }, - { - "name": "icewind/streams", - "version": "v0.7.7", - "version_normalized": "0.7.7.0", - "source": { - "type": "git", - "url": "https://github.com/icewind1991/Streams.git", - "reference": "64200fd7cfcc7f550c3c695c48d8fd8bba97fecb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/64200fd7cfcc7f550c3c695c48d8fd8bba97fecb", - "reference": "64200fd7cfcc7f550c3c695c48d8fd8bba97fecb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9" - }, - "time": "2023-03-16T14:52:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Icewind\\Streams\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Robin Appelman", - "email": "icewind@owncloud.com" - } - ], - "description": "A set of generic stream wrappers", - "support": { - "issues": "https://github.com/icewind1991/Streams/issues", - "source": "https://github.com/icewind1991/Streams/tree/v0.7.7" - }, - "install-path": "../icewind/streams" - } - ], - "dev": true, - "dev-package-names": [] -} diff --git a/apps/files_external/3rdparty/composer/installed.php b/apps/files_external/3rdparty/composer/installed.php deleted file mode 100644 index 12058ec9474..00000000000 --- a/apps/files_external/3rdparty/composer/installed.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php return array( - 'root' => array( - 'name' => 'files_external/3rdparty', - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => '101c7575ae7684a572e53740c63635cd12685995', - 'type' => 'library', - 'install_path' => __DIR__ . '/../', - 'aliases' => array(), - 'dev' => true, - ), - 'versions' => array( - 'files_external/3rdparty' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => '101c7575ae7684a572e53740c63635cd12685995', - 'type' => 'library', - 'install_path' => __DIR__ . '/../', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'icewind/smb' => array( - 'pretty_version' => 'v3.7.0', - 'version' => '3.7.0.0', - 'reference' => 'e6904cbe75f678335092f4861c60c656b1a99e84', - 'type' => 'library', - 'install_path' => __DIR__ . '/../icewind/smb', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'icewind/streams' => array( - 'pretty_version' => 'v0.7.7', - 'version' => '0.7.7.0', - 'reference' => '64200fd7cfcc7f550c3c695c48d8fd8bba97fecb', - 'type' => 'library', - 'install_path' => __DIR__ . '/../icewind/streams', - 'aliases' => array(), - 'dev_requirement' => false, - ), - ), -); diff --git a/apps/files_external/3rdparty/composer/platform_check.php b/apps/files_external/3rdparty/composer/platform_check.php deleted file mode 100644 index 589e9e770b9..00000000000 --- a/apps/files_external/3rdparty/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -// platform_check.php @generated by Composer - -$issues = array(); - -if (!(PHP_VERSION_ID >= 70200)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/apps/files_external/3rdparty/icewind/smb/.gitignore b/apps/files_external/3rdparty/icewind/smb/.gitignore deleted file mode 100644 index 5c8c3eecba4..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-FileCopyrightText: 2012 Robin Appelman <robin@icewind.nl> -# SPDX-License-Identifier: MIT -.idea -vendor -composer.lock -.php_cs.cache -listen.php -test.php -*.cache
\ No newline at end of file diff --git a/apps/files_external/3rdparty/icewind/smb/.php_cs.dist b/apps/files_external/3rdparty/icewind/smb/.php_cs.dist deleted file mode 100644 index e37135fcb7b..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/.php_cs.dist +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -$finder = PhpCsFixer\Finder::create() - ->exclude('vendor') - ->in(__DIR__) -; -return PhpCsFixer\Config::create() - ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'braces' => ['position_after_functions_and_oop_constructs' => 'same'], - 'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => false], - ]) - ->setIndent("\t") - ->setFinder($finder) - ; diff --git a/apps/files_external/3rdparty/icewind/smb/LICENSE.txt b/apps/files_external/3rdparty/icewind/smb/LICENSE.txt deleted file mode 100644 index fa0495d94c3..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Robin Appelman <robin@icewind.nl> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/apps/files_external/3rdparty/icewind/smb/LICENSES/AGPL-3.0-or-later.txt b/apps/files_external/3rdparty/icewind/smb/LICENSES/AGPL-3.0-or-later.txt deleted file mode 100644 index 0c97efd25b5..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/LICENSES/AGPL-3.0-or-later.txt +++ /dev/null @@ -1,235 +0,0 @@ -GNU AFFERO GENERAL PUBLIC LICENSE -Version 3, 19 November 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - - Preamble - -The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. - -A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. - -The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. - -An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. - -The precise terms and conditions for copying, distribution and modification follow. - - TERMS AND CONDITIONS - -0. Definitions. - -"This License" refers to version 3 of the GNU Affero General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the Program. - -To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those -subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". - - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. - -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Remote Network Interaction; Use with the GNU General Public License. - -Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. - -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. - -14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - -If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>. diff --git a/apps/files_external/3rdparty/icewind/smb/LICENSES/CC0-1.0.txt b/apps/files_external/3rdparty/icewind/smb/LICENSES/CC0-1.0.txt deleted file mode 100644 index 0e259d42c99..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/LICENSES/CC0-1.0.txt +++ /dev/null @@ -1,121 +0,0 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. diff --git a/apps/files_external/3rdparty/icewind/smb/LICENSES/MIT.txt b/apps/files_external/3rdparty/icewind/smb/LICENSES/MIT.txt deleted file mode 100644 index 2071b23b0e0..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/LICENSES/MIT.txt +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) <year> <copyright holders> - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/apps/files_external/3rdparty/icewind/smb/README.md b/apps/files_external/3rdparty/icewind/smb/README.md deleted file mode 100644 index 2a93c8c4717..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/README.md +++ /dev/null @@ -1,192 +0,0 @@ -<!-- - - SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - - SPDX-License-Identifier: MIT ---> -SMB -=== - -[](https://github.com/icewind1991/SMB/actions/workflows/ci.yaml) -[](https://codecov.io/gh/icewind1991/SMB) - -PHP wrapper for `smbclient` and [`libsmbclient-php`](https://github.com/eduardok/libsmbclient-php) - -- Reuses a single `smbclient` instance for multiple requests -- Doesn't leak the password to the process list -- Simple 1-on-1 mapping of SMB commands -- A stream-based api to remove the need for temporary files -- Support for using libsmbclient directly trough [`libsmbclient-php`](https://github.com/eduardok/libsmbclient-php) - -Examples ----- - -### Connect to a share ### - -```php -<?php -use Icewind\SMB\ServerFactory; -use Icewind\SMB\BasicAuth; - -require('vendor/autoload.php'); - -$serverFactory = new ServerFactory(); -$auth = new BasicAuth('user', 'workgroup', 'password'); -$server = $serverFactory->createServer('localhost', $auth); - -$share = $server->getShare('test'); -``` - -The server factory will automatically pick between the `smbclient` and `libsmbclient-php` -based backend depending on what is available. - -### Using anonymous authentication ### - -```php -$serverFactory = new ServerFactory(); -$auth = new AnonymousAuth(); -$server = $serverFactory->createServer('localhost', $auth); -``` - -### Using kerberos authentication ### - -There are two ways of using kerberos to authenticate against the smb server: - -- Using a ticket from the php server -- Re-using a ticket send by the client - -### Using a server ticket - -Using a server ticket allows the web server to authenticate against the smb server using an existing machine account. - -The ticket needs to be available in the environment of the php process. - -```php -$serverFactory = new ServerFactory(); -$auth = new KerberosAuth(); -$server = $serverFactory->createServer('localhost', $auth); -``` - -### Re-using a client ticket - -By re-using a client ticket you can create a single sign-on setup where the user authenticates against -the web service using kerberos. And the web server can forward that ticket to the smb server, allowing it -to act on the behalf of the user without requiring the user to enter his password. - -The setup for such a system is fairly involved and requires roughly the following this - -- The web server is authenticated against kerberos with a machine account -- Delegation is enabled for the web server's machine account -- The web server is setup to perform kerberos authentication and save the ticket in it's environment -- Php has the krb5 extension installed -- The client authenticates using a ticket with forwarding enabled - -```php -$serverFactory = new ServerFactory(); -$auth = new KerberosAuth(); -$auth->setTicket(KerberosTicket::fromEnv()); -$server = $serverFactory->createServer('localhost', $auth); -``` - -### Upload a file ### - -```php -$share->put($fileToUpload, 'example.txt'); -``` - -### Download a file ### - -```php -$share->get('example.txt', $target); -``` - -### List shares on the remote server ### - -```php -$shares = $server->listShares(); - -foreach ($shares as $share) { - echo $share->getName() . "\n"; -} -``` - -### List the content of a folder ### - -```php -$content = $share->dir('test'); - -foreach ($content as $info) { - echo $info->getName() . "\n"; - echo "\tsize :" . $info->getSize() . "\n"; -} -``` - -### Using read streams - -```php -$fh = $share->read('test.txt'); -echo fread($fh, 4086); -fclose($fh); -``` - -### Using write streams - -```php -$fh = $share->write('test.txt'); -fwrite($fh, 'bar'); -fclose($fh); -``` - -**Note**: write() will truncate your file to 0bytes. You may open a writeable stream with append() which will point -the cursor to the end of the file or create it if it does not exist yet. (append() is only compatible with libsmbclient-php) -```php -$fh = $share->append('test.txt'); -fwrite($fh, 'bar'); -fclose($fh); -``` - - -### Using notify - -```php -$share->notify('')->listen(function (\Icewind\SMB\Change $change) { - echo $change->getCode() . ': ' . $change->getPath() . "\n"; -}); -``` - -### Changing network timeouts - -```php -$options = new Options(); -$options->setTimeout(5); -$serverFactory = new ServerFactory($options); -``` - -### Setting protocol version - -```php -$options = new Options(); -$options->setMinProtocol(IOptions::PROTOCOL_SMB2); -$options->setMaxProtocol(IOptions::PROTOCOL_SMB3); -$serverFactory = new ServerFactory($options); -``` - -Note, setting the protocol version is not supported with php-smbclient version 1.0.1 or lower. - -### Customizing system integration - -The `smbclient` backend needs to get various information about the system it's running on to function -such as the paths of various binaries or the system timezone. -While the default logic for getting this information should work on most systems, it is possible to customize this behaviour. - -In order to customize the integration you provide a custom implementation of `ITimezoneProvider` and/or `ISystem` and pass them as arguments to the `ServerFactory`. - -## Testing SMB - -Use the following steps to check if the library can connect to your SMB share. - -1. Clone this repository or download the source as [zip](https://github.com/icewind1991/SMB/archive/master.zip) -2. Make sure [composer](https://getcomposer.org/) is installed -3. Run `composer install` in the root of the repository -4. Edit `example.php` with the relevant settings for your share. -5. Run `php example.php` - -If everything works correctly then the contents of the share should be outputted. diff --git a/apps/files_external/3rdparty/icewind/smb/composer.json b/apps/files_external/3rdparty/icewind/smb/composer.json deleted file mode 100644 index 6ab6100af71..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "icewind/smb", - "description": "php wrapper for smbclient and libsmbclient-php", - "license": "MIT", - "authors": [ - { - "name": "Robin Appelman", - "email": "icewind@owncloud.com" - } - ], - "require": { - "php": ">=7.2", - "icewind/streams": ">=0.7.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.5|^9.3.8", - "friendsofphp/php-cs-fixer": "^2.16", - "phpstan/phpstan": "^0.12.57", - "psalm/phar": "^4.3" - }, - "autoload": { - "psr-4": { - "Icewind\\SMB\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Icewind\\SMB\\Test\\": "tests/" - } - }, - "scripts": { - "lint": "parallel-lint --exclude src --exclude vendor --exclude target --exclude build .", - "cs:check": "php-cs-fixer fix --dry-run --diff", - "cs:fix": "php-cs-fixer fix", - "psalm": "psalm.phar" - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/composer.json.license b/apps/files_external/3rdparty/icewind/smb/composer.json.license deleted file mode 100644 index 99ba7368b14..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/composer.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> -SPDX-License-Identifier: MIT diff --git a/apps/files_external/3rdparty/icewind/smb/psalm.xml.license b/apps/files_external/3rdparty/icewind/smb/psalm.xml.license deleted file mode 100644 index 94efc752831..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/psalm.xml.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2021 Robin Appelman <robin@icewind.nl> -SPDX-License-Identifier: MIT diff --git a/apps/files_external/3rdparty/icewind/smb/src/ACL.php b/apps/files_external/3rdparty/icewind/smb/src/ACL.php deleted file mode 100644 index 9d83cd15409..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/ACL.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2020 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -class ACL { - const TYPE_ALLOW = 0; - const TYPE_DENY = 1; - - const MASK_READ = 0x0001; - const MASK_WRITE = 0x0002; - const MASK_EXECUTE = 0x00020; - const MASK_DELETE = 0x10000; - - const FLAG_OBJECT_INHERIT = 0x1; - const FLAG_CONTAINER_INHERIT = 0x2; - - /** @var int */ - private $type; - /** @var int */ - private $flags; - /** @var int */ - private $mask; - - public function __construct(int $type, int $flags, int $mask) { - $this->type = $type; - $this->flags = $flags; - $this->mask = $mask; - } - - /** - * Check if the acl allows a specific permissions - * - * Note that this does not take inherited acls into account - * - * @param int $mask one of the ACL::MASK_* constants - * @return bool - */ - public function allows(int $mask): bool { - return $this->type === self::TYPE_ALLOW && ($this->mask & $mask) === $mask; - } - - /** - * Check if the acl allows a specific permissions - * - * Note that this does not take inherited acls into account - * - * @param int $mask one of the ACL::MASK_* constants - * @return bool - */ - public function denies(int $mask): bool { - return $this->type === self::TYPE_DENY && ($this->mask & $mask) === $mask; - } - - public function getType(): int { - return $this->type; - } - - public function getFlags(): int { - return $this->flags; - } - - public function getMask(): int { - return $this->mask; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/AbstractServer.php b/apps/files_external/3rdparty/icewind/smb/src/AbstractServer.php deleted file mode 100644 index fe22fb10d19..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/AbstractServer.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -abstract class AbstractServer implements IServer { - const LOCALE = 'en_US.UTF-8'; - - /** @var string */ - protected $host; - - /** @var IAuth */ - protected $auth; - - /** @var ISystem */ - protected $system; - - /** @var ITimeZoneProvider */ - protected $timezoneProvider; - - /** @var IOptions */ - protected $options; - - /** - * @param string $host - * @param IAuth $auth - * @param ISystem $system - * @param ITimeZoneProvider $timeZoneProvider - * @param IOptions $options - */ - public function __construct(string $host, IAuth $auth, ISystem $system, ITimeZoneProvider $timeZoneProvider, IOptions $options) { - $this->host = $host; - $this->auth = $auth; - $this->system = $system; - $this->timezoneProvider = $timeZoneProvider; - $this->options = $options; - } - - public function getAuth(): IAuth { - return $this->auth; - } - - public function getHost(): string { - return $this->host; - } - - public function getTimeZone(): string { - return $this->timezoneProvider->get($this->host); - } - - public function getSystem(): ISystem { - return $this->system; - } - - public function getOptions(): IOptions { - return $this->options; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php b/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php deleted file mode 100644 index 77f50e4ca9d..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2015 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\InvalidPathException; - -abstract class AbstractShare implements IShare { - /** @var string[] */ - private $forbiddenCharacters; - - public function __construct() { - $this->forbiddenCharacters = ['?', '<', '>', ':', '*', '|', '"', chr(0), "\n", "\r"]; - } - - /** - * @param string $path - * @throws InvalidPathException - */ - protected function verifyPath(string $path): void { - foreach ($this->forbiddenCharacters as $char) { - if (strpos($path, $char) !== false) { - throw new InvalidPathException('Invalid path, "' . $char . '" is not allowed'); - } - } - } - - /** - * @param string[] $charList - */ - public function setForbiddenChars(array $charList): void { - $this->forbiddenCharacters = $charList; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/AnonymousAuth.php b/apps/files_external/3rdparty/icewind/smb/src/AnonymousAuth.php deleted file mode 100644 index 87bce1663dd..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/AnonymousAuth.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\Exception; - -class AnonymousAuth implements IAuth { - public function getUsername(): ?string { - return null; - } - - public function getWorkgroup(): ?string { - return 'dummy'; - } - - public function getPassword(): ?string { - return null; - } - - public function getExtraCommandLineArguments(): string { - return '-N'; - } - - public function setExtraSmbClientOptions($smbClientState): void { - if (smbclient_option_set($smbClientState, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, true) === false) { - throw new Exception("Failed to set smbclient options for anonymous auth"); - } - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/BasicAuth.php b/apps/files_external/3rdparty/icewind/smb/src/BasicAuth.php deleted file mode 100644 index a462109b3c2..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/BasicAuth.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -class BasicAuth implements IAuth { - /** @var string */ - private $username; - /** @var string|null */ - private $workgroup; - /** @var string */ - private $password; - - public function __construct(string $username, ?string $workgroup, string $password) { - $this->username = $username; - $this->workgroup = $workgroup; - $this->password = $password; - } - - public function getUsername(): ?string { - return $this->username; - } - - public function getWorkgroup(): ?string { - return $this->workgroup; - } - - public function getPassword(): ?string { - return $this->password; - } - - public function getExtraCommandLineArguments(): string { - return ($this->workgroup) ? '-W ' . escapeshellarg($this->workgroup) : ''; - } - - public function setExtraSmbClientOptions($smbClientState): void { - // noop - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Change.php b/apps/files_external/3rdparty/icewind/smb/src/Change.php deleted file mode 100644 index c21297a2bec..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Change.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2016 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -class Change { - /** @var int */ - private $code; - /** @var string */ - private $path; - - public function __construct(int $code, string $path) { - $this->code = $code; - $this->path = $path; - } - - public function getCode(): int { - return $this->code; - } - - public function getPath(): string { - return $this->path; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/AccessDeniedException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/AccessDeniedException.php deleted file mode 100644 index 7e8a81d88ba..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/AccessDeniedException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class AccessDeniedException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/AlreadyExistsException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/AlreadyExistsException.php deleted file mode 100644 index 7828efe8529..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/AlreadyExistsException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class AlreadyExistsException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/AuthenticationException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/AuthenticationException.php deleted file mode 100644 index bf51f5c2bd1..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/AuthenticationException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class AuthenticationException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectException.php deleted file mode 100644 index 527e5835c25..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class ConnectException extends Exception { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php deleted file mode 100644 index cc959c27734..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class ConnectionAbortedException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionException.php deleted file mode 100644 index deabfcd78b7..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class ConnectionException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionRefusedException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionRefusedException.php deleted file mode 100644 index 826a19615a2..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionRefusedException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class ConnectionRefusedException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php deleted file mode 100644 index 464e752c2c6..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2020 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class ConnectionResetException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/DependencyException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/DependencyException.php deleted file mode 100644 index ed3d427918d..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/DependencyException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2016 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class DependencyException extends Exception { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php deleted file mode 100644 index 199cdf3056b..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -use Throwable; - -/** - * @psalm-consistent-constructor - */ -class Exception extends \Exception { - public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) { - parent::__construct($message, $code, $previous); - } - - /** - * @param string|null $path - * @param string|int|null $error - * @return Exception - */ - public static function unknown(?string $path, $error): Exception { - $message = 'Unknown error (' . (string)$error . ')'; - if ($path) { - $message .= ' for ' . $path; - } - - return new Exception($message, is_int($error) ? $error : 0); - } - - /** - * @param array<int|string, class-string<Exception>> $exceptionMap - * @param string|int|null $error - * @param string|null $path - * @return Exception - */ - public static function fromMap(array $exceptionMap, $error, ?string $path): Exception { - if (isset($exceptionMap[$error])) { - $exceptionClass = $exceptionMap[$error]; - if (is_numeric($error)) { - return new $exceptionClass($path, $error); - } else { - return new $exceptionClass($path); - } - } else { - return Exception::unknown($path, $error); - } - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/FileInUseException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/FileInUseException.php deleted file mode 100644 index 44affabc428..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/FileInUseException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class FileInUseException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/ForbiddenException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/ForbiddenException.php deleted file mode 100644 index 2d070543114..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/ForbiddenException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class ForbiddenException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/HostDownException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/HostDownException.php deleted file mode 100644 index 321f8d2f902..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/HostDownException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class HostDownException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidArgumentException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidArgumentException.php deleted file mode 100644 index 69422392123..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidArgumentException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidHostException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidHostException.php deleted file mode 100644 index 630734ee855..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidHostException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidHostException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidParameterException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidParameterException.php deleted file mode 100644 index 57a50a16496..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidParameterException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidParameterException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidPathException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidPathException.php deleted file mode 100644 index 8b2ea3aeab3..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidPathException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidPathException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidRequestException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidRequestException.php deleted file mode 100644 index d6ee8db0698..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidRequestException.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidRequestException extends Exception { - /** - * @var string - */ - protected $path; - - public function __construct(string $path = "", int $code = 0, ?\Throwable $previous = null) { - $class = get_class($this); - $parts = explode('\\', $class); - $baseName = array_pop($parts); - parent::__construct('Invalid request for ' . $path . ' (' . $baseName . ')', $code, $previous); - $this->path = $path; - } - - /** - * @return string - */ - public function getPath() { - return $this->path; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidResourceException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidResourceException.php deleted file mode 100644 index 95507e4f4ea..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidResourceException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidResourceException extends Exception { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidTicket.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidTicket.php deleted file mode 100644 index eb718af37e8..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidTicket.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2022 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB\Exception; - -class InvalidTicket extends Exception { - -}
\ No newline at end of file diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidTypeException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidTypeException.php deleted file mode 100644 index 4a5b12cbab8..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidTypeException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class InvalidTypeException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/NoLoginServerException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/NoLoginServerException.php deleted file mode 100644 index efe5b4e9197..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/NoLoginServerException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class NoLoginServerException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/NoRouteToHostException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/NoRouteToHostException.php deleted file mode 100644 index 475aaef6699..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/NoRouteToHostException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class NoRouteToHostException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/NotEmptyException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/NotEmptyException.php deleted file mode 100644 index e76980b1f60..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/NotEmptyException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class NotEmptyException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/NotFoundException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/NotFoundException.php deleted file mode 100644 index 9cea30d86f3..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/NotFoundException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class NotFoundException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/OutOfSpaceException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/OutOfSpaceException.php deleted file mode 100644 index 1db6a7208a9..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/OutOfSpaceException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class OutOfSpaceException extends InvalidRequestException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/RevisionMismatchException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/RevisionMismatchException.php deleted file mode 100644 index a3954018b4c..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/RevisionMismatchException.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -use Throwable; - -class RevisionMismatchException extends Exception { - public function __construct(string $message = 'Protocol version mismatch', int $code = 0, Throwable $previous = null) { - parent::__construct($message, $code, $previous); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Exception/TimedOutException.php b/apps/files_external/3rdparty/icewind/smb/src/Exception/TimedOutException.php deleted file mode 100644 index 57eeb0f0ba8..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Exception/TimedOutException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Exception; - -class TimedOutException extends ConnectException { -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/IAuth.php b/apps/files_external/3rdparty/icewind/smb/src/IAuth.php deleted file mode 100644 index 46ba4b81b18..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/IAuth.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -interface IAuth { - public function getUsername(): ?string; - - public function getWorkgroup(): ?string; - - public function getPassword(): ?string; - - /** - * Any extra command line option for smbclient that are required - * - * @return string - */ - public function getExtraCommandLineArguments(): string; - - /** - * Set any extra options for libsmbclient that are required - * - * @param resource $smbClientState - */ - public function setExtraSmbClientOptions($smbClientState): void; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/IFileInfo.php b/apps/files_external/3rdparty/icewind/smb/src/IFileInfo.php deleted file mode 100644 index e71e0e40a1e..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/IFileInfo.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -interface IFileInfo { - /* - * Mappings of the DOS mode bits, as returned by smbc_getxattr() when the - * attribute name "system.dos_attr.mode" (or "system.dos_attr.*" or - * "system.*") is specified. - */ - const MODE_READONLY = 0x01; - const MODE_HIDDEN = 0x02; - const MODE_SYSTEM = 0x04; - const MODE_VOLUME_ID = 0x08; - const MODE_DIRECTORY = 0x10; - const MODE_ARCHIVE = 0x20; - const MODE_NORMAL = 0x80; - - public function getPath(): string; - - public function getName(): string; - - public function getSize(): int; - - public function getMTime(): int; - - public function isDirectory(): bool; - - public function isReadOnly(): bool; - - public function isHidden(): bool; - - public function isSystem(): bool; - - public function isArchived(): bool; - - /** - * @return ACL[] - */ - public function getAcls(): array; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/INotifyHandler.php b/apps/files_external/3rdparty/icewind/smb/src/INotifyHandler.php deleted file mode 100644 index 829ac7d9a0a..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/INotifyHandler.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2016 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -interface INotifyHandler { - // https://msdn.microsoft.com/en-us/library/dn392331.aspx - const NOTIFY_ADDED = 1; - const NOTIFY_REMOVED = 2; - const NOTIFY_MODIFIED = 3; - const NOTIFY_RENAMED_OLD = 4; - const NOTIFY_RENAMED_NEW = 5; - const NOTIFY_ADDED_STREAM = 6; - const NOTIFY_REMOVED_STREAM = 7; - const NOTIFY_MODIFIED_STREAM = 8; - const NOTIFY_REMOVED_BY_DELETE = 9; - - /** - * Get all changes detected since the start of the notify process or the last call to getChanges - * - * @return Change[] - */ - public function getChanges(): array; - - /** - * Listen actively to all incoming changes - * - * Note that this is a blocking process and will cause the process to block forever if not explicitly terminated - * - * @param callable(Change):?bool $callback - */ - public function listen(callable $callback): void; - - /** - * Stop listening for changes - * - * Note that any pending changes will be discarded - */ - public function stop(): void; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/IOptions.php b/apps/files_external/3rdparty/icewind/smb/src/IOptions.php deleted file mode 100644 index b72700c9d8c..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/IOptions.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -interface IOptions { - const PROTOCOL_NT1 = 'NT1'; - const PROTOCOL_SMB2 = 'SMB2'; - const PROTOCOL_SMB2_02 = 'SMB2_02'; - const PROTOCOL_SMB2_22 = 'SMB2_22'; - const PROTOCOL_SMB2_24 = 'SMB2_24'; - const PROTOCOL_SMB3 = 'SMB3'; - const PROTOCOL_SMB3_00 = 'SMB3_00'; - const PROTOCOL_SMB3_02 = 'SMB3_02'; - const PROTOCOL_SMB3_10 = 'SMB3_10'; - const PROTOCOL_SMB3_11 = 'SMB3_11'; - - public function getTimeout(): int; - - public function getMinProtocol(): ?string; - - public function getMaxProtocol(): ?string; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/IServer.php b/apps/files_external/3rdparty/icewind/smb/src/IServer.php deleted file mode 100644 index c11fb450853..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/IServer.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -interface IServer { - public function getAuth(): IAuth; - - public function getHost(): string; - - /** - * @return \Icewind\SMB\IShare[] - * - * @throws \Icewind\SMB\Exception\AuthenticationException - * @throws \Icewind\SMB\Exception\InvalidHostException - */ - public function listShares(): array; - - public function getShare(string $name): IShare; - - public function getTimeZone(): string; - - public function getSystem(): ISystem; - - public function getOptions(): IOptions; - - public static function available(ISystem $system): bool; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/IShare.php b/apps/files_external/3rdparty/icewind/smb/src/IShare.php deleted file mode 100644 index 617b81746ea..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/IShare.php +++ /dev/null @@ -1,164 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\AlreadyExistsException; -use Icewind\SMB\Exception\InvalidRequestException; -use Icewind\SMB\Exception\InvalidTypeException; -use Icewind\SMB\Exception\NotFoundException; - -interface IShare { - /** - * Get the name of the share - * - * @return string - */ - public function getName(): string; - - /** - * Download a remote file - * - * @param string $source remote file - * @param string $target local file - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function get(string $source, string $target): bool; - - /** - * Upload a local file - * - * @param string $source local file - * @param string $target remote file - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function put(string $source, string $target): bool; - - /** - * Open a readable stream to a remote file - * - * @param string $source - * @return resource a read only stream with the contents of the remote file - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function read(string $source); - - /** - * Open a writable stream to a remote file - * Note: This method will truncate the file to 0bytes - * - * @param string $target - * @return resource a write only stream to upload a remote file - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function write(string $target); - - /** - * Open a writable stream to a remote file and set the cursor to the end of the file - * - * @param string $target - * @return resource a write only stream to upload a remote file - * - * @throws NotFoundException - * @throws InvalidTypeException - * @throws InvalidRequestException - */ - public function append(string $target); - - /** - * Rename a remote file - * - * @param string $from - * @param string $to - * @return bool - * - * @throws NotFoundException - * @throws AlreadyExistsException - */ - public function rename(string $from, string $to): bool; - - /** - * Delete a file on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function del(string $path): bool; - - /** - * List the content of a remote folder - * - * @param string $path - * @return IFileInfo[] - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function dir(string $path): array; - - /** - * @param string $path - * @return IFileInfo - * - * @throws NotFoundException - */ - public function stat(string $path): IFileInfo; - - /** - * Create a folder on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws AlreadyExistsException - */ - public function mkdir(string $path): bool; - - /** - * Remove a folder on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function rmdir(string $path): bool; - - /** - * @param string $path - * @param int $mode a combination of FileInfo::MODE_READONLY, FileInfo::MODE_ARCHIVE, FileInfo::MODE_SYSTEM and FileInfo::MODE_HIDDEN, FileInfo::NORMAL - * @return mixed - */ - public function setMode(string $path, int $mode); - - /** - * @param string $path - * @return INotifyHandler - */ - public function notify(string $path); - - /** - * Get the IServer instance for this share - * - * @return IServer - */ - public function getServer(): IServer; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/ISystem.php b/apps/files_external/3rdparty/icewind/smb/src/ISystem.php deleted file mode 100644 index 90209f9ae24..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/ISystem.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -/** - * The `ISystem` interface provides a way to access system dependent information - * such as the availability and location of certain binaries. - */ -interface ISystem { - /** - * Get the path to a file descriptor of the current process - * - * @param int $num the file descriptor id - * @return string - */ - public function getFD(int $num): string; - - /** - * Get the full path to the `smbclient` binary of null if the binary is not available - * - * @return string|null - */ - public function getSmbclientPath(): ?string; - - /** - * Get the full path to the `net` binary of null if the binary is not available - * - * @return string|null - */ - public function getNetPath(): ?string; - - /** - * Get the full path to the `smbcacls` binary of null if the binary is not available - * - * @return string|null - */ - public function getSmbcAclsPath(): ?string; - - /** - * Get the full path to the `stdbuf` binary of null if the binary is not available - * - * @return string|null - */ - public function getStdBufPath(): ?string; - - /** - * Get the full path to the `date` binary of null if the binary is not available - * - * @return string|null - */ - public function getDatePath(): ?string; - - /** - * Whether or not the smbclient php extension is enabled - * - * @return bool - */ - public function libSmbclientAvailable(): bool; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/ITimeZoneProvider.php b/apps/files_external/3rdparty/icewind/smb/src/ITimeZoneProvider.php deleted file mode 100644 index dba3b58132e..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/ITimeZoneProvider.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -interface ITimeZoneProvider { - /** - * Get the timezone of the smb server - * - * @param string $host - * @return string - */ - public function get(string $host): string; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/KerberosApacheAuth.php b/apps/files_external/3rdparty/icewind/smb/src/KerberosApacheAuth.php deleted file mode 100644 index eb22982f0ec..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/KerberosApacheAuth.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\DependencyException; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\InvalidTicket; - -/** - * Use existing kerberos ticket to authenticate and reuse the apache ticket cache (mod_auth_kerb) - * - * @deprecated Use `KerberosAuth` with `$auth->setTicket(KerberosTicket::fromEnv())` instead - */ -class KerberosApacheAuth extends KerberosAuth implements IAuth { - public function getTicket(): KerberosTicket { - if ($this->ticket === null) { - $ticket = KerberosTicket::fromEnv(); - if ($ticket === null) { - throw new InvalidTicket("No ticket found in environment"); - } - $this->ticket = $ticket; - } - return $this->ticket; - } - - /** - * Copy the ticket to a temporary location and use that ticket for authentication - * - * @return void - */ - public function copyTicket(): void { - $this->ticket = KerberosTicket::load($this->getTicket()->save()); - } - - /** - * Check if a valid kerberos ticket is present - * - * @return bool - */ - public function checkTicket(): bool { - return $this->getTicket()->isValid(); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/KerberosAuth.php b/apps/files_external/3rdparty/icewind/smb/src/KerberosAuth.php deleted file mode 100644 index 6e35f9bd8f3..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/KerberosAuth.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\Exception; - -/** - * Use existing kerberos ticket to authenticate - */ -class KerberosAuth implements IAuth { - /** @var ?KerberosTicket */ - protected $ticket = null; - - public function getTicket(): ?KerberosTicket { - return $this->ticket; - } - - public function setTicket(?KerberosTicket $ticket): void { - $this->ticket = $ticket; - } - - public function getUsername(): ?string { - return 'dummy'; - } - - public function getWorkgroup(): ?string { - return 'dummy'; - } - - public function getPassword(): ?string { - return null; - } - - private function setEnv():void { - $ticket = $this->getTicket(); - if ($ticket) { - $ticket->validate(); - - // note that even if the ticket name is the value we got from `getenv("KRB5CCNAME")` we still need to set the env variable ourselves - // this is because `getenv` also reads the variables passed from the SAPI (apache-php) and we need to set the variable in the OS's env - putenv("KRB5CCNAME=" . $ticket->getCacheName()); - } - } - - public function getExtraCommandLineArguments(): string { - $this->setEnv(); - return '-k'; - } - - public function setExtraSmbClientOptions($smbClientState): void { - $this->setEnv(); - - $success = (bool)smbclient_option_set($smbClientState, SMBCLIENT_OPT_USE_KERBEROS, true); - $success = $success && smbclient_option_set($smbClientState, SMBCLIENT_OPT_FALLBACK_AFTER_KERBEROS, false); - - if (!$success) { - throw new Exception("Failed to set smbclient options for kerberos auth"); - } - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/KerberosTicket.php b/apps/files_external/3rdparty/icewind/smb/src/KerberosTicket.php deleted file mode 100644 index c019b18119a..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/KerberosTicket.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2022 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\InvalidTicket; -use KRB5CCache; - -class KerberosTicket { - /** @var KRB5CCache */ - private $krb5; - /** @var string */ - private $cacheName; - - public function __construct(KRB5CCache $krb5, string $cacheName) { - $this->krb5 = $krb5; - $this->cacheName = $cacheName; - } - - public function getCacheName(): string { - return $this->cacheName; - } - - public function getName(): string{ - return $this->krb5->getName(); - } - - public function isValid(): bool { - return count($this->krb5->getEntries()) > 0; - } - - public function validate(): void { - if (!$this->isValid()) { - throw new InvalidTicket("No kerberos ticket found."); - } - } - - /** - * Load the ticket from the cache specified by the KRB5CCNAME variable. - * - * @return KerberosTicket|null - */ - public static function fromEnv(): ?KerberosTicket { - $ticketName = getenv("KRB5CCNAME"); - if (!$ticketName) { - return null; - } - $krb5 = new KRB5CCache(); - $krb5->open($ticketName); - return new KerberosTicket($krb5, $ticketName); - } - - public static function load(string $ticket): KerberosTicket { - $tmpFilename = tempnam(sys_get_temp_dir(), "krb5cc_php_"); - file_put_contents($tmpFilename, $ticket); - register_shutdown_function(function () use ($tmpFilename) { - if (file_exists($tmpFilename)) { - unlink($tmpFilename); - } - }); - - $ticketName = "FILE:" . $tmpFilename; - $krb5 = new KRB5CCache(); - $krb5->open($ticketName); - return new KerberosTicket($krb5, $ticketName); - } - - public function save(): string { - if (substr($this->cacheName, 0, 5) === 'FILE:') { - $ticket = file_get_contents(substr($this->cacheName, 5)); - } else { - $tmpFilename = tempnam(sys_get_temp_dir(), "krb5cc_php_"); - $tmpCacheFile = "FILE:" . $tmpFilename; - $this->krb5->save($tmpCacheFile); - $ticket = file_get_contents($tmpFilename); - unlink($tmpFilename); - } - return $ticket; - } -}
\ No newline at end of file diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php deleted file mode 100644 index 48804afb108..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\ACL; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\NotFoundException; -use Icewind\SMB\IFileInfo; - -class NativeFileInfo implements IFileInfo { - /** @var string */ - protected $path; - /** @var string */ - protected $name; - /** @var NativeShare */ - protected $share; - /** @var array{"mode": int, "size": int, "mtime": int}|null */ - protected $statCache = null; - - public function __construct(NativeShare $share, string $path, string $name) { - $this->share = $share; - $this->path = $path; - $this->name = $name; - } - - public function getPath(): string { - return $this->path; - } - - public function getName(): string { - return $this->name; - } - - /** - * @return array{"mode": int, "size": int, "mtime": int} - */ - protected function stat(): array { - if (is_null($this->statCache)) { - $this->statCache = $this->share->rawStat($this->path); - } - return $this->statCache; - } - - public function getSize(): int { - $stat = $this->stat(); - return $stat['size']; - } - - public function getMTime(): int { - $stat = $this->stat(); - return $stat['mtime']; - } - - /** - * On "mode": - * - * different smbclient versions seem to return different mode values for 'system.dos_attr.mode' - * - * older versions return the dos permissions mask as defined in `IFileInfo::MODE_*` while - * newer versions return the equivalent unix permission mask. - * - * Since the unix mask doesn't contain the proper hidden/archive/system flags we have to assume them - * as false (except for `hidden` where we use the unix dotfile convention) - */ - - protected function getMode(): int { - $mode = $this->stat()['mode']; - - // Let us ignore the ATTR_NOT_CONTENT_INDEXED for now - $mode &= ~0x00002000; - - return $mode; - } - - public function isDirectory(): bool { - $mode = $this->getMode(); - if ($mode > 0x1000) { - return ($mode & 0x4000 && !($mode & 0x8000)); // 0x4000: unix directory flag shares bits with 0xC000: socket - } else { - return (bool)($mode & IFileInfo::MODE_DIRECTORY); - } - } - - public function isReadOnly(): bool { - $mode = $this->getMode(); - if ($mode > 0x1000) { - return !(bool)($mode & 0x80); // 0x80: owner write permissions - } else { - return (bool)($mode & IFileInfo::MODE_READONLY); - } - } - - public function isHidden(): bool { - $mode = $this->getMode(); - if ($mode > 0x1000) { - return strlen($this->name) > 0 && $this->name[0] === '.'; - } else { - return (bool)($mode & IFileInfo::MODE_HIDDEN); - } - } - - public function isSystem(): bool { - $mode = $this->getMode(); - if ($mode > 0x1000) { - return false; - } else { - return (bool)($mode & IFileInfo::MODE_SYSTEM); - } - } - - public function isArchived(): bool { - $mode = $this->getMode(); - if ($mode > 0x1000) { - return false; - } else { - return (bool)($mode & IFileInfo::MODE_ARCHIVE); - } - } - - /** - * @return ACL[] - */ - public function getAcls(): array { - $acls = []; - $attribute = $this->share->getAttribute($this->path, 'system.nt_sec_desc.acl.*+'); - - foreach (explode(',', $attribute) as $acl) { - list($user, $permissions) = explode(':', $acl, 2); - $user = trim($user, '\\'); - list($type, $flags, $mask) = explode('/', $permissions); - $mask = hexdec($mask); - - $acls[$user] = new ACL((int)$type, (int)$flags, (int)$mask); - } - - return $acls; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeReadStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeReadStream.php deleted file mode 100644 index af1aa49613e..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeReadStream.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\StringBuffer; - -/** - * Stream optimized for read only usage - */ -class NativeReadStream extends NativeStream { - const CHUNK_SIZE = 1048576; // 1MB chunks - - /** @var StringBuffer */ - private $readBuffer; - - public function __construct() { - $this->readBuffer = new StringBuffer(); - } - - /** @var int */ - private $pos = 0; - - public function stream_open($path, $mode, $options, &$opened_path) { - return parent::stream_open($path, $mode, $options, $opened_path); - } - - /** - * Wrap a stream from libsmbclient-php into a regular php stream - * - * @param NativeState $state - * @param resource $smbStream - * @param string $mode - * @param string $url - * @return resource - */ - public static function wrap(NativeState $state, $smbStream, string $mode, string $url) { - return parent::wrapClass($state, $smbStream, $mode, $url, NativeReadStream::class); - } - - public function stream_read($count) { - // php reads 8192 bytes at once - // however due to network latency etc, it's faster to read in larger chunks - // and buffer the result - if (!parent::stream_eof() && $this->readBuffer->remaining() < $count) { - $chunk = parent::stream_read(self::CHUNK_SIZE); - if ($chunk === false) { - return false; - } - $this->readBuffer->push($chunk); - } - - $result = $this->readBuffer->read($count); - - $read = strlen($result); - $this->pos += $read; - - return $result; - } - - public function stream_seek($offset, $whence = SEEK_SET) { - $result = parent::stream_seek($offset, $whence); - if ($result) { - $this->readBuffer->clear(); - $pos = parent::stream_tell(); - if ($pos === false) { - return false; - } - $this->pos = $pos; - } - return $result; - } - - public function stream_eof() { - return $this->readBuffer->remaining() <= 0 && parent::stream_eof(); - } - - public function stream_tell() { - return $this->pos; - } - - public function stream_write($data) { - return false; - } - - public function stream_truncate($size) { - return false; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeServer.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeServer.php deleted file mode 100644 index 2a9153ad549..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeServer.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\AbstractServer; -use Icewind\SMB\Exception\AuthenticationException; -use Icewind\SMB\Exception\InvalidHostException; -use Icewind\SMB\IAuth; -use Icewind\SMB\IOptions; -use Icewind\SMB\IShare; -use Icewind\SMB\ISystem; -use Icewind\SMB\ITimeZoneProvider; - -class NativeServer extends AbstractServer { - /** - * @var NativeState - */ - protected $state; - - public function __construct(string $host, IAuth $auth, ISystem $system, ITimeZoneProvider $timeZoneProvider, IOptions $options) { - parent::__construct($host, $auth, $system, $timeZoneProvider, $options); - $this->state = new NativeState(); - } - - protected function connect(): void { - $this->state->init($this->getAuth(), $this->getOptions()); - } - - /** - * @return IShare[] - * @throws AuthenticationException - * @throws InvalidHostException - */ - public function listShares(): array { - $this->connect(); - $shares = []; - $dh = $this->state->opendir('smb://' . $this->getHost()); - while ($share = $this->state->readdir($dh, '')) { - if ($share['type'] === 'file share') { - $shares[] = $this->getShare($share['name']); - } - } - $this->state->closedir($dh, ''); - return $shares; - } - - public function getShare(string $name): IShare { - return new NativeShare($this, $name); - } - - /** - * Check if the smbclient php extension is available - * - * @param ISystem $system - * @return bool - */ - public static function available(ISystem $system): bool { - return $system->libSmbclientAvailable(); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php deleted file mode 100644 index 0c7e3471e32..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php +++ /dev/null @@ -1,369 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\AbstractShare; -use Icewind\SMB\Exception\AlreadyExistsException; -use Icewind\SMB\Exception\AuthenticationException; -use Icewind\SMB\Exception\ConnectionException; -use Icewind\SMB\Exception\DependencyException; -use Icewind\SMB\Exception\InvalidHostException; -use Icewind\SMB\Exception\InvalidPathException; -use Icewind\SMB\Exception\InvalidResourceException; -use Icewind\SMB\Exception\InvalidTypeException; -use Icewind\SMB\Exception\NotFoundException; -use Icewind\SMB\IFileInfo; -use Icewind\SMB\INotifyHandler; -use Icewind\SMB\IServer; -use Icewind\SMB\Wrapped\Server; -use Icewind\SMB\Wrapped\Share; - -class NativeShare extends AbstractShare { - /** - * @var IServer $server - */ - private $server; - - /** - * @var string $name - */ - private $name; - - /** @var NativeState|null $state */ - private $state = null; - - public function __construct(IServer $server, string $name) { - parent::__construct(); - $this->server = $server; - $this->name = $name; - } - - /** - * @throws ConnectionException - * @throws AuthenticationException - * @throws InvalidHostException - */ - protected function getState(): NativeState { - if ($this->state) { - return $this->state; - } - - $this->state = new NativeState(); - $this->state->init($this->server->getAuth(), $this->server->getOptions()); - return $this->state; - } - - /** - * Get the name of the share - * - * @return string - */ - public function getName(): string { - return $this->name; - } - - private function buildUrl(string $path): string { - $this->verifyPath($path); - $url = sprintf('smb://%s/%s', $this->server->getHost(), $this->name); - if ($path) { - $path = trim($path, '/'); - $url .= '/'; - $url .= implode('/', array_map('rawurlencode', explode('/', $path))); - } - return $url; - } - - /** - * List the content of a remote folder - * - * @param string $path - * @return IFileInfo[] - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function dir(string $path): array { - $files = []; - - $dh = $this->getState()->opendir($this->buildUrl($path)); - while ($file = $this->getState()->readdir($dh, $path)) { - $name = $file['name']; - if ($name !== '.' and $name !== '..') { - $fullPath = $path . '/' . $name; - $files [] = new NativeFileInfo($this, $fullPath, $name); - } - } - - $this->getState()->closedir($dh, $path); - return $files; - } - - /** - * @param string $path - * @return IFileInfo - */ - public function stat(string $path): IFileInfo { - $info = new NativeFileInfo($this, $path, self::mb_basename($path)); - - // trigger attribute loading - $info->getSize(); - - return $info; - } - - /** - * @return array{"mode": int, "size": int, "mtime": int} - */ - public function rawStat(string $path): array { - return $this->getState()->stat($this->buildUrl($path)); - } - - /** - * Multibyte unicode safe version of basename() - * - * @param string $path - * @link http://php.net/manual/en/function.basename.php#121405 - * @return string - */ - protected static function mb_basename(string $path): string { - if (preg_match('@^.*[\\\\/]([^\\\\/]+)$@s', $path, $matches)) { - return $matches[1]; - } elseif (preg_match('@^([^\\\\/]+)$@s', $path, $matches)) { - return $matches[1]; - } - - return ''; - } - - /** - * Create a folder on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws AlreadyExistsException - */ - public function mkdir(string $path): bool { - return $this->getState()->mkdir($this->buildUrl($path)); - } - - /** - * Remove a folder on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function rmdir(string $path): bool { - return $this->getState()->rmdir($this->buildUrl($path)); - } - - /** - * Delete a file on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function del(string $path): bool { - return $this->getState()->unlink($this->buildUrl($path)); - } - - /** - * Rename a remote file - * - * @param string $from - * @param string $to - * @return bool - * - * @throws NotFoundException - * @throws AlreadyExistsException - */ - public function rename(string $from, string $to): bool { - return $this->getState()->rename($this->buildUrl($from), $this->buildUrl($to)); - } - - /** - * Upload a local file - * - * @param string $source local file - * @param string $target remove file - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function put(string $source, string $target): bool { - $sourceHandle = fopen($source, 'rb'); - $targetUrl = $this->buildUrl($target); - - $targetHandle = $this->getState()->create($targetUrl); - - while ($data = fread($sourceHandle, NativeReadStream::CHUNK_SIZE)) { - $this->getState()->write($targetHandle, $data, $targetUrl); - } - $this->getState()->close($targetHandle, $targetUrl); - return true; - } - - /** - * Download a remote file - * - * @param string $source remove file - * @param string $target local file - * @return bool - * - * @throws AuthenticationException - * @throws ConnectionException - * @throws InvalidHostException - * @throws InvalidPathException - * @throws InvalidResourceException - */ - public function get(string $source, string $target): bool { - if (!$target) { - throw new InvalidPathException('Invalid target path: Filename cannot be empty'); - } - - $sourceHandle = $this->getState()->open($this->buildUrl($source), 'r'); - - $targetHandle = @fopen($target, 'wb'); - if (!$targetHandle) { - $error = error_get_last(); - if (is_array($error)) { - $reason = $error['message']; - } else { - $reason = 'Unknown error'; - } - $this->getState()->close($sourceHandle, $this->buildUrl($source)); - throw new InvalidResourceException('Failed opening local file "' . $target . '" for writing: ' . $reason); - } - - while ($data = $this->getState()->read($sourceHandle, NativeReadStream::CHUNK_SIZE, $source)) { - fwrite($targetHandle, $data); - } - $this->getState()->close($sourceHandle, $this->buildUrl($source)); - return true; - } - - /** - * Open a readable stream to a remote file - * - * @param string $source - * @return resource a read only stream with the contents of the remote file - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function read(string $source) { - $url = $this->buildUrl($source); - $handle = $this->getState()->open($url, 'r'); - return NativeReadStream::wrap($this->getState(), $handle, 'r', $url); - } - - /** - * Open a writeable stream to a remote file - * Note: This method will truncate the file to 0bytes first - * - * @param string $target - * @return resource a writeable stream - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function write(string $target) { - $url = $this->buildUrl($target); - $handle = $this->getState()->create($url); - return NativeWriteStream::wrap($this->getState(), $handle, 'w', $url); - } - - /** - * Open a writeable stream and set the cursor to the end of the stream - * - * @param string $target - * @return resource a writeable stream - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function append(string $target) { - $url = $this->buildUrl($target); - $handle = $this->getState()->open($url, "a+"); - return NativeWriteStream::wrap($this->getState(), $handle, "a", $url); - } - - /** - * Get extended attributes for the path - * - * @param string $path - * @param string $attribute attribute to get the info - * @return string the attribute value - */ - public function getAttribute(string $path, string $attribute): string { - return $this->getState()->getxattr($this->buildUrl($path), $attribute); - } - - /** - * Set extended attributes for the given path - * - * @param string $path - * @param string $attribute attribute to get the info - * @param string|int $value - * @return mixed the attribute value - */ - public function setAttribute(string $path, string $attribute, $value) { - if (is_int($value)) { - if ($attribute === 'system.dos_attr.mode') { - $value = '0x' . dechex($value); - } else { - throw new \InvalidArgumentException("Invalid value for attribute"); - } - } - - return $this->getState()->setxattr($this->buildUrl($path), $attribute, $value); - } - - /** - * Set DOS comaptible node mode - * - * @param string $path - * @param int $mode a combination of FileInfo::MODE_READONLY, FileInfo::MODE_ARCHIVE, FileInfo::MODE_SYSTEM and FileInfo::MODE_HIDDEN, FileInfo::NORMAL - * @return mixed - */ - public function setMode(string $path, int $mode) { - return $this->setAttribute($path, 'system.dos_attr.mode', $mode); - } - - /** - * Start smb notify listener - * Note: This is a blocking call - * - * @param string $path - * @return INotifyHandler - */ - public function notify(string $path): INotifyHandler { - // php-smbclient does not support notify (https://github.com/eduardok/libsmbclient-php/issues/29) - // so we use the smbclient based backend for this - if (!Server::available($this->server->getSystem())) { - throw new DependencyException('smbclient not found in path for notify command'); - } - $share = new Share($this->server, $this->getName(), $this->server->getSystem()); - return $share->notify($path); - } - - public function getServer(): IServer { - return $this->server; - } - - public function __destruct() { - unset($this->state); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php deleted file mode 100644 index 99cef052d55..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php +++ /dev/null @@ -1,433 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\Exception\AlreadyExistsException; -use Icewind\SMB\Exception\ConnectionException; -use Icewind\SMB\Exception\ConnectionRefusedException; -use Icewind\SMB\Exception\ConnectionResetException; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\FileInUseException; -use Icewind\SMB\Exception\ForbiddenException; -use Icewind\SMB\Exception\HostDownException; -use Icewind\SMB\Exception\InvalidArgumentException; -use Icewind\SMB\Exception\InvalidTypeException; -use Icewind\SMB\Exception\ConnectionAbortedException; -use Icewind\SMB\Exception\NoRouteToHostException; -use Icewind\SMB\Exception\NotEmptyException; -use Icewind\SMB\Exception\NotFoundException; -use Icewind\SMB\Exception\OutOfSpaceException; -use Icewind\SMB\Exception\TimedOutException; -use Icewind\SMB\IAuth; -use Icewind\SMB\IOptions; - -/** - * Low level wrapper for libsmbclient-php with error handling - */ -class NativeState { - /** @var resource|null */ - protected $state = null; - - /** @var bool */ - protected $connected = false; - - /** - * sync the garbage collection cycle - * __deconstruct() of KerberosAuth should not called too soon - * - * @var IAuth|null $auth - */ - protected $auth = null; - - // see error.h - const EXCEPTION_MAP = [ - 1 => ForbiddenException::class, - 2 => NotFoundException::class, - 13 => ForbiddenException::class, - 16 => FileInUseException::class, - 17 => AlreadyExistsException::class, - 20 => InvalidTypeException::class, - 21 => InvalidTypeException::class, - 22 => InvalidArgumentException::class, - 28 => OutOfSpaceException::class, - 39 => NotEmptyException::class, - 103 => ConnectionAbortedException::class, - 104 => ConnectionResetException::class, - 110 => TimedOutException::class, - 111 => ConnectionRefusedException::class, - 112 => HostDownException::class, - 113 => NoRouteToHostException::class - ]; - - protected function handleError(?string $path): void { - if (!$this->state) { - return; - } - $error = smbclient_state_errno($this->state); - if ($error === 0) { - return; - } - throw Exception::fromMap(self::EXCEPTION_MAP, $error, $path); - } - - /** - * @param mixed $result - * @param string|null $uri - * @throws Exception - */ - protected function testResult($result, ?string $uri): void { - if ($result === false or $result === null) { - // smb://host/share/path - if (is_string($uri) && count(explode('/', $uri, 5)) > 4) { - list(, , , , $path) = explode('/', $uri, 5); - $path = '/' . $path; - } else { - $path = $uri; - } - $this->handleError($path); - } - } - - /** - * @param IAuth $auth - * @param IOptions $options - * @return bool - */ - public function init(IAuth $auth, IOptions $options) { - if ($this->connected) { - return true; - } - /** @var resource $state */ - $state = smbclient_state_new(); - $this->state = $state; - /** @psalm-suppress UnusedFunctionCall */ - smbclient_option_set($this->state, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, false); - /** @psalm-suppress UnusedFunctionCall */ - smbclient_option_set($this->state, SMBCLIENT_OPT_TIMEOUT, $options->getTimeout() * 1000); - - if (function_exists('smbclient_client_protocols')) { - smbclient_client_protocols($this->state, $options->getMinProtocol(), $options->getMaxProtocol()); - } - - $auth->setExtraSmbClientOptions($this->state); - - // sync the garbage collection cycle - // __deconstruct() of KerberosAuth should not caled too soon - $this->auth = $auth; - - $result = @smbclient_state_init($this->state, $auth->getWorkgroup(), $auth->getUsername(), $auth->getPassword()); - - $this->testResult($result, ''); - $this->connected = true; - return $result; - } - - /** - * @param string $uri - * @return resource - */ - public function opendir(string $uri) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var resource $result */ - $result = @smbclient_opendir($this->state, $uri); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param resource $dir - * @param string $path - * @return array{"type": string, "comment": string, "name": string}|false - */ - public function readdir($dir, string $path) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var array{"type": string, "comment": string, "name": string}|false $result */ - $result = @smbclient_readdir($this->state, $dir); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param resource $dir - * @param string $path - * @return bool - */ - public function closedir($dir, string $path): bool { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - $result = @smbclient_closedir($this->state, $dir); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param string $old - * @param string $new - * @return bool - */ - public function rename(string $old, string $new): bool { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - $result = @smbclient_rename($this->state, $old, $this->state, $new); - - $this->testResult($result, $new); - return $result; - } - - /** - * @param string $uri - * @return bool - */ - public function unlink(string $uri): bool { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - $result = @smbclient_unlink($this->state, $uri); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param string $uri - * @param int $mask - * @return bool - */ - public function mkdir(string $uri, int $mask = 0777): bool { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - $result = @smbclient_mkdir($this->state, $uri, $mask); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param string $uri - * @return bool - */ - public function rmdir(string $uri): bool { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - $result = @smbclient_rmdir($this->state, $uri); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param string $uri - * @return array{"mtime": int, "size": int, "mode": int} - */ - public function stat(string $uri): array { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var array{"mtime": int, "size": int, "mode": int} $result */ - $result = @smbclient_stat($this->state, $uri); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param resource $file - * @param string $path - * @return array{"mtime": int, "size": int, "mode": int} - */ - public function fstat($file, string $path): array { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var array{"mtime": int, "size": int, "mode": int} $result */ - $result = @smbclient_fstat($this->state, $file); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param string $uri - * @param string $mode - * @param int $mask - * @return resource - */ - public function open(string $uri, string $mode, int $mask = 0666) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var resource $result */ - $result = @smbclient_open($this->state, $uri, $mode, $mask); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param string $uri - * @param int $mask - * @return resource - */ - public function create(string $uri, int $mask = 0666) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var resource $result */ - $result = @smbclient_creat($this->state, $uri, $mask); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param resource $file - * @param int $bytes - * @param string $path - * @return string - */ - public function read($file, int $bytes, string $path): string { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var string $result */ - $result = @smbclient_read($this->state, $file, $bytes); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param resource $file - * @param string $data - * @param string $path - * @param int|null $length - * @return int - */ - public function write($file, string $data, string $path, ?int $length = null): int { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - if ($length) { - $result = @smbclient_write($this->state, $file, $data, $length); - } else { - $result = @smbclient_write($this->state, $file, $data); - } - - $this->testResult($result, $path); - if ($result === false) { - return 0; - } - return $result; - } - - /** - * @param resource $file - * @param int $offset - * @param int $whence SEEK_SET | SEEK_CUR | SEEK_END - * @param string|null $path - * - * @return false|int new file offset as measured from the start of the file on success. - */ - public function lseek($file, int $offset, int $whence = SEEK_SET, string $path = null) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - // psalm doesn't think int|false == int|false for some reason, so we do a needless annotation to help it out - /** - * @psalm-suppress UnnecessaryVarAnnotation - * @var int|false $result - */ - $result = @smbclient_lseek($this->state, $file, $offset, $whence); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param resource $file - * @param int $size - * @param string $path - * @return bool - */ - public function ftruncate($file, int $size, string $path): bool { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - $result = @smbclient_ftruncate($this->state, $file, $size); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param resource $file - * @param string $path - * @return bool - */ - public function close($file, string $path): bool { - if (!$this->state) { - return false; - } - $result = @smbclient_close($this->state, $file); - - $this->testResult($result, $path); - return $result; - } - - /** - * @param string $uri - * @param string $key - * @return string - */ - public function getxattr(string $uri, string $key) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var string $result */ - $result = @smbclient_getxattr($this->state, $uri, $key); - - $this->testResult($result, $uri); - return $result; - } - - /** - * @param string $uri - * @param string $key - * @param string $value - * @param int $flags - * @return bool - */ - public function setxattr(string $uri, string $key, string $value, int $flags = 0) { - if (!$this->state) { - throw new ConnectionException("Not connected"); - } - /** @var bool $result */ - $result = @smbclient_setxattr($this->state, $uri, $key, $value, $flags); - - $this->testResult($result, $uri); - return $result; - } - - public function __destruct() { - if ($this->connected && $this->state) { - if (smbclient_state_free($this->state) === false) { - throw new Exception("Failed to free smb state"); - } - } - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php deleted file mode 100644 index 6916660906f..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeStream.php +++ /dev/null @@ -1,158 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\InvalidRequestException; -use Icewind\Streams\File; -use InvalidArgumentException; - -abstract class NativeStream implements File { - /** - * @var resource - * @psalm-suppress PropertyNotSetInConstructor - */ - public $context; - - /** - * @var NativeState - * @psalm-suppress PropertyNotSetInConstructor - */ - protected $state; - - /** - * @var resource - * @psalm-suppress PropertyNotSetInConstructor - */ - protected $handle; - - /** - * @var bool - */ - protected $eof = false; - - /** - * @var string - */ - protected $url = ''; - - /** - * Wrap a stream from libsmbclient-php into a regular php stream - * - * @param NativeState $state - * @param resource $smbStream - * @param string $mode - * @param string $url - * @param class-string<NativeStream> $class - * @return resource - */ - protected static function wrapClass(NativeState $state, $smbStream, string $mode, string $url, string $class) { - if (stream_wrapper_register('nativesmb', $class) === false) { - throw new Exception("Failed to register stream wrapper"); - } - $context = stream_context_create([ - 'nativesmb' => [ - 'state' => $state, - 'handle' => $smbStream, - 'url' => $url - ] - ]); - $fh = fopen('nativesmb://', $mode, false, $context); - if (stream_wrapper_unregister('nativesmb') === false) { - throw new Exception("Failed to unregister stream wrapper"); - } - return $fh; - } - - public function stream_close() { - try { - return $this->state->close($this->handle, $this->url); - } catch (\Exception $e) { - return false; - } - } - - public function stream_eof() { - return $this->eof; - } - - public function stream_flush() { - return false; - } - - - public function stream_open($path, $mode, $options, &$opened_path) { - $context = stream_context_get_options($this->context); - if (!isset($context['nativesmb']) || !is_array($context['nativesmb'])) { - throw new InvalidArgumentException("context not set"); - } - $state = $context['nativesmb']['state']; - if (!$state instanceof NativeState) { - throw new InvalidArgumentException("invalid context set"); - } - $this->state = $state; - $handle = $context['nativesmb']['handle']; - if (!is_resource($handle)) { - throw new InvalidArgumentException("invalid context set"); - } - $this->handle = $handle; - $url = $context['nativesmb']['url']; - if (!is_string($url)) { - throw new InvalidArgumentException("invalid context set"); - } - $this->url = $url; - return true; - } - - public function stream_read($count) { - $result = $this->state->read($this->handle, $count, $this->url); - if (strlen($result) < $count) { - $this->eof = true; - } - return $result; - } - - public function stream_seek($offset, $whence = SEEK_SET) { - $this->eof = false; - try { - return $this->state->lseek($this->handle, $offset, $whence, $this->url) !== false; - } catch (InvalidRequestException $e) { - return false; - } - } - - /** - * @return array{"mtime": int, "size": int, "mode": int}|false - */ - public function stream_stat() { - try { - return $this->state->fstat($this->handle, $this->url); - } catch (Exception $e) { - return false; - } - } - - public function stream_tell() { - return $this->state->lseek($this->handle, 0, SEEK_CUR, $this->url); - } - - public function stream_write($data) { - return $this->state->write($this->handle, $data, $this->url); - } - - public function stream_truncate($size) { - return $this->state->ftruncate($this->handle, $size, $this->url); - } - - public function stream_set_option($option, $arg1, $arg2) { - return false; - } - - public function stream_lock($operation) { - return false; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php deleted file mode 100644 index f09c80eec7c..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Native; - -use Icewind\SMB\StringBuffer; - -/** - * Stream optimized for write only usage - */ -class NativeWriteStream extends NativeStream { - const CHUNK_SIZE = 1048576; // 1MB chunks - - /** @var StringBuffer */ - private $writeBuffer; - - /** @var int */ - private $pos = 0; - - public function __construct() { - $this->writeBuffer = new StringBuffer(); - } - - public function stream_open($path, $mode, $options, &$opened_path): bool { - return parent::stream_open($path, $mode, $options, $opened_path); - } - - /** - * Wrap a stream from libsmbclient-php into a regular php stream - * - * @param NativeState $state - * @param resource $smbStream - * @param string $mode - * @param string $url - * @return resource - */ - public static function wrap(NativeState $state, $smbStream, string $mode, string $url) { - return parent::wrapClass($state, $smbStream, $mode, $url, NativeWriteStream::class); - } - - public function stream_seek($offset, $whence = SEEK_SET) { - $this->flushWrite(); - $result = parent::stream_seek($offset, $whence); - if ($result) { - $pos = parent::stream_tell(); - if ($pos === false) { - return false; - } - $this->pos = $pos; - } - return $result; - } - - private function flushWrite(): void { - parent::stream_write($this->writeBuffer->flush()); - } - - public function stream_write($data) { - $written = $this->writeBuffer->push($data); - $this->pos += $written; - - if ($this->writeBuffer->remaining() >= self::CHUNK_SIZE) { - $this->flushWrite(); - } - - return $written; - } - - public function stream_close() { - try { - $this->flushWrite(); - $flushResult = true; - } catch (\Exception $e) { - $flushResult = false; - } - return parent::stream_close() && $flushResult; - } - - public function stream_tell() { - return $this->pos; - } - - public function stream_read($count) { - return false; - } - - public function stream_truncate($size) { - $this->flushWrite(); - $this->pos = $size; - return parent::stream_truncate($size); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Options.php b/apps/files_external/3rdparty/icewind/smb/src/Options.php deleted file mode 100644 index f250d4defb3..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Options.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -class Options implements IOptions { - /** @var int */ - private $timeout = 20; - - /** @var string|null */ - private $minProtocol; - /** @var string|null */ - private $maxProtocol; - - public function getTimeout(): int { - return $this->timeout; - } - - public function setTimeout(int $timeout): void { - $this->timeout = $timeout; - } - - public function getMinProtocol(): ?string { - return $this->minProtocol; - } - - public function setMinProtocol(?string $minProtocol): void { - $this->minProtocol = $minProtocol; - } - - public function getMaxProtocol(): ?string { - return $this->maxProtocol; - } - - public function setMaxProtocol(?string $maxProtocol): void { - $this->maxProtocol = $maxProtocol; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/ServerFactory.php b/apps/files_external/3rdparty/icewind/smb/src/ServerFactory.php deleted file mode 100644 index ee7e5af83bb..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/ServerFactory.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\DependencyException; -use Icewind\SMB\Native\NativeServer; -use Icewind\SMB\Wrapped\Server; - -class ServerFactory { - const BACKENDS = [ - NativeServer::class, - Server::class - ]; - - /** @var ISystem */ - private $system; - - /** @var IOptions */ - private $options; - - /** @var ITimeZoneProvider */ - private $timeZoneProvider; - - /** - * ServerFactory constructor. - * - * @param IOptions|null $options - * @param ISystem|null $system - * @param ITimeZoneProvider|null $timeZoneProvider - */ - public function __construct( - ?IOptions $options = null, - ?ISystem $system = null, - ?ITimeZoneProvider $timeZoneProvider = null - ) { - if (is_null($options)) { - $options = new Options(); - } - if (is_null($system)) { - $system = new System(); - } - if (is_null($timeZoneProvider)) { - $timeZoneProvider = new TimeZoneProvider($system); - } - $this->options = $options; - $this->system = $system; - $this->timeZoneProvider = $timeZoneProvider; - } - - - /** - * @param string $host - * @param IAuth $credentials - * @return IServer - * @throws DependencyException - */ - public function createServer(string $host, IAuth $credentials): IServer { - foreach (self::BACKENDS as $backend) { - if (call_user_func("$backend::available", $this->system)) { - return new $backend($host, $credentials, $this->system, $this->timeZoneProvider, $this->options); - } - } - - throw new DependencyException('No valid backend available, ensure smbclient is in the path or php-smbclient is installed'); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/StringBuffer.php b/apps/files_external/3rdparty/icewind/smb/src/StringBuffer.php deleted file mode 100644 index 56d14edb857..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/StringBuffer.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2021 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\SMB; - -class StringBuffer { - /** @var string */ - private $buffer = ""; - /** @var int */ - private $pos = 0; - - public function clear(): void { - $this->buffer = ""; - $this->pos = 0; - } - - public function push(string $data): int { - $this->buffer = $this->flush() . $data; - return strlen($data); - } - - public function remaining(): int { - return strlen($this->buffer) - $this->pos; - } - - public function read(int $count): string { - $chunk = substr($this->buffer, $this->pos, $count); - $this->pos += strlen($chunk); - return $chunk; - } - - public function flush(): string { - if ($this->pos === 0) { - $remaining = $this->buffer; - } else { - $remaining = substr($this->buffer, $this->pos); - } - - $this->clear(); - - return $remaining; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/System.php b/apps/files_external/3rdparty/icewind/smb/src/System.php deleted file mode 100644 index 2867b8eec42..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/System.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\Exception; - -class System implements ISystem { - /** @var (string|null)[] */ - private $paths = []; - - /** - * Get the path to a file descriptor of the current process - * - * @param int $num the file descriptor id - * @return string - * @throws Exception - */ - public function getFD(int $num): string { - $folders = [ - '/proc/self/fd', - '/dev/fd' - ]; - foreach ($folders as $folder) { - if (file_exists($folder)) { - return $folder . '/' . $num; - } - } - throw new Exception('Cant find file descriptor path'); - } - - public function getSmbclientPath(): ?string { - return $this->getBinaryPath('smbclient'); - } - - public function getNetPath(): ?string { - return $this->getBinaryPath('net'); - } - - public function getSmbcAclsPath(): ?string { - return $this->getBinaryPath('smbcacls'); - } - - public function getStdBufPath(): ?string { - return $this->getBinaryPath('stdbuf'); - } - - public function getDatePath(): ?string { - return $this->getBinaryPath('date'); - } - - public function libSmbclientAvailable(): bool { - return function_exists('smbclient_state_new'); - } - - protected function getBinaryPath(string $binary): ?string { - if (!isset($this->paths[$binary])) { - $result = null; - $output = []; - exec("which $binary 2>&1", $output, $result); - - if ($result === 0 && isset($output[0])) { - $this->paths[$binary] = (string)$output[0]; - } elseif (is_executable("/usr/bin/$binary")) { - $this->paths[$binary] = "/usr/bin/$binary"; - } else { - $this->paths[$binary] = null; - } - } - return $this->paths[$binary]; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php b/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php deleted file mode 100644 index f1d2c38f634..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/TimeZoneProvider.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2015 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ -namespace Icewind\SMB; - -class TimeZoneProvider implements ITimeZoneProvider { - /** - * @var string[] - */ - private $timeZones = []; - - /** - * @var ISystem - */ - private $system; - - /** - * @param ISystem $system - */ - public function __construct(ISystem $system) { - $this->system = $system; - } - - public function get(string $host): string { - if (!isset($this->timeZones[$host])) { - $timeZone = null; - $net = $this->system->getNetPath(); - // for local domain names we can assume same timezone - if ($net && $host && strpos($host, '.') !== false) { - $command = sprintf( - '%s time zone -S %s', - $net, - escapeshellarg($host) - ); - $timeZone = exec($command); - } - - if (!$timeZone) { - $date = $this->system->getDatePath(); - if ($date) { - $timeZone = exec($date . " +%z"); - } else { - $timeZone = date_default_timezone_get(); - } - } - $this->timeZones[$host] = $timeZone; - } - return $this->timeZones[$host]; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Connection.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Connection.php deleted file mode 100644 index 95e63fb16d9..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Connection.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\Exception\AccessDeniedException; -use Icewind\SMB\Exception\AuthenticationException; -use Icewind\SMB\Exception\ConnectException; -use Icewind\SMB\Exception\ConnectionException; -use Icewind\SMB\Exception\ConnectionRefusedException; -use Icewind\SMB\Exception\InvalidHostException; -use Icewind\SMB\Exception\NoLoginServerException; - -class Connection extends RawConnection { - const DELIMITER = 'smb:'; - const DELIMITER_LENGTH = 4; - - /** @var Parser */ - private $parser; - - /** - * @param string $command - * @param Parser $parser - * @param array<string, string> $env - */ - public function __construct(string $command, Parser $parser, array $env = []) { - parent::__construct($command, $env); - $this->parser = $parser; - } - - /** - * send input to smbclient - * - * @param string $input - */ - public function write(string $input) { - return parent::write($input . PHP_EOL); - } - - /** - * @throws ConnectException - */ - public function clearTillPrompt(): void { - $this->write(''); - do { - $promptLine = $this->readTillPrompt(); - if ($promptLine === false) { - break; - } - $this->parser->checkConnectionError($promptLine); - } while (!$this->isPrompt($promptLine)); - if ($this->write('') === false) { - throw new ConnectionRefusedException(); - } - $this->readTillPrompt(); - } - - /** - * get all unprocessed output from smbclient until the next prompt - * - * @return string[] - * @throws AuthenticationException - * @throws ConnectException - * @throws ConnectionException - * @throws InvalidHostException - * @throws NoLoginServerException - * @throws AccessDeniedException - */ - public function read(): array { - if (!$this->isValid()) { - throw new ConnectionException('Connection not valid'); - } - $output = $this->readTillPrompt(); - if ($output === false) { - $this->unknownError(false); - } - $output = explode("\n", $output); - // last line contains the prompt - array_pop($output); - return $output; - } - - private function isPrompt(string $line): bool { - return substr($line, 0, self::DELIMITER_LENGTH) === self::DELIMITER; - } - - /** - * @param string|bool $promptLine (optional) prompt line that might contain some info about the error - * @throws ConnectException - * @return no-return - */ - private function unknownError($promptLine = '') { - if ($promptLine) { //maybe we have some error we missed on the previous line - throw new ConnectException('Unknown error (' . $promptLine . ')'); - } else { - $error = $this->readError(); // maybe something on stderr - if ($error) { - throw new ConnectException('Unknown error (stderr: ' . $error . ')'); - } else { - throw new ConnectException('Unknown error'); - } - } - } - - public function close(bool $terminate = true): void { - if (get_resource_type($this->getInputStream()) === 'stream') { - // ignore any errors while trying to send the close command, the process might already be dead - @$this->write('close' . PHP_EOL); - } - $this->close_process($terminate); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/ErrorCodes.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/ErrorCodes.php deleted file mode 100644 index c053f7b4a8e..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/ErrorCodes.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -class ErrorCodes { - /** - * connection errors - */ - const LogonFailure = 'NT_STATUS_LOGON_FAILURE'; - const BadHostName = 'NT_STATUS_BAD_NETWORK_NAME'; - const Unsuccessful = 'NT_STATUS_UNSUCCESSFUL'; - const ConnectionRefused = 'NT_STATUS_CONNECTION_REFUSED'; - const NoLogonServers = 'NT_STATUS_NO_LOGON_SERVERS'; - - const PathNotFound = 'NT_STATUS_OBJECT_PATH_NOT_FOUND'; - const NoSuchFile = 'NT_STATUS_NO_SUCH_FILE'; - const ObjectNotFound = 'NT_STATUS_OBJECT_NAME_NOT_FOUND'; - const NameCollision = 'NT_STATUS_OBJECT_NAME_COLLISION'; - const AccessDenied = 'NT_STATUS_ACCESS_DENIED'; - const DirectoryNotEmpty = 'NT_STATUS_DIRECTORY_NOT_EMPTY'; - const FileIsADirectory = 'NT_STATUS_FILE_IS_A_DIRECTORY'; - const NotADirectory = 'NT_STATUS_NOT_A_DIRECTORY'; - const SharingViolation = 'NT_STATUS_SHARING_VIOLATION'; - const InvalidParameter = 'NT_STATUS_INVALID_PARAMETER'; - const RevisionMismatch = 'NT_STATUS_REVISION_MISMATCH'; -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/FileInfo.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/FileInfo.php deleted file mode 100644 index 5e957bd6fec..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/FileInfo.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\ACL; -use Icewind\SMB\IFileInfo; - -class FileInfo implements IFileInfo { - /** @var string */ - protected $path; - /** @var string */ - protected $name; - /** @var int */ - protected $size; - /** @var int */ - protected $time; - /** @var int */ - protected $mode; - /** @var callable(): ACL[] */ - protected $aclCallback; - - /** - * @param string $path - * @param string $name - * @param int $size - * @param int $time - * @param int $mode - * @param callable(): ACL[] $aclCallback - */ - public function __construct(string $path, string $name, int $size, int $time, int $mode, callable $aclCallback) { - $this->path = $path; - $this->name = $name; - $this->size = $size; - $this->time = $time; - $this->mode = $mode; - $this->aclCallback = $aclCallback; - } - - /** - * @return string - */ - public function getPath(): string { - return $this->path; - } - - public function getName(): string { - return $this->name; - } - - public function getSize(): int { - return $this->size; - } - - public function getMTime(): int { - return $this->time; - } - - public function isDirectory(): bool { - return (bool)($this->mode & IFileInfo::MODE_DIRECTORY); - } - - public function isReadOnly(): bool { - return (bool)($this->mode & IFileInfo::MODE_READONLY); - } - - public function isHidden(): bool { - return (bool)($this->mode & IFileInfo::MODE_HIDDEN); - } - - public function isSystem(): bool { - return (bool)($this->mode & IFileInfo::MODE_SYSTEM); - } - - public function isArchived(): bool { - return (bool)($this->mode & IFileInfo::MODE_ARCHIVE); - } - - /** - * @return ACL[] - */ - public function getAcls(): array { - return ($this->aclCallback)(); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php deleted file mode 100644 index 7063873460d..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/NotifyHandler.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2016 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\Change; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\RevisionMismatchException; -use Icewind\SMB\INotifyHandler; - -class NotifyHandler implements INotifyHandler { - /** @var Connection */ - private $connection; - - /** @var string */ - private $path; - - /** @var bool */ - private $listening = true; - - // see error.h - const EXCEPTION_MAP = [ - ErrorCodes::RevisionMismatch => RevisionMismatchException::class, - ]; - - /** - * @param Connection $connection - * @param string $path - */ - public function __construct(Connection $connection, string $path) { - $this->connection = $connection; - $this->path = $path; - } - - /** - * Get all changes detected since the start of the notify process or the last call to getChanges - * - * @return Change[] - */ - public function getChanges(): array { - if (!$this->listening) { - return []; - } - stream_set_blocking($this->connection->getOutputStream(), false); - $lines = []; - while (($line = $this->connection->readLine())) { - $this->checkForError($line); - $lines[] = $line; - } - stream_set_blocking($this->connection->getOutputStream(), true); - return array_values(array_filter(array_map([$this, 'parseChangeLine'], $lines))); - } - - /** - * Listen actively to all incoming changes - * - * Note that this is a blocking process and will cause the process to block forever if not explicitly terminated - * - * @param callable(Change):?bool $callback - */ - public function listen(callable $callback): void { - if ($this->listening) { - while (true) { - $line = $this->connection->readLine(); - if ($line === false) { - break; - } - $this->checkForError($line); - $change = $this->parseChangeLine($line); - if ($change) { - $result = $callback($change); - if ($result === false) { - break; - } - } - }; - } - } - - private function parseChangeLine(string $line): ?Change { - $code = (int)substr($line, 0, 4); - if ($code === 0) { - return null; - } - $subPath = str_replace('\\', '/', substr($line, 5)); - if ($this->path === '') { - return new Change($code, $subPath); - } else { - return new Change($code, $this->path . '/' . $subPath); - } - } - - private function checkForError(string $line): void { - if (substr($line, 0, 16) === 'notify returned ') { - $error = substr($line, 16); - throw Exception::fromMap(array_merge(self::EXCEPTION_MAP, Parser::EXCEPTION_MAP), $error, 'Notify is not supported with the used smb version'); - } - } - - public function stop(): void { - $this->listening = false; - $this->connection->close(); - } - - public function __destruct() { - $this->stop(); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php deleted file mode 100644 index 06812ee61ef..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php +++ /dev/null @@ -1,276 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\ACL; -use Icewind\SMB\Exception\AccessDeniedException; -use Icewind\SMB\Exception\AlreadyExistsException; -use Icewind\SMB\Exception\AuthenticationException; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\FileInUseException; -use Icewind\SMB\Exception\InvalidHostException; -use Icewind\SMB\Exception\InvalidParameterException; -use Icewind\SMB\Exception\InvalidResourceException; -use Icewind\SMB\Exception\InvalidTypeException; -use Icewind\SMB\Exception\NoLoginServerException; -use Icewind\SMB\Exception\NotEmptyException; -use Icewind\SMB\Exception\NotFoundException; - -class Parser { - const MSG_NOT_FOUND = 'Error opening local file '; - - /** - * @var string - */ - protected $timeZone; - - // see error.h - const EXCEPTION_MAP = [ - ErrorCodes::LogonFailure => AuthenticationException::class, - ErrorCodes::PathNotFound => NotFoundException::class, - ErrorCodes::ObjectNotFound => NotFoundException::class, - ErrorCodes::NoSuchFile => NotFoundException::class, - ErrorCodes::NameCollision => AlreadyExistsException::class, - ErrorCodes::AccessDenied => AccessDeniedException::class, - ErrorCodes::DirectoryNotEmpty => NotEmptyException::class, - ErrorCodes::FileIsADirectory => InvalidTypeException::class, - ErrorCodes::NotADirectory => InvalidTypeException::class, - ErrorCodes::SharingViolation => FileInUseException::class, - ErrorCodes::InvalidParameter => InvalidParameterException::class - ]; - - const MODE_STRINGS = [ - 'R' => FileInfo::MODE_READONLY, - 'H' => FileInfo::MODE_HIDDEN, - 'S' => FileInfo::MODE_SYSTEM, - 'D' => FileInfo::MODE_DIRECTORY, - 'A' => FileInfo::MODE_ARCHIVE, - 'N' => FileInfo::MODE_NORMAL - ]; - - /** - * @param string $timeZone - */ - public function __construct(string $timeZone) { - $this->timeZone = $timeZone; - } - - private function getErrorCode(string $line): ?string { - $parts = explode(' ', $line); - foreach ($parts as $part) { - if (substr($part, 0, 9) === 'NT_STATUS') { - return $part; - } - } - return null; - } - - /** - * @param string[] $output - * @param string $path - * @return no-return - * @throws Exception - * @throws InvalidResourceException - * @throws NotFoundException - */ - public function checkForError(array $output, string $path): void { - if (strpos($output[0], 'does not exist')) { - throw new NotFoundException($path); - } - $error = $this->getErrorCode($output[0]); - - if (substr($output[0], 0, strlen(self::MSG_NOT_FOUND)) === self::MSG_NOT_FOUND) { - $localPath = substr($output[0], strlen(self::MSG_NOT_FOUND)); - throw new InvalidResourceException('Failed opening local file "' . $localPath . '" for writing'); - } - - throw Exception::fromMap(self::EXCEPTION_MAP, $error, $path); - } - - /** - * check if the first line holds a connection failure - * - * @param string $line - * @throws AuthenticationException - * @throws InvalidHostException - * @throws NoLoginServerException - * @throws AccessDeniedException - */ - public function checkConnectionError(string $line): void { - $line = rtrim($line, ')'); - if (substr($line, -23) === ErrorCodes::LogonFailure) { - throw new AuthenticationException('Invalid login'); - } - if (substr($line, -26) === ErrorCodes::BadHostName) { - throw new InvalidHostException('Invalid hostname'); - } - if (substr($line, -22) === ErrorCodes::Unsuccessful) { - throw new InvalidHostException('Connection unsuccessful'); - } - if (substr($line, -28) === ErrorCodes::ConnectionRefused) { - throw new InvalidHostException('Connection refused'); - } - if (substr($line, -26) === ErrorCodes::NoLogonServers) { - throw new NoLoginServerException('No login server'); - } - if (substr($line, -23) === ErrorCodes::AccessDenied) { - throw new AccessDeniedException('Access denied'); - } - } - - public function parseMode(string $mode): int { - $result = 0; - foreach (self::MODE_STRINGS as $char => $val) { - if (strpos($mode, $char) !== false) { - $result |= $val; - } - } - return $result; - } - - /** - * @param string[] $output - * @return array{"mtime": int, "mode": int, "size": int} - * @throws Exception - */ - public function parseStat(array $output): array { - $data = []; - foreach ($output as $line) { - // A line = explode statement may not fill all array elements - // properly. May happen when accessing non Windows Fileservers - $words = explode(':', $line, 2); - $name = isset($words[0]) ? $words[0] : ''; - $value = isset($words[1]) ? $words[1] : ''; - $value = trim($value); - - if (!isset($data[$name])) { - $data[$name] = $value; - } - } - $attributeStart = strpos($data['attributes'], '('); - if ($attributeStart === false) { - throw new Exception("Malformed state response from server"); - } - return [ - 'mtime' => strtotime($data['write_time']), - 'mode' => hexdec(substr($data['attributes'], $attributeStart + 1, -1)), - 'size' => isset($data['stream']) ? (int)(explode(' ', $data['stream'])[1]) : 0 - ]; - } - - /** - * @param string[] $output - * @param string $basePath - * @param callable(string):ACL[] $aclCallback - * @return FileInfo[] - */ - public function parseDir(array $output, string $basePath, callable $aclCallback): array { - //last line is used space - array_pop($output); - $regex = '/^\s*(.*?)\s\s\s\s+(?:([NDHARSCndharsc]*)\s+)?([0-9]+)\s+(.*)$/'; - //2 spaces, filename, optional type, size, date - $content = []; - foreach ($output as $line) { - if (preg_match($regex, $line, $matches)) { - list(, $name, $mode, $size, $time) = $matches; - if ($name !== '.' and $name !== '..') { - $mode = $this->parseMode(strtoupper($mode)); - $time = strtotime($time . ' ' . $this->timeZone); - $path = $basePath . '/' . $name; - $content[] = new FileInfo($path, $name, (int)$size, $time, $mode, function () use ($aclCallback, $path): array { - return $aclCallback($path); - }); - } - } - } - return $content; - } - - /** - * @param string[] $output - * @return array<string, string> - */ - public function parseListShares(array $output): array { - $shareNames = []; - foreach ($output as $line) { - if (strpos($line, '|')) { - list($type, $name, $description) = explode('|', $line); - if (strtolower($type) === 'disk') { - $shareNames[$name] = $description; - } - } elseif (strpos($line, 'Disk')) { - // new output format - list($name, $description) = explode('Disk', $line); - $shareNames[trim($name)] = trim($description); - } - } - return $shareNames; - } - - /** - * @param string[] $rawAcls - * @return ACL[] - */ - public function parseACLs(array $rawAcls): array { - $acls = []; - foreach ($rawAcls as $acl) { - if (strpos($acl, ':') === false) { - continue; - } - [$type, $acl] = explode(':', $acl, 2); - if ($type !== 'ACL') { - continue; - } - [$user, $permissions] = explode(':', $acl, 2); - [$type, $flags, $mask] = explode('/', $permissions); - - $type = $type === 'ALLOWED' ? ACL::TYPE_ALLOW : ACL::TYPE_DENY; - - $flagsInt = 0; - foreach (explode('|', $flags) as $flagString) { - if ($flagString === 'OI') { - $flagsInt += ACL::FLAG_OBJECT_INHERIT; - } elseif ($flagString === 'CI') { - $flagsInt += ACL::FLAG_CONTAINER_INHERIT; - } - } - - if (substr($mask, 0, 2) === '0x') { - $maskInt = hexdec($mask); - } else { - $maskInt = 0; - foreach (explode('|', $mask) as $maskString) { - if ($maskString === 'R') { - $maskInt += ACL::MASK_READ; - } elseif ($maskString === 'W') { - $maskInt += ACL::MASK_WRITE; - } elseif ($maskString === 'X') { - $maskInt += ACL::MASK_EXECUTE; - } elseif ($maskString === 'D') { - $maskInt += ACL::MASK_DELETE; - } elseif ($maskString === 'READ') { - $maskInt += ACL::MASK_READ + ACL::MASK_EXECUTE; - } elseif ($maskString === 'CHANGE') { - $maskInt += ACL::MASK_READ + ACL::MASK_EXECUTE + ACL::MASK_WRITE + ACL::MASK_DELETE; - } elseif ($maskString === 'FULL') { - $maskInt += ACL::MASK_READ + ACL::MASK_EXECUTE + ACL::MASK_WRITE + ACL::MASK_DELETE; - } - } - } - - if (isset($acls[$user])) { - $existing = $acls[$user]; - $maskInt += $existing->getMask(); - } - $acls[$user] = new ACL($type, $flagsInt, $maskInt); - } - - ksort($acls); - - return $acls; - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/RawConnection.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/RawConnection.php deleted file mode 100644 index 13828d28334..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/RawConnection.php +++ /dev/null @@ -1,250 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\Exception\ConnectException; -use Icewind\SMB\Exception\ConnectionException; - -class RawConnection { - /** - * @var string - */ - private $command; - - /** - * @var string[] - */ - private $env; - - /** - * @var resource[] $pipes - * - * $pipes[0] holds STDIN for smbclient - * $pipes[1] holds STDOUT for smbclient - * $pipes[3] holds the authfile for smbclient - * $pipes[4] holds the stream for writing files - * $pipes[5] holds the stream for reading files - */ - private $pipes = []; - - /** - * @var resource|null $process - */ - private $process; - - /** - * @var resource|null $authStream - */ - private $authStream = null; - - /** - * @param string $command - * @param array<string, string> $env - */ - public function __construct(string $command, array $env = []) { - $this->command = $command; - $this->env = $env; - } - - /** - * @throws ConnectException - * @psalm-assert resource $this->process - */ - public function connect(): void { - if (is_null($this->getAuthStream())) { - throw new ConnectException('Authentication not set before connecting'); - } - - $descriptorSpec = [ - 0 => ['pipe', 'r'], // child reads from stdin - 1 => ['pipe', 'w'], // child writes to stdout - 2 => ['pipe', 'w'], // child writes to stderr - 3 => $this->getAuthStream(), // child reads from fd#3 - 4 => ['pipe', 'r'], // child reads from fd#4 - 5 => ['pipe', 'w'] // child writes to fd#5 - ]; - - setlocale(LC_ALL, Server::LOCALE); - $env = array_merge($this->env, [ - 'CLI_FORCE_INTERACTIVE' => 'y', // Make sure the prompt is displayed - 'CLI_NO_READLINE' => 1, // Not all distros build smbclient with readline, disable it to get consistent behaviour - 'LC_ALL' => Server::LOCALE, - 'LANG' => Server::LOCALE, - 'COLUMNS' => 8192, // prevent smbclient from line-wrapping it's output - 'TZ' => 'UTC', - ]); - $this->process = proc_open($this->command, $descriptorSpec, $this->pipes, '/', $env); - if (!$this->isValid()) { - throw new ConnectionException(); - } - } - - /** - * check if the connection is still active - * - * @return bool - * @psalm-assert-if-true resource $this->process - */ - public function isValid(): bool { - if (is_resource($this->process)) { - $status = proc_get_status($this->process); - return $status['running']; - } else { - return false; - } - } - - /** - * send input to the process - * - * @param string $input - * @return int|bool - */ - public function write(string $input) { - $result = @fwrite($this->getInputStream(), $input); - fflush($this->getInputStream()); - return $result; - } - - /** - * read output till the next prompt - * - * @return string|false - */ - public function readTillPrompt() { - $output = ""; - do { - $chunk = $this->readLine('\> '); - if ($chunk === false) { - return false; - } - $output .= $chunk; - } while (strlen($chunk) == 4096 && strpos($chunk, "smb:") === false); - return $output; - } - - /** - * read a line of output - * - * @return string|false - */ - public function readLine(string $end = "\n") { - return stream_get_line($this->getOutputStream(), 4096, $end); - } - - /** - * read a line of output - * - * @return string|false - */ - public function readError() { - $line = stream_get_line($this->getErrorStream(), 4086); - return $line !== false ? trim($line) : false; - } - - /** - * get all output until the process closes - * - * @return string[] - */ - public function readAll(): array { - $output = []; - while ($line = $this->readLine()) { - $output[] = $line; - } - return $output; - } - - /** - * @return resource - */ - public function getInputStream() { - return $this->pipes[0]; - } - - /** - * @return resource - */ - public function getOutputStream() { - return $this->pipes[1]; - } - - /** - * @return resource - */ - public function getErrorStream() { - return $this->pipes[2]; - } - - /** - * @return resource|null - */ - public function getAuthStream() { - return $this->authStream; - } - - /** - * @return resource - */ - public function getFileInputStream() { - return $this->pipes[4]; - } - - /** - * @return resource - */ - public function getFileOutputStream() { - return $this->pipes[5]; - } - - /** - * @param string|null $user - * @param string|null $password - * @psalm-assert resource $this->authStream - */ - public function writeAuthentication(?string $user, ?string $password): void { - $auth = ($password === null) - ? "username=$user" - : "username=$user\npassword=$password\n"; - - $this->authStream = fopen('php://temp', 'w+'); - fwrite($this->authStream, $auth); - rewind($this->authStream); - } - - /** - * @param bool $terminate - * @psalm-assert null $this->process - */ - public function close(bool $terminate = true): void { - $this->close_process($terminate); - } - - /** - * @param bool $terminate - * @psalm-assert null $this->process - */ - protected function close_process(bool $terminate = true): void { - if (!is_resource($this->process)) { - return; - } - if ($terminate) { - proc_terminate($this->process); - } - proc_close($this->process); - $this->process = null; - } - - public function reconnect(): void { - $this->close(); - $this->connect(); - } - - public function __destruct() { - $this->close(); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Server.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Server.php deleted file mode 100644 index 6d6052966f7..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Server.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\AbstractServer; -use Icewind\SMB\Exception\AuthenticationException; -use Icewind\SMB\Exception\ConnectException; -use Icewind\SMB\Exception\ConnectionException; -use Icewind\SMB\Exception\ConnectionRefusedException; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\InvalidHostException; -use Icewind\SMB\IShare; -use Icewind\SMB\ISystem; - -class Server extends AbstractServer { - /** - * Check if the smbclient php extension is available - * - * @param ISystem $system - * @return bool - */ - public static function available(ISystem $system): bool { - return $system->getSmbclientPath() !== null; - } - - private function getAuthFileArgument(): string { - if ($this->getAuth()->getUsername()) { - return '--authentication-file=' . $this->system->getFD(3); - } else { - return ''; - } - } - - /** - * @return IShare[] - * - * @throws AuthenticationException - * @throws InvalidHostException - * @throws ConnectException - */ - public function listShares(): array { - $maxProtocol = $this->options->getMaxProtocol(); - $minProtocol = $this->options->getMinProtocol(); - $smbClient = $this->system->getSmbclientPath(); - if ($smbClient === null) { - throw new Exception("Backend not available"); - } - $command = sprintf( - '%s %s %s %s %s -L %s', - $smbClient, - $this->getAuthFileArgument(), - $this->getAuth()->getExtraCommandLineArguments(), - $maxProtocol ? "--option='client max protocol=" . $maxProtocol . "'" : "", - $minProtocol ? "--option='client min protocol=" . $minProtocol . "'" : "", - escapeshellarg('//' . $this->getHost()) - ); - $connection = new RawConnection($command); - $connection->writeAuthentication($this->getAuth()->getUsername(), $this->getAuth()->getPassword()); - $connection->connect(); - if (!$connection->isValid()) { - throw new ConnectionException((string)$connection->readLine()); - } - - $parser = new Parser('UTC'); - - $output = $connection->readAll(); - if (isset($output[0])) { - $parser->checkConnectionError($output[0]); - } - - // sometimes we get an empty line first - if (count($output) < 2) { - $output = $connection->readAll(); - } - - if (isset($output[0])) { - $parser->checkConnectionError($output[0]); - } - if (count($output) === 0) { - throw new ConnectionRefusedException(); - } - - $shareNames = $parser->parseListShares($output); - - $shares = []; - foreach ($shareNames as $name => $_description) { - $shares[] = $this->getShare($name); - } - return $shares; - } - - /** - * @param string $name - * @return IShare - */ - public function getShare(string $name): IShare { - return new Share($this, $name, $this->system); - } -} diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php deleted file mode 100644 index 63e1490d72c..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php +++ /dev/null @@ -1,553 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB\Wrapped; - -use Icewind\SMB\AbstractShare; -use Icewind\SMB\ACL; -use Icewind\SMB\Exception\AlreadyExistsException; -use Icewind\SMB\Exception\AuthenticationException; -use Icewind\SMB\Exception\ConnectException; -use Icewind\SMB\Exception\ConnectionException; -use Icewind\SMB\Exception\DependencyException; -use Icewind\SMB\Exception\Exception; -use Icewind\SMB\Exception\FileInUseException; -use Icewind\SMB\Exception\InvalidHostException; -use Icewind\SMB\Exception\InvalidTypeException; -use Icewind\SMB\Exception\NotFoundException; -use Icewind\SMB\Exception\InvalidRequestException; -use Icewind\SMB\IFileInfo; -use Icewind\SMB\INotifyHandler; -use Icewind\SMB\IServer; -use Icewind\SMB\ISystem; -use Icewind\Streams\CallbackWrapper; -use Icewind\SMB\Native\NativeShare; -use Icewind\SMB\Native\NativeServer; - -class Share extends AbstractShare { - /** - * @var IServer $server - */ - private $server; - - /** - * @var string $name - */ - private $name; - - /** - * @var Connection|null $connection - */ - public $connection = null; - - /** - * @var Parser - */ - protected $parser; - - /** - * @var ISystem - */ - private $system; - - const MODE_MAP = [ - FileInfo::MODE_READONLY => 'r', - FileInfo::MODE_HIDDEN => 'h', - FileInfo::MODE_ARCHIVE => 'a', - FileInfo::MODE_SYSTEM => 's' - ]; - - const EXEC_CMD = 'exec'; - - /** - * @param IServer $server - * @param string $name - * @param ISystem $system - */ - public function __construct(IServer $server, string $name, ISystem $system) { - parent::__construct(); - $this->server = $server; - $this->name = $name; - $this->system = $system; - $this->parser = new Parser('UTC'); - } - - private function getAuthFileArgument(): string { - if ($this->server->getAuth()->getUsername()) { - return '--authentication-file=' . $this->system->getFD(3); - } else { - return ''; - } - } - - protected function getConnection(): Connection { - $maxProtocol = $this->server->getOptions()->getMaxProtocol(); - $minProtocol = $this->server->getOptions()->getMinProtocol(); - $smbClient = $this->system->getSmbclientPath(); - $stdBuf = $this->system->getStdBufPath(); - if ($smbClient === null) { - throw new Exception("Backend not available"); - } - $command = sprintf( - '%s %s%s -t %s %s %s %s %s %s', - self::EXEC_CMD, - $stdBuf ? $stdBuf . ' -o0 ' : '', - $smbClient, - $this->server->getOptions()->getTimeout(), - $this->getAuthFileArgument(), - $this->server->getAuth()->getExtraCommandLineArguments(), - $maxProtocol ? "--option='client max protocol=" . $maxProtocol . "'" : "", - $minProtocol ? "--option='client min protocol=" . $minProtocol . "'" : "", - escapeshellarg('//' . $this->server->getHost() . '/' . $this->name) - ); - $connection = new Connection($command, $this->parser); - $connection->writeAuthentication($this->server->getAuth()->getUsername(), $this->server->getAuth()->getPassword()); - $connection->connect(); - if (!$connection->isValid()) { - throw new ConnectionException((string)$connection->readLine()); - } - // some versions of smbclient add a help message in first of the first prompt - $connection->clearTillPrompt(); - return $connection; - } - - /** - * @throws ConnectionException - * @throws AuthenticationException - * @throws InvalidHostException - * @psalm-assert Connection $this->connection - */ - protected function connect(): Connection { - if ($this->connection and $this->connection->isValid()) { - return $this->connection; - } - $this->connection = $this->getConnection(); - return $this->connection; - } - - /** - * @throws ConnectionException - * @throws AuthenticationException - * @throws InvalidHostException - * @psalm-assert Connection $this->connection - */ - protected function reconnect(): void { - if ($this->connection === null) { - $this->connect(); - } else { - $this->connection->reconnect(); - if (!$this->connection->isValid()) { - throw new ConnectionException(); - } - } - } - - /** - * Get the name of the share - * - * @return string - */ - public function getName(): string { - return $this->name; - } - - protected function simpleCommand(string $command, string $path): bool { - $escapedPath = $this->escapePath($path); - $cmd = $command . ' ' . $escapedPath; - $output = $this->execute($cmd); - return $this->parseOutput($output, $path); - } - - /** - * List the content of a remote folder - * - * @param string $path - * @return IFileInfo[] - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function dir(string $path): array { - $escapedPath = $this->escapePath($path); - $output = $this->execute('cd ' . $escapedPath); - //check output for errors - $this->parseOutput($output, $path); - $output = $this->execute('dir'); - - $this->execute('cd /'); - - return $this->parser->parseDir($output, $path, function (string $path) { - return $this->getAcls($path); - }); - } - - /** - * @param string $path - * @return IFileInfo - */ - public function stat(string $path): IFileInfo { - // some windows server setups don't seem to like the allinfo command - // use the dir command instead to get the file info where possible - if ($path !== "" && $path !== "/") { - $parent = dirname($path); - $dir = $this->dir($parent); - $file = array_values(array_filter($dir, function (IFileInfo $info) use ($path) { - return $info->getPath() === $path; - })); - if ($file) { - return $file[0]; - } - } - - $escapedPath = $this->escapePath($path); - $output = $this->execute('allinfo ' . $escapedPath); - // Windows and non Windows Fileserver may respond different - // to the allinfo command for directories. If the result is a single - // line = error line, redo it with a different allinfo parameter - if ($escapedPath == '""' && count($output) < 2) { - $output = $this->execute('allinfo ' . '"."'); - } - if (count($output) < 3) { - $this->parseOutput($output, $path); - } - $stat = $this->parser->parseStat($output); - return new FileInfo($path, basename($path), $stat['size'], $stat['mtime'], $stat['mode'], function () use ($path) { - return $this->getAcls($path); - }); - } - - /** - * Create a folder on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws AlreadyExistsException - */ - public function mkdir(string $path): bool { - return $this->simpleCommand('mkdir', $path); - } - - /** - * Remove a folder on the share - * - * @param string $path - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function rmdir(string $path): bool { - return $this->simpleCommand('rmdir', $path); - } - - /** - * Delete a file on the share - * - * @param string $path - * @param bool $secondTry - * @return bool - * @throws InvalidTypeException - * @throws NotFoundException - * @throws \Exception - */ - public function del(string $path, bool $secondTry = false): bool { - //del return a file not found error when trying to delete a folder - //we catch it so we can check if $path doesn't exist or is of invalid type - try { - return $this->simpleCommand('del', $path); - } catch (NotFoundException $e) { - //no need to do anything with the result, we just check if this throws the not found error - try { - $this->simpleCommand('ls', $path); - } catch (NotFoundException $e2) { - throw $e; - } catch (\Exception $e2) { - throw new InvalidTypeException($path); - } - throw $e; - } catch (FileInUseException $e) { - if ($secondTry) { - throw $e; - } - $this->reconnect(); - return $this->del($path, true); - } - } - - /** - * Rename a remote file - * - * @param string $from - * @param string $to - * @return bool - * - * @throws NotFoundException - * @throws AlreadyExistsException - */ - public function rename(string $from, string $to): bool { - $path1 = $this->escapePath($from); - $path2 = $this->escapePath($to); - $output = $this->execute('rename ' . $path1 . ' ' . $path2); - return $this->parseOutput($output, $to); - } - - /** - * Upload a local file - * - * @param string $source local file - * @param string $target remove file - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function put(string $source, string $target): bool { - $path1 = $this->escapeLocalPath($source); //first path is local, needs different escaping - $path2 = $this->escapePath($target); - $output = $this->execute('put ' . $path1 . ' ' . $path2); - return $this->parseOutput($output, $target); - } - - /** - * Download a remote file - * - * @param string $source remove file - * @param string $target local file - * @return bool - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function get(string $source, string $target): bool { - $path1 = $this->escapePath($source); - $path2 = $this->escapeLocalPath($target); //second path is local, needs different escaping - $output = $this->execute('get ' . $path1 . ' ' . $path2); - return $this->parseOutput($output, $source); - } - - /** - * Open a readable stream to a remote file - * - * @param string $source - * @return resource a read only stream with the contents of the remote file - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function read(string $source) { - $source = $this->escapePath($source); - // since returned stream is closed by the caller we need to create a new instance - // since we can't re-use the same file descriptor over multiple calls - $connection = $this->getConnection(); - stream_set_blocking($connection->getOutputStream(), false); - - $connection->write('get ' . $source . ' ' . $this->system->getFD(5)); - $connection->write('exit'); - $fh = $connection->getFileOutputStream(); - $fh = CallbackWrapper::wrap($fh, function() use ($connection) { - $connection->write(''); - }); - if (!is_resource($fh)) { - throw new Exception("Failed to wrap file output"); - } - return $fh; - } - - /** - * Open a writable stream to a remote file - * - * @param string $target - * @return resource a write only stream to upload a remote file - * - * @throws NotFoundException - * @throws InvalidTypeException - */ - public function write(string $target) { - $target = $this->escapePath($target); - // since returned stream is closed by the caller we need to create a new instance - // since we can't re-use the same file descriptor over multiple calls - $connection = $this->getConnection(); - - $fh = $connection->getFileInputStream(); - $connection->write('put ' . $this->system->getFD(4) . ' ' . $target); - $connection->write('exit'); - - // use a close callback to ensure the upload is finished before continuing - // this also serves as a way to keep the connection in scope - $stream = CallbackWrapper::wrap($fh, function() use ($connection) { - $connection->write(''); - }, null, function () use ($connection) { - $connection->close(false); // dont terminate, give the upload some time - }); - if (is_resource($stream)) { - return $stream; - } else { - throw new InvalidRequestException($target); - } - } - - /** - * Append to stream - * Note: smbclient does not support this (Use php-libsmbclient) - * - * @param string $target - * - * @throws DependencyException - */ - public function append(string $target) { - throw new DependencyException('php-libsmbclient is required for append'); - } - - /** - * @param string $path - * @param int $mode a combination of FileInfo::MODE_READONLY, FileInfo::MODE_ARCHIVE, FileInfo::MODE_SYSTEM and FileInfo::MODE_HIDDEN, FileInfo::NORMAL - * @return mixed - */ - public function setMode(string $path, int $mode) { - $modeString = ''; - foreach (self::MODE_MAP as $modeByte => $string) { - if ($mode & $modeByte) { - $modeString .= $string; - } - } - $path = $this->escapePath($path); - - // first reset the mode to normal - $cmd = 'setmode ' . $path . ' -rsha'; - $output = $this->execute($cmd); - $this->parseOutput($output, $path); - - if ($mode !== FileInfo::MODE_NORMAL) { - // then set the modes we want - $cmd = 'setmode ' . $path . ' ' . $modeString; - $output = $this->execute($cmd); - return $this->parseOutput($output, $path); - } else { - return true; - } - } - - /** - * @param string $path - * @return INotifyHandler - * @throws ConnectionException - * @throws DependencyException - */ - public function notify(string $path): INotifyHandler { - if (!$this->system->getStdBufPath()) { //stdbuf is required to disable smbclient's output buffering - throw new DependencyException('stdbuf is required for usage of the notify command'); - } - $connection = $this->getConnection(); // use a fresh connection since the notify command blocks the process - $command = 'notify ' . $this->escapePath($path); - $connection->write($command . PHP_EOL); - return new NotifyHandler($connection, $path); - } - - /** - * @param string $command - * @return string[] - */ - protected function execute(string $command): array { - $this->connect()->write($command); - return $this->connect()->read(); - } - - /** - * check output for errors - * - * @param string[] $lines - * @param string $path - * - * @return bool - * @throws AlreadyExistsException - * @throws \Icewind\SMB\Exception\AccessDeniedException - * @throws \Icewind\SMB\Exception\NotEmptyException - * @throws InvalidTypeException - * @throws \Icewind\SMB\Exception\Exception - * @throws NotFoundException - */ - protected function parseOutput(array $lines, string $path = ''): bool { - if (count($lines) === 0) { - return true; - } else { - $this->parser->checkForError($lines, $path); - } - } - - /** - * @param string $string - * @return string - */ - protected function escape(string $string): string { - return escapeshellarg($string); - } - - /** - * @param string $path - * @return string - */ - protected function escapePath(string $path): string { - $this->verifyPath($path); - if ($path === '/') { - $path = ''; - } - $path = str_replace('/', '\\', $path); - $path = str_replace('"', '^"', $path); - $path = ltrim($path, '\\'); - return '"' . $path . '"'; - } - - /** - * @param string $path - * @return string - */ - protected function escapeLocalPath(string $path): string { - $path = str_replace('"', '\"', $path); - return '"' . $path . '"'; - } - - /** - * @param string $path - * @return ACL[] - * @throws ConnectionException - * @throws ConnectException - */ - protected function getAcls(string $path): array { - $commandPath = $this->system->getSmbcAclsPath(); - if (!$commandPath) { - return []; - } - - $command = sprintf( - '%s %s %s %s/%s %s', - $commandPath, - $this->getAuthFileArgument(), - $this->server->getAuth()->getExtraCommandLineArguments(), - escapeshellarg('//' . $this->server->getHost()), - escapeshellarg($this->name), - escapeshellarg($path) - ); - $connection = new RawConnection($command); - $connection->writeAuthentication($this->server->getAuth()->getUsername(), $this->server->getAuth()->getPassword()); - $connection->connect(); - if (!$connection->isValid()) { - throw new ConnectionException((string)$connection->readLine()); - } - - $rawAcls = $connection->readAll(); - return $this->parser->parseACLs($rawAcls); - } - - public function getServer(): IServer { - return $this->server; - } - - public function __destruct() { - unset($this->connection); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams-dummy/composer.json b/apps/files_external/3rdparty/icewind/streams-dummy/composer.json deleted file mode 100644 index ad6a6a1b1c1..00000000000 --- a/apps/files_external/3rdparty/icewind/streams-dummy/composer.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "icewind/streams-dummy", - "provide": { - "icewind/streams": "0.2" - } -} - diff --git a/apps/files_external/3rdparty/icewind/streams-dummy/composer.json.license b/apps/files_external/3rdparty/icewind/streams-dummy/composer.json.license deleted file mode 100644 index 99ba7368b14..00000000000 --- a/apps/files_external/3rdparty/icewind/streams-dummy/composer.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> -SPDX-License-Identifier: MIT diff --git a/apps/files_external/3rdparty/icewind/streams/.gitignore b/apps/files_external/3rdparty/icewind/streams/.gitignore deleted file mode 100644 index ad93d8acd1a..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> -# SPDX-License-Identifier: MIT -.idea -vendor -composer.lock -build -example.php -*.cache diff --git a/apps/files_external/3rdparty/icewind/streams/LICENSE.txt b/apps/files_external/3rdparty/icewind/streams/LICENSE.txt deleted file mode 100644 index 2cc1fa91e49..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Robin Appelman <robin@icewind.nl> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/apps/files_external/3rdparty/icewind/streams/README.md b/apps/files_external/3rdparty/icewind/streams/README.md deleted file mode 100644 index c8b9accdadc..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/README.md +++ /dev/null @@ -1,56 +0,0 @@ -<!-- - - SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - - SPDX-License-Identifier: MIT ---> -# Streams # - -[](https://github.com/icewind1991/Streams/actions/workflows/ci.yaml) -[](https://codecov.io/gh/icewind1991/Streams) - -Generic stream wrappers for php. - -## CallBackWrapper ## - -A `CallBackWrapper` can be used to register callbacks on read, write and closing of the stream, -it wraps an existing stream and can thus be used for any stream in php - -The callbacks are passed in the stream context along with the source stream -and can be any valid [php callable](http://php.net/manual/en/language.types.callable.php) - -### Example ### -```php -<?php - -use \Icewind\Streams\CallBackWrapper; - -require('vendor/autoload.php'); - -// get an existing stream to wrap -$source = fopen('php://temp', 'r+'); - -// register the callbacks -$stream = CallbackWrapper::wrap($source, - // read callback - function ($count) { - echo "read " . $count . "bytes\n"; - }, - // write callback - function ($data) { - echo "wrote '" . $data . "'\n"; - }, - // close callback - function () { - echo "stream closed\n"; - }); - -fwrite($stream, 'some dummy data'); - -rewind($stream); -fread($stream, 5); - -fclose($stream); -``` - -Note: due to php's internal stream buffering the `$count` passed to the read callback -will be equal to php's internal buffer size (8192 on default) an not the number of bytes -requested by `fopen()` diff --git a/apps/files_external/3rdparty/icewind/streams/composer.json b/apps/files_external/3rdparty/icewind/streams/composer.json deleted file mode 100644 index 2a148158fbc..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "icewind/streams", - "description": "A set of generic stream wrappers", - "license": "MIT", - "authors": [ - { - "name": "Robin Appelman", - "email": "icewind@owncloud.com" - } - ], - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^9", - "friendsofphp/php-cs-fixer": "^2", - "phpstan/phpstan": "^0.12" - }, - "autoload": { - "psr-4": { - "Icewind\\Streams\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Icewind\\Streams\\Tests\\": "tests/" - } - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/composer.json.license b/apps/files_external/3rdparty/icewind/streams/composer.json.license deleted file mode 100644 index 99ba7368b14..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/composer.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> -SPDX-License-Identifier: MIT diff --git a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php deleted file mode 100644 index a50aa05c7ca..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ -namespace Icewind\Streams; - -/** - * Wrapper that provides callbacks for write, read and close - * - * The following options should be passed in the context when opening the stream - * [ - * 'callback' => [ - * 'source' => resource - * 'read' => function($count){} (optional) - * 'write' => function($data){} (optional) - * 'close' => function(){} (optional) - * 'readdir' => function(){} (optional) - * ] - * ] - * - * All callbacks are called after the operation is executed on the source stream - */ -class CallbackWrapper extends Wrapper { - /** - * @var callable|null - */ - protected $readCallback; - - /** - * @var callable|null - */ - protected $writeCallback; - - /** - * @var callable|null - */ - protected $closeCallback; - - /** - * @var callable|null - */ - protected $readDirCallBack; - - /** - * @var callable|null - */ - protected $preCloseCallback; - - /** - * Wraps a stream with the provided callbacks - * - * @param resource $source - * @param callable|null $read (optional) - * @param callable|null $write (optional) - * @param callable|null $close (optional) - * @param callable|null $readDir (optional) - * @param callable|null $preClose (optional) - * @return resource|false - * - */ - public static function wrap($source, $read = null, $write = null, $close = null, $readDir = null, $preClose = null) { - $context = [ - 'source' => $source, - 'read' => $read, - 'write' => $write, - 'close' => $close, - 'readDir' => $readDir, - 'preClose' => $preClose, - ]; - return self::wrapSource($source, $context); - } - - protected function open() { - $context = $this->loadContext(); - - $this->readCallback = $context['read']; - $this->writeCallback = $context['write']; - $this->closeCallback = $context['close']; - $this->readDirCallBack = $context['readDir']; - $this->preCloseCallback = $context['preClose']; - return true; - } - - public function dir_opendir($path, $options) { - return $this->open(); - } - - public function stream_open($path, $mode, $options, &$opened_path) { - return $this->open(); - } - - public function stream_read($count) { - $result = parent::stream_read($count); - if (is_callable($this->readCallback)) { - call_user_func($this->readCallback, strlen($result)); - } - return $result; - } - - public function stream_write($data) { - $result = parent::stream_write($data); - if (is_callable($this->writeCallback)) { - call_user_func($this->writeCallback, $data); - } - return $result; - } - - public function stream_close() { - if (is_callable($this->preCloseCallback)) { - call_user_func($this->preCloseCallback, $this->source); - // prevent further calls by potential PHP 7 GC ghosts - $this->preCloseCallback = null; - } - $result = parent::stream_close(); - if (is_callable($this->closeCallback)) { - call_user_func($this->closeCallback); - // prevent further calls by potential PHP 7 GC ghosts - $this->closeCallback = null; - } - return $result; - } - - public function dir_readdir() { - $result = parent::dir_readdir(); - if (is_callable($this->readDirCallBack)) { - call_user_func($this->readDirCallBack); - } - return $result; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/CountWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/CountWrapper.php deleted file mode 100644 index d1427dd97af..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/CountWrapper.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2018 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\Streams; - -/** - * Wrapper that counts the amount of data read and written - * - * The following options should be passed in the context when opening the stream - * [ - * 'callback' => [ - * 'source' => resource - * 'callback' => function($readCount, $writeCount){} - * ] - * ] - * - * The callback will be called when the stream is closed - */ -class CountWrapper extends Wrapper { - /** - * @var int - */ - protected $readCount = 0; - - /** - * @var int - */ - protected $writeCount = 0; - - /** - * @var callable - */ - protected $callback; - - /** - * Wraps a stream with the provided callbacks - * - * @param resource $source - * @param callable $callback - * @return resource|false - * - * @throws \BadMethodCallException - */ - public static function wrap($source, $callback) { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Invalid or missing callback'); - } - return self::wrapSource($source, [ - 'source' => $source, - 'callback' => $callback - ]); - } - - protected function open() { - $context = $this->loadContext(); - $this->callback = $context['callback']; - return true; - } - - public function dir_opendir($path, $options) { - return $this->open(); - } - - public function stream_open($path, $mode, $options, &$opened_path) { - return $this->open(); - } - - public function stream_read($count) { - $result = parent::stream_read($count); - $this->readCount += strlen($result); - return $result; - } - - public function stream_write($data) { - $result = parent::stream_write($data); - $this->writeCount += strlen($data); - return $result; - } - - public function stream_close() { - $result = parent::stream_close(); - call_user_func($this->callback, $this->readCount, $this->writeCount); - return $result; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/Directory.php b/apps/files_external/3rdparty/icewind/streams/src/Directory.php deleted file mode 100644 index 3a4d01e67c8..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/Directory.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Interface for stream wrappers that implements a directory - */ -interface Directory { - /** - * @param string $path - * @param array $options - * @return bool - */ - public function dir_opendir($path, $options); - - /** - * @return string|bool - */ - public function dir_readdir(); - - /** - * @return bool - */ - public function dir_closedir(); - - /** - * @return bool - */ - public function dir_rewinddir(); -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php b/apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php deleted file mode 100644 index 3df6a37f281..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/DirectoryFilter.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2015 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Wrapper allows filtering of directories - * - * The filter callback will be called for each entry in the folder - * when the callback return false the entry will be filtered out - */ -class DirectoryFilter extends DirectoryWrapper { - /** - * @var callable - */ - private $filter; - - /** - * @param string $path - * @param array $options - * @return bool - */ - public function dir_opendir($path, $options) { - $context = $this->loadContext(); - $this->filter = $context['filter']; - return true; - } - - /** - * @return string - */ - public function dir_readdir() { - $file = readdir($this->source); - $filter = $this->filter; - // keep reading until we have an accepted entry or we're at the end of the folder - while ($file !== false && $filter($file) === false) { - $file = readdir($this->source); - } - return $file; - } - - /** - * @param resource $source - * @param callable $filter - * @return resource|false - */ - public static function wrap($source, callable $filter) { - return self::wrapSource($source, [ - 'source' => $source, - 'filter' => $filter - ]); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php deleted file mode 100644 index fbae56a88cf..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/DirectoryWrapper.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2015 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -class DirectoryWrapper extends Wrapper implements Directory { - public function stream_open($path, $mode, $options, &$opened_path) { - return false; - } - - /** - * @param string $path - * @param array $options - * @return bool - */ - public function dir_opendir($path, $options) { - $this->loadContext(); - return true; - } - - /** - * @return string|false - */ - public function dir_readdir() { - return readdir($this->source); - } - - /** - * @return bool - */ - public function dir_closedir() { - closedir($this->source); - return true; - } - - /** - * @return bool - */ - public function dir_rewinddir() { - rewinddir($this->source); - return true; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/File.php b/apps/files_external/3rdparty/icewind/streams/src/File.php deleted file mode 100644 index 249c92d1a4e..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/File.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Interface for stream wrappers that implements a file - */ -interface File { - /** - * @param string $path - * @param string $mode - * @param int $options - * @param string $opened_path - * @return bool - */ - public function stream_open($path, $mode, $options, &$opened_path); - - /** - * @param int $offset - * @param int $whence - * @return bool - */ - public function stream_seek($offset, $whence = SEEK_SET); - - /** - * @return int|false - */ - public function stream_tell(); - - /** - * @param int $count - * @return string|false - */ - public function stream_read($count); - - /** - * @param string $data - * @return int|false - */ - public function stream_write($data); - - /** - * @param int $option - * @param int $arg1 - * @param int $arg2 - * @return bool - */ - public function stream_set_option($option, $arg1, $arg2); - - /** - * @param int $size - * @return bool - */ - public function stream_truncate($size); - - /** - * @return array|false - */ - public function stream_stat(); - - /** - * @param int $operation - * @return bool - */ - public function stream_lock($operation); - - /** - * @return bool - */ - public function stream_flush(); - - /** - * @return bool - */ - public function stream_eof(); - - /** - * @return bool - */ - public function stream_close(); -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/HashWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/HashWrapper.php deleted file mode 100644 index 7fb739e0d49..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/HashWrapper.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2019 Roeland Jago Douma <roeland@famdouma.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\Streams; - -abstract class HashWrapper extends Wrapper { - - /** - * @var callable|null - */ - private $callback; - - /** - * @var resource|\HashContext - */ - private $hashContext; - - /** - * Wraps a stream to make it seekable - * - * @param resource $source - * @param string $hash - * @param callable $callback - * @return resource|false - * - * @throws \BadMethodCallException - */ - public static function wrap($source, $hash, $callback) { - $context = [ - 'hash' => $hash, - 'callback' => $callback, - ]; - return self::wrapSource($source, $context); - } - - public function dir_opendir($path, $options) { - return false; - } - - public function stream_open($path, $mode, $options, &$opened_path) { - $context = $this->loadContext(); - $this->callback = $context['callback']; - $this->hashContext = hash_init($context['hash']); - return true; - } - - protected function updateHash($data) { - hash_update($this->hashContext, $data); - } - - public function stream_close() { - $hash = hash_final($this->hashContext); - if ($this->hashContext !== false && is_callable($this->callback)) { - call_user_func($this->callback, $hash); - } - return parent::stream_close(); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php b/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php deleted file mode 100644 index 24a4723d1e3..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/IteratorDirectory.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Create a directory handle from an iterator or array - * - * The following options should be passed in the context when opening the stream - * [ - * 'dir' => [ - * 'array' => string[] - * 'iterator' => \Iterator - * ] - * ] - * - * Either 'array' or 'iterator' need to be set, if both are set, 'iterator' takes preference - */ -class IteratorDirectory extends WrapperHandler implements Directory { - /** - * @var resource - */ - public $context; - - /** - * @var \Iterator - */ - protected $iterator; - - /** - * Load the source from the stream context and return the context options - * - * @param string $name - * @return array - * @throws \BadMethodCallException - */ - protected function loadContext($name = null) { - $context = parent::loadContext($name); - if (isset($context['iterator'])) { - $this->iterator = $context['iterator']; - } elseif (isset($context['array'])) { - $this->iterator = new \ArrayIterator($context['array']); - } else { - throw new \BadMethodCallException('Invalid context, iterator or array not set'); - } - return $context; - } - - /** - * @param string $path - * @param array $options - * @return bool - */ - public function dir_opendir($path, $options) { - $this->loadContext(); - return true; - } - - /** - * @return string|bool - */ - public function dir_readdir() { - if ($this->iterator->valid()) { - $result = $this->iterator->current(); - $this->iterator->next(); - return $result; - } else { - return false; - } - } - - /** - * @return bool - */ - public function dir_closedir() { - return true; - } - - /** - * @return bool - */ - public function dir_rewinddir() { - $this->iterator->rewind(); - return true; - } - - /** - * Creates a directory handle from the provided array or iterator - * - * @param \Iterator | array $source - * @return resource|false - * - * @throws \BadMethodCallException - */ - public static function wrap($source) { - if ($source instanceof \Iterator) { - $options = [ - 'iterator' => $source - ]; - } elseif (is_array($source)) { - $options = [ - 'array' => $source - ]; - } else { - throw new \BadMethodCallException('$source should be an Iterator or array'); - } - return self::wrapSource(self::NO_SOURCE_DIR, $options); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php deleted file mode 100644 index f92279381a5..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/NullWrapper.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Stream wrapper that does nothing, used for tests - */ -class NullWrapper extends Wrapper { - public static function wrap($source) { - return self::wrapSource($source); - } - - public function stream_open($path, $mode, $options, &$opened_path) { - $this->loadContext(); - return true; - } - - public function dir_opendir($path, $options) { - $this->loadContext(); - return true; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/Path.php b/apps/files_external/3rdparty/icewind/streams/src/Path.php deleted file mode 100644 index 63fbd6504da..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/Path.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * A string-like object that automatically registers a stream wrapper when used and removes the stream wrapper when no longer used - * - * Can optionally pass context options to the stream wrapper - */ -class Path { - - /** - * @var bool - */ - protected $registered = false; - - /** - * @var string - */ - protected $protocol; - - /** - * @var string - */ - protected $class; - - /** - * @var array - */ - protected $contextOptions; - - /** - * @param string $class - * @param array $contextOptions - */ - public function __construct($class, $contextOptions = []) { - $this->class = $class; - $this->contextOptions = $contextOptions; - } - - public function getProtocol() { - if (!$this->protocol) { - $this->protocol = 'auto' . uniqid(); - } - return $this->protocol; - } - - public function wrapPath($path) { - return $this->getProtocol() . '://' . $path; - } - - protected function register() { - if (!$this->registered) { - $this->appendDefaultContent($this->contextOptions); - stream_wrapper_register($this->getProtocol(), $this->class); - $this->registered = true; - } - } - - protected function unregister() { - stream_wrapper_unregister($this->getProtocol()); - $this->unsetDefaultContent($this->getProtocol()); - $this->registered = false; - } - - /** - * Add values to the default stream context - * - * @param array $values - */ - protected function appendDefaultContent($values) { - if (!is_array(current($values))) { - $values = [$this->getProtocol() => $values]; - } - $context = stream_context_get_default(); - $defaults = stream_context_get_options($context); - foreach ($values as $key => $value) { - $defaults[$key] = $value; - } - stream_context_set_default($defaults); - } - - /** - * Remove values from the default stream context - * - * @param string $key - */ - protected function unsetDefaultContent($key) { - $context = stream_context_get_default(); - $defaults = stream_context_get_options($context); - unset($defaults[$key]); - stream_context_set_default($defaults); - } - - public function __toString() { - $this->register(); - return $this->protocol . '://'; - } - - public function __destruct() { - $this->unregister(); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php deleted file mode 100644 index 3a6e236942f..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/PathWrapper.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2016 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * A string-like object that maps to an existing stream when opened - */ -class PathWrapper extends NullWrapper { - /** - * @param resource $source - * @return Path|string - */ - public static function getPath($source) { - return new Path(NullWrapper::class, [ - NullWrapper::getProtocol() => ['source' => $source] - ]); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/ReadHashWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/ReadHashWrapper.php deleted file mode 100644 index a9e9fc831e6..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/ReadHashWrapper.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2019 Roeland Jago Douma <roeland@famdouma.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\Streams; - -/** - * Wrapper that calculates the hash on the stream on read - * - * The stream and hash should be passed in when wrapping the stream. - * On close the callback will be called with the calculated checksum. - * - * For supported hashes see: http://php.net/manual/en/function.hash-algos.php - */ -class ReadHashWrapper extends HashWrapper { - public function stream_read($count) { - $data = parent::stream_read($count); - $this->updateHash($data); - return $data; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php deleted file mode 100644 index 2899a97a0d1..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2016 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Wrapper that retries reads/writes to remote streams that dont deliver/recieve all requested data at once - */ -class RetryWrapper extends Wrapper { - public static function wrap($source) { - return self::wrapSource($source); - } - - public function dir_opendir($path, $options) { - return false; - } - - public function stream_open($path, $mode, $options, &$opened_path) { - $this->loadContext(); - return true; - } - - public function stream_read($count) { - $result = parent::stream_read($count); - - $bytesReceived = strlen($result); - while (strlen($result) > 0 && $bytesReceived < $count && !$this->stream_eof()) { - $result .= parent::stream_read($count - $bytesReceived); - $bytesReceived = strlen($result); - } - - return $result; - } - - public function stream_write($data) { - $bytesToSend = strlen($data); - $bytesWritten = parent::stream_write($data); - $result = $bytesWritten; - - while ($bytesWritten > 0 && $result < $bytesToSend && !$this->stream_eof()) { - $dataLeft = substr($data, $result); - $bytesWritten = parent::stream_write($dataLeft); - $result += $bytesWritten; - } - - return $result; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php deleted file mode 100644 index 1eb06c6294c..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/SeekableWrapper.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Wrapper that provides callbacks for write, read and close - * - * The following options should be passed in the context when opening the stream - * [ - * 'callback' => [ - * 'source' => resource - * ] - * ] - * - * All callbacks are called after the operation is executed on the source stream - */ -class SeekableWrapper extends Wrapper { - /** - * @var resource - */ - protected $cache; - - public static function wrap($source) { - return self::wrapSource($source); - } - - public function dir_opendir($path, $options) { - return false; - } - - public function stream_open($path, $mode, $options, &$opened_path) { - $this->loadContext(); - $cache = fopen('php://temp', 'w+'); - if ($cache === false) { - return false; - } - $this->cache = $cache; - return true; - } - - protected function readTill($position) { - $current = ftell($this->source); - if ($position > $current) { - $data = parent::stream_read($position - $current); - $cachePosition = ftell($this->cache); - fseek($this->cache, $current); - fwrite($this->cache, $data); - fseek($this->cache, $cachePosition); - } - } - - public function stream_read($count) { - $current = ftell($this->cache); - $this->readTill($current + $count); - return fread($this->cache, $count); - } - - public function stream_seek($offset, $whence = SEEK_SET) { - if ($whence === SEEK_SET) { - $target = $offset; - } elseif ($whence === SEEK_CUR) { - $current = ftell($this->cache); - $target = $current + $offset; - } else { - return false; - } - $this->readTill($target); - return fseek($this->cache, $target) === 0; - } - - public function stream_tell() { - return ftell($this->cache); - } - - public function stream_eof() { - return parent::stream_eof() and (ftell($this->source) === ftell($this->cache)); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/Url.php b/apps/files_external/3rdparty/icewind/streams/src/Url.php deleted file mode 100644 index dfe36a00d6f..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/Url.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Interface for stream wrappers that implement url functions such as unlink, stat - */ -interface Url { - /** - * @param string $path - * @param array $options - * @return bool - */ - public function dir_opendir($path, $options); - - /** - * @param string $path - * @param string $mode - * @param int $options - * @param string $opened_path - * @return bool - */ - public function stream_open($path, $mode, $options, &$opened_path); - - /** - * @param string $path - * @param int $mode - * @param int $options - * @return bool - */ - public function mkdir($path, $mode, $options); - - /** - * @param string $source - * @param string $target - * @return bool - */ - public function rename($source, $target); - - /** - * @param string $path - * @param int $options - * @return bool - */ - public function rmdir($path, $options); - - /** - * @param string $path - * @return bool - */ - public function unlink($path); - - /** - * @param string $path - * @param int $flags - * @return array|false - */ - public function url_stat($path, $flags); -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/UrlCallback.php b/apps/files_external/3rdparty/icewind/streams/src/UrlCallback.php deleted file mode 100644 index 4471c2d4f1f..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/UrlCallback.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Wrapper that provides callbacks for url actions such as fopen, unlink, rename - * - * Usage: - * - * $path = UrlCallBack('/path/so/source', function(){ - * echo 'fopen'; - * }, function(){ - * echo 'opendir'; - * }, function(){ - * echo 'mkdir'; - * }, function(){ - * echo 'rename'; - * }, function(){ - * echo 'rmdir'; - * }, function(){ - * echo 'unlink'; - * }, function(){ - * echo 'stat'; - * }); - * - * mkdir($path); - * ... - * - * All callbacks are called after the operation is executed on the source stream - */ -class UrlCallback extends Wrapper implements Url { - - /** - * @param string $source - * @param callable $fopen - * @param callable $opendir - * @param callable $mkdir - * @param callable $rename - * @param callable $rmdir - * @param callable $unlink - * @param callable $stat - * @return \Icewind\Streams\Path - * - * @throws \BadMethodCallException - */ - public static function wrap( - $source, - $fopen = null, - $opendir = null, - $mkdir = null, - $rename = null, - $rmdir = null, - $unlink = null, - $stat = null - ) { - return new Path(static::class, [ - 'source' => $source, - 'fopen' => $fopen, - 'opendir' => $opendir, - 'mkdir' => $mkdir, - 'rename' => $rename, - 'rmdir' => $rmdir, - 'unlink' => $unlink, - 'stat' => $stat - ]); - } - - protected function loadUrlContext($url) { - list($protocol) = explode('://', $url); - $options = stream_context_get_options($this->context); - return $options[$protocol]; - } - - protected function callCallBack($context, $callback) { - if (is_callable($context[$callback])) { - call_user_func($context[$callback]); - } - } - - public function stream_open($path, $mode, $options, &$opened_path) { - $context = $this->loadUrlContext($path); - $this->callCallBack($context, 'fopen'); - $source = fopen($context['source'], $mode); - if ($source === false) { - return false; - } - $this->setSourceStream($source); - return true; - } - - public function dir_opendir($path, $options) { - $context = $this->loadUrlContext($path); - $this->callCallBack($context, 'opendir'); - $source = opendir($context['source']); - if ($source === false) { - return false; - } - $this->setSourceStream($source); - return true; - } - - public function mkdir($path, $mode, $options) { - $context = $this->loadUrlContext($path); - $this->callCallBack($context, 'mkdir'); - return mkdir($context['source'], $mode, ($options & STREAM_MKDIR_RECURSIVE) > 0); - } - - public function rmdir($path, $options) { - $context = $this->loadUrlContext($path); - $this->callCallBack($context, 'rmdir'); - return rmdir($context['source']); - } - - public function rename($source, $target) { - $context = $this->loadUrlContext($source); - $this->callCallBack($context, 'rename'); - list(, $target) = explode('://', $target); - return rename($context['source'], $target); - } - - public function unlink($path) { - $context = $this->loadUrlContext($path); - $this->callCallBack($context, 'unlink'); - return unlink($context['source']); - } - - public function url_stat($path, $flags) { - throw new \Exception('stat is not supported due to php bug 50526'); - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php b/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php deleted file mode 100644 index 0a9c07bee83..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\Streams; - -/** - * Base class for stream wrappers, wraps an existing stream - * - * This wrapper itself doesn't implement any functionality but is just a base class for other wrappers to extend - */ -abstract class Wrapper extends WrapperHandler implements File, Directory { - /** - * @var resource - */ - public $context; - - /** - * The wrapped stream - * - * @var resource - */ - protected $source; - - /** - * @param resource $source - */ - protected function setSourceStream($source) { - $this->source = $source; - } - - protected function loadContext($name = null) { - $context = parent::loadContext($name); - if (isset($context['source']) and is_resource($context['source'])) { - $this->setSourceStream($context['source']); - } else { - throw new \BadMethodCallException('Invalid context, source not set'); - } - return $context; - } - - public function stream_seek($offset, $whence = SEEK_SET) { - $result = fseek($this->source, $offset, $whence); - return $result == 0; - } - - public function stream_tell() { - return ftell($this->source); - } - - public function stream_read($count) { - return fread($this->source, $count); - } - - public function stream_write($data) { - return fwrite($this->source, $data); - } - - public function stream_set_option($option, $arg1, $arg2) { - switch ($option) { - case STREAM_OPTION_BLOCKING: - return stream_set_blocking($this->source, (bool)$arg1); - case STREAM_OPTION_READ_TIMEOUT: - return stream_set_timeout($this->source, $arg1, $arg2); - case STREAM_OPTION_WRITE_BUFFER: - return stream_set_write_buffer($this->source, $arg1) === 0; - } - return false; - } - - public function stream_truncate($size) { - return ftruncate($this->source, $size); - } - - public function stream_stat() { - return fstat($this->source); - } - - public function stream_lock($mode) { - return flock($this->source, $mode); - } - - public function stream_flush() { - return fflush($this->source); - } - - public function stream_eof() { - return feof($this->source); - } - - public function stream_close() { - if (is_resource($this->source)) { - return fclose($this->source); - } - } - - public function dir_readdir() { - return readdir($this->source); - } - - public function dir_closedir() { - closedir($this->source); - return true; - } - - public function dir_rewinddir() { - return rewind($this->source); - } - - public function getSource() { - return $this->source; - } - - /** - * Retrieves header/metadata from the source stream. - * - * This is equivalent to calling `stream_get_meta_data` on the source stream except nested stream wrappers are handled transparently - * - * @return array - */ - public function getMetaData(): array { - $meta = stream_get_meta_data($this->source); - while (isset($meta['wrapper_data']) && $meta['wrapper_data'] instanceof Wrapper) { - $meta = $meta['wrapper_data']->getMetaData(); - } - return $meta; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/WrapperHandler.php b/apps/files_external/3rdparty/icewind/streams/src/WrapperHandler.php deleted file mode 100644 index 64b3be213a3..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/WrapperHandler.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2019 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\Streams; - -class WrapperHandler { - /** @var resource $context */ - protected $context; - - const NO_SOURCE_DIR = 1; - - /** - * get the protocol name that is generated for the class - * @param string|null $class - * @return string - */ - public static function getProtocol($class = null) { - if ($class === null) { - $class = static::class; - } - - $parts = explode('\\', $class); - return strtolower(array_pop($parts)); - } - - private static function buildContext($protocol, $context, $source) { - if (is_array($context)) { - $context['source'] = $source; - return stream_context_create([$protocol => $context]); - } else { - return $context; - } - } - - /** - * @param resource|int $source - * @param resource|array $context - * @param string|null $protocol deprecated, protocol is now automatically generated - * @param string|null $class deprecated, class is now automatically generated - * @return resource|false - */ - protected static function wrapSource($source, $context = [], $protocol = null, $class = null, $mode = 'r+') { - if ($class === null) { - $class = static::class; - } - - if ($protocol === null) { - $protocol = self::getProtocol($class); - } - - $context = self::buildContext($protocol, $context, $source); - try { - stream_wrapper_register($protocol, $class); - if (self::isDirectoryHandle($source)) { - return opendir($protocol . '://', $context); - } else { - return fopen($protocol . '://', $mode, false, $context); - } - } finally { - stream_wrapper_unregister($protocol); - } - } - - protected static function isDirectoryHandle($resource) { - if ($resource === self::NO_SOURCE_DIR) { - return true; - } - if (!is_resource($resource)) { - throw new \BadMethodCallException('Invalid stream source'); - } - $meta = stream_get_meta_data($resource); - return $meta['stream_type'] === 'dir' || $meta['stream_type'] === 'user-space-dir'; - } - - /** - * Load the source from the stream context and return the context options - * - * @param string|null $name if not set, the generated protocol name is used - * @return array - * @throws \BadMethodCallException - */ - protected function loadContext($name = null) { - if ($name === null) { - $parts = explode('\\', static::class); - $name = strtolower(array_pop($parts)); - } - - $context = stream_context_get_options($this->context); - if (isset($context[$name])) { - $context = $context[$name]; - } else { - throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set'); - } - return $context; - } -} diff --git a/apps/files_external/3rdparty/icewind/streams/src/WriteHashWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/WriteHashWrapper.php deleted file mode 100644 index 685d73c1fbd..00000000000 --- a/apps/files_external/3rdparty/icewind/streams/src/WriteHashWrapper.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2019 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace Icewind\Streams; - -/** - * Wrapper that calculates the hash on the stream on write - * - * The stream and hash should be passed in when wrapping the stream. - * On close the callback will be called with the calculated checksum. - * - * For supported hashes see: http://php.net/manual/en/function.hash-algos.php - */ -class WriteHashWrapper extends HashWrapper { - public function stream_write($data) { - $this->updateHash($data); - return parent::stream_write($data); - } -} diff --git a/apps/files_external/ajax/oauth2.php b/apps/files_external/ajax/oauth2.php index 9dd8ceec2d2..d961d41ea6b 100644 --- a/apps/files_external/ajax/oauth2.php +++ b/apps/files_external/ajax/oauth2.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index 18418cc19c3..39b15e2a956 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/l10n/az.js b/apps/files_external/l10n/az.js deleted file mode 100644 index 324455d9dc8..00000000000 --- a/apps/files_external/l10n/az.js +++ /dev/null @@ -1,65 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Step 1 failed. Exception: %s" : "1-ci addım səhv oldu. İstisna: %s", - "Step 2 failed. Exception: %s" : "2-ci addım. İstisna: %s", - "External storage" : "Kənar informasıya daşıyıcısı", - "Personal" : "Şəxsi", - "System" : "Sistem", - "Grant access" : "Yetkinin verilməsi", - "Generate keys" : "Açarları generasiya et", - "Error generating key pair" : "Açar cütlüyünün generasiyası səhvi", - "All users. Type to select user or group." : "Sistem istifadəçiləri. Daxil edin ki, istifadəçi və ya qrupu seçəsiniz.", - "(group)" : "(qrup)", - "Saved" : "Saxlanıldı", - "Username" : "İstifadəçi adı", - "Password" : "Şifrə", - "Save" : "Saxla", - "Storage with id \"%i\" not found" : "\"%i\"-li depo tapılmadı", - "Invalid mount point" : "Yalnış mount nöqtəsi", - "Invalid storage backend \"%s\"" : "Yalnış depo arxasonu \"%s\"", - "None" : "Heç bir", - "App key" : "Proqram açarı", - "App secret" : "Proqram sirri", - "Client ID" : "Müştəri İD-s", - "Client secret" : "Müxtəri sirri", - "Public key" : "İctimai açar", - "Amazon S3" : "Amazon S3", - "Bucket" : "Vedrə", - "Hostname" : "Sahibadı", - "Port" : "Port", - "Region" : "Ərazi", - "Enable SSL" : "SSL-i işə sal", - "Enable Path Style" : "Ünvan stilini işə sal", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Uzaq altqovluğu", - "Secure https://" : "Təhlükəsiz https://", - "Dropbox" : "Dropbox", - "Host" : "Şəbəkədə ünvan", - "Secure ftps://" : "Təhlükəsiz ftps://", - "Local" : "Yerli", - "Location" : "Yerləşdiyiniz ünvan", - "Share" : "Yayımla", - "SMB / CIFS using OC login" : "OC login istifadə edir SMB / CIFS", - "Username as share" : "Paylaşım üçün istifadəçi adı", - "OpenStack Object Storage" : "OpenStack Obyekt Deposu", - "<b>Note:</b> " : "<b>Qeyd:</b> ", - "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Qeyd:</b> PHP-də cURL dəstəyi aktiv deyil və ya yüklənməyib. %s -in birləşdirilməsi mümkün deyil. Xahiş edilir onun yüklənilməsi barəsində inzibatşınıza məlumat verəsiniz.", - "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Qeyd:</b> PHP-də FTP dəstəyi aktiv deyil və ya yüklənməyib. %s -in birləşdirilməsi mümkün deyil. Xahiş edilir onun yüklənilməsi barəsində inzibatşınıza məlumat verəsiniz.", - "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Qeyd:</b> \"%s\" yüklənməyib. %s -in birləşdirilməsi mümkün deyil. Xahiş edilir onun yüklənilməsi barəsində inzibatşınıza məlumat verəsiniz.", - "No external storage configured" : "Kənar depo konfiq edilməyib", - "You can add external storages in the personal settings" : "Siz şəxsi quraşdırmalarınızda kənar depo əlavə edə bilərsiniz", - "Name" : "Ad", - "Storage type" : "Depo tipi", - "Scope" : "Həcm", - "External Storage" : "Kənar depo", - "Folder name" : "Qovluq adı", - "Configuration" : "Konfiqurasiya", - "Available for" : "Üçün mövcuddur", - "Add storage" : "Deponu əlavə et", - "Advanced settings" : "İrəliləmiş quraşdırmalar", - "Delete" : "Sil", - "Allow users to mount the following external storage" : "Göstərilən kənar deponun bərkidilməsi üçün istifadəçilərə izin ver" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/az.json b/apps/files_external/l10n/az.json deleted file mode 100644 index 962b0cdd244..00000000000 --- a/apps/files_external/l10n/az.json +++ /dev/null @@ -1,63 +0,0 @@ -{ "translations": { - "Step 1 failed. Exception: %s" : "1-ci addım səhv oldu. İstisna: %s", - "Step 2 failed. Exception: %s" : "2-ci addım. İstisna: %s", - "External storage" : "Kənar informasıya daşıyıcısı", - "Personal" : "Şəxsi", - "System" : "Sistem", - "Grant access" : "Yetkinin verilməsi", - "Generate keys" : "Açarları generasiya et", - "Error generating key pair" : "Açar cütlüyünün generasiyası səhvi", - "All users. Type to select user or group." : "Sistem istifadəçiləri. Daxil edin ki, istifadəçi və ya qrupu seçəsiniz.", - "(group)" : "(qrup)", - "Saved" : "Saxlanıldı", - "Username" : "İstifadəçi adı", - "Password" : "Şifrə", - "Save" : "Saxla", - "Storage with id \"%i\" not found" : "\"%i\"-li depo tapılmadı", - "Invalid mount point" : "Yalnış mount nöqtəsi", - "Invalid storage backend \"%s\"" : "Yalnış depo arxasonu \"%s\"", - "None" : "Heç bir", - "App key" : "Proqram açarı", - "App secret" : "Proqram sirri", - "Client ID" : "Müştəri İD-s", - "Client secret" : "Müxtəri sirri", - "Public key" : "İctimai açar", - "Amazon S3" : "Amazon S3", - "Bucket" : "Vedrə", - "Hostname" : "Sahibadı", - "Port" : "Port", - "Region" : "Ərazi", - "Enable SSL" : "SSL-i işə sal", - "Enable Path Style" : "Ünvan stilini işə sal", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Uzaq altqovluğu", - "Secure https://" : "Təhlükəsiz https://", - "Dropbox" : "Dropbox", - "Host" : "Şəbəkədə ünvan", - "Secure ftps://" : "Təhlükəsiz ftps://", - "Local" : "Yerli", - "Location" : "Yerləşdiyiniz ünvan", - "Share" : "Yayımla", - "SMB / CIFS using OC login" : "OC login istifadə edir SMB / CIFS", - "Username as share" : "Paylaşım üçün istifadəçi adı", - "OpenStack Object Storage" : "OpenStack Obyekt Deposu", - "<b>Note:</b> " : "<b>Qeyd:</b> ", - "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Qeyd:</b> PHP-də cURL dəstəyi aktiv deyil və ya yüklənməyib. %s -in birləşdirilməsi mümkün deyil. Xahiş edilir onun yüklənilməsi barəsində inzibatşınıza məlumat verəsiniz.", - "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Qeyd:</b> PHP-də FTP dəstəyi aktiv deyil və ya yüklənməyib. %s -in birləşdirilməsi mümkün deyil. Xahiş edilir onun yüklənilməsi barəsində inzibatşınıza məlumat verəsiniz.", - "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Qeyd:</b> \"%s\" yüklənməyib. %s -in birləşdirilməsi mümkün deyil. Xahiş edilir onun yüklənilməsi barəsində inzibatşınıza məlumat verəsiniz.", - "No external storage configured" : "Kənar depo konfiq edilməyib", - "You can add external storages in the personal settings" : "Siz şəxsi quraşdırmalarınızda kənar depo əlavə edə bilərsiniz", - "Name" : "Ad", - "Storage type" : "Depo tipi", - "Scope" : "Həcm", - "External Storage" : "Kənar depo", - "Folder name" : "Qovluq adı", - "Configuration" : "Konfiqurasiya", - "Available for" : "Üçün mövcuddur", - "Add storage" : "Deponu əlavə et", - "Advanced settings" : "İrəliləmiş quraşdırmalar", - "Delete" : "Sil", - "Allow users to mount the following external storage" : "Göstərilən kənar deponun bərkidilməsi üçün istifadəçilərə izin ver" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/bg.js b/apps/files_external/l10n/bg.js index be6696e231a..673928a5048 100644 --- a/apps/files_external/l10n/bg.js +++ b/apps/files_external/l10n/bg.js @@ -91,7 +91,7 @@ OC.L10N.register( "Unknown" : "Неизвестен", "Scope" : "Обхват", "Personal" : "Личен", - "System" : "Системен", + "System" : "Системна информация", "(Group)" : "(Група)", "Compatibility with Mac NFD encoding (slow)" : "Съвместимост с кодиране на Mac NFD (бавно)", "Enable encryption" : "Включване на криптиране", diff --git a/apps/files_external/l10n/bg.json b/apps/files_external/l10n/bg.json index e5a7b4b7f05..90e7b871531 100644 --- a/apps/files_external/l10n/bg.json +++ b/apps/files_external/l10n/bg.json @@ -89,7 +89,7 @@ "Unknown" : "Неизвестен", "Scope" : "Обхват", "Personal" : "Личен", - "System" : "Системен", + "System" : "Системна информация", "(Group)" : "(Група)", "Compatibility with Mac NFD encoding (slow)" : "Съвместимост с кодиране на Mac NFD (бавно)", "Enable encryption" : "Включване на криптиране", diff --git a/apps/files_external/l10n/bn_BD.js b/apps/files_external/l10n/bn_BD.js deleted file mode 100644 index 4d99e32ffdd..00000000000 --- a/apps/files_external/l10n/bn_BD.js +++ /dev/null @@ -1,39 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Step 1 failed. Exception: %s" : "প্রথম ধাপ ব্যার্থ। ব্যতিক্রম: %s", - "External storage" : "বাহ্যিক সংরক্ষণাগার", - "Personal" : "ব্যক্তিগত", - "Grant access" : "অধিগমনের অনুমতি প্রদান কর", - "(group)" : "(গোষ্ঠি)", - "Saved" : "সংরক্ষণ করা হলো", - "Username" : "ব্যবহারকারী", - "Password" : "কূটশব্দ", - "Save" : "সংরক্ষণ", - "None" : "কোনটিই নয়", - "App key" : "অ্যাপ কি", - "App secret" : "অ্যাপ সিক্রেট", - "Client ID" : "ক্লায়েন্ট পরিচিতি", - "Amazon S3" : "আমাজন S3", - "Bucket" : "বালতি", - "Hostname" : "হোস্টনেম", - "Port" : "পোর্ট", - "Region" : "এলাকা", - "Enable SSL" : "SSL সক্রিয় কর", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Host" : "হোস্ট", - "Secure ftps://" : "ftps:// অর্জন কর", - "Local" : "স্থানীয়", - "Location" : "অবস্থান", - "ownCloud" : "ওউনক্লাউড", - "Root" : "শেকড়", - "Share" : "ভাগাভাগি কর", - "<b>Note:</b> " : "<b>দ্রষ্টব্য:</b> ", - "Name" : "রাম", - "External Storage" : "বাহ্যিক সংরক্ষণাগার", - "Folder name" : "ফোলডারের নাম", - "Configuration" : "কনফিগারেসন", - "Delete" : "মুছে" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/bn_BD.json b/apps/files_external/l10n/bn_BD.json deleted file mode 100644 index d7035b0737f..00000000000 --- a/apps/files_external/l10n/bn_BD.json +++ /dev/null @@ -1,37 +0,0 @@ -{ "translations": { - "Step 1 failed. Exception: %s" : "প্রথম ধাপ ব্যার্থ। ব্যতিক্রম: %s", - "External storage" : "বাহ্যিক সংরক্ষণাগার", - "Personal" : "ব্যক্তিগত", - "Grant access" : "অধিগমনের অনুমতি প্রদান কর", - "(group)" : "(গোষ্ঠি)", - "Saved" : "সংরক্ষণ করা হলো", - "Username" : "ব্যবহারকারী", - "Password" : "কূটশব্দ", - "Save" : "সংরক্ষণ", - "None" : "কোনটিই নয়", - "App key" : "অ্যাপ কি", - "App secret" : "অ্যাপ সিক্রেট", - "Client ID" : "ক্লায়েন্ট পরিচিতি", - "Amazon S3" : "আমাজন S3", - "Bucket" : "বালতি", - "Hostname" : "হোস্টনেম", - "Port" : "পোর্ট", - "Region" : "এলাকা", - "Enable SSL" : "SSL সক্রিয় কর", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Host" : "হোস্ট", - "Secure ftps://" : "ftps:// অর্জন কর", - "Local" : "স্থানীয়", - "Location" : "অবস্থান", - "ownCloud" : "ওউনক্লাউড", - "Root" : "শেকড়", - "Share" : "ভাগাভাগি কর", - "<b>Note:</b> " : "<b>দ্রষ্টব্য:</b> ", - "Name" : "রাম", - "External Storage" : "বাহ্যিক সংরক্ষণাগার", - "Folder name" : "ফোলডারের নাম", - "Configuration" : "কনফিগারেসন", - "Delete" : "মুছে" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/bs.js b/apps/files_external/l10n/bs.js deleted file mode 100644 index dd90e5eeb36..00000000000 --- a/apps/files_external/l10n/bs.js +++ /dev/null @@ -1,19 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "Osobno", - "Saved" : "Spremljeno", - "Username" : "Korisničko ime", - "Password" : "Lozinka", - "Save" : "Spremi", - "None" : "Ništa", - "Port" : "Priključak", - "WebDAV" : "WebDAV", - "Local" : "Lokalno", - "Location" : "Lokacija", - "ownCloud" : "OwnCloud", - "Share" : "Podijeli", - "Name" : "Ime", - "Delete" : "Izbriši" -}, -"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/bs.json b/apps/files_external/l10n/bs.json deleted file mode 100644 index 815a60f1996..00000000000 --- a/apps/files_external/l10n/bs.json +++ /dev/null @@ -1,17 +0,0 @@ -{ "translations": { - "Personal" : "Osobno", - "Saved" : "Spremljeno", - "Username" : "Korisničko ime", - "Password" : "Lozinka", - "Save" : "Spremi", - "None" : "Ništa", - "Port" : "Priključak", - "WebDAV" : "WebDAV", - "Local" : "Lokalno", - "Location" : "Lokacija", - "ownCloud" : "OwnCloud", - "Share" : "Podijeli", - "Name" : "Ime", - "Delete" : "Izbriši" -},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/cy_GB.js b/apps/files_external/l10n/cy_GB.js deleted file mode 100644 index 6faf7f87fae..00000000000 --- a/apps/files_external/l10n/cy_GB.js +++ /dev/null @@ -1,16 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "Personol", - "Username" : "Enw defnyddiwr", - "Password" : "Cyfrinair", - "Save" : "Cadw", - "None" : "Dim", - "URL" : "URL", - "Location" : "Lleoliad", - "ownCloud" : "ownCloud", - "Share" : "Rhannu", - "Name" : "Enw", - "Delete" : "Dileu" -}, -"nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;"); diff --git a/apps/files_external/l10n/cy_GB.json b/apps/files_external/l10n/cy_GB.json deleted file mode 100644 index acc75b9afbb..00000000000 --- a/apps/files_external/l10n/cy_GB.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "translations": { - "Personal" : "Personol", - "Username" : "Enw defnyddiwr", - "Password" : "Cyfrinair", - "Save" : "Cadw", - "None" : "Dim", - "URL" : "URL", - "Location" : "Lleoliad", - "ownCloud" : "ownCloud", - "Share" : "Rhannu", - "Name" : "Enw", - "Delete" : "Dileu" -},"pluralForm" :"nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/et_EE.js b/apps/files_external/l10n/et_EE.js index c43471fe499..9624cfcc025 100644 --- a/apps/files_external/l10n/et_EE.js +++ b/apps/files_external/l10n/et_EE.js @@ -2,13 +2,14 @@ OC.L10N.register( "files_external", { "Grant access" : "Anna ligipääs", - "Error configuring OAuth1" : "OAuth1 seadistamise tõrge", - "Please provide a valid app key and secret." : "Palun sisesta rakenduse ketiva võti ja saladus.", - "Error configuring OAuth2" : "OAuth2 seadistamise tõrge", + "Error configuring OAuth1" : "Viga OAuth1 seadistamisel", + "Please provide a valid app key and secret." : "Palun sisesta rakenduse kehtiv võti ja saladus.", + "Error configuring OAuth2" : "Viga OAuth2 seadistamisel", "Generate keys" : "Loo võtmed", "Error generating key pair" : "Viga võtmepaari loomisel", "You are not logged in" : "Sa pole sisse logitud.", "Permission denied" : "Õigus on keelatud", + "Forbidden to manage local mounts" : "Kohalike haakepunktide haldamine on keelatud", "Storage with ID \"%d\" not found" : "Andmeruumi tunnusega „%d“ ei leidu", "Invalid backend or authentication mechanism class" : "Vigane taustateenus või autentimismeetodi klass", "Invalid mount point" : "Vigane haakepunkt", @@ -19,6 +20,7 @@ OC.L10N.register( "Unsatisfied backend parameters" : "Rahuldamata taustarakenduse parameetrid", "Insufficient data: %s" : "Pole piisavalt andmeid: %s", "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "Andmeruumi tunnusega „%d“ on muudetav vaid peakasutajate poolt", "Access key" : "Ligipääsuvõti", "Secret key" : "Salavõti", "Builtin" : "Sisseehitatud", @@ -43,6 +45,7 @@ OC.L10N.register( "Login and password" : "Kasutajanimi ja salasõna", "Log-in credentials, save in session" : "Salvesta sisselogimise kasutajanimi/salasõna sessioonis", "Global credentials, manually entered" : "Käsitsi sisestatud üldine kasutajanimi/salasõna", + "Manually entered, store in database" : "Käsitsi sisestatud ja salvestub andmebaasis", "RSA public key" : "RSA avalik võti", "Public key" : "Avalik võti", "RSA private key" : "RSA privaatvõti", @@ -52,12 +55,13 @@ OC.L10N.register( "Hostname" : "Hostinimi", "Port" : "Port", "Region" : "Piirkond", + "Storage Class" : "Andmeruumi klass (Storage class)", "Enable SSL" : "SSL-i kasutamine", "Enable Path Style" : "Luba otsingtee stiilis", "Legacy (v2) authentication" : "Pärandvormis autentimine (v2)", "SSE-C encryption key" : "SSE-C krüptimisvõti", "WebDAV" : "WebDAV", - "URL" : "URL", + "URL" : "Võrguaadress", "Remote subfolder" : "Mujal olev alamkaust", "Secure https://" : "Turvaline https://", "FTP" : "FTP", @@ -73,6 +77,7 @@ OC.L10N.register( "Share" : "Jaga", "Show hidden files" : "Näita peidetud faile", "Case sensitive file system" : "Tõstutundlik failisüsteem", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Selle valiku keelamisega saad kasutada tõstutundetut failisüsteemi, kuid sellega kaasneb jõudluskadu", "Timeout" : "Aegumine", "SMB/CIFS using OC login" : "SMB / CIFS kasutades OC sisselogimist", "OpenStack Object Storage" : "OpenStack Object Storage", @@ -80,25 +85,37 @@ OC.L10N.register( "Request timeout (seconds)" : "Päringu aegumine (sekundites)", "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "cURL-i tugi on PHP-s on kas paigaldamata või pole kasutusele võetud. „%s“ haakimine pole võimalik. Palun oma peakasutajat, et ta teeks cURL-i toe tagamiseks vajalikud muudatused.", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP tugi on PHP-s on kas paigaldamata või pole kasutusele võetud. „%s“ haakimine pole võimalik. Palun oma peakasutajat, et ta teeks FTP toe tagamiseks vajalikud muudatused.", + "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "„%1$s“ pole paigladatud. „%2$s“ haakimine pole võimalik. Palu oma peakasutajal või süsteemihalduril ta paigaldada.", "External storage" : "Väline andmehoidla", "External storage support" : "Väliste andmehoidlate tugi", - "Adds basic external storage support" : "Lisab väliste andmehoidlate toe baasiteratsioonis", + "Adds basic external storage support" : "Lisab väliste andmehoidlate toe põhivariandi", "Confirm" : "Kinnita", "Storage credentials" : "Andmeruumi kasutajanimi/salasõna", "To access the storage, you need to provide the authentication credentials." : "Selle andmeruumi jaoks pead autentimiseks lisama kasutajanime ja salasõna.", "Enter the storage login" : "Sisesta andmeruumi kasutajatunnus", "Enter the storage password" : "Sisesta andmeruumi kasutaja salasõna", + "Unable to update this external storage config. {statusMessage}" : "Selle välise andmeruumi seadistusi pole võimalik uuendada. {statusMessage}", + "New configuration successfully saved" : "Uue seadistuse salvestamine õnnestus", "Enter missing credentials" : "Lisa puuduvad kasutajanimi/salasõna", "Credentials successfully set" : "Kasutajanime/salasõna lisamine õnnestus", "Error while setting credentials: {error}" : "Viga kasutajanime/salasõna lisamisel: {error}", "Checking storage …" : "Kontrollin andmeruumi…", + "There was an error with this external storage." : "Selle välis andmeruumi kontekstis tekkis viga.", + "We were unable to check the external storage {basename}" : "Meil ei õnnestunud kontrollida välist andmeruumi „{basename}“", + "Examine this faulty external storage configuration" : "Kontrolli uuesti selle vigase välise andmeruumi seadistusi", "Open in Files" : "Ava failirakenduses", - "External mount error" : "Välise seostamise tõrge", - "Storage type" : "Andmehoidla tüüp", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Selle välise andmeruumiga tekkis viga. Kas sa tahaksid seadistustest kontrollida haakepunkti konfiguratsiooni?", + "External mount error" : "Viga välise andmeruumi haakimisel", + "List of external storage." : "Väliste andmeruumide loend.", + "There is no external storage configured. You can configure them in your Personal settings." : "Ühtegi välist andmeruumi pole seadistatud. Saad seda teha isiklikest seadistustest.", + "There is no external storage configured and you don't have the permission to configure them." : "Ühtegi välist andmeruumi pole seadistatud ja sul pole õigust seda teha.", + "No external storage" : "Ühtegi välist andmeruumi ei leidu", + "Storage type" : "Andmeruumi tüüp", "Unknown" : "Teadmata", "Scope" : "Skoop", "Personal" : "Isiklik", "System" : "Süsteem", + "Type to select account or group." : "Kasutakonto või grupi leidmiseks kirjuta midagi.", "(Group)" : "(Grupp)", "Compatibility with Mac NFD encoding (slow)" : "Ühilduvus Mac NFD kodeeringuga (aeglane)", "Enable encryption" : "Luba krüptimine", @@ -124,6 +141,8 @@ OC.L10N.register( "Configuration" : "Seadistamine", "Available for" : "Saadaval", "Add storage" : "Lisa andmehoidla", - "Advanced settings" : "Lisavalikud" + "All people" : "Kõik inimesed", + "Advanced settings" : "Lisavalikud", + "Allow people to mount external storage" : "Luba kõigil haakida välist andmeruumi" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/et_EE.json b/apps/files_external/l10n/et_EE.json index 108e1ad18aa..eed33193c14 100644 --- a/apps/files_external/l10n/et_EE.json +++ b/apps/files_external/l10n/et_EE.json @@ -1,12 +1,13 @@ { "translations": { "Grant access" : "Anna ligipääs", - "Error configuring OAuth1" : "OAuth1 seadistamise tõrge", - "Please provide a valid app key and secret." : "Palun sisesta rakenduse ketiva võti ja saladus.", - "Error configuring OAuth2" : "OAuth2 seadistamise tõrge", + "Error configuring OAuth1" : "Viga OAuth1 seadistamisel", + "Please provide a valid app key and secret." : "Palun sisesta rakenduse kehtiv võti ja saladus.", + "Error configuring OAuth2" : "Viga OAuth2 seadistamisel", "Generate keys" : "Loo võtmed", "Error generating key pair" : "Viga võtmepaari loomisel", "You are not logged in" : "Sa pole sisse logitud.", "Permission denied" : "Õigus on keelatud", + "Forbidden to manage local mounts" : "Kohalike haakepunktide haldamine on keelatud", "Storage with ID \"%d\" not found" : "Andmeruumi tunnusega „%d“ ei leidu", "Invalid backend or authentication mechanism class" : "Vigane taustateenus või autentimismeetodi klass", "Invalid mount point" : "Vigane haakepunkt", @@ -17,6 +18,7 @@ "Unsatisfied backend parameters" : "Rahuldamata taustarakenduse parameetrid", "Insufficient data: %s" : "Pole piisavalt andmeid: %s", "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "Andmeruumi tunnusega „%d“ on muudetav vaid peakasutajate poolt", "Access key" : "Ligipääsuvõti", "Secret key" : "Salavõti", "Builtin" : "Sisseehitatud", @@ -41,6 +43,7 @@ "Login and password" : "Kasutajanimi ja salasõna", "Log-in credentials, save in session" : "Salvesta sisselogimise kasutajanimi/salasõna sessioonis", "Global credentials, manually entered" : "Käsitsi sisestatud üldine kasutajanimi/salasõna", + "Manually entered, store in database" : "Käsitsi sisestatud ja salvestub andmebaasis", "RSA public key" : "RSA avalik võti", "Public key" : "Avalik võti", "RSA private key" : "RSA privaatvõti", @@ -50,12 +53,13 @@ "Hostname" : "Hostinimi", "Port" : "Port", "Region" : "Piirkond", + "Storage Class" : "Andmeruumi klass (Storage class)", "Enable SSL" : "SSL-i kasutamine", "Enable Path Style" : "Luba otsingtee stiilis", "Legacy (v2) authentication" : "Pärandvormis autentimine (v2)", "SSE-C encryption key" : "SSE-C krüptimisvõti", "WebDAV" : "WebDAV", - "URL" : "URL", + "URL" : "Võrguaadress", "Remote subfolder" : "Mujal olev alamkaust", "Secure https://" : "Turvaline https://", "FTP" : "FTP", @@ -71,6 +75,7 @@ "Share" : "Jaga", "Show hidden files" : "Näita peidetud faile", "Case sensitive file system" : "Tõstutundlik failisüsteem", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Selle valiku keelamisega saad kasutada tõstutundetut failisüsteemi, kuid sellega kaasneb jõudluskadu", "Timeout" : "Aegumine", "SMB/CIFS using OC login" : "SMB / CIFS kasutades OC sisselogimist", "OpenStack Object Storage" : "OpenStack Object Storage", @@ -78,25 +83,37 @@ "Request timeout (seconds)" : "Päringu aegumine (sekundites)", "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "cURL-i tugi on PHP-s on kas paigaldamata või pole kasutusele võetud. „%s“ haakimine pole võimalik. Palun oma peakasutajat, et ta teeks cURL-i toe tagamiseks vajalikud muudatused.", "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP tugi on PHP-s on kas paigaldamata või pole kasutusele võetud. „%s“ haakimine pole võimalik. Palun oma peakasutajat, et ta teeks FTP toe tagamiseks vajalikud muudatused.", + "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "„%1$s“ pole paigladatud. „%2$s“ haakimine pole võimalik. Palu oma peakasutajal või süsteemihalduril ta paigaldada.", "External storage" : "Väline andmehoidla", "External storage support" : "Väliste andmehoidlate tugi", - "Adds basic external storage support" : "Lisab väliste andmehoidlate toe baasiteratsioonis", + "Adds basic external storage support" : "Lisab väliste andmehoidlate toe põhivariandi", "Confirm" : "Kinnita", "Storage credentials" : "Andmeruumi kasutajanimi/salasõna", "To access the storage, you need to provide the authentication credentials." : "Selle andmeruumi jaoks pead autentimiseks lisama kasutajanime ja salasõna.", "Enter the storage login" : "Sisesta andmeruumi kasutajatunnus", "Enter the storage password" : "Sisesta andmeruumi kasutaja salasõna", + "Unable to update this external storage config. {statusMessage}" : "Selle välise andmeruumi seadistusi pole võimalik uuendada. {statusMessage}", + "New configuration successfully saved" : "Uue seadistuse salvestamine õnnestus", "Enter missing credentials" : "Lisa puuduvad kasutajanimi/salasõna", "Credentials successfully set" : "Kasutajanime/salasõna lisamine õnnestus", "Error while setting credentials: {error}" : "Viga kasutajanime/salasõna lisamisel: {error}", "Checking storage …" : "Kontrollin andmeruumi…", + "There was an error with this external storage." : "Selle välis andmeruumi kontekstis tekkis viga.", + "We were unable to check the external storage {basename}" : "Meil ei õnnestunud kontrollida välist andmeruumi „{basename}“", + "Examine this faulty external storage configuration" : "Kontrolli uuesti selle vigase välise andmeruumi seadistusi", "Open in Files" : "Ava failirakenduses", - "External mount error" : "Välise seostamise tõrge", - "Storage type" : "Andmehoidla tüüp", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Selle välise andmeruumiga tekkis viga. Kas sa tahaksid seadistustest kontrollida haakepunkti konfiguratsiooni?", + "External mount error" : "Viga välise andmeruumi haakimisel", + "List of external storage." : "Väliste andmeruumide loend.", + "There is no external storage configured. You can configure them in your Personal settings." : "Ühtegi välist andmeruumi pole seadistatud. Saad seda teha isiklikest seadistustest.", + "There is no external storage configured and you don't have the permission to configure them." : "Ühtegi välist andmeruumi pole seadistatud ja sul pole õigust seda teha.", + "No external storage" : "Ühtegi välist andmeruumi ei leidu", + "Storage type" : "Andmeruumi tüüp", "Unknown" : "Teadmata", "Scope" : "Skoop", "Personal" : "Isiklik", "System" : "Süsteem", + "Type to select account or group." : "Kasutakonto või grupi leidmiseks kirjuta midagi.", "(Group)" : "(Grupp)", "Compatibility with Mac NFD encoding (slow)" : "Ühilduvus Mac NFD kodeeringuga (aeglane)", "Enable encryption" : "Luba krüptimine", @@ -122,6 +139,8 @@ "Configuration" : "Seadistamine", "Available for" : "Saadaval", "Add storage" : "Lisa andmehoidla", - "Advanced settings" : "Lisavalikud" + "All people" : "Kõik inimesed", + "Advanced settings" : "Lisavalikud", + "Allow people to mount external storage" : "Luba kõigil haakida välist andmeruumi" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index bb6ed322fea..4fe61304c42 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -7,6 +7,7 @@ OC.L10N.register( "Error configuring OAuth2" : "Erreur lors de la configuration de OAuth2", "Generate keys" : "Générer des clés", "Error generating key pair" : "Erreur lors de la génération des clés", + "You are not logged in" : "Vous n'êtes pas connecté", "Permission denied" : "Autorisation refusée", "Forbidden to manage local mounts" : "Interdiction de gérer les montages locaux.", "Storage with ID \"%d\" not found" : "Stockage avec l'ID \"%d\" non trouvé", @@ -106,6 +107,7 @@ OC.L10N.register( "New configuration successfully saved" : "Nouvelle configuration entrée avec succès", "Enter missing credentials" : "Saisissez les identifiants de connexion manquants", "Credentials successfully set" : "Identifiants enregistrés avec succès", + "Error while setting credentials: {error}" : "Erreur lors de l'envoi des identifiants: {error}", "Checking storage …" : "Vérification du stockage ...", "There was an error with this external storage." : "Il y a eu une erreur avec ce stockage externe.", "We were unable to check the external storage {basename}" : "Nous n'avons pas pu vérifier le stockage externe {basename}", @@ -142,6 +144,8 @@ OC.L10N.register( "Saved" : "Enregistré", "Saving …" : "Enregistrement ...", "Save" : "Enregistrer", + "Failed to save global credentials" : "Échec de l'enregistrement des identifiants globaux", + "Failed to save global credentials: {message}" : "Échec de l'enregistrement des identifiants globaux : {message}", "No external storage configured or you don't have the permission to configure them" : "Aucun stockage externe configuré ou vous n'avez pas l'autorisation de les configurer", "Open documentation" : "Voir la documentation", "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Le stockage externe vous permet de monter des périphériques et services externes en tant que périphériques de stockage secondaires sous Nextcloud. Vous pouvez aussi autoriser les personnes à monter leurs propres services de stockage externes.", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index 23e6346641f..d55040a70db 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -5,6 +5,7 @@ "Error configuring OAuth2" : "Erreur lors de la configuration de OAuth2", "Generate keys" : "Générer des clés", "Error generating key pair" : "Erreur lors de la génération des clés", + "You are not logged in" : "Vous n'êtes pas connecté", "Permission denied" : "Autorisation refusée", "Forbidden to manage local mounts" : "Interdiction de gérer les montages locaux.", "Storage with ID \"%d\" not found" : "Stockage avec l'ID \"%d\" non trouvé", @@ -104,6 +105,7 @@ "New configuration successfully saved" : "Nouvelle configuration entrée avec succès", "Enter missing credentials" : "Saisissez les identifiants de connexion manquants", "Credentials successfully set" : "Identifiants enregistrés avec succès", + "Error while setting credentials: {error}" : "Erreur lors de l'envoi des identifiants: {error}", "Checking storage …" : "Vérification du stockage ...", "There was an error with this external storage." : "Il y a eu une erreur avec ce stockage externe.", "We were unable to check the external storage {basename}" : "Nous n'avons pas pu vérifier le stockage externe {basename}", @@ -140,6 +142,8 @@ "Saved" : "Enregistré", "Saving …" : "Enregistrement ...", "Save" : "Enregistrer", + "Failed to save global credentials" : "Échec de l'enregistrement des identifiants globaux", + "Failed to save global credentials: {message}" : "Échec de l'enregistrement des identifiants globaux : {message}", "No external storage configured or you don't have the permission to configure them" : "Aucun stockage externe configuré ou vous n'avez pas l'autorisation de les configurer", "Open documentation" : "Voir la documentation", "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Le stockage externe vous permet de monter des périphériques et services externes en tant que périphériques de stockage secondaires sous Nextcloud. Vous pouvez aussi autoriser les personnes à monter leurs propres services de stockage externes.", diff --git a/apps/files_external/l10n/hu.js b/apps/files_external/l10n/hu.js index f9c76ae632a..d5e59fa5d77 100644 --- a/apps/files_external/l10n/hu.js +++ b/apps/files_external/l10n/hu.js @@ -7,6 +7,8 @@ OC.L10N.register( "Error configuring OAuth2" : "OAuth2 beállítási hiba", "Generate keys" : "Kulcsok előállítása", "Error generating key pair" : "Hiba történt a kulcspár előállítása során", + "You are not logged in" : "Nincs bejelentkezve.", + "Permission denied" : "Jogosultság megtagadva", "Forbidden to manage local mounts" : "A helyi csatolt kötetek kezelése tiltott", "Storage with ID \"%d\" not found" : "A(z) „%d” azonosítójú tároló nem található", "Invalid backend or authentication mechanism class" : "Érvénytelen háttérszolgáltatási vagy hitelesítési mechanizmus osztály", @@ -19,6 +21,7 @@ OC.L10N.register( "Unsatisfied authentication mechanism parameters" : "Elégtelen paraméterek a hitelesítési mechanizmushoz", "Insufficient data: %s" : "Elégtelen adatok: %s", "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "A(z) „%d” azonosítójú tárolót csak rendszergazdák szerkeszthetik", "Access key" : "Hozzáférési kulcs", "Secret key" : "Titkos kulcs", "Builtin" : "Beépített", @@ -40,7 +43,10 @@ OC.L10N.register( "API key" : "API kulcs", "Global credentials" : "Globális hitelesítő adatok", "Log-in credentials, save in database" : "Bejelentkezési hitelesítő adatok, mentés adatbázisban", + "Login and password" : "Bejelentkezés és jelszó", "Log-in credentials, save in session" : "Bejelentkezési hitelesítő adatok, mentés a munkamenetben", + "Global credentials, manually entered" : "Globális hitelesítő adatok, kézileg megadva", + "Manually entered, store in database" : "Kézileg megadva, tárolás adatbázisban", "RSA public key" : "RSA nyilvános kulcs", "Public key" : "Nyilvános kulcs", "RSA private key" : "RSA titkos kulcs", @@ -57,6 +63,8 @@ OC.L10N.register( "Enable SSL" : "SSL engedélyezése", "Enable Path Style" : "Útvonal stílus engedélyezés", "Legacy (v2) authentication" : "Örökölt (v2) hitelesítés", + "Enable multipart copy" : "Többrészes másolás engedélyezése", + "SSE-C encryption key" : "SSE-C titkosítási kulcsa", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Távoli almappa", @@ -76,8 +84,10 @@ OC.L10N.register( "Case sensitive file system" : "Kis- és nagybetűket megkülönböztető fájlrendszer", "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "A letiltása lehetővé teszi a kis- és nagybetűket nem megkülönböztető fájlrendszerek használatát, de ez teljesítményvesztést okoz", "Verify ACL access when listing files" : "ACL hozzáférés ellenőrzése a fájlok listázásakor", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Egy könyvtárban szereplő összes fájl vagy mappa ACL-jének ellenőrzése azon elemek kiszűréséhez, melyeken a fióknak nincs olvasási engedélye; teljesítménycsökkenéssel jár", "Timeout" : "Időtúllépés", "SMB/CIFS using OC login" : "SMB / CIFS OC bejelentkezéssel", + "Login as share" : "Bejelentkezés megosztásként", "OpenStack Object Storage" : "OpenStack objektumtároló", "Service name" : "Szolgáltatás neve", "Request timeout (seconds)" : "Kérés időtúllépése (másodpercben)", @@ -87,10 +97,18 @@ OC.L10N.register( "External storage" : "Külső tároló", "External storage support" : "Külső tároló támogatás", "Adds basic external storage support" : "Külső tároló támogatás hozzáadása", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Ez az alkalmazás lehetővé teszi a rendszergazdák számára, hogy beállítsák a kapcsolatokat a külső tárhely-szolgáltatókkal, például FTP-kiszolgálókkal, S3 vagy SWIFT objektumtárolókkal, más Nextcloud-kiszolgálókkal, WebDAV-kiszolgálókkal és egyebekkel. A rendszergazdák kiválaszthatják, hogy milyen típusú tárolókat engedélyeznek, és csatolhatják ezeket a tárhelyeket egy fiók, egy csoport vagy az egész rendszer számára. A felhasználók látni fogják, hogy egy új mappa jelenik meg a Nextcloud gyökérkönyvtárában, amelyet minden más Nextcloud mappához hasonlóan elérhetnek és használhatnak. A külső tárhely lehetővé teszi az emberek számára a külső helyeken tárolt fájlok megosztását is. Ezekben az esetekben a fájl tulajdonosának hitelesítő adatait akkor használják, amikor a címzett a fájlt külső tárhelyről kéri, ezáltal biztosítva, hogy a címzett hozzáférjen a megosztott fájlhoz.\n\nA külső tároló grafikus felületen vagy a parancssorban konfigurálható. Ez a második lehetőség a rendszergazdák számára nagyobb rugalmasságot biztosít a tömeges külső tárolók konfigurálásához, és a csatolási prioritások beállításához. További információ a külső tároló GUI dokumentációjában, és a külső tároló konfigurációs fájljának dokumentációjában található.", "Confirm" : "Megerősítés", + "Storage credentials" : "Tároló hitelesítő adatai", + "To access the storage, you need to provide the authentication credentials." : "A tároló eléréséhez meg kell adnia a hitelesítő adatokat.", + "Enter the storage login" : "Adja meg a tároló bejelentkezését", + "Enter the storage password" : "Adja meg a tároló jelszavát", "Unable to update this external storage config. {statusMessage}" : "A külső tároló beállításainak frissítése nem sikerült. {statusMessage}", "New configuration successfully saved" : "Az új konfiguráció sikeresen elmentve", "Enter missing credentials" : "Adja meg a hiányzó hitelesítési adatokat", + "Credentials successfully set" : "Hitelesítő adatok sikeresen beállítva", + "Error while setting credentials: {error}" : "Hiba a hitelesítő adatok beállításakor: {error}", + "Checking storage …" : "Tároló ellenőrzése…", "There was an error with this external storage." : "Hiba történt ezzel a külső tárolóval.", "We were unable to check the external storage {basename}" : "Nem sikerült a(z) {basename} külső tároló ellenőrzése", "Examine this faulty external storage configuration" : "Vizsgálja meg a külső tároló hibás konfigurációját", @@ -106,6 +124,7 @@ OC.L10N.register( "Scope" : "Hatókör", "Personal" : "Személyes", "System" : "Rendszer", + "Type to select account or group." : "Gépeljen a fiók vagy a csoport kiválasztásához.", "(Group)" : "(Csoport)", "Compatibility with Mac NFD encoding (slow)" : "Kompatibilitás a Mac NFD kódolással (lassú)", "Enable encryption" : "Titkosítás engedélyezése", @@ -116,6 +135,7 @@ OC.L10N.register( "Once every direct access" : "Minden közvetlen elérésnél", "Read only" : "Csak olvasható", "Disconnect" : "Kapcsolat bontása", + "Unknown backend: {backendName}" : "Ismeretlen háttérszolgáltatás: {backendName}", "Admin defined" : "Rendszergazda által definiálva", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Az automatikus állapotellenőrzés a beállított tárolók nagy száma miatt ki van kapcsolva, kattintson az állapot ellenőrzéséhez", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Biztos, hogy bontja a kapcsolatot ezzel a külső tárolóval? A tároló nem lesz elérhető a Nextcloudban, és a szinkronizálási kliensek is törölni fogják azokat a fájlokat, amelyek jelenleg kapcsolatban vannak, viszont magáról a külső tárolóról nem fogja törölni a fájlokat és mappákat.", @@ -124,14 +144,19 @@ OC.L10N.register( "Saved" : "Mentve", "Saving …" : "Mentés…", "Save" : "Mentés", + "Failed to save global credentials" : "A globális hitelesítő adatok mentése sikertelen", + "Failed to save global credentials: {message}" : "A globális hitelesítő adatok mentése sikertelen: {message}", "No external storage configured or you don't have the permission to configure them" : "Nincsenek külső tárolók beállítva, vagy nincs hozzáférése a beállításaikhoz", "Open documentation" : "Dokumentáció megnyitása", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "A külső tárhely lehetővé teszi külső tárolási szolgáltatások és eszközök másodlagos Nextcloud-tárolóeszközként történő csatlakoztatását. Lehetővé teheti az emberek számára, hogy saját külső tárolószolgáltatásukat is csatlakoztassák.", "Folder name" : "Mappa neve", "Authentication" : "Hitelesítés", "Configuration" : "Beállítások", "Available for" : "Számukra érhető el:", "Add storage" : "Tároló hozzáadása", + "All people" : "Mindenki", "Advanced settings" : "Speciális beállítások", + "Allow people to mount external storage" : "Külső tárolók csatolásának engedélyezése az emberek számára", "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "A globális hitelesítő adatokkal azonos külső hitelesítő adatokkal rendelkező külső tárhelyek hitelesíthetők." }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/hu.json b/apps/files_external/l10n/hu.json index a33f82f6a8c..f87d4b601f9 100644 --- a/apps/files_external/l10n/hu.json +++ b/apps/files_external/l10n/hu.json @@ -5,6 +5,8 @@ "Error configuring OAuth2" : "OAuth2 beállítási hiba", "Generate keys" : "Kulcsok előállítása", "Error generating key pair" : "Hiba történt a kulcspár előállítása során", + "You are not logged in" : "Nincs bejelentkezve.", + "Permission denied" : "Jogosultság megtagadva", "Forbidden to manage local mounts" : "A helyi csatolt kötetek kezelése tiltott", "Storage with ID \"%d\" not found" : "A(z) „%d” azonosítójú tároló nem található", "Invalid backend or authentication mechanism class" : "Érvénytelen háttérszolgáltatási vagy hitelesítési mechanizmus osztály", @@ -17,6 +19,7 @@ "Unsatisfied authentication mechanism parameters" : "Elégtelen paraméterek a hitelesítési mechanizmushoz", "Insufficient data: %s" : "Elégtelen adatok: %s", "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "A(z) „%d” azonosítójú tárolót csak rendszergazdák szerkeszthetik", "Access key" : "Hozzáférési kulcs", "Secret key" : "Titkos kulcs", "Builtin" : "Beépített", @@ -38,7 +41,10 @@ "API key" : "API kulcs", "Global credentials" : "Globális hitelesítő adatok", "Log-in credentials, save in database" : "Bejelentkezési hitelesítő adatok, mentés adatbázisban", + "Login and password" : "Bejelentkezés és jelszó", "Log-in credentials, save in session" : "Bejelentkezési hitelesítő adatok, mentés a munkamenetben", + "Global credentials, manually entered" : "Globális hitelesítő adatok, kézileg megadva", + "Manually entered, store in database" : "Kézileg megadva, tárolás adatbázisban", "RSA public key" : "RSA nyilvános kulcs", "Public key" : "Nyilvános kulcs", "RSA private key" : "RSA titkos kulcs", @@ -55,6 +61,8 @@ "Enable SSL" : "SSL engedélyezése", "Enable Path Style" : "Útvonal stílus engedélyezés", "Legacy (v2) authentication" : "Örökölt (v2) hitelesítés", + "Enable multipart copy" : "Többrészes másolás engedélyezése", + "SSE-C encryption key" : "SSE-C titkosítási kulcsa", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Távoli almappa", @@ -74,8 +82,10 @@ "Case sensitive file system" : "Kis- és nagybetűket megkülönböztető fájlrendszer", "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "A letiltása lehetővé teszi a kis- és nagybetűket nem megkülönböztető fájlrendszerek használatát, de ez teljesítményvesztést okoz", "Verify ACL access when listing files" : "ACL hozzáférés ellenőrzése a fájlok listázásakor", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Egy könyvtárban szereplő összes fájl vagy mappa ACL-jének ellenőrzése azon elemek kiszűréséhez, melyeken a fióknak nincs olvasási engedélye; teljesítménycsökkenéssel jár", "Timeout" : "Időtúllépés", "SMB/CIFS using OC login" : "SMB / CIFS OC bejelentkezéssel", + "Login as share" : "Bejelentkezés megosztásként", "OpenStack Object Storage" : "OpenStack objektumtároló", "Service name" : "Szolgáltatás neve", "Request timeout (seconds)" : "Kérés időtúllépése (másodpercben)", @@ -85,10 +95,18 @@ "External storage" : "Külső tároló", "External storage support" : "Külső tároló támogatás", "Adds basic external storage support" : "Külső tároló támogatás hozzáadása", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Ez az alkalmazás lehetővé teszi a rendszergazdák számára, hogy beállítsák a kapcsolatokat a külső tárhely-szolgáltatókkal, például FTP-kiszolgálókkal, S3 vagy SWIFT objektumtárolókkal, más Nextcloud-kiszolgálókkal, WebDAV-kiszolgálókkal és egyebekkel. A rendszergazdák kiválaszthatják, hogy milyen típusú tárolókat engedélyeznek, és csatolhatják ezeket a tárhelyeket egy fiók, egy csoport vagy az egész rendszer számára. A felhasználók látni fogják, hogy egy új mappa jelenik meg a Nextcloud gyökérkönyvtárában, amelyet minden más Nextcloud mappához hasonlóan elérhetnek és használhatnak. A külső tárhely lehetővé teszi az emberek számára a külső helyeken tárolt fájlok megosztását is. Ezekben az esetekben a fájl tulajdonosának hitelesítő adatait akkor használják, amikor a címzett a fájlt külső tárhelyről kéri, ezáltal biztosítva, hogy a címzett hozzáférjen a megosztott fájlhoz.\n\nA külső tároló grafikus felületen vagy a parancssorban konfigurálható. Ez a második lehetőség a rendszergazdák számára nagyobb rugalmasságot biztosít a tömeges külső tárolók konfigurálásához, és a csatolási prioritások beállításához. További információ a külső tároló GUI dokumentációjában, és a külső tároló konfigurációs fájljának dokumentációjában található.", "Confirm" : "Megerősítés", + "Storage credentials" : "Tároló hitelesítő adatai", + "To access the storage, you need to provide the authentication credentials." : "A tároló eléréséhez meg kell adnia a hitelesítő adatokat.", + "Enter the storage login" : "Adja meg a tároló bejelentkezését", + "Enter the storage password" : "Adja meg a tároló jelszavát", "Unable to update this external storage config. {statusMessage}" : "A külső tároló beállításainak frissítése nem sikerült. {statusMessage}", "New configuration successfully saved" : "Az új konfiguráció sikeresen elmentve", "Enter missing credentials" : "Adja meg a hiányzó hitelesítési adatokat", + "Credentials successfully set" : "Hitelesítő adatok sikeresen beállítva", + "Error while setting credentials: {error}" : "Hiba a hitelesítő adatok beállításakor: {error}", + "Checking storage …" : "Tároló ellenőrzése…", "There was an error with this external storage." : "Hiba történt ezzel a külső tárolóval.", "We were unable to check the external storage {basename}" : "Nem sikerült a(z) {basename} külső tároló ellenőrzése", "Examine this faulty external storage configuration" : "Vizsgálja meg a külső tároló hibás konfigurációját", @@ -104,6 +122,7 @@ "Scope" : "Hatókör", "Personal" : "Személyes", "System" : "Rendszer", + "Type to select account or group." : "Gépeljen a fiók vagy a csoport kiválasztásához.", "(Group)" : "(Csoport)", "Compatibility with Mac NFD encoding (slow)" : "Kompatibilitás a Mac NFD kódolással (lassú)", "Enable encryption" : "Titkosítás engedélyezése", @@ -114,6 +133,7 @@ "Once every direct access" : "Minden közvetlen elérésnél", "Read only" : "Csak olvasható", "Disconnect" : "Kapcsolat bontása", + "Unknown backend: {backendName}" : "Ismeretlen háttérszolgáltatás: {backendName}", "Admin defined" : "Rendszergazda által definiálva", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Az automatikus állapotellenőrzés a beállított tárolók nagy száma miatt ki van kapcsolva, kattintson az állapot ellenőrzéséhez", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Biztos, hogy bontja a kapcsolatot ezzel a külső tárolóval? A tároló nem lesz elérhető a Nextcloudban, és a szinkronizálási kliensek is törölni fogják azokat a fájlokat, amelyek jelenleg kapcsolatban vannak, viszont magáról a külső tárolóról nem fogja törölni a fájlokat és mappákat.", @@ -122,14 +142,19 @@ "Saved" : "Mentve", "Saving …" : "Mentés…", "Save" : "Mentés", + "Failed to save global credentials" : "A globális hitelesítő adatok mentése sikertelen", + "Failed to save global credentials: {message}" : "A globális hitelesítő adatok mentése sikertelen: {message}", "No external storage configured or you don't have the permission to configure them" : "Nincsenek külső tárolók beállítva, vagy nincs hozzáférése a beállításaikhoz", "Open documentation" : "Dokumentáció megnyitása", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "A külső tárhely lehetővé teszi külső tárolási szolgáltatások és eszközök másodlagos Nextcloud-tárolóeszközként történő csatlakoztatását. Lehetővé teheti az emberek számára, hogy saját külső tárolószolgáltatásukat is csatlakoztassák.", "Folder name" : "Mappa neve", "Authentication" : "Hitelesítés", "Configuration" : "Beállítások", "Available for" : "Számukra érhető el:", "Add storage" : "Tároló hozzáadása", + "All people" : "Mindenki", "Advanced settings" : "Speciális beállítások", + "Allow people to mount external storage" : "Külső tárolók csatolásának engedélyezése az emberek számára", "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "A globális hitelesítő adatokkal azonos külső hitelesítő adatokkal rendelkező külső tárhelyek hitelesíthetők." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/hy.js b/apps/files_external/l10n/hy.js deleted file mode 100644 index b55c9393b39..00000000000 --- a/apps/files_external/l10n/hy.js +++ /dev/null @@ -1,17 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "Անձնական", - "Saved" : "Պահված", - "Username" : "Օգտանուն", - "Password" : "Գաղտնաբառ", - "Save" : "Պահպանել", - "URL" : "URL", - "Dropbox" : "Dropbox", - "Share" : "Կիսվել", - "Name" : "Անուն", - "Never" : "Երբեք", - "Folder name" : "Պանակի անուն", - "Delete" : "Ջնջել" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/hy.json b/apps/files_external/l10n/hy.json deleted file mode 100644 index 7a5d37b985c..00000000000 --- a/apps/files_external/l10n/hy.json +++ /dev/null @@ -1,15 +0,0 @@ -{ "translations": { - "Personal" : "Անձնական", - "Saved" : "Պահված", - "Username" : "Օգտանուն", - "Password" : "Գաղտնաբառ", - "Save" : "Պահպանել", - "URL" : "URL", - "Dropbox" : "Dropbox", - "Share" : "Կիսվել", - "Name" : "Անուն", - "Never" : "Երբեք", - "Folder name" : "Պանակի անուն", - "Delete" : "Ջնջել" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/ia.js b/apps/files_external/l10n/ia.js deleted file mode 100644 index 02b888e1b02..00000000000 --- a/apps/files_external/l10n/ia.js +++ /dev/null @@ -1,77 +0,0 @@ -OC.L10N.register( - "files_external", - { - "External storage" : "Immagazinage externe", - "Personal" : "Personal", - "System" : "Systema", - "Grant access" : "Conceder accesso", - "Error configuring OAuth1" : "Error durante configuration de OAuth1", - "Please provide a valid app key and secret." : "Per favor, provide un clave e un secreto ambe valide.", - "Error configuring OAuth2" : "Error durante configuration de OAuth2", - "Generate keys" : "Generar claves", - "Error generating key pair" : "Error durante creation de par de claves", - "Enable encryption" : "Activar cryptographia", - "Enable previews" : "Activar previsualisationes", - "Enable sharing" : "Activar compartimento", - "Check for changes" : "Verificar nove modificationes", - "Never" : "Nunquam", - "Once every direct access" : "A cata accesso directe", - "Disconnect" : "Disconnecter", - "Saved" : "Salveguardate", - "Save" : "Salveguardar", - "External mount error" : "Error del montage externe", - "external-storage" : "immagazinage-externe", - "Username" : "Nomine de usator", - "Password" : "Contrasigno", - "Credentials saved" : "Datos de authentication salveguardate", - "Credentials saving failed" : "Salveguarda de datos de authentication falleva", - "Credentials required" : "Datos de authentication requirite", - "Invalid mount point" : "Puncto de montage non valide", - "Insufficient data: %s" : "Datos insufficiente: %s", - "%s" : "%s", - "Access key" : "Clave de accesso", - "Secret key" : "Clave secrete", - "None" : "Nulle", - "OAuth1" : "OAuth1", - "App key" : "Clave del Application", - "App secret" : "Secreto del Application", - "OAuth2" : "OAuth2", - "Domain" : "Dominio", - "API key" : "Clave API", - "Global credentials" : "Datos de authentication global", - "Username and password" : "Nomine de usator e contrasigno", - "RSA public key" : "Clave public RSA", - "Public key" : "Clave public", - "Amazon S3" : "Amazon S3", - "Hostname" : "Nomine de Hospite", - "Port" : "Porto", - "Region" : "Region", - "Enable SSL" : "Activar SSL", - "Enable Path Style" : "Activar Stilo de Sentiero", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Sub-dossier remote", - "Secure https://" : "Secur https://", - "FTP" : "FTP", - "Host" : "Hospite", - "Secure ftps://" : "Secure ftps://", - "Local" : "Local", - "Location" : "Loco", - "Nextcloud" : "Nextcloud", - "SFTP" : "SFTP", - "Root" : "Root", - "Share" : "Compartir", - "Show hidden files" : "Monstrar files occultate", - "Service name" : "Nomine del servicio", - "Name" : "Nomine", - "Storage type" : "Typo de immagazinage", - "Open documentation" : "Aperir documentation", - "Folder name" : "Nomine de dossier", - "Authentication" : "Authentication", - "Configuration" : "Configuration", - "Available for" : "Disponibile a", - "Add storage" : "Adder immagazinage", - "Advanced settings" : "Configurationes avantiate", - "Allow users to mount external storage" : "Permitter usatores montar immagazinage externe" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/ia.json b/apps/files_external/l10n/ia.json deleted file mode 100644 index 774e47dcb6c..00000000000 --- a/apps/files_external/l10n/ia.json +++ /dev/null @@ -1,75 +0,0 @@ -{ "translations": { - "External storage" : "Immagazinage externe", - "Personal" : "Personal", - "System" : "Systema", - "Grant access" : "Conceder accesso", - "Error configuring OAuth1" : "Error durante configuration de OAuth1", - "Please provide a valid app key and secret." : "Per favor, provide un clave e un secreto ambe valide.", - "Error configuring OAuth2" : "Error durante configuration de OAuth2", - "Generate keys" : "Generar claves", - "Error generating key pair" : "Error durante creation de par de claves", - "Enable encryption" : "Activar cryptographia", - "Enable previews" : "Activar previsualisationes", - "Enable sharing" : "Activar compartimento", - "Check for changes" : "Verificar nove modificationes", - "Never" : "Nunquam", - "Once every direct access" : "A cata accesso directe", - "Disconnect" : "Disconnecter", - "Saved" : "Salveguardate", - "Save" : "Salveguardar", - "External mount error" : "Error del montage externe", - "external-storage" : "immagazinage-externe", - "Username" : "Nomine de usator", - "Password" : "Contrasigno", - "Credentials saved" : "Datos de authentication salveguardate", - "Credentials saving failed" : "Salveguarda de datos de authentication falleva", - "Credentials required" : "Datos de authentication requirite", - "Invalid mount point" : "Puncto de montage non valide", - "Insufficient data: %s" : "Datos insufficiente: %s", - "%s" : "%s", - "Access key" : "Clave de accesso", - "Secret key" : "Clave secrete", - "None" : "Nulle", - "OAuth1" : "OAuth1", - "App key" : "Clave del Application", - "App secret" : "Secreto del Application", - "OAuth2" : "OAuth2", - "Domain" : "Dominio", - "API key" : "Clave API", - "Global credentials" : "Datos de authentication global", - "Username and password" : "Nomine de usator e contrasigno", - "RSA public key" : "Clave public RSA", - "Public key" : "Clave public", - "Amazon S3" : "Amazon S3", - "Hostname" : "Nomine de Hospite", - "Port" : "Porto", - "Region" : "Region", - "Enable SSL" : "Activar SSL", - "Enable Path Style" : "Activar Stilo de Sentiero", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Sub-dossier remote", - "Secure https://" : "Secur https://", - "FTP" : "FTP", - "Host" : "Hospite", - "Secure ftps://" : "Secure ftps://", - "Local" : "Local", - "Location" : "Loco", - "Nextcloud" : "Nextcloud", - "SFTP" : "SFTP", - "Root" : "Root", - "Share" : "Compartir", - "Show hidden files" : "Monstrar files occultate", - "Service name" : "Nomine del servicio", - "Name" : "Nomine", - "Storage type" : "Typo de immagazinage", - "Open documentation" : "Aperir documentation", - "Folder name" : "Nomine de dossier", - "Authentication" : "Authentication", - "Configuration" : "Configuration", - "Available for" : "Disponibile a", - "Add storage" : "Adder immagazinage", - "Advanced settings" : "Configurationes avantiate", - "Allow users to mount external storage" : "Permitter usatores montar immagazinage externe" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/km.js b/apps/files_external/l10n/km.js deleted file mode 100644 index 3f42823824b..00000000000 --- a/apps/files_external/l10n/km.js +++ /dev/null @@ -1,25 +0,0 @@ -OC.L10N.register( - "files_external", - { - "External storage" : "ឃ្លាំងផ្ទុកខាងក្រៅ", - "Personal" : "ផ្ទាល់ខ្លួន", - "Grant access" : "ទទួលសិទ្ធិចូល", - "Saved" : "បានរក្សាទុក", - "Username" : "ឈ្មោះអ្នកប្រើ", - "Password" : "ពាក្យសម្ងាត់", - "Save" : "រក្សាទុក", - "None" : "គ្មាន", - "Port" : "ច្រក", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Host" : "ម៉ាស៊ីនផ្ទុក", - "Location" : "ទីតាំង", - "Share" : "ចែករំលែក", - "Name" : "ឈ្មោះ", - "External Storage" : "ឃ្លាំងផ្ទុកខាងក្រៅ", - "Folder name" : "ឈ្មោះថត", - "Configuration" : "ការកំណត់សណ្ឋាន", - "Add storage" : "បន្ថែមឃ្លាំងផ្ទុក", - "Delete" : "លុប" -}, -"nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/km.json b/apps/files_external/l10n/km.json deleted file mode 100644 index 06ab103b606..00000000000 --- a/apps/files_external/l10n/km.json +++ /dev/null @@ -1,23 +0,0 @@ -{ "translations": { - "External storage" : "ឃ្លាំងផ្ទុកខាងក្រៅ", - "Personal" : "ផ្ទាល់ខ្លួន", - "Grant access" : "ទទួលសិទ្ធិចូល", - "Saved" : "បានរក្សាទុក", - "Username" : "ឈ្មោះអ្នកប្រើ", - "Password" : "ពាក្យសម្ងាត់", - "Save" : "រក្សាទុក", - "None" : "គ្មាន", - "Port" : "ច្រក", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Host" : "ម៉ាស៊ីនផ្ទុក", - "Location" : "ទីតាំង", - "Share" : "ចែករំលែក", - "Name" : "ឈ្មោះ", - "External Storage" : "ឃ្លាំងផ្ទុកខាងក្រៅ", - "Folder name" : "ឈ្មោះថត", - "Configuration" : "ការកំណត់សណ្ឋាន", - "Add storage" : "បន្ថែមឃ្លាំងផ្ទុក", - "Delete" : "លុប" -},"pluralForm" :"nplurals=1; plural=0;" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/kn.js b/apps/files_external/l10n/kn.js deleted file mode 100644 index 81c8e442f28..00000000000 --- a/apps/files_external/l10n/kn.js +++ /dev/null @@ -1,19 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "ವೈಯಕ್ತಿಕ", - "Saved" : "ಉಳಿಸಿದ", - "Username" : "ಬಳಕೆಯ ಹೆಸರು", - "Password" : "ಗುಪ್ತ ಪದ", - "Save" : "ಉಳಿಸಿ", - "None" : "ಯಾವುದೂ ಇಲ್ಲ", - "Port" : "ರೇವು", - "WebDAV" : "WebDAV", - "URL" : "ಜಾಲದ ಕೊಂಡಿ", - "Host" : "ಅತಿಥೆಯ-ಗಣಕ", - "Local" : "ಸ್ಥಳೀಯ", - "Share" : "ಹಂಚಿಕೊಳ್ಳಿ", - "Name" : "ಹೆಸರು", - "Delete" : "ಅಳಿಸಿ" -}, -"nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/kn.json b/apps/files_external/l10n/kn.json deleted file mode 100644 index cd14c56a32f..00000000000 --- a/apps/files_external/l10n/kn.json +++ /dev/null @@ -1,17 +0,0 @@ -{ "translations": { - "Personal" : "ವೈಯಕ್ತಿಕ", - "Saved" : "ಉಳಿಸಿದ", - "Username" : "ಬಳಕೆಯ ಹೆಸರು", - "Password" : "ಗುಪ್ತ ಪದ", - "Save" : "ಉಳಿಸಿ", - "None" : "ಯಾವುದೂ ಇಲ್ಲ", - "Port" : "ರೇವು", - "WebDAV" : "WebDAV", - "URL" : "ಜಾಲದ ಕೊಂಡಿ", - "Host" : "ಅತಿಥೆಯ-ಗಣಕ", - "Local" : "ಸ್ಥಳೀಯ", - "Share" : "ಹಂಚಿಕೊಳ್ಳಿ", - "Name" : "ಹೆಸರು", - "Delete" : "ಅಳಿಸಿ" -},"pluralForm" :"nplurals=1; plural=0;" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/lb.js b/apps/files_external/l10n/lb.js deleted file mode 100644 index 29014e55190..00000000000 --- a/apps/files_external/l10n/lb.js +++ /dev/null @@ -1,24 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "Perséinlech", - "Saved" : "Gespäichert", - "Username" : "Benotzernumm", - "Password" : "Passwuert", - "Save" : "Späicheren", - "None" : "Keng", - "Port" : "Port", - "Region" : "Regioun", - "URL" : "URL", - "Host" : "Host", - "Location" : "Uert", - "ownCloud" : "ownCloud", - "Share" : "Deelen", - "Name" : "Numm", - "Enable encryption" : "Verschlësselung aschalten", - "External Storage" : "Externt Lager", - "Folder name" : "Dossiers Numm:", - "Advanced settings" : "Erweidert Astellungen", - "Delete" : "Läschen" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/lb.json b/apps/files_external/l10n/lb.json deleted file mode 100644 index ef3f3d2f333..00000000000 --- a/apps/files_external/l10n/lb.json +++ /dev/null @@ -1,22 +0,0 @@ -{ "translations": { - "Personal" : "Perséinlech", - "Saved" : "Gespäichert", - "Username" : "Benotzernumm", - "Password" : "Passwuert", - "Save" : "Späicheren", - "None" : "Keng", - "Port" : "Port", - "Region" : "Regioun", - "URL" : "URL", - "Host" : "Host", - "Location" : "Uert", - "ownCloud" : "ownCloud", - "Share" : "Deelen", - "Name" : "Numm", - "Enable encryption" : "Verschlësselung aschalten", - "External Storage" : "Externt Lager", - "Folder name" : "Dossiers Numm:", - "Advanced settings" : "Erweidert Astellungen", - "Delete" : "Läschen" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/lv.js b/apps/files_external/l10n/lv.js deleted file mode 100644 index 2fc3b21fd72..00000000000 --- a/apps/files_external/l10n/lv.js +++ /dev/null @@ -1,82 +0,0 @@ -OC.L10N.register( - "files_external", - { - "(Group)" : "(Grupa)", - "Compatibility with Mac NFD encoding (slow)" : "Saderība ar Mac NFD kodēšanu (lēni)", - "Enable encryption" : "Ieslēgt šifrēšanu", - "Enable previews" : "Iespējot priekšskatījumu", - "Enable sharing" : "Koplietošanas iespējošana", - "Check for changes" : "Pārbaudīt, vai nav izmaiņu", - "Never" : "Nekad", - "Read only" : "Tikai lasāms", - "Disconnect" : "Atvienot", - "Admin defined" : "Administrators definētās", - "Saved" : "Saglabāts", - "Saving …" : "Saglabā ...", - "Save" : "Saglabāt", - "Invalid mount point" : "Nederīgs montēšanas punkts", - "%s" : "%s", - "Access key" : "Pieejas atslēga", - "Secret key" : "Slepenā atslēga", - "None" : "Nav", - "OAuth1" : "OAuth1", - "App key" : "Lietotnes atslēga", - "OAuth2" : "OAuth2", - "Client ID" : "Klienta ID", - "Username" : "Lietotājvārds", - "Password" : "Parole", - "Domain" : "Domain", - "API key" : "API atslēga", - "Username and password" : "Lietotājvārds un parole", - "RSA public key" : "RSA publiskā atslēga", - "Public key" : "Publiska atslēga", - "Amazon S3" : "Amazon S3", - "Hostname" : "Resursa nosaukums", - "Port" : "Ports", - "Region" : "Reģions", - "Enable SSL" : "Iespējot SSL", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Attālinātā apakšmape", - "Secure https://" : "Secure https://", - "FTP" : "FTP", - "Host" : "Resursdators", - "Secure ftps://" : "Secure ftps://", - "Local" : "Lokāls", - "Location" : "Vieta", - "Nextcloud" : "Nextcloud", - "SFTP" : "SFTP", - "Root" : "Root", - "SFTP with secret key login" : "SFTP pieteikšanās ar slepeno atslēgu", - "Share" : "Koplietot", - "Show hidden files" : "Rādīt slēptās datnes", - "OpenStack Object Storage" : "OpenStack Object krātuve", - "Service name" : "Servisa nosaukums", - "External storage" : "Ārējā krātuve", - "External mount error" : "Ārējā montēšanas kļūda", - "Storage type" : "Krātuves tips", - "Unknown" : "Nezināms", - "Scope" : "Darbības joma", - "Personal" : "Personīgi", - "System" : "Sistēma", - "Open documentation" : "Atvērt dokumentāciju", - "Folder name" : "Mapes nosaukums", - "Authentication" : "Autentifikācija", - "Configuration" : "Konfigurācija", - "Available for" : "Pieejams", - "Add storage" : "Pievienot krātuvi", - "Advanced settings" : "Paplašināti iestatījumi", - "Allow users to mount external storage" : "Atļaut lietotājiem uzstādīt ārējās krātuves", - "Grant access" : "Piešķirt pieeju", - "Error configuring OAuth1" : "Konfigurēšanas kļūda OAuth1", - "Please provide a valid app key and secret." : "Lūdzu, norādiet derīgu lietotnes atslēgu un noslēpumu.", - "Error configuring OAuth2" : "Konfigurēšanas kļūda OAuth2", - "Generate keys" : "Izveidot atslēgas", - "Error generating key pair" : "Kļūda, ģenerējot atslēgu pāri", - "Empty response from the server" : "Tukša atbilde no servera", - "Couldn't get the information from the remote server: {code} {type}" : "Nevarējām iegūt informāciju no attālā servera: {code} {type}", - "There was an error with message: " : "Radās kļūda ar ziņu:", - "external-storage" : "ārējā krātuve", - "Name" : "Nosaukums" -}, -"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); diff --git a/apps/files_external/l10n/lv.json b/apps/files_external/l10n/lv.json deleted file mode 100644 index c24256d2ff4..00000000000 --- a/apps/files_external/l10n/lv.json +++ /dev/null @@ -1,80 +0,0 @@ -{ "translations": { - "(Group)" : "(Grupa)", - "Compatibility with Mac NFD encoding (slow)" : "Saderība ar Mac NFD kodēšanu (lēni)", - "Enable encryption" : "Ieslēgt šifrēšanu", - "Enable previews" : "Iespējot priekšskatījumu", - "Enable sharing" : "Koplietošanas iespējošana", - "Check for changes" : "Pārbaudīt, vai nav izmaiņu", - "Never" : "Nekad", - "Read only" : "Tikai lasāms", - "Disconnect" : "Atvienot", - "Admin defined" : "Administrators definētās", - "Saved" : "Saglabāts", - "Saving …" : "Saglabā ...", - "Save" : "Saglabāt", - "Invalid mount point" : "Nederīgs montēšanas punkts", - "%s" : "%s", - "Access key" : "Pieejas atslēga", - "Secret key" : "Slepenā atslēga", - "None" : "Nav", - "OAuth1" : "OAuth1", - "App key" : "Lietotnes atslēga", - "OAuth2" : "OAuth2", - "Client ID" : "Klienta ID", - "Username" : "Lietotājvārds", - "Password" : "Parole", - "Domain" : "Domain", - "API key" : "API atslēga", - "Username and password" : "Lietotājvārds un parole", - "RSA public key" : "RSA publiskā atslēga", - "Public key" : "Publiska atslēga", - "Amazon S3" : "Amazon S3", - "Hostname" : "Resursa nosaukums", - "Port" : "Ports", - "Region" : "Reģions", - "Enable SSL" : "Iespējot SSL", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Attālinātā apakšmape", - "Secure https://" : "Secure https://", - "FTP" : "FTP", - "Host" : "Resursdators", - "Secure ftps://" : "Secure ftps://", - "Local" : "Lokāls", - "Location" : "Vieta", - "Nextcloud" : "Nextcloud", - "SFTP" : "SFTP", - "Root" : "Root", - "SFTP with secret key login" : "SFTP pieteikšanās ar slepeno atslēgu", - "Share" : "Koplietot", - "Show hidden files" : "Rādīt slēptās datnes", - "OpenStack Object Storage" : "OpenStack Object krātuve", - "Service name" : "Servisa nosaukums", - "External storage" : "Ārējā krātuve", - "External mount error" : "Ārējā montēšanas kļūda", - "Storage type" : "Krātuves tips", - "Unknown" : "Nezināms", - "Scope" : "Darbības joma", - "Personal" : "Personīgi", - "System" : "Sistēma", - "Open documentation" : "Atvērt dokumentāciju", - "Folder name" : "Mapes nosaukums", - "Authentication" : "Autentifikācija", - "Configuration" : "Konfigurācija", - "Available for" : "Pieejams", - "Add storage" : "Pievienot krātuvi", - "Advanced settings" : "Paplašināti iestatījumi", - "Allow users to mount external storage" : "Atļaut lietotājiem uzstādīt ārējās krātuves", - "Grant access" : "Piešķirt pieeju", - "Error configuring OAuth1" : "Konfigurēšanas kļūda OAuth1", - "Please provide a valid app key and secret." : "Lūdzu, norādiet derīgu lietotnes atslēgu un noslēpumu.", - "Error configuring OAuth2" : "Konfigurēšanas kļūda OAuth2", - "Generate keys" : "Izveidot atslēgas", - "Error generating key pair" : "Kļūda, ģenerējot atslēgu pāri", - "Empty response from the server" : "Tukša atbilde no servera", - "Couldn't get the information from the remote server: {code} {type}" : "Nevarējām iegūt informāciju no attālā servera: {code} {type}", - "There was an error with message: " : "Radās kļūda ar ziņu:", - "external-storage" : "ārējā krātuve", - "Name" : "Nosaukums" -},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/mk.js b/apps/files_external/l10n/mk.js index 4708014f4d2..a41f84e471a 100644 --- a/apps/files_external/l10n/mk.js +++ b/apps/files_external/l10n/mk.js @@ -64,7 +64,12 @@ OC.L10N.register( "External storage support" : "Поддршка за надворешно складиште", "Confirm" : "Потврди", "Open in Files" : "Отвори во датотеките", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Се појави грешка со ова надворешно складиште. Дали сакате да ја прегледате оваа конфигурација на страницата со поставки?", "External mount error" : "Грешка при надворешно монтирање", + "List of external storage." : "Листа на надворешни складишта.", + "There is no external storage configured. You can configure them in your Personal settings." : "Нема конфигурирано надворешно складирање. Можете да ги конфигурирате во вашите лични поставки.", + "There is no external storage configured and you don't have the permission to configure them." : "Нема конфигурирано надворешно складирање и немате дозвола да го конфигурирате.", + "No external storage" : "Нема надворешно складиште", "Storage type" : "Вид на складиште", "Unknown" : "Непознат", "Scope" : "Опсег", diff --git a/apps/files_external/l10n/mk.json b/apps/files_external/l10n/mk.json index b4de5a8bed7..413265d40c3 100644 --- a/apps/files_external/l10n/mk.json +++ b/apps/files_external/l10n/mk.json @@ -62,7 +62,12 @@ "External storage support" : "Поддршка за надворешно складиште", "Confirm" : "Потврди", "Open in Files" : "Отвори во датотеките", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Се појави грешка со ова надворешно складиште. Дали сакате да ја прегледате оваа конфигурација на страницата со поставки?", "External mount error" : "Грешка при надворешно монтирање", + "List of external storage." : "Листа на надворешни складишта.", + "There is no external storage configured. You can configure them in your Personal settings." : "Нема конфигурирано надворешно складирање. Можете да ги конфигурирате во вашите лични поставки.", + "There is no external storage configured and you don't have the permission to configure them." : "Нема конфигурирано надворешно складирање и немате дозвола да го конфигурирате.", + "No external storage" : "Нема надворешно складиште", "Storage type" : "Вид на складиште", "Unknown" : "Непознат", "Scope" : "Опсег", diff --git a/apps/files_external/l10n/mn.js b/apps/files_external/l10n/mn.js deleted file mode 100644 index 546c4370441..00000000000 --- a/apps/files_external/l10n/mn.js +++ /dev/null @@ -1,9 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Username" : "Хэрэглэгчийн нэр", - "Password" : "Нууц үг", - "Save" : "Хадгалах", - "Share" : "Түгээх" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/mn.json b/apps/files_external/l10n/mn.json deleted file mode 100644 index 61fc25d3458..00000000000 --- a/apps/files_external/l10n/mn.json +++ /dev/null @@ -1,7 +0,0 @@ -{ "translations": { - "Username" : "Хэрэглэгчийн нэр", - "Password" : "Нууц үг", - "Save" : "Хадгалах", - "Share" : "Түгээх" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/ms_MY.js b/apps/files_external/l10n/ms_MY.js deleted file mode 100644 index 986d64538a6..00000000000 --- a/apps/files_external/l10n/ms_MY.js +++ /dev/null @@ -1,16 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "Peribadi", - "Username" : "Nama pengguna", - "Password" : "Kata laluan", - "Save" : "Simpan", - "Region" : "Wilayah", - "URL" : "URL", - "Location" : "Lokasi", - "ownCloud" : "ownCloud", - "Share" : "Kongsi", - "Name" : "Nama", - "Delete" : "Padam" -}, -"nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/ms_MY.json b/apps/files_external/l10n/ms_MY.json deleted file mode 100644 index 3658a124898..00000000000 --- a/apps/files_external/l10n/ms_MY.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "translations": { - "Personal" : "Peribadi", - "Username" : "Nama pengguna", - "Password" : "Kata laluan", - "Save" : "Simpan", - "Region" : "Wilayah", - "URL" : "URL", - "Location" : "Lokasi", - "ownCloud" : "ownCloud", - "Share" : "Kongsi", - "Name" : "Nama", - "Delete" : "Padam" -},"pluralForm" :"nplurals=1; plural=0;" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index 8271299a3b9..467ab309566 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -1,12 +1,14 @@ OC.L10N.register( "files_external", { - "Grant access" : "Sta toegang toe", + "Grant access" : "Toegang verlenen", "Error configuring OAuth1" : "Fout bij configureren OAuth1", "Please provide a valid app key and secret." : "Geef een geldige app sleutel en geheime sleutel op.", "Error configuring OAuth2" : "Fout bij configureren OAuth2", - "Generate keys" : "Genereer sleutels", + "Generate keys" : "Sleutels genereren", "Error generating key pair" : "Fout bij genereren sleutelpaar", + "You are not logged in" : "Je bent niet ingelogd", + "Permission denied" : "Toestemming geweigerd", "Forbidden to manage local mounts" : "Niet toegestaan lokale koppelpunten te beheren", "Storage with ID \"%d\" not found" : "Opslag met ID \"%d\" niet gevonden", "Invalid backend or authentication mechanism class" : "Ongeldige backend of authenticatie mechanisme klasse", @@ -19,6 +21,7 @@ OC.L10N.register( "Unsatisfied authentication mechanism parameters" : "Onvoldoende authenticatiemechanisme parameters", "Insufficient data: %s" : "Onvoldoende gegevens: %s", "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "Opslag met ID \"%d\" is niet bewerkbaar door niet-beheerders", "Access key" : "Access Key", "Secret key" : "Geheime sleutel", "Builtin" : "Ingebouwd", @@ -37,14 +40,18 @@ OC.L10N.register( "OpenStack v3" : "OpenStack v3", "Domain" : "Domein", "Rackspace" : "Rackspace", - "API key" : "API sleutel", - "Global credentials" : "Algemene inloggegevens", + "API key" : "API-sleutel", + "Global credentials" : "Globale inloggegevens", "Log-in credentials, save in database" : "Inloggegevens, bewaren in de database", + "Login and password" : "Login en wachtwoord", "Log-in credentials, save in session" : "Inloggegevens, opslaan in sessie", + "Global credentials, manually entered" : "Globale inloggegevens, handmatig ingevoerd", + "Manually entered, store in database" : "Handmatig ingevoerd, opslaan in database", "RSA public key" : "RSA publieke sleutel", "Public key" : "Publieke sleutel", "RSA private key" : "RSA privésleutel", "Private key" : "Privésleutel", + "Kerberos default realm, defaults to \"WORKGROUP\"" : "Kerberos standaardomgeving, standaard ingesteld op \"WORKGROUP\"", "Kerberos ticket Apache mode" : "Kerberos ticket Apache modus", "Kerberos ticket" : "Kerberos ticket", "Amazon S3" : "Amazon S3", @@ -52,9 +59,12 @@ OC.L10N.register( "Hostname" : "Hostnaam", "Port" : "Poort", "Region" : "Regio", - "Enable SSL" : "Activeren SSL", - "Enable Path Style" : "Activeren pad stijl", - "Legacy (v2) authentication" : "Legacy (v2) authenticatie", + "Storage Class" : "Opslagklasse", + "Enable SSL" : "SSL inschakelen", + "Enable Path Style" : "Padstijl inschakelen", + "Legacy (v2) authentication" : "Verouderde (v2) authenticatie", + "Enable multipart copy" : "Meervoudig kopiëren inschakelen", + "SSE-C encryption key" : "SSE-C versleutelingscode", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Externe submap", @@ -71,9 +81,13 @@ OC.L10N.register( "SMB/CIFS" : "SMB/CIFS", "Share" : "Share", "Show hidden files" : "Laat verborgen bestanden zien", - "Verify ACL access when listing files" : "Controleer ACL bij bestandsoverzichten", + "Case sensitive file system" : "Hoofdlettergevoelig bestandssysteem", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Door dit uit te schakelen kan een hoofdletterongevoelig bestandssysteem worden gebruikt, zij het met verminderde prestaties", + "Verify ACL access when listing files" : "ACL controleren bij bestandsoverzichten", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Controleer de ACL's van elk bestand of elke map in een map om items eruit te filteren waarvan het account geen leesrechten heeft. Dit geeft verminderde prestaties.", "Timeout" : "Time-out", - "SMB/CIFS using OC login" : "SMB/CIFS via OC inlog", + "SMB/CIFS using OC login" : "SMB/CIFS via OC-inlog", + "Login as share" : "Login als share", "OpenStack Object Storage" : "OpenStack Object Storage", "Service name" : "Servicenaam", "Request timeout (seconds)" : "Aanvraag time-out (seconds)", @@ -81,41 +95,68 @@ OC.L10N.register( "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP ondersteuning in PHP is niet ingeschakeld of geïnstalleerd. Aankoppelen van %s is niet mogelijk. Vraag je beheerder dit te installeren.", "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" is niet geïnstalleerd. Aankoppelen van %2$s is niet mogelijk. Vraag je beheerder om dit te installeren.", "External storage" : "Externe opslag", - "External storage support" : "Externe opslag ondersteuning", - "Adds basic external storage support" : "Toevoegen basale ondersteuning voor externe opslag", + "External storage support" : "Ondersteuning voor externe opslag", + "Adds basic external storage support" : "Voegt basale ondersteuning voor externe opslag toe", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Met deze applicatie kunnen beheerders verbindingen configureren met externe opslagproviders, zoals FTP-servers, S3- of SWIFT-objectstores, andere Nextcloud-servers, WebDAV-servers en meer. De beneerder kan kiezen welke soorten opslag ze inschakelen en kan deze opslaglocaties koppelen voor een account, een groep of het hele systeem. Gebruikers zullen een nieuwe map zien verschijnen in hun root Nextcloud-map, die ze kunnen openen en gebruiken zoals elke andere Nextcloud-map. Met externe opslag kunnen mensen ook bestanden delen die op deze externe locaties zijn opgeslagen. In deze gevallen worden de inloggegevens van de eigenaar van het bestand gebruikt wanneer de ontvanger het bestand vanuit externe opslag opvraagt, waardoor wordt gegarandeerd dat de ontvanger toegang heeft tot het gedeelde bestand.\n\nExterne opslag kan worden geconfigureerd met behulp van de GUI of op de opdrachtregel. Deze tweede optie biedt de administratie meer flexibiliteit voor het configureren van externe opslagbevestigingen in bulk en het stellen van prioriteiten voor aankoppelen. Meer informatie is beschikbaar in de GUI-documentatie voor externe opslag en de documentatie voor het configuratiebestand voor externe opslag.", "Confirm" : "Bevestigen", - "Open in Files" : "Open in Bestanden", - "External mount error" : "Extern koppelpunt fout", + "Storage credentials" : "Opslagreferenties", + "To access the storage, you need to provide the authentication credentials." : "Om toegang te krijgen tot de opslag, moeten de authenticatiegegevens worden geleverd.", + "Enter the storage login" : "Voer de loginnaam in voor de opslag", + "Enter the storage password" : "Voer het wachtwoord in voor de opslag", + "Unable to update this external storage config. {statusMessage}" : "Kan deze configuratie van de externe opslag niet bijwerken.{statusMessage}", + "New configuration successfully saved" : "Nieuwe configuratie succesvol opgeslagen", + "Enter missing credentials" : "Voer de ontbrekende inloggegevens in", + "Credentials successfully set" : "Inloggegevens succesvol ingesteld", + "Error while setting credentials: {error}" : "Fout tijdens het instellen van inloggegevens: {error}", + "Checking storage …" : "Controle van opslag …", + "There was an error with this external storage." : "Er is een fout opgetreden bij deze externe opslag.", + "We were unable to check the external storage {basename}" : "We konden de externe opslag {basename} niet controleren", + "Examine this faulty external storage configuration" : "Onderzoek deze foutieve externe opslagconfiguratie", + "Open in Files" : "Openen in Bestanden", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Er is een fout opgetreden bij deze externe opslag. Wil je de configuratie voor dit aankoppelpunt bekijken op de instellingenpagina?", + "External mount error" : "Fout met extern aankoppelpunt", + "List of external storage." : "Lijst van externe opslag.", + "There is no external storage configured. You can configure them in your Personal settings." : "Er is geen externe opslag geconfigureerd. Je kunt deze configureren in Persoonlijke instellingen.", + "There is no external storage configured and you don't have the permission to configure them." : "Er is geen externe opslag geconfigureerd en je hebt geen toestemming om deze te configureren.", + "No external storage" : "Geen externe opslag", "Storage type" : "Opslagtype", "Unknown" : "Onbekend", - "Scope" : "Scope", + "Scope" : "Toepassingsgebied", "Personal" : "Persoonlijk", "System" : "Systeem", + "Type to select account or group." : "Typ om account of groep te selecteren.", "(Group)" : "(Groep)", "Compatibility with Mac NFD encoding (slow)" : "Compatibiliteit met Mac NFD encoding (traag)", "Enable encryption" : "Versleuteling inschakelen", - "Enable previews" : "Activeren voorbeelden", - "Enable sharing" : "Activeren delen", + "Enable previews" : "Voorbeeldweergave inschakelen", + "Enable sharing" : "Delen inschakelen", "Check for changes" : "Controleren op wijzigingen", "Never" : "Nooit", "Once every direct access" : "Een keer bij elke directe toegang", - "Read only" : "Alleen lezen", - "Disconnect" : "Verbreek verbinding", + "Read only" : "Alleen-lezen", + "Disconnect" : "Verbinding verbreken", + "Unknown backend: {backendName}" : "Onbekend back-end: {backendName}", "Admin defined" : "Beheerder gedefinieerd", + "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Automatische statuscontrole is uitgeschakeld vanwege het grote aantal geconfigureerde opslagplaatsen. Klik om de status te controleren", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Weet je zeker dat je deze externe opslag wilt loskoppelen? Het maakt de opslag niet langer beschikbaar in Nextcloud en leidt tot het verwijderen van de bestanden en mappen op elke synchronisatieclient die momenteel is verbonden. Het verwijdert geen bestanden en mappen op de externe opslag zelf.", "Delete storage?" : "Opslag verwijderen?", "Click to recheck the configuration" : "Klik om de configuratie opnieuw te controleren", "Saved" : "Bewaard", - "Saving …" : "Opslaan ...", - "Save" : "Bewaren", + "Saving …" : "Opslaan …", + "Save" : "Opslaan", + "Failed to save global credentials" : "Het opslaan van globale inloggegevens is mislukt", + "Failed to save global credentials: {message}" : "Het opslaan van globale inloggegevens is mislukt: {message}", "No external storage configured or you don't have the permission to configure them" : "Geen externe opslag geconfigureerd of je hebt geen toestemming om deze te configureren", "Open documentation" : "Documentatie openen", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Met externe opslag kun je externe opslagservices en -apparaten koppelen als secundaire Nextcloud-opslagapparaten. Je kunt mensen ook toestaan hun eigen externe opslagdiensten aan te koppelen.", "Folder name" : "Mapnaam", "Authentication" : "Authenticatie", "Configuration" : "Configuratie", "Available for" : "Beschikbaar voor", - "Add storage" : "Toevoegen opslag", + "Add storage" : "Opslag toevoegen", + "All people" : "Iedereen", "Advanced settings" : "Geavanceerde instellingen", + "Allow people to mount external storage" : "Toestaan dat mensen externe opslag aankoppelen", "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "Globale inloggegevens kunnen worden gebruikt met meerdere externe opslagsystemen met dezelfde inloggegevens." }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index 28b268249f7..edfbb1ecdd0 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -1,10 +1,12 @@ { "translations": { - "Grant access" : "Sta toegang toe", + "Grant access" : "Toegang verlenen", "Error configuring OAuth1" : "Fout bij configureren OAuth1", "Please provide a valid app key and secret." : "Geef een geldige app sleutel en geheime sleutel op.", "Error configuring OAuth2" : "Fout bij configureren OAuth2", - "Generate keys" : "Genereer sleutels", + "Generate keys" : "Sleutels genereren", "Error generating key pair" : "Fout bij genereren sleutelpaar", + "You are not logged in" : "Je bent niet ingelogd", + "Permission denied" : "Toestemming geweigerd", "Forbidden to manage local mounts" : "Niet toegestaan lokale koppelpunten te beheren", "Storage with ID \"%d\" not found" : "Opslag met ID \"%d\" niet gevonden", "Invalid backend or authentication mechanism class" : "Ongeldige backend of authenticatie mechanisme klasse", @@ -17,6 +19,7 @@ "Unsatisfied authentication mechanism parameters" : "Onvoldoende authenticatiemechanisme parameters", "Insufficient data: %s" : "Onvoldoende gegevens: %s", "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "Opslag met ID \"%d\" is niet bewerkbaar door niet-beheerders", "Access key" : "Access Key", "Secret key" : "Geheime sleutel", "Builtin" : "Ingebouwd", @@ -35,14 +38,18 @@ "OpenStack v3" : "OpenStack v3", "Domain" : "Domein", "Rackspace" : "Rackspace", - "API key" : "API sleutel", - "Global credentials" : "Algemene inloggegevens", + "API key" : "API-sleutel", + "Global credentials" : "Globale inloggegevens", "Log-in credentials, save in database" : "Inloggegevens, bewaren in de database", + "Login and password" : "Login en wachtwoord", "Log-in credentials, save in session" : "Inloggegevens, opslaan in sessie", + "Global credentials, manually entered" : "Globale inloggegevens, handmatig ingevoerd", + "Manually entered, store in database" : "Handmatig ingevoerd, opslaan in database", "RSA public key" : "RSA publieke sleutel", "Public key" : "Publieke sleutel", "RSA private key" : "RSA privésleutel", "Private key" : "Privésleutel", + "Kerberos default realm, defaults to \"WORKGROUP\"" : "Kerberos standaardomgeving, standaard ingesteld op \"WORKGROUP\"", "Kerberos ticket Apache mode" : "Kerberos ticket Apache modus", "Kerberos ticket" : "Kerberos ticket", "Amazon S3" : "Amazon S3", @@ -50,9 +57,12 @@ "Hostname" : "Hostnaam", "Port" : "Poort", "Region" : "Regio", - "Enable SSL" : "Activeren SSL", - "Enable Path Style" : "Activeren pad stijl", - "Legacy (v2) authentication" : "Legacy (v2) authenticatie", + "Storage Class" : "Opslagklasse", + "Enable SSL" : "SSL inschakelen", + "Enable Path Style" : "Padstijl inschakelen", + "Legacy (v2) authentication" : "Verouderde (v2) authenticatie", + "Enable multipart copy" : "Meervoudig kopiëren inschakelen", + "SSE-C encryption key" : "SSE-C versleutelingscode", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Externe submap", @@ -69,9 +79,13 @@ "SMB/CIFS" : "SMB/CIFS", "Share" : "Share", "Show hidden files" : "Laat verborgen bestanden zien", - "Verify ACL access when listing files" : "Controleer ACL bij bestandsoverzichten", + "Case sensitive file system" : "Hoofdlettergevoelig bestandssysteem", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Door dit uit te schakelen kan een hoofdletterongevoelig bestandssysteem worden gebruikt, zij het met verminderde prestaties", + "Verify ACL access when listing files" : "ACL controleren bij bestandsoverzichten", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Controleer de ACL's van elk bestand of elke map in een map om items eruit te filteren waarvan het account geen leesrechten heeft. Dit geeft verminderde prestaties.", "Timeout" : "Time-out", - "SMB/CIFS using OC login" : "SMB/CIFS via OC inlog", + "SMB/CIFS using OC login" : "SMB/CIFS via OC-inlog", + "Login as share" : "Login als share", "OpenStack Object Storage" : "OpenStack Object Storage", "Service name" : "Servicenaam", "Request timeout (seconds)" : "Aanvraag time-out (seconds)", @@ -79,41 +93,68 @@ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP ondersteuning in PHP is niet ingeschakeld of geïnstalleerd. Aankoppelen van %s is niet mogelijk. Vraag je beheerder dit te installeren.", "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" is niet geïnstalleerd. Aankoppelen van %2$s is niet mogelijk. Vraag je beheerder om dit te installeren.", "External storage" : "Externe opslag", - "External storage support" : "Externe opslag ondersteuning", - "Adds basic external storage support" : "Toevoegen basale ondersteuning voor externe opslag", + "External storage support" : "Ondersteuning voor externe opslag", + "Adds basic external storage support" : "Voegt basale ondersteuning voor externe opslag toe", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Met deze applicatie kunnen beheerders verbindingen configureren met externe opslagproviders, zoals FTP-servers, S3- of SWIFT-objectstores, andere Nextcloud-servers, WebDAV-servers en meer. De beneerder kan kiezen welke soorten opslag ze inschakelen en kan deze opslaglocaties koppelen voor een account, een groep of het hele systeem. Gebruikers zullen een nieuwe map zien verschijnen in hun root Nextcloud-map, die ze kunnen openen en gebruiken zoals elke andere Nextcloud-map. Met externe opslag kunnen mensen ook bestanden delen die op deze externe locaties zijn opgeslagen. In deze gevallen worden de inloggegevens van de eigenaar van het bestand gebruikt wanneer de ontvanger het bestand vanuit externe opslag opvraagt, waardoor wordt gegarandeerd dat de ontvanger toegang heeft tot het gedeelde bestand.\n\nExterne opslag kan worden geconfigureerd met behulp van de GUI of op de opdrachtregel. Deze tweede optie biedt de administratie meer flexibiliteit voor het configureren van externe opslagbevestigingen in bulk en het stellen van prioriteiten voor aankoppelen. Meer informatie is beschikbaar in de GUI-documentatie voor externe opslag en de documentatie voor het configuratiebestand voor externe opslag.", "Confirm" : "Bevestigen", - "Open in Files" : "Open in Bestanden", - "External mount error" : "Extern koppelpunt fout", + "Storage credentials" : "Opslagreferenties", + "To access the storage, you need to provide the authentication credentials." : "Om toegang te krijgen tot de opslag, moeten de authenticatiegegevens worden geleverd.", + "Enter the storage login" : "Voer de loginnaam in voor de opslag", + "Enter the storage password" : "Voer het wachtwoord in voor de opslag", + "Unable to update this external storage config. {statusMessage}" : "Kan deze configuratie van de externe opslag niet bijwerken.{statusMessage}", + "New configuration successfully saved" : "Nieuwe configuratie succesvol opgeslagen", + "Enter missing credentials" : "Voer de ontbrekende inloggegevens in", + "Credentials successfully set" : "Inloggegevens succesvol ingesteld", + "Error while setting credentials: {error}" : "Fout tijdens het instellen van inloggegevens: {error}", + "Checking storage …" : "Controle van opslag …", + "There was an error with this external storage." : "Er is een fout opgetreden bij deze externe opslag.", + "We were unable to check the external storage {basename}" : "We konden de externe opslag {basename} niet controleren", + "Examine this faulty external storage configuration" : "Onderzoek deze foutieve externe opslagconfiguratie", + "Open in Files" : "Openen in Bestanden", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Er is een fout opgetreden bij deze externe opslag. Wil je de configuratie voor dit aankoppelpunt bekijken op de instellingenpagina?", + "External mount error" : "Fout met extern aankoppelpunt", + "List of external storage." : "Lijst van externe opslag.", + "There is no external storage configured. You can configure them in your Personal settings." : "Er is geen externe opslag geconfigureerd. Je kunt deze configureren in Persoonlijke instellingen.", + "There is no external storage configured and you don't have the permission to configure them." : "Er is geen externe opslag geconfigureerd en je hebt geen toestemming om deze te configureren.", + "No external storage" : "Geen externe opslag", "Storage type" : "Opslagtype", "Unknown" : "Onbekend", - "Scope" : "Scope", + "Scope" : "Toepassingsgebied", "Personal" : "Persoonlijk", "System" : "Systeem", + "Type to select account or group." : "Typ om account of groep te selecteren.", "(Group)" : "(Groep)", "Compatibility with Mac NFD encoding (slow)" : "Compatibiliteit met Mac NFD encoding (traag)", "Enable encryption" : "Versleuteling inschakelen", - "Enable previews" : "Activeren voorbeelden", - "Enable sharing" : "Activeren delen", + "Enable previews" : "Voorbeeldweergave inschakelen", + "Enable sharing" : "Delen inschakelen", "Check for changes" : "Controleren op wijzigingen", "Never" : "Nooit", "Once every direct access" : "Een keer bij elke directe toegang", - "Read only" : "Alleen lezen", - "Disconnect" : "Verbreek verbinding", + "Read only" : "Alleen-lezen", + "Disconnect" : "Verbinding verbreken", + "Unknown backend: {backendName}" : "Onbekend back-end: {backendName}", "Admin defined" : "Beheerder gedefinieerd", + "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Automatische statuscontrole is uitgeschakeld vanwege het grote aantal geconfigureerde opslagplaatsen. Klik om de status te controleren", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Weet je zeker dat je deze externe opslag wilt loskoppelen? Het maakt de opslag niet langer beschikbaar in Nextcloud en leidt tot het verwijderen van de bestanden en mappen op elke synchronisatieclient die momenteel is verbonden. Het verwijdert geen bestanden en mappen op de externe opslag zelf.", "Delete storage?" : "Opslag verwijderen?", "Click to recheck the configuration" : "Klik om de configuratie opnieuw te controleren", "Saved" : "Bewaard", - "Saving …" : "Opslaan ...", - "Save" : "Bewaren", + "Saving …" : "Opslaan …", + "Save" : "Opslaan", + "Failed to save global credentials" : "Het opslaan van globale inloggegevens is mislukt", + "Failed to save global credentials: {message}" : "Het opslaan van globale inloggegevens is mislukt: {message}", "No external storage configured or you don't have the permission to configure them" : "Geen externe opslag geconfigureerd of je hebt geen toestemming om deze te configureren", "Open documentation" : "Documentatie openen", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Met externe opslag kun je externe opslagservices en -apparaten koppelen als secundaire Nextcloud-opslagapparaten. Je kunt mensen ook toestaan hun eigen externe opslagdiensten aan te koppelen.", "Folder name" : "Mapnaam", "Authentication" : "Authenticatie", "Configuration" : "Configuratie", "Available for" : "Beschikbaar voor", - "Add storage" : "Toevoegen opslag", + "Add storage" : "Opslag toevoegen", + "All people" : "Iedereen", "Advanced settings" : "Geavanceerde instellingen", + "Allow people to mount external storage" : "Toestaan dat mensen externe opslag aankoppelen", "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "Globale inloggegevens kunnen worden gebruikt met meerdere externe opslagsystemen met dezelfde inloggegevens." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/nn_NO.js b/apps/files_external/l10n/nn_NO.js deleted file mode 100644 index 00be7c7e386..00000000000 --- a/apps/files_external/l10n/nn_NO.js +++ /dev/null @@ -1,20 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "Personleg", - "Username" : "Brukarnamn", - "Password" : "Passord", - "Save" : "Lagra", - "Region" : "Region/fylke", - "WebDAV" : "WebDAV", - "URL" : "Nettstad", - "Host" : "Tenar", - "Location" : "Stad", - "ownCloud" : "ownCloud", - "Share" : "Del", - "Name" : "Namn", - "Folder name" : "Mappenamn", - "Configuration" : "Innstillingar", - "Delete" : "Slett" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/nn_NO.json b/apps/files_external/l10n/nn_NO.json deleted file mode 100644 index 6f2aeceb13b..00000000000 --- a/apps/files_external/l10n/nn_NO.json +++ /dev/null @@ -1,18 +0,0 @@ -{ "translations": { - "Personal" : "Personleg", - "Username" : "Brukarnamn", - "Password" : "Passord", - "Save" : "Lagra", - "Region" : "Region/fylke", - "WebDAV" : "WebDAV", - "URL" : "Nettstad", - "Host" : "Tenar", - "Location" : "Stad", - "ownCloud" : "ownCloud", - "Share" : "Del", - "Name" : "Namn", - "Folder name" : "Mappenamn", - "Configuration" : "Innstillingar", - "Delete" : "Slett" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/oc.js b/apps/files_external/l10n/oc.js deleted file mode 100644 index d66ff356e42..00000000000 --- a/apps/files_external/l10n/oc.js +++ /dev/null @@ -1,107 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Fetching request tokens failed. Verify that your app key and secret are correct." : "L'obtencion dels getons de requèsta a fracassat. Verificatz que vòstra clau d'aplicacion e vòstre senhal son corrèctes.", - "Fetching access tokens failed. Verify that your app key and secret are correct." : "L'obtencion dels getons d'aacès a fracassat. Verificatz que vòstra clau d'aplicacion e vòstre senhal son corrèctes.", - "Please provide a valid app key and secret." : "Provesissètz una clau d'aplicacion e un senhal valids.", - "Step 1 failed. Exception: %s" : "L’etapa 1 a fracassat. Error : %s", - "Step 2 failed. Exception: %s" : "L’etapa 2 a fracassat. Error : %s", - "External storage" : "Emmagazinatge extèrne", - "Personal" : "Personal", - "System" : "Sistèma", - "Grant access" : "Autorizar l'accès", - "Error configuring OAuth1" : "Error al moment de la configuracion d'OAuth1", - "Error configuring OAuth2" : "Error al moment de la configuracion d'OAuth2", - "Generate keys" : "Generar de claus", - "Error generating key pair" : "Error al moment de la generacion de las claus", - "All users. Type to select user or group." : "Totes los utilizaires. Clicatz aicí per restrénher.", - "(group)" : "(grop)", - "Saved" : "Enregistrat", - "Username" : "Nom d'utilizaire", - "Password" : "Senhal", - "Save" : "Enregistrar", - "Storage with id \"%i\" not found" : "Emmagazinatge amb l'id \"%i\" pas trobat", - "Invalid backend or authentication mechanism class" : "Servici o metòde d'autentificacion pas valable", - "Invalid mount point" : "Punt de montatge invalid", - "Objectstore forbidden" : "\"Objectstore\" interdich", - "Invalid storage backend \"%s\"" : "Servici d'emmagazinatge invalid : \"%s\"", - "Not permitted to use backend \"%s\"" : "Pas autorizat a utilizar lo servici \"%s\"", - "Not permitted to use authentication mechanism \"%s\"" : "Pas autorizat a utilizar lo mecanisme d'autentificacion \"%s\"", - "Unsatisfied backend parameters" : "Paramètres mancants pel servici", - "Unsatisfied authentication mechanism parameters" : "Paramètres mancants pel metòde d'autentificacion", - "Insufficient data: %s" : "Donadas insufisentas : %s", - "%s" : "%s", - "Access key" : "Clau d'accès", - "Secret key" : "Clau secreta", - "Builtin" : "Integrat", - "None" : "Pas cap", - "OAuth1" : "OAuth1", - "App key" : "App key", - "App secret" : "App secret", - "OAuth2" : "OAuth2", - "Client ID" : "ID Client", - "Client secret" : "Secret client", - "OpenStack" : "OpenStack", - "Tenant name" : "Tenant name", - "Identity endpoint URL" : "Identity endpoint URL", - "Rackspace" : "Rackspace", - "API key" : "Clau API", - "Username and password" : "Nom d'utilizaire e senhal", - "RSA public key" : "Clau publica RSA", - "Public key" : "Clau publica", - "Amazon S3" : "Amazon S3", - "Bucket" : "Bucket", - "Hostname" : "Nom de l'òste", - "Port" : "Pòrt", - "Region" : "Region", - "Enable SSL" : "Activar SSL", - "Enable Path Style" : "Accès per path", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Sosdorsièr distant", - "Secure https://" : "Securizacion https://", - "Dropbox" : "Dropbox", - "FTP" : "FTP", - "Host" : "Òste", - "Secure ftps://" : "Securizacion ftps://", - "Google Drive" : "Google Drive", - "Local" : "Local", - "Location" : "Emplaçament", - "ownCloud" : "ownCloud", - "SFTP" : "SFTP", - "Root" : "Raiç", - "SFTP with secret key login" : "SFTP amb un identificant secret", - "SMB / CIFS" : "SMB / CIFS", - "Share" : "Partejar", - "Domain" : "Domeni", - "SMB / CIFS using OC login" : "SMB / CIFS en utilizant los identificants OC", - "Username as share" : "Nom d'utilizaire coma nom de partiment", - "OpenStack Object Storage" : "OpenStack Object Storage", - "Service name" : "Nom del servici", - "Request timeout (seconds)" : "Timeout de las requèstas (en segondas)", - "<b>Note:</b> " : "<b>Atencion :</b>", - "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Atencion :</b> La presa en carga de cURL per PHP es pas activada o installada. Lo montatge de %s es pas possible. Contactatz vòstre administrator sistèma per l'installar.", - "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Atencion : </b> La presa en carga del FTP per PHP es pas activada o installada. Lo montatge de %s es pas possible. Contactatz vòstre administrator sistèma per l'installar.", - "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Atencion : </b> \"%s\" es pas installat. Lo montatge de %s es pas possible. Contactatz vòstre administrator sistèma per l'installar.", - "No external storage configured" : "Aucun emmagazinatge externe configurat", - "You can add external storages in the personal settings" : "Podètz apondre des emmagazinatges externes dins los paramètres personals", - "Name" : "Nom", - "Storage type" : "Tipe d'emmagazinatge", - "Scope" : "Portada", - "Enable encryption" : "Activar lo chiframent", - "Enable previews" : "Activar las previsualizacions", - "Check for changes" : "Recercar las modificacions", - "Never" : "Pas jamai", - "Once every direct access" : "Un còp a cada accès dirècte", - "External Storage" : "Emmagazinatge externe", - "Folder name" : "Nom del dorsièr", - "Authentication" : "Autentificacion", - "Configuration" : "Configuracion", - "Available for" : "Disponible per", - "Add storage" : "Apondre un supòrt d'emmagazinatge", - "Advanced settings" : "Paramètres avançats", - "Delete" : "Suprimir", - "Allow users to mount external storage" : "Autorizar los utilizaires a montar l'espaci d'emmagazinatge extèrne", - "Allow users to mount the following external storage" : "Autorizar los utilizaires a montar los emmagazinatges extèrnes seguents" -}, -"nplurals=2; plural=(n > 1);"); diff --git a/apps/files_external/l10n/oc.json b/apps/files_external/l10n/oc.json deleted file mode 100644 index c64cddb474e..00000000000 --- a/apps/files_external/l10n/oc.json +++ /dev/null @@ -1,105 +0,0 @@ -{ "translations": { - "Fetching request tokens failed. Verify that your app key and secret are correct." : "L'obtencion dels getons de requèsta a fracassat. Verificatz que vòstra clau d'aplicacion e vòstre senhal son corrèctes.", - "Fetching access tokens failed. Verify that your app key and secret are correct." : "L'obtencion dels getons d'aacès a fracassat. Verificatz que vòstra clau d'aplicacion e vòstre senhal son corrèctes.", - "Please provide a valid app key and secret." : "Provesissètz una clau d'aplicacion e un senhal valids.", - "Step 1 failed. Exception: %s" : "L’etapa 1 a fracassat. Error : %s", - "Step 2 failed. Exception: %s" : "L’etapa 2 a fracassat. Error : %s", - "External storage" : "Emmagazinatge extèrne", - "Personal" : "Personal", - "System" : "Sistèma", - "Grant access" : "Autorizar l'accès", - "Error configuring OAuth1" : "Error al moment de la configuracion d'OAuth1", - "Error configuring OAuth2" : "Error al moment de la configuracion d'OAuth2", - "Generate keys" : "Generar de claus", - "Error generating key pair" : "Error al moment de la generacion de las claus", - "All users. Type to select user or group." : "Totes los utilizaires. Clicatz aicí per restrénher.", - "(group)" : "(grop)", - "Saved" : "Enregistrat", - "Username" : "Nom d'utilizaire", - "Password" : "Senhal", - "Save" : "Enregistrar", - "Storage with id \"%i\" not found" : "Emmagazinatge amb l'id \"%i\" pas trobat", - "Invalid backend or authentication mechanism class" : "Servici o metòde d'autentificacion pas valable", - "Invalid mount point" : "Punt de montatge invalid", - "Objectstore forbidden" : "\"Objectstore\" interdich", - "Invalid storage backend \"%s\"" : "Servici d'emmagazinatge invalid : \"%s\"", - "Not permitted to use backend \"%s\"" : "Pas autorizat a utilizar lo servici \"%s\"", - "Not permitted to use authentication mechanism \"%s\"" : "Pas autorizat a utilizar lo mecanisme d'autentificacion \"%s\"", - "Unsatisfied backend parameters" : "Paramètres mancants pel servici", - "Unsatisfied authentication mechanism parameters" : "Paramètres mancants pel metòde d'autentificacion", - "Insufficient data: %s" : "Donadas insufisentas : %s", - "%s" : "%s", - "Access key" : "Clau d'accès", - "Secret key" : "Clau secreta", - "Builtin" : "Integrat", - "None" : "Pas cap", - "OAuth1" : "OAuth1", - "App key" : "App key", - "App secret" : "App secret", - "OAuth2" : "OAuth2", - "Client ID" : "ID Client", - "Client secret" : "Secret client", - "OpenStack" : "OpenStack", - "Tenant name" : "Tenant name", - "Identity endpoint URL" : "Identity endpoint URL", - "Rackspace" : "Rackspace", - "API key" : "Clau API", - "Username and password" : "Nom d'utilizaire e senhal", - "RSA public key" : "Clau publica RSA", - "Public key" : "Clau publica", - "Amazon S3" : "Amazon S3", - "Bucket" : "Bucket", - "Hostname" : "Nom de l'òste", - "Port" : "Pòrt", - "Region" : "Region", - "Enable SSL" : "Activar SSL", - "Enable Path Style" : "Accès per path", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Sosdorsièr distant", - "Secure https://" : "Securizacion https://", - "Dropbox" : "Dropbox", - "FTP" : "FTP", - "Host" : "Òste", - "Secure ftps://" : "Securizacion ftps://", - "Google Drive" : "Google Drive", - "Local" : "Local", - "Location" : "Emplaçament", - "ownCloud" : "ownCloud", - "SFTP" : "SFTP", - "Root" : "Raiç", - "SFTP with secret key login" : "SFTP amb un identificant secret", - "SMB / CIFS" : "SMB / CIFS", - "Share" : "Partejar", - "Domain" : "Domeni", - "SMB / CIFS using OC login" : "SMB / CIFS en utilizant los identificants OC", - "Username as share" : "Nom d'utilizaire coma nom de partiment", - "OpenStack Object Storage" : "OpenStack Object Storage", - "Service name" : "Nom del servici", - "Request timeout (seconds)" : "Timeout de las requèstas (en segondas)", - "<b>Note:</b> " : "<b>Atencion :</b>", - "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Atencion :</b> La presa en carga de cURL per PHP es pas activada o installada. Lo montatge de %s es pas possible. Contactatz vòstre administrator sistèma per l'installar.", - "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Atencion : </b> La presa en carga del FTP per PHP es pas activada o installada. Lo montatge de %s es pas possible. Contactatz vòstre administrator sistèma per l'installar.", - "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Atencion : </b> \"%s\" es pas installat. Lo montatge de %s es pas possible. Contactatz vòstre administrator sistèma per l'installar.", - "No external storage configured" : "Aucun emmagazinatge externe configurat", - "You can add external storages in the personal settings" : "Podètz apondre des emmagazinatges externes dins los paramètres personals", - "Name" : "Nom", - "Storage type" : "Tipe d'emmagazinatge", - "Scope" : "Portada", - "Enable encryption" : "Activar lo chiframent", - "Enable previews" : "Activar las previsualizacions", - "Check for changes" : "Recercar las modificacions", - "Never" : "Pas jamai", - "Once every direct access" : "Un còp a cada accès dirècte", - "External Storage" : "Emmagazinatge externe", - "Folder name" : "Nom del dorsièr", - "Authentication" : "Autentificacion", - "Configuration" : "Configuracion", - "Available for" : "Disponible per", - "Add storage" : "Apondre un supòrt d'emmagazinatge", - "Advanced settings" : "Paramètres avançats", - "Delete" : "Suprimir", - "Allow users to mount external storage" : "Autorizar los utilizaires a montar l'espaci d'emmagazinatge extèrne", - "Allow users to mount the following external storage" : "Autorizar los utilizaires a montar los emmagazinatges extèrnes seguents" -},"pluralForm" :"nplurals=2; plural=(n > 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 4df5dddd8db..c1f7cff9a1d 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -33,7 +33,7 @@ OC.L10N.register( "Client ID" : "ID do Cliente", "Client secret" : "Segredo do cliente", "OpenStack v2" : "OpenStack v2", - "Login" : "Entrar", + "Login" : "Nome de login", "Password" : "Senha", "Tenant name" : "Nome do inquilino", "Identity endpoint URL" : "URL do destino da identidade", @@ -42,17 +42,17 @@ OC.L10N.register( "Rackspace" : "Espaço no rack", "API key" : "Chave API", "Global credentials" : "Credenciais globais", - "Log-in credentials, save in database" : "Credenciais de acesso, salvas no banco de dados", - "Login and password" : "Login e senha", - "Log-in credentials, save in session" : "Credenciais de login, guardadas em sessão", + "Log-in credentials, save in database" : "Credenciais de acesso, armazenar no banco de dados", + "Login and password" : "Nome de login e senha", + "Log-in credentials, save in session" : "Credenciais de login, armazenar na sessão", "Global credentials, manually entered" : "Credenciais globais, inseridas manualmente", - "Manually entered, store in database" : "Inserido manualmente, armazenado no banco de dados", + "Manually entered, store in database" : "Inseridos manualmente, armazenados no banco de dados", "RSA public key" : "Chave pública RSA", "Public key" : "Chave pública", "RSA private key" : "Chave privada RSA", "Private key" : "Chave privada", - "Kerberos default realm, defaults to \"WORKGROUP\"" : "reino padrão do Kerberos, padrão para \"WORKGROUP\"", - "Kerberos ticket Apache mode" : "Bilhete Kerberos Modo Apache", + "Kerberos default realm, defaults to \"WORKGROUP\"" : "Reino padrão do Kerberos, o padrão é \"WORKGROUP\"", + "Kerberos ticket Apache mode" : "Modo Apache de ticket Kerberos", "Kerberos ticket" : "Ticket Kerberos", "Amazon S3" : "Amazon S3", "Bucket" : "Cesta", @@ -81,13 +81,13 @@ OC.L10N.register( "SMB/CIFS" : "SMB/CIFS", "Share" : "Compartilhar", "Show hidden files" : "Mostrar arquivos ocultos", - "Case sensitive file system" : "Sistema de arquivos sensível a maiúsculas", - "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Desativá-lo permitirá usar um sistema de arquivos que não diferencia maiúsculas de minúsculas, mas acarretará uma penalidade de desempenho", + "Case sensitive file system" : "Sistema de arquivos diferenciando maiúsculas/minúsculas", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Desativar está opção permitirá usar um sistema de arquivos que não diferencia maiúsculas de minúsculas, mas acarretará uma penalidade de desempenho", "Verify ACL access when listing files" : "Verifique o acesso da ACL ao listar arquivos", - "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Verifique as ACLs de cada arquivo ou pasta dentro de um diretório para filtrar itens onde a conta não tem permissões de leitura, o que acarreta uma penalidade de desempenho", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Verificar as ACLs de cada arquivo ou pasta dentro de um diretório para filtrar itens onde a conta não tem permissões de leitura, tem uma penalidade de desempenho", "Timeout" : "Tempo limite", - "SMB/CIFS using OC login" : "SMB/CIFS usandoo login OC", - "Login as share" : "Faça login como compartilhar", + "SMB/CIFS using OC login" : "SMB/CIFS usando login OC", + "Login as share" : "Faça login como compartilhamento", "OpenStack Object Storage" : "Armazenamento de Objetos OpenStack", "Service name" : "Nome do serviço", "Request timeout (seconds)" : "Tempo limite para requisição (segundos)", @@ -97,25 +97,25 @@ OC.L10N.register( "External storage" : "Armazenamento Externo", "External storage support" : "Suporte a armazenamento externo", "Adds basic external storage support" : "Adiciona suporte básico para armazenamento externo", - "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Este aplicativo permite que os administradores configurem conexões com provedores de armazenamento externos, como servidores FTP, armazenamentos de objetos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e muito mais. A administração pode escolher quais tipos de armazenamento ativar e pode montar esses locais de armazenamento para uma conta, um grupo ou todo o sistema. Os usuários verão uma nova pasta aparecer em seu diretório raiz Nextcloud, que eles podem acessar e usar como qualquer outra pasta Nextcloud. O armazenamento externo também permite que as pessoas compartilhem arquivos armazenados nesses locais externos. Nesses casos, as credenciais do proprietário do arquivo são usadas quando o destinatário solicita o arquivo do armazenamento externo, garantindo assim que o destinatário possa acessar o arquivo compartilhado. \n\nO armazenamento externo pode ser configurado usando a GUI ou na linha de comando. Esta segunda opção fornece à administração mais flexibilidade para configurar montagens de armazenamento externo em massa e definir prioridades de montagem. Mais informações estão disponíveis na documentação da GUI de armazenamento externo e na documentação do arquivo de configuração de armazenamento externo.", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Este aplicativo permite que os administradores configurem conexões com provedores de armazenamento externos, como servidores FTP, armazenamentos de objetos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e muito mais. A administração pode escolher quais tipos de armazenamento a serem ativados e pode montar estes locais de armazenamento para uma conta, um grupo ou todo o sistema. Os usuários verão uma nova pasta aparecer em seu diretório raiz Nextcloud, que eles podem acessar e usar como qualquer outra pasta do Nextcloud. O armazenamento externo também permite que as pessoas compartilhem arquivos armazenados nestes locais externos. Nesses casos, as credenciais do proprietário do arquivo são usadas quando o destinatário solicita o arquivo do armazenamento externo, garantindo assim que o destinatário possa acessar o arquivo compartilhado. \n\nO armazenamento externo pode ser configurado usando a GUI ou na linha de comando. Esta segunda opção fornece à administração mais flexibilidade para configurar montagens de armazenamento externo em massa e definir prioridades de montagem. Mais informações estão disponíveis na documentação da GUI de armazenamento externo e na documentação do arquivo de configuração de armazenamento externo.", "Confirm" : "Confirmar", "Storage credentials" : "Credenciais de armazenamento", "To access the storage, you need to provide the authentication credentials." : "Para acessar o armazenamento, você precisa fornecer as credenciais de autenticação.", - "Enter the storage login" : "Digite o login de armazenamento", + "Enter the storage login" : "Digite o nome de login de armazenamento", "Enter the storage password" : "Digite a senha de armazenamento", "Unable to update this external storage config. {statusMessage}" : "Não é possível atualizar esta configuração de armazenamento externo. {statusMessage}", "New configuration successfully saved" : "Nova configuração salva com sucesso", "Enter missing credentials" : "Digite as credenciais ausentes", - "Credentials successfully set" : "Credenciais configuradas com sucesso", - "Error while setting credentials: {error}" : "Erro ao configurar as credenciais: {error}", + "Credentials successfully set" : "Credenciais definidas com sucesso", + "Error while setting credentials: {error}" : "Erro ao definir as credenciais: {error}", "Checking storage …" : "Verificação do armazenamento …", "There was an error with this external storage." : "Ocorreu um erro com este armazenamento externo.", "We were unable to check the external storage {basename}" : "Não foi possível verificar o armazenamento externo {basename}", "Examine this faulty external storage configuration" : "Examine esta configuração de armazenamento externo com falha", - "Open in Files" : "Abrir em arquivos", + "Open in Files" : "Abrir em Arquivos", "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Ocorreu um erro com este armazenamento externo. Deseja revisar esta configuração do ponto de montagem na página de configurações?", "External mount error" : "Erro de montagem externa", - "List of external storage." : "Lista de armazenamento externo.", + "List of external storage." : "Lista de armazenamentos externos.", "There is no external storage configured. You can configure them in your Personal settings." : "Não há armazenamento externo configurado. Você pode configurá-los em suas configurações pessoais.", "There is no external storage configured and you don't have the permission to configure them." : "Não há armazenamento externo configurado e você não tem permissão para configurá-los.", "No external storage" : "Sem armazenamento externo", @@ -135,10 +135,10 @@ OC.L10N.register( "Once every direct access" : "Uma vez a cada acesso direto", "Read only" : "Somente leitura", "Disconnect" : "Desconectar", - "Unknown backend: {backendName}" : "Backend desconhecido: {backendName}", + "Unknown backend: {backendName}" : "Back-end desconhecido: {backendName}", "Admin defined" : "Definido pelo administrador", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "A verificação automática de status está desabilitada devido ao grande número de armazenamentos configurados, clique para verificar o status", - "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão desses arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta no próprio armazenamento externo.", + "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão destes arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta do armazenamento externo em si.", "Delete storage?" : "Excluir armazenamento?", "Click to recheck the configuration" : "Clique para rechecar a configuração", "Saved" : "Salvo", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index 02fd258d356..d4110a66176 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -31,7 +31,7 @@ "Client ID" : "ID do Cliente", "Client secret" : "Segredo do cliente", "OpenStack v2" : "OpenStack v2", - "Login" : "Entrar", + "Login" : "Nome de login", "Password" : "Senha", "Tenant name" : "Nome do inquilino", "Identity endpoint URL" : "URL do destino da identidade", @@ -40,17 +40,17 @@ "Rackspace" : "Espaço no rack", "API key" : "Chave API", "Global credentials" : "Credenciais globais", - "Log-in credentials, save in database" : "Credenciais de acesso, salvas no banco de dados", - "Login and password" : "Login e senha", - "Log-in credentials, save in session" : "Credenciais de login, guardadas em sessão", + "Log-in credentials, save in database" : "Credenciais de acesso, armazenar no banco de dados", + "Login and password" : "Nome de login e senha", + "Log-in credentials, save in session" : "Credenciais de login, armazenar na sessão", "Global credentials, manually entered" : "Credenciais globais, inseridas manualmente", - "Manually entered, store in database" : "Inserido manualmente, armazenado no banco de dados", + "Manually entered, store in database" : "Inseridos manualmente, armazenados no banco de dados", "RSA public key" : "Chave pública RSA", "Public key" : "Chave pública", "RSA private key" : "Chave privada RSA", "Private key" : "Chave privada", - "Kerberos default realm, defaults to \"WORKGROUP\"" : "reino padrão do Kerberos, padrão para \"WORKGROUP\"", - "Kerberos ticket Apache mode" : "Bilhete Kerberos Modo Apache", + "Kerberos default realm, defaults to \"WORKGROUP\"" : "Reino padrão do Kerberos, o padrão é \"WORKGROUP\"", + "Kerberos ticket Apache mode" : "Modo Apache de ticket Kerberos", "Kerberos ticket" : "Ticket Kerberos", "Amazon S3" : "Amazon S3", "Bucket" : "Cesta", @@ -79,13 +79,13 @@ "SMB/CIFS" : "SMB/CIFS", "Share" : "Compartilhar", "Show hidden files" : "Mostrar arquivos ocultos", - "Case sensitive file system" : "Sistema de arquivos sensível a maiúsculas", - "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Desativá-lo permitirá usar um sistema de arquivos que não diferencia maiúsculas de minúsculas, mas acarretará uma penalidade de desempenho", + "Case sensitive file system" : "Sistema de arquivos diferenciando maiúsculas/minúsculas", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Desativar está opção permitirá usar um sistema de arquivos que não diferencia maiúsculas de minúsculas, mas acarretará uma penalidade de desempenho", "Verify ACL access when listing files" : "Verifique o acesso da ACL ao listar arquivos", - "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Verifique as ACLs de cada arquivo ou pasta dentro de um diretório para filtrar itens onde a conta não tem permissões de leitura, o que acarreta uma penalidade de desempenho", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Verificar as ACLs de cada arquivo ou pasta dentro de um diretório para filtrar itens onde a conta não tem permissões de leitura, tem uma penalidade de desempenho", "Timeout" : "Tempo limite", - "SMB/CIFS using OC login" : "SMB/CIFS usandoo login OC", - "Login as share" : "Faça login como compartilhar", + "SMB/CIFS using OC login" : "SMB/CIFS usando login OC", + "Login as share" : "Faça login como compartilhamento", "OpenStack Object Storage" : "Armazenamento de Objetos OpenStack", "Service name" : "Nome do serviço", "Request timeout (seconds)" : "Tempo limite para requisição (segundos)", @@ -95,25 +95,25 @@ "External storage" : "Armazenamento Externo", "External storage support" : "Suporte a armazenamento externo", "Adds basic external storage support" : "Adiciona suporte básico para armazenamento externo", - "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Este aplicativo permite que os administradores configurem conexões com provedores de armazenamento externos, como servidores FTP, armazenamentos de objetos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e muito mais. A administração pode escolher quais tipos de armazenamento ativar e pode montar esses locais de armazenamento para uma conta, um grupo ou todo o sistema. Os usuários verão uma nova pasta aparecer em seu diretório raiz Nextcloud, que eles podem acessar e usar como qualquer outra pasta Nextcloud. O armazenamento externo também permite que as pessoas compartilhem arquivos armazenados nesses locais externos. Nesses casos, as credenciais do proprietário do arquivo são usadas quando o destinatário solicita o arquivo do armazenamento externo, garantindo assim que o destinatário possa acessar o arquivo compartilhado. \n\nO armazenamento externo pode ser configurado usando a GUI ou na linha de comando. Esta segunda opção fornece à administração mais flexibilidade para configurar montagens de armazenamento externo em massa e definir prioridades de montagem. Mais informações estão disponíveis na documentação da GUI de armazenamento externo e na documentação do arquivo de configuração de armazenamento externo.", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Este aplicativo permite que os administradores configurem conexões com provedores de armazenamento externos, como servidores FTP, armazenamentos de objetos S3 ou SWIFT, outros servidores Nextcloud, servidores WebDAV e muito mais. A administração pode escolher quais tipos de armazenamento a serem ativados e pode montar estes locais de armazenamento para uma conta, um grupo ou todo o sistema. Os usuários verão uma nova pasta aparecer em seu diretório raiz Nextcloud, que eles podem acessar e usar como qualquer outra pasta do Nextcloud. O armazenamento externo também permite que as pessoas compartilhem arquivos armazenados nestes locais externos. Nesses casos, as credenciais do proprietário do arquivo são usadas quando o destinatário solicita o arquivo do armazenamento externo, garantindo assim que o destinatário possa acessar o arquivo compartilhado. \n\nO armazenamento externo pode ser configurado usando a GUI ou na linha de comando. Esta segunda opção fornece à administração mais flexibilidade para configurar montagens de armazenamento externo em massa e definir prioridades de montagem. Mais informações estão disponíveis na documentação da GUI de armazenamento externo e na documentação do arquivo de configuração de armazenamento externo.", "Confirm" : "Confirmar", "Storage credentials" : "Credenciais de armazenamento", "To access the storage, you need to provide the authentication credentials." : "Para acessar o armazenamento, você precisa fornecer as credenciais de autenticação.", - "Enter the storage login" : "Digite o login de armazenamento", + "Enter the storage login" : "Digite o nome de login de armazenamento", "Enter the storage password" : "Digite a senha de armazenamento", "Unable to update this external storage config. {statusMessage}" : "Não é possível atualizar esta configuração de armazenamento externo. {statusMessage}", "New configuration successfully saved" : "Nova configuração salva com sucesso", "Enter missing credentials" : "Digite as credenciais ausentes", - "Credentials successfully set" : "Credenciais configuradas com sucesso", - "Error while setting credentials: {error}" : "Erro ao configurar as credenciais: {error}", + "Credentials successfully set" : "Credenciais definidas com sucesso", + "Error while setting credentials: {error}" : "Erro ao definir as credenciais: {error}", "Checking storage …" : "Verificação do armazenamento …", "There was an error with this external storage." : "Ocorreu um erro com este armazenamento externo.", "We were unable to check the external storage {basename}" : "Não foi possível verificar o armazenamento externo {basename}", "Examine this faulty external storage configuration" : "Examine esta configuração de armazenamento externo com falha", - "Open in Files" : "Abrir em arquivos", + "Open in Files" : "Abrir em Arquivos", "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Ocorreu um erro com este armazenamento externo. Deseja revisar esta configuração do ponto de montagem na página de configurações?", "External mount error" : "Erro de montagem externa", - "List of external storage." : "Lista de armazenamento externo.", + "List of external storage." : "Lista de armazenamentos externos.", "There is no external storage configured. You can configure them in your Personal settings." : "Não há armazenamento externo configurado. Você pode configurá-los em suas configurações pessoais.", "There is no external storage configured and you don't have the permission to configure them." : "Não há armazenamento externo configurado e você não tem permissão para configurá-los.", "No external storage" : "Sem armazenamento externo", @@ -133,10 +133,10 @@ "Once every direct access" : "Uma vez a cada acesso direto", "Read only" : "Somente leitura", "Disconnect" : "Desconectar", - "Unknown backend: {backendName}" : "Backend desconhecido: {backendName}", + "Unknown backend: {backendName}" : "Back-end desconhecido: {backendName}", "Admin defined" : "Definido pelo administrador", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "A verificação automática de status está desabilitada devido ao grande número de armazenamentos configurados, clique para verificar o status", - "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão desses arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta no próprio armazenamento externo.", + "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão destes arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta do armazenamento externo em si.", "Delete storage?" : "Excluir armazenamento?", "Click to recheck the configuration" : "Clique para rechecar a configuração", "Saved" : "Salvo", diff --git a/apps/files_external/l10n/ro.js b/apps/files_external/l10n/ro.js deleted file mode 100644 index dd2d412484d..00000000000 --- a/apps/files_external/l10n/ro.js +++ /dev/null @@ -1,85 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Grant access" : "Permite accesul", - "Error configuring OAuth1" : "Eroare la configurarea OAuth1", - "Error configuring OAuth2" : "Eroare la configurarea OAuth2", - "Generate keys" : "Generează chei", - "Error generating key pair" : "Eroarea la generarea cheilor", - "(Group)" : "(Grup)", - "Enable encryption" : "Activează criptarea", - "Enable previews" : "Activează previzualizările", - "Enable sharing" : "Activează partajarea", - "Check for changes" : "Verifică dacă au intervenit modificări", - "Never" : "Niciodată", - "Once every direct access" : "O dată la fiecare acces direct", - "Read only" : "Doar citire", - "Disconnect" : "Deconectare", - "Admin defined" : "Administrator definit", - "Saved" : "Salvat", - "Saving …" : "Se salvează", - "Save" : "Salvează", - "Insufficient data: %s" : "Date insuficiente: %s", - "%s" : "%s", - "Access key" : "Cheie de acces", - "Secret key" : "Cheie secretă", - "Builtin" : "Inclus", - "None" : "Niciuna", - "OAuth1" : "OAuth1", - "App key" : "Cheie aplicație", - "App secret" : "Secret aplicație", - "OAuth2" : "OAuth2", - "Client ID" : "ID client", - "Client secret" : "Secret client", - "Login" : "Autentificare", - "Password" : "Parolă", - "Tenant name" : "Nume titular", - "Domain" : "Domeniu", - "API key" : "Cheie API", - "RSA public key" : "Cheie publică RSA", - "Public key" : "Cheie publică", - "Amazon S3" : "Amazon S3", - "Hostname" : "Nume mașină", - "Port" : "Port", - "Region" : "Regiune", - "Enable SSL" : "Activează SSL", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Secure https://" : "https:// sigur", - "FTP" : "FTP", - "Host" : "Gazdă", - "Secure ftps://" : "ftps:// sigur", - "Local" : "Local", - "Location" : "Locație", - "Nextcloud" : "Nextcloud", - "SFTP" : "SFTP", - "Root" : "Root", - "SFTP with secret key login" : "SFTP cu cheie secretă de autentificare", - "Share" : "Partajează", - "Show hidden files" : "Arată fișierele ascunse", - "Service name" : "Nume serviciu", - "External storage" : "Stocare externă", - "Open in Files" : "Deschide în Fișiere", - "Storage type" : "Tip stocare", - "Unknown" : "Necunoscut", - "Scope" : "Scop", - "Personal" : "Personal", - "System" : "Sistem", - "Open documentation" : "Deschide documentația", - "Folder name" : "Denumire director", - "Authentication" : "Autentificare", - "Configuration" : "Configurație", - "Available for" : "Disponibil pentru", - "Add storage" : "Adauga stocare", - "Advanced settings" : "Setări avansate", - "Empty response from the server" : "Răspuns nul de la server", - "There was an error with message: " : "A apărut o eroare cu mesajul:", - "external-storage" : "Stocare externă", - "Username" : "Nume utilizator", - "Credentials saved" : "Detalii de autentificare salvate", - "Credentials saving failed" : "Salvarea detaliilor de autentificare a eșuat", - "Credentials required" : "Detalii de autentificare necesare", - "Username and password" : "Nume de utilizator și parolă", - "Name" : "Nume" -}, -"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"); diff --git a/apps/files_external/l10n/ro.json b/apps/files_external/l10n/ro.json deleted file mode 100644 index a21b756bd6f..00000000000 --- a/apps/files_external/l10n/ro.json +++ /dev/null @@ -1,83 +0,0 @@ -{ "translations": { - "Grant access" : "Permite accesul", - "Error configuring OAuth1" : "Eroare la configurarea OAuth1", - "Error configuring OAuth2" : "Eroare la configurarea OAuth2", - "Generate keys" : "Generează chei", - "Error generating key pair" : "Eroarea la generarea cheilor", - "(Group)" : "(Grup)", - "Enable encryption" : "Activează criptarea", - "Enable previews" : "Activează previzualizările", - "Enable sharing" : "Activează partajarea", - "Check for changes" : "Verifică dacă au intervenit modificări", - "Never" : "Niciodată", - "Once every direct access" : "O dată la fiecare acces direct", - "Read only" : "Doar citire", - "Disconnect" : "Deconectare", - "Admin defined" : "Administrator definit", - "Saved" : "Salvat", - "Saving …" : "Se salvează", - "Save" : "Salvează", - "Insufficient data: %s" : "Date insuficiente: %s", - "%s" : "%s", - "Access key" : "Cheie de acces", - "Secret key" : "Cheie secretă", - "Builtin" : "Inclus", - "None" : "Niciuna", - "OAuth1" : "OAuth1", - "App key" : "Cheie aplicație", - "App secret" : "Secret aplicație", - "OAuth2" : "OAuth2", - "Client ID" : "ID client", - "Client secret" : "Secret client", - "Login" : "Autentificare", - "Password" : "Parolă", - "Tenant name" : "Nume titular", - "Domain" : "Domeniu", - "API key" : "Cheie API", - "RSA public key" : "Cheie publică RSA", - "Public key" : "Cheie publică", - "Amazon S3" : "Amazon S3", - "Hostname" : "Nume mașină", - "Port" : "Port", - "Region" : "Regiune", - "Enable SSL" : "Activează SSL", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Secure https://" : "https:// sigur", - "FTP" : "FTP", - "Host" : "Gazdă", - "Secure ftps://" : "ftps:// sigur", - "Local" : "Local", - "Location" : "Locație", - "Nextcloud" : "Nextcloud", - "SFTP" : "SFTP", - "Root" : "Root", - "SFTP with secret key login" : "SFTP cu cheie secretă de autentificare", - "Share" : "Partajează", - "Show hidden files" : "Arată fișierele ascunse", - "Service name" : "Nume serviciu", - "External storage" : "Stocare externă", - "Open in Files" : "Deschide în Fișiere", - "Storage type" : "Tip stocare", - "Unknown" : "Necunoscut", - "Scope" : "Scop", - "Personal" : "Personal", - "System" : "Sistem", - "Open documentation" : "Deschide documentația", - "Folder name" : "Denumire director", - "Authentication" : "Autentificare", - "Configuration" : "Configurație", - "Available for" : "Disponibil pentru", - "Add storage" : "Adauga stocare", - "Advanced settings" : "Setări avansate", - "Empty response from the server" : "Răspuns nul de la server", - "There was an error with message: " : "A apărut o eroare cu mesajul:", - "external-storage" : "Stocare externă", - "Username" : "Nume utilizator", - "Credentials saved" : "Detalii de autentificare salvate", - "Credentials saving failed" : "Salvarea detaliilor de autentificare a eșuat", - "Credentials required" : "Detalii de autentificare necesare", - "Username and password" : "Nume de utilizator și parolă", - "Name" : "Nume" -},"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js index c62abe057e0..e98198264b8 100644 --- a/apps/files_external/l10n/ru.js +++ b/apps/files_external/l10n/ru.js @@ -7,6 +7,8 @@ OC.L10N.register( "Error configuring OAuth2" : "Ошибка настройки OAuth2", "Generate keys" : "Создать ключи", "Error generating key pair" : "Ошибка создания пары ключей", + "You are not logged in" : "Вход в систему не выполнен", + "Permission denied" : "Доступ запрещён", "Forbidden to manage local mounts" : "Запрещено изменять параметры подключения файловых систем", "Storage with ID \"%d\" not found" : "Хранилище с идентификатором «%d» не найдено", "Invalid backend or authentication mechanism class" : "Недопустимый механизм или класс авторизации", @@ -62,6 +64,7 @@ OC.L10N.register( "Enable Path Style" : "Использовать стиль пути", "Legacy (v2) authentication" : "Устаревшая (v2) проверка подлинности", "Enable multipart copy" : "Включить составное копирование", + "SSE-C encryption key" : "Ключ шифрования SSE-C", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Подкаталог на другом сервере", @@ -103,6 +106,9 @@ OC.L10N.register( "Unable to update this external storage config. {statusMessage}" : "Не удалось обновить эту конфигурацию внешних хранилищ. {statusMessage}", "New configuration successfully saved" : "Новая конфигурация успешно сохранена", "Enter missing credentials" : "Ввод пропущенных учётных данных", + "Credentials successfully set" : "Учётные данные успешно заданы", + "Error while setting credentials: {error}" : "Ошибка при установке учётных данных: {error}", + "Checking storage …" : "Проверка хранилища …", "There was an error with this external storage." : "Произошла ошибка с этим внешним хранилищем.", "We were unable to check the external storage {basename}" : "Нам не удалось проверить внешнее хранилище {basename}", "Examine this faulty external storage configuration" : "Проверьте эту конфигурацию внешнего хранилища, она содержит ошибки", @@ -138,6 +144,8 @@ OC.L10N.register( "Saved" : "Сохранено", "Saving …" : "Сохранение ...", "Save" : "Сохранить", + "Failed to save global credentials" : "Не удалось сохранить глобальные учётные данные", + "Failed to save global credentials: {message}" : "Не удалось сохранить глобальные учётные данные: {message}", "No external storage configured or you don't have the permission to configure them" : "Нет настроенного внешнего хранилища или у вас нет прав доступа для их настройки", "Open documentation" : "Открыть документацию", "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Внешнее хранилище позволяет подключать внешние службы и устройства хранения в качестве дополнительных устройств хранения данных Nextcloud. Вы также можете разрешить людям подключать свои собственные внешние службы хранения данных.", diff --git a/apps/files_external/l10n/ru.json b/apps/files_external/l10n/ru.json index ece2f8cd31b..a0260761245 100644 --- a/apps/files_external/l10n/ru.json +++ b/apps/files_external/l10n/ru.json @@ -5,6 +5,8 @@ "Error configuring OAuth2" : "Ошибка настройки OAuth2", "Generate keys" : "Создать ключи", "Error generating key pair" : "Ошибка создания пары ключей", + "You are not logged in" : "Вход в систему не выполнен", + "Permission denied" : "Доступ запрещён", "Forbidden to manage local mounts" : "Запрещено изменять параметры подключения файловых систем", "Storage with ID \"%d\" not found" : "Хранилище с идентификатором «%d» не найдено", "Invalid backend or authentication mechanism class" : "Недопустимый механизм или класс авторизации", @@ -60,6 +62,7 @@ "Enable Path Style" : "Использовать стиль пути", "Legacy (v2) authentication" : "Устаревшая (v2) проверка подлинности", "Enable multipart copy" : "Включить составное копирование", + "SSE-C encryption key" : "Ключ шифрования SSE-C", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Подкаталог на другом сервере", @@ -101,6 +104,9 @@ "Unable to update this external storage config. {statusMessage}" : "Не удалось обновить эту конфигурацию внешних хранилищ. {statusMessage}", "New configuration successfully saved" : "Новая конфигурация успешно сохранена", "Enter missing credentials" : "Ввод пропущенных учётных данных", + "Credentials successfully set" : "Учётные данные успешно заданы", + "Error while setting credentials: {error}" : "Ошибка при установке учётных данных: {error}", + "Checking storage …" : "Проверка хранилища …", "There was an error with this external storage." : "Произошла ошибка с этим внешним хранилищем.", "We were unable to check the external storage {basename}" : "Нам не удалось проверить внешнее хранилище {basename}", "Examine this faulty external storage configuration" : "Проверьте эту конфигурацию внешнего хранилища, она содержит ошибки", @@ -136,6 +142,8 @@ "Saved" : "Сохранено", "Saving …" : "Сохранение ...", "Save" : "Сохранить", + "Failed to save global credentials" : "Не удалось сохранить глобальные учётные данные", + "Failed to save global credentials: {message}" : "Не удалось сохранить глобальные учётные данные: {message}", "No external storage configured or you don't have the permission to configure them" : "Нет настроенного внешнего хранилища или у вас нет прав доступа для их настройки", "Open documentation" : "Открыть документацию", "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Внешнее хранилище позволяет подключать внешние службы и устройства хранения в качестве дополнительных устройств хранения данных Nextcloud. Вы также можете разрешить людям подключать свои собственные внешние службы хранения данных.", diff --git a/apps/files_external/l10n/sk.js b/apps/files_external/l10n/sk.js index 54c7ccfb70c..5c0530cbfa2 100644 --- a/apps/files_external/l10n/sk.js +++ b/apps/files_external/l10n/sk.js @@ -79,7 +79,7 @@ OC.L10N.register( "Root" : "Root", "SFTP with secret key login" : "SFTP prihlásenie pomocou tajného kľúča", "SMB/CIFS" : "SMB/CIFS", - "Share" : "Sprístupniť", + "Share" : "Zdieľaný priečinok", "Show hidden files" : "Zobraziť skryté súbory", "Case sensitive file system" : "Súborový systém rozlišujúci veľkosti písmen", "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Zakázaním, bude možné používať súborový systém bez ohľadu na veľkosť písmen, ale s tým je spojený pokles výkonu.", diff --git a/apps/files_external/l10n/sk.json b/apps/files_external/l10n/sk.json index 83731a6ed00..3a7b5775e1b 100644 --- a/apps/files_external/l10n/sk.json +++ b/apps/files_external/l10n/sk.json @@ -77,7 +77,7 @@ "Root" : "Root", "SFTP with secret key login" : "SFTP prihlásenie pomocou tajného kľúča", "SMB/CIFS" : "SMB/CIFS", - "Share" : "Sprístupniť", + "Share" : "Zdieľaný priečinok", "Show hidden files" : "Zobraziť skryté súbory", "Case sensitive file system" : "Súborový systém rozlišujúci veľkosti písmen", "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Zakázaním, bude možné používať súborový systém bez ohľadu na veľkosť písmen, ale s tým je spojený pokles výkonu.", diff --git a/apps/files_external/l10n/sr@latin.js b/apps/files_external/l10n/sr@latin.js deleted file mode 100644 index 2cc12ecf4aa..00000000000 --- a/apps/files_external/l10n/sr@latin.js +++ /dev/null @@ -1,55 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Step 1 failed. Exception: %s" : "Korak 1 nije uspeo. Izuzetak: %s", - "Step 2 failed. Exception: %s" : "Korak 2 nije uspeo. Izuzetak: %s", - "External storage" : "Spoljašnje skladište", - "Personal" : "Lično", - "System" : "Sistemsko", - "Grant access" : "Dozvoli pristup", - "All users. Type to select user or group." : "Svi korisnici. Kucajte da biste izabrali korisnika ili grupu.", - "(group)" : "(grupa)", - "Saved" : "Sačuvano", - "Username" : "Korisničko ime", - "Password" : "Lozinka", - "Save" : "Sačuvaj", - "App key" : "Ključ Aplikacije", - "App secret" : "Tajna lozinka Aplikacije", - "Client ID" : "Identifikator klijenta", - "Client secret" : "Tajna lozinka klijenta", - "Amazon S3" : "Amazon S3", - "Bucket" : "Korpa", - "Hostname" : "Ime računara", - "Port" : "Port", - "Region" : "Regija", - "Enable SSL" : "Uključi SSL", - "Enable Path Style" : "Omogući stil putanje", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Udaljeni poddirektorijum", - "Secure https://" : "Sigurni https://", - "Host" : "Računar", - "Secure ftps://" : "Sigurni ftps://", - "Local" : "Lokalno", - "Location" : "Lokacija", - "Root" : "Koren", - "Share" : "Podeli", - "SMB / CIFS using OC login" : "SMB / CIFS koji koristi OC prijavljivanje", - "Username as share" : "Korisničko ime i deljeni direktorijum", - "OpenStack Object Storage" : "OpenStack skladište objekata", - "<b>Note:</b> " : "<b>Obratite pažnju:</b>", - "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Obratite pažnju</b> Podrška za cURL u PHP-u nije uključena ili instalirana. Montiranje %s nije moguće. Molimo Vas da se obratite Vašem sistem administratoru da je instalira.", - "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Obratite pažnju:</b> FTP podrška u PHP-u nije uključena ili instalirana. Montiranje %s nije moguće. Molimo Vas da tražite od Vašeg sistem administratora da je instalira.", - "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Obratite pažnju:</b> \"%s\" nije instaliran. Monitranje %s nije moguće. Molimo Vas da se obratite Vašem sistem administratoru da to instalira.", - "Name" : "Ime", - "Storage type" : "Tip skladišta", - "Scope" : "Opseg", - "External Storage" : "Spoljašnje skladište", - "Folder name" : "Ime fascikle", - "Configuration" : "Podešavanje", - "Available for" : "Dostupno za", - "Add storage" : "Dodaj skladište", - "Delete" : "Obriši", - "Allow users to mount the following external storage" : "Omogući korisnicima da namontiraju sledeće spoljašnje skladište" -}, -"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/sr@latin.json b/apps/files_external/l10n/sr@latin.json deleted file mode 100644 index 2460d2544a4..00000000000 --- a/apps/files_external/l10n/sr@latin.json +++ /dev/null @@ -1,53 +0,0 @@ -{ "translations": { - "Step 1 failed. Exception: %s" : "Korak 1 nije uspeo. Izuzetak: %s", - "Step 2 failed. Exception: %s" : "Korak 2 nije uspeo. Izuzetak: %s", - "External storage" : "Spoljašnje skladište", - "Personal" : "Lično", - "System" : "Sistemsko", - "Grant access" : "Dozvoli pristup", - "All users. Type to select user or group." : "Svi korisnici. Kucajte da biste izabrali korisnika ili grupu.", - "(group)" : "(grupa)", - "Saved" : "Sačuvano", - "Username" : "Korisničko ime", - "Password" : "Lozinka", - "Save" : "Sačuvaj", - "App key" : "Ključ Aplikacije", - "App secret" : "Tajna lozinka Aplikacije", - "Client ID" : "Identifikator klijenta", - "Client secret" : "Tajna lozinka klijenta", - "Amazon S3" : "Amazon S3", - "Bucket" : "Korpa", - "Hostname" : "Ime računara", - "Port" : "Port", - "Region" : "Regija", - "Enable SSL" : "Uključi SSL", - "Enable Path Style" : "Omogući stil putanje", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Remote subfolder" : "Udaljeni poddirektorijum", - "Secure https://" : "Sigurni https://", - "Host" : "Računar", - "Secure ftps://" : "Sigurni ftps://", - "Local" : "Lokalno", - "Location" : "Lokacija", - "Root" : "Koren", - "Share" : "Podeli", - "SMB / CIFS using OC login" : "SMB / CIFS koji koristi OC prijavljivanje", - "Username as share" : "Korisničko ime i deljeni direktorijum", - "OpenStack Object Storage" : "OpenStack skladište objekata", - "<b>Note:</b> " : "<b>Obratite pažnju:</b>", - "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Obratite pažnju</b> Podrška za cURL u PHP-u nije uključena ili instalirana. Montiranje %s nije moguće. Molimo Vas da se obratite Vašem sistem administratoru da je instalira.", - "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Obratite pažnju:</b> FTP podrška u PHP-u nije uključena ili instalirana. Montiranje %s nije moguće. Molimo Vas da tražite od Vašeg sistem administratora da je instalira.", - "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Obratite pažnju:</b> \"%s\" nije instaliran. Monitranje %s nije moguće. Molimo Vas da se obratite Vašem sistem administratoru da to instalira.", - "Name" : "Ime", - "Storage type" : "Tip skladišta", - "Scope" : "Opseg", - "External Storage" : "Spoljašnje skladište", - "Folder name" : "Ime fascikle", - "Configuration" : "Podešavanje", - "Available for" : "Dostupno za", - "Add storage" : "Dodaj skladište", - "Delete" : "Obriši", - "Allow users to mount the following external storage" : "Omogući korisnicima da namontiraju sledeće spoljašnje skladište" -},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/sw.js b/apps/files_external/l10n/sw.js new file mode 100644 index 00000000000..253644ceb3e --- /dev/null +++ b/apps/files_external/l10n/sw.js @@ -0,0 +1,162 @@ +OC.L10N.register( + "files_external", + { + "Grant access" : "Toa ufikiaji", + "Error configuring OAuth1" : "Hitilafu katika kusanidi OAuth1", + "Please provide a valid app key and secret." : "Tafadhali toa ufunguo halali wa programu na siri.", + "Error configuring OAuth2" : "Hitilafu katika kusanidi OAuth2", + "Generate keys" : "Tengeneza funguo", + "Error generating key pair" : "Hitilafu katika kuzalisha jozi za funguo", + "You are not logged in" : " Hujaingia", + "Permission denied" : " Ruhusa imekataliwa", + "Forbidden to manage local mounts" : " Hairuhusiwi kudhibiti vipandikizi vya ndani", + "Storage with ID \"%d\" not found" : "Hifadhi yenye kitambulisho \"%d\" haijapatikana", + "Invalid backend or authentication mechanism class" : "Aina batili ya nyuma au utaratibu wa uthibitishaji", + "Invalid mount point" : "Sehemu ya kupachika ni batili", + "Objectstore forbidden" : "Hifadhi ya vitu imezuiliwa", + "Invalid storage backend \"%s\"" : "Nyuma ya hifadhi ni batili \"%s\"", + "Not permitted to use backend \"%s\"" : "Hairuhusiwi kutumia backend \"%s\"", + "Not permitted to use authentication mechanism \"%s\"" : "Hairuhusiwi kutumia utaratibu wa uthibitishaji \"%s\"", + "Unsatisfied backend parameters" : "Vigezo vya mandharinyuma ambavyo havijaridhika", + "Unsatisfied authentication mechanism parameters" : "Vigezo vya utaratibu wa uthibitishaji ambavyo havijaridhika", + "Insufficient data: %s" : " Data hazitoshi: %s", + "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "Hifadhi iliyo na kitambulisho \"%d\" haiwezi kuhaririwa na wasio wasimamizi", + "Access key" : " Ufunguo wa ufikiaji", + "Secret key" : " Ufunguo wa siri", + "Builtin" : "Builtin", + "None" : "Hakuna", + "OAuth1" : "OAuth1", + "App key" : "Kitufe cha programu", + "App secret" : "Siri ya programu", + "OAuth2" : "OAuth2", + "Client ID" : "Kitambulisho cha mteja", + "Client secret" : "Siri ya mteja", + "OpenStack v2" : "OpenStack v2", + "Login" : "Ingia", + "Password" : "Nenosiri", + "Tenant name" : "Jina la mpangaji", + "Identity endpoint URL" : "URL ya mwisho wa kitambulisho", + "OpenStack v3" : "OpenStack v3", + "Domain" : "Umiliki", + "Rackspace" : "Rackspace", + "API key" : "Ufunguo wa API", + "Global credentials" : " Vitambulisho vya kimataifa", + "Log-in credentials, save in database" : "Kitambulisho cha kuingia, hifadhi katika hifadhidata", + "Login and password" : "Ingia na nenosiri", + "Log-in credentials, save in session" : "Kitambulisho cha kuingia, hifadhi katika kipindi", + "Global credentials, manually entered" : "Vitambulisho vya kimataifa, vimeingizwa kwa mikono", + "Manually entered, store in database" : "Imeingizwa kwa mikono, hifadhi kwenye hifadhidata", + "RSA public key" : "Ufunguo wa umma wa RSA", + "Public key" : "Ufunguo wa umma", + "RSA private key" : "Ufunguo wa kibinafsi wa RSA", + "Private key" : " Ufunguo wa kibinafsi", + "Kerberos default realm, defaults to \"WORKGROUP\"" : "Ufalme chaguo-msingi wa Kerberos, chaguomsingi kuwa \"WORKGROUP\"", + "Kerberos ticket Apache mode" : "Njia ya Apache ya tikiti ya Kerberos", + "Kerberos ticket" : "Tikiti za Kerberos", + "Amazon S3" : "Amazon S3", + "Bucket" : " Ndoo", + "Hostname" : "Jina la mwenyeji", + "Port" : "Port", + "Region" : "Kanda", + "Storage Class" : " Daraja la Uhifadhi", + "Enable SSL" : "Washa SSL", + "Enable Path Style" : "Washa Mtindo wa Njia", + "Legacy (v2) authentication" : "Uthibitishaji wa urithi (v2).", + "Enable multipart copy" : "Washa nakala za sehemu nyingi", + "SSE-C encryption key" : " Kitufe cha usimbaji cha SSE-C", + "WebDAV" : "WavutiDAV", + "URL" : "Url", + "Remote subfolder" : " Folda ndogo ya mbali", + "Secure https://" : "Salama https://", + "FTP" : "FTP", + "Host" : "Host", + "Secure ftps://" : "Salama ftps://", + "Local" : "Kawaida", + "Location" : "Mahali/eneo", + "Nextcloud" : "Nextcloud", + "SFTP" : "SFTP", + "Root" : "Mzizi", + "SFTP with secret key login" : " SFTP na kuingia kwa ufunguo wa siri", + "SMB/CIFS" : "SMB/CIFS", + "Share" : "Shirikisha", + "Show hidden files" : "Onesha mafaili yaliyofichwa", + "Case sensitive file system" : "Mfumo wa faili nyeti wa kesi", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Kuizima kutaruhusu kutumia mfumo wa faili usiojali kesi, lakini inakuja na adhabu ya utendakazi", + "Verify ACL access when listing files" : "Thibitisha ufikiaji wa ACL unapoorodhesha faili", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Angalia ACL za kila faili au folda ndani ya saraka ili kuchuja vitu ambapo akaunti haina ruhusa ya kusoma, inakuja na adhabu ya utendaji.", + "Timeout" : "Muda umeisha", + "SMB/CIFS using OC login" : "SMB/CIFS kwa kutumia kuingia kwa OC", + "Login as share" : "Ingia kama kushiriki", + "OpenStack Object Storage" : "Hifadhi ya Kitu cha OpenStack", + "Service name" : "Jina la huduma", + "Request timeout (seconds)" : "Muda wa ombi umeisha (sekunde)", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Usaidizi wa cURL katika PHP haujawezeshwa au kusakinishwa. Upachikaji wa %s hauwezekani. Tafadhali muulize msimamizi wa mfumo wako aisakinishe.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Usaidizi wa FTP katika PHP haujawezeshwa au kusakinishwa. Upachikaji wa %s hauwezekani. Tafadhali muulize msimamizi wa mfumo wako aisakinishe.", + "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" haijasakinishwa. Haiwezekani kupachika %2$s. Tafadhali muulize msimamizi wako wa mfumo aisakinishe.", + "External storage" : " Hifadhi ya nje", + "External storage support" : "Usaidizi wa hifadhi ya nje", + "Adds basic external storage support" : "Huongeza usaidizi msingi wa hifadhi ya nje", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Programu hii inawawezesha wasimamizi kusanidi miunganisho kwa watoa huduma wa hifadhi ya nje, kama vile seva za FTP, maduka ya vitu vya S3 au SWIFT, seva nyingine za Nextcloud, seva za WebDAV, na zaidi. Utawala unaweza kuchagua aina gani za hifadhi zitakazowezesha na unaweza kuweka maeneo haya ya hifadhi kwa akaunti, kikundi au mfumo mzima. Watumiaji wataona folda mpya ikitokea kwenye saraka yao ya mizizi ya Nextcloud, ambayo wanaweza kufikia na kutumia kama folda nyingine yoyote ya Nextcloud. Hifadhi ya nje pia inaruhusu watu kushiriki faili zilizohifadhiwa katika maeneo haya ya nje. Katika matukio haya, sifa za mmiliki wa faili hutumiwa wakati mpokeaji anaomba faili kutoka kwa hifadhi ya nje, na hivyo kuhakikisha kwamba mpokeaji anaweza kufikia faili iliyoshirikiwa.\n\nHifadhi ya nje inaweza kusanidiwa kwa kutumia GUI au kwenye mstari wa amri. Chaguo hili la pili hutoa usimamizi kwa urahisi zaidi wa kusanidi viweke vingi vya hifadhi ya nje na kuweka vipaumbele vya kupachika. Maelezo zaidi yanapatikana katika uhifadhi wa nje wa hati za GUI na uhifadhi wa nje wa hati za Faili ya Usanidi.", + "Confirm" : "Thibitisha", + "Storage credentials" : "Vitambulisho vya uhifadhi", + "To access the storage, you need to provide the authentication credentials." : "Ili kufikia hifadhi, unahitaji kutoa vitambulisho vya uthibitishaji.", + "Enter the storage login" : "Ingiza kuingia kwa hifadhi", + "Enter the storage password" : "Ingiza nenosiri la kuhifadhi", + "Unable to update this external storage config. {statusMessage}" : "Imeshindwa kusasisha usanidi huu wa hifadhi ya nje.{statusMessage}", + "New configuration successfully saved" : "Mpangilio mpya umehifadhiwa", + "Enter missing credentials" : "Weka vitambulisho ambavyo havipo", + "Credentials successfully set" : "Vitambulisho vimewekwa kikamilifu", + "Error while setting credentials: {error}" : "Hitilafu wakati wa kuweka vitambulisho: {error}", + "Checking storage …" : "Inakagua hifadhi...", + "There was an error with this external storage." : "Kulikuwa na hitilafu na hifadhi hii ya nje.", + "We were unable to check the external storage {basename}" : " Hatukuweza kuangalia hifadhi ya nje {basename}", + "Examine this faulty external storage configuration" : "Chunguza usanidi huu wa hifadhi ya nje wenye hitilafu", + "Open in Files" : "Fungua ndani ya faili", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Kulikuwa na hitilafu na hifadhi hii ya nje. Je, ungependa kukagua usanidi huu wa sehemu ya kupachika kwenye ukurasa wa mipangilio?", + "External mount error" : "Hitilafu ya kupachika nje", + "List of external storage." : "Orodha ya hifadhi za nje", + "There is no external storage configured. You can configure them in your Personal settings." : "Hakuna hifadhi ya nje iliyosanidiwa. Unaweza kuzisanidi katika mipangilio yako ya Kibinafsi.", + "There is no external storage configured and you don't have the permission to configure them." : "Hakuna hifadhi ya nje iliyosanidiwa na huna ruhusa ya kuzisanidi.", + "No external storage" : "Hakuna hifadhi ya nje", + "Storage type" : "Aina za hifadhi", + "Unknown" : "Haijulikani", + "Scope" : "Upeo", + "Personal" : "Binafsi", + "System" : "Mfumo", + "Type to select account or group." : "Andika ili kuchagua akaunti au kikundi.", + "(Group)" : "(Kundi)", + "Compatibility with Mac NFD encoding (slow)" : "Utangamano na usimbaji wa Mac NFD (polepole)", + "Enable encryption" : "Washa usimbaji fiche", + "Enable previews" : "Washa uhakiki", + "Enable sharing" : "Washa ushiriki", + "Check for changes" : "Angalia mabadiliko", + "Never" : "Kamwe", + "Once every direct access" : "Mara moja kila ufikiaji wa moja kwa moja", + "Read only" : "Kusoma pekee", + "Disconnect" : "Tenganisha", + "Unknown backend: {backendName}" : "Mandhari ya nyuma yasiyojulikana: {backendName}", + "Admin defined" : "Msimamizi amefafanuliwa", + "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Ukaguzi wa hali otomatiki umezimwa kutokana na idadi kubwa ya hifadhi zilizosanidiwa, bofya ili kuangalia hali", + "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Je, una uhakika unataka kukata hifadhi hii ya nje? Itafanya hifadhi isipatikane katika Nextcloud na itasababisha kufutwa kwa faili na folda hizi kwenye kiteja chochote cha kusawazisha ambacho kimeunganishwa kwa sasa lakini hakitafuta faili na folda zozote kwenye hifadhi ya nje yenyewe.", + "Delete storage?" : "Futa hifadhi?", + "Click to recheck the configuration" : "Bofya ili kuangalia upya usanidi", + "Saved" : "Imehifadhiwa", + "Saving …" : "Inahifadhi...", + "Save" : "Hifadhi", + "Failed to save global credentials" : " Imeshindwa kuhifadhi vitambulisho vya kimataifa", + "Failed to save global credentials: {message}" : "Imeshindwa kuhifadhi vitambulisho vya kimataifa: {message}", + "No external storage configured or you don't have the permission to configure them" : "Hakuna hifadhi ya nje iliyosanidiwa au huna ruhusa ya kuzisanidi", + "Open documentation" : "Fungua nyaraka", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Hifadhi ya nje hukuwezesha kupachika huduma na vifaa vya hifadhi ya nje kama vifaa vya pili vya uhifadhi vya Nextcloud. Unaweza pia kuruhusu watu kupachika huduma zao za hifadhi ya nje", + "Folder name" : "Jina la kisanduku", + "Authentication" : "Uthibitisho", + "Configuration" : "Usanidi", + "Available for" : "Inapatikani kwa", + "Add storage" : "Ongeza hifadhi", + "All people" : "Watu wote", + "Advanced settings" : "Mipangilio ya kiwangi cha juu", + "Allow people to mount external storage" : "Ruhusu watu kupachika hifadhi ya nje", + "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "Vitambulisho vya kimataifa vinaweza kutumika kuthibitisha kwa hifadhi nyingi za nje ambazo zina vitambulisho sawa." +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/sw.json b/apps/files_external/l10n/sw.json new file mode 100644 index 00000000000..210c842ffcf --- /dev/null +++ b/apps/files_external/l10n/sw.json @@ -0,0 +1,160 @@ +{ "translations": { + "Grant access" : "Toa ufikiaji", + "Error configuring OAuth1" : "Hitilafu katika kusanidi OAuth1", + "Please provide a valid app key and secret." : "Tafadhali toa ufunguo halali wa programu na siri.", + "Error configuring OAuth2" : "Hitilafu katika kusanidi OAuth2", + "Generate keys" : "Tengeneza funguo", + "Error generating key pair" : "Hitilafu katika kuzalisha jozi za funguo", + "You are not logged in" : " Hujaingia", + "Permission denied" : " Ruhusa imekataliwa", + "Forbidden to manage local mounts" : " Hairuhusiwi kudhibiti vipandikizi vya ndani", + "Storage with ID \"%d\" not found" : "Hifadhi yenye kitambulisho \"%d\" haijapatikana", + "Invalid backend or authentication mechanism class" : "Aina batili ya nyuma au utaratibu wa uthibitishaji", + "Invalid mount point" : "Sehemu ya kupachika ni batili", + "Objectstore forbidden" : "Hifadhi ya vitu imezuiliwa", + "Invalid storage backend \"%s\"" : "Nyuma ya hifadhi ni batili \"%s\"", + "Not permitted to use backend \"%s\"" : "Hairuhusiwi kutumia backend \"%s\"", + "Not permitted to use authentication mechanism \"%s\"" : "Hairuhusiwi kutumia utaratibu wa uthibitishaji \"%s\"", + "Unsatisfied backend parameters" : "Vigezo vya mandharinyuma ambavyo havijaridhika", + "Unsatisfied authentication mechanism parameters" : "Vigezo vya utaratibu wa uthibitishaji ambavyo havijaridhika", + "Insufficient data: %s" : " Data hazitoshi: %s", + "%s" : "%s", + "Storage with ID \"%d\" is not editable by non-admins" : "Hifadhi iliyo na kitambulisho \"%d\" haiwezi kuhaririwa na wasio wasimamizi", + "Access key" : " Ufunguo wa ufikiaji", + "Secret key" : " Ufunguo wa siri", + "Builtin" : "Builtin", + "None" : "Hakuna", + "OAuth1" : "OAuth1", + "App key" : "Kitufe cha programu", + "App secret" : "Siri ya programu", + "OAuth2" : "OAuth2", + "Client ID" : "Kitambulisho cha mteja", + "Client secret" : "Siri ya mteja", + "OpenStack v2" : "OpenStack v2", + "Login" : "Ingia", + "Password" : "Nenosiri", + "Tenant name" : "Jina la mpangaji", + "Identity endpoint URL" : "URL ya mwisho wa kitambulisho", + "OpenStack v3" : "OpenStack v3", + "Domain" : "Umiliki", + "Rackspace" : "Rackspace", + "API key" : "Ufunguo wa API", + "Global credentials" : " Vitambulisho vya kimataifa", + "Log-in credentials, save in database" : "Kitambulisho cha kuingia, hifadhi katika hifadhidata", + "Login and password" : "Ingia na nenosiri", + "Log-in credentials, save in session" : "Kitambulisho cha kuingia, hifadhi katika kipindi", + "Global credentials, manually entered" : "Vitambulisho vya kimataifa, vimeingizwa kwa mikono", + "Manually entered, store in database" : "Imeingizwa kwa mikono, hifadhi kwenye hifadhidata", + "RSA public key" : "Ufunguo wa umma wa RSA", + "Public key" : "Ufunguo wa umma", + "RSA private key" : "Ufunguo wa kibinafsi wa RSA", + "Private key" : " Ufunguo wa kibinafsi", + "Kerberos default realm, defaults to \"WORKGROUP\"" : "Ufalme chaguo-msingi wa Kerberos, chaguomsingi kuwa \"WORKGROUP\"", + "Kerberos ticket Apache mode" : "Njia ya Apache ya tikiti ya Kerberos", + "Kerberos ticket" : "Tikiti za Kerberos", + "Amazon S3" : "Amazon S3", + "Bucket" : " Ndoo", + "Hostname" : "Jina la mwenyeji", + "Port" : "Port", + "Region" : "Kanda", + "Storage Class" : " Daraja la Uhifadhi", + "Enable SSL" : "Washa SSL", + "Enable Path Style" : "Washa Mtindo wa Njia", + "Legacy (v2) authentication" : "Uthibitishaji wa urithi (v2).", + "Enable multipart copy" : "Washa nakala za sehemu nyingi", + "SSE-C encryption key" : " Kitufe cha usimbaji cha SSE-C", + "WebDAV" : "WavutiDAV", + "URL" : "Url", + "Remote subfolder" : " Folda ndogo ya mbali", + "Secure https://" : "Salama https://", + "FTP" : "FTP", + "Host" : "Host", + "Secure ftps://" : "Salama ftps://", + "Local" : "Kawaida", + "Location" : "Mahali/eneo", + "Nextcloud" : "Nextcloud", + "SFTP" : "SFTP", + "Root" : "Mzizi", + "SFTP with secret key login" : " SFTP na kuingia kwa ufunguo wa siri", + "SMB/CIFS" : "SMB/CIFS", + "Share" : "Shirikisha", + "Show hidden files" : "Onesha mafaili yaliyofichwa", + "Case sensitive file system" : "Mfumo wa faili nyeti wa kesi", + "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Kuizima kutaruhusu kutumia mfumo wa faili usiojali kesi, lakini inakuja na adhabu ya utendakazi", + "Verify ACL access when listing files" : "Thibitisha ufikiaji wa ACL unapoorodhesha faili", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Angalia ACL za kila faili au folda ndani ya saraka ili kuchuja vitu ambapo akaunti haina ruhusa ya kusoma, inakuja na adhabu ya utendaji.", + "Timeout" : "Muda umeisha", + "SMB/CIFS using OC login" : "SMB/CIFS kwa kutumia kuingia kwa OC", + "Login as share" : "Ingia kama kushiriki", + "OpenStack Object Storage" : "Hifadhi ya Kitu cha OpenStack", + "Service name" : "Jina la huduma", + "Request timeout (seconds)" : "Muda wa ombi umeisha (sekunde)", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Usaidizi wa cURL katika PHP haujawezeshwa au kusakinishwa. Upachikaji wa %s hauwezekani. Tafadhali muulize msimamizi wa mfumo wako aisakinishe.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Usaidizi wa FTP katika PHP haujawezeshwa au kusakinishwa. Upachikaji wa %s hauwezekani. Tafadhali muulize msimamizi wa mfumo wako aisakinishe.", + "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" haijasakinishwa. Haiwezekani kupachika %2$s. Tafadhali muulize msimamizi wako wa mfumo aisakinishe.", + "External storage" : " Hifadhi ya nje", + "External storage support" : "Usaidizi wa hifadhi ya nje", + "Adds basic external storage support" : "Huongeza usaidizi msingi wa hifadhi ya nje", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Programu hii inawawezesha wasimamizi kusanidi miunganisho kwa watoa huduma wa hifadhi ya nje, kama vile seva za FTP, maduka ya vitu vya S3 au SWIFT, seva nyingine za Nextcloud, seva za WebDAV, na zaidi. Utawala unaweza kuchagua aina gani za hifadhi zitakazowezesha na unaweza kuweka maeneo haya ya hifadhi kwa akaunti, kikundi au mfumo mzima. Watumiaji wataona folda mpya ikitokea kwenye saraka yao ya mizizi ya Nextcloud, ambayo wanaweza kufikia na kutumia kama folda nyingine yoyote ya Nextcloud. Hifadhi ya nje pia inaruhusu watu kushiriki faili zilizohifadhiwa katika maeneo haya ya nje. Katika matukio haya, sifa za mmiliki wa faili hutumiwa wakati mpokeaji anaomba faili kutoka kwa hifadhi ya nje, na hivyo kuhakikisha kwamba mpokeaji anaweza kufikia faili iliyoshirikiwa.\n\nHifadhi ya nje inaweza kusanidiwa kwa kutumia GUI au kwenye mstari wa amri. Chaguo hili la pili hutoa usimamizi kwa urahisi zaidi wa kusanidi viweke vingi vya hifadhi ya nje na kuweka vipaumbele vya kupachika. Maelezo zaidi yanapatikana katika uhifadhi wa nje wa hati za GUI na uhifadhi wa nje wa hati za Faili ya Usanidi.", + "Confirm" : "Thibitisha", + "Storage credentials" : "Vitambulisho vya uhifadhi", + "To access the storage, you need to provide the authentication credentials." : "Ili kufikia hifadhi, unahitaji kutoa vitambulisho vya uthibitishaji.", + "Enter the storage login" : "Ingiza kuingia kwa hifadhi", + "Enter the storage password" : "Ingiza nenosiri la kuhifadhi", + "Unable to update this external storage config. {statusMessage}" : "Imeshindwa kusasisha usanidi huu wa hifadhi ya nje.{statusMessage}", + "New configuration successfully saved" : "Mpangilio mpya umehifadhiwa", + "Enter missing credentials" : "Weka vitambulisho ambavyo havipo", + "Credentials successfully set" : "Vitambulisho vimewekwa kikamilifu", + "Error while setting credentials: {error}" : "Hitilafu wakati wa kuweka vitambulisho: {error}", + "Checking storage …" : "Inakagua hifadhi...", + "There was an error with this external storage." : "Kulikuwa na hitilafu na hifadhi hii ya nje.", + "We were unable to check the external storage {basename}" : " Hatukuweza kuangalia hifadhi ya nje {basename}", + "Examine this faulty external storage configuration" : "Chunguza usanidi huu wa hifadhi ya nje wenye hitilafu", + "Open in Files" : "Fungua ndani ya faili", + "There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Kulikuwa na hitilafu na hifadhi hii ya nje. Je, ungependa kukagua usanidi huu wa sehemu ya kupachika kwenye ukurasa wa mipangilio?", + "External mount error" : "Hitilafu ya kupachika nje", + "List of external storage." : "Orodha ya hifadhi za nje", + "There is no external storage configured. You can configure them in your Personal settings." : "Hakuna hifadhi ya nje iliyosanidiwa. Unaweza kuzisanidi katika mipangilio yako ya Kibinafsi.", + "There is no external storage configured and you don't have the permission to configure them." : "Hakuna hifadhi ya nje iliyosanidiwa na huna ruhusa ya kuzisanidi.", + "No external storage" : "Hakuna hifadhi ya nje", + "Storage type" : "Aina za hifadhi", + "Unknown" : "Haijulikani", + "Scope" : "Upeo", + "Personal" : "Binafsi", + "System" : "Mfumo", + "Type to select account or group." : "Andika ili kuchagua akaunti au kikundi.", + "(Group)" : "(Kundi)", + "Compatibility with Mac NFD encoding (slow)" : "Utangamano na usimbaji wa Mac NFD (polepole)", + "Enable encryption" : "Washa usimbaji fiche", + "Enable previews" : "Washa uhakiki", + "Enable sharing" : "Washa ushiriki", + "Check for changes" : "Angalia mabadiliko", + "Never" : "Kamwe", + "Once every direct access" : "Mara moja kila ufikiaji wa moja kwa moja", + "Read only" : "Kusoma pekee", + "Disconnect" : "Tenganisha", + "Unknown backend: {backendName}" : "Mandhari ya nyuma yasiyojulikana: {backendName}", + "Admin defined" : "Msimamizi amefafanuliwa", + "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Ukaguzi wa hali otomatiki umezimwa kutokana na idadi kubwa ya hifadhi zilizosanidiwa, bofya ili kuangalia hali", + "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Je, una uhakika unataka kukata hifadhi hii ya nje? Itafanya hifadhi isipatikane katika Nextcloud na itasababisha kufutwa kwa faili na folda hizi kwenye kiteja chochote cha kusawazisha ambacho kimeunganishwa kwa sasa lakini hakitafuta faili na folda zozote kwenye hifadhi ya nje yenyewe.", + "Delete storage?" : "Futa hifadhi?", + "Click to recheck the configuration" : "Bofya ili kuangalia upya usanidi", + "Saved" : "Imehifadhiwa", + "Saving …" : "Inahifadhi...", + "Save" : "Hifadhi", + "Failed to save global credentials" : " Imeshindwa kuhifadhi vitambulisho vya kimataifa", + "Failed to save global credentials: {message}" : "Imeshindwa kuhifadhi vitambulisho vya kimataifa: {message}", + "No external storage configured or you don't have the permission to configure them" : "Hakuna hifadhi ya nje iliyosanidiwa au huna ruhusa ya kuzisanidi", + "Open documentation" : "Fungua nyaraka", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Hifadhi ya nje hukuwezesha kupachika huduma na vifaa vya hifadhi ya nje kama vifaa vya pili vya uhifadhi vya Nextcloud. Unaweza pia kuruhusu watu kupachika huduma zao za hifadhi ya nje", + "Folder name" : "Jina la kisanduku", + "Authentication" : "Uthibitisho", + "Configuration" : "Usanidi", + "Available for" : "Inapatikani kwa", + "Add storage" : "Ongeza hifadhi", + "All people" : "Watu wote", + "Advanced settings" : "Mipangilio ya kiwangi cha juu", + "Allow people to mount external storage" : "Ruhusu watu kupachika hifadhi ya nje", + "Global credentials can be used to authenticate with multiple external storages that have the same credentials." : "Vitambulisho vya kimataifa vinaweza kutumika kuthibitisha kwa hifadhi nyingi za nje ambazo zina vitambulisho sawa." +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js index f17488f7154..f735d7b3668 100644 --- a/apps/files_external/l10n/tr.js +++ b/apps/files_external/l10n/tr.js @@ -14,10 +14,10 @@ OC.L10N.register( "Invalid backend or authentication mechanism class" : "Arka yüz ya da kimlik doğrulama yöntemi sınıfı geçersiz", "Invalid mount point" : "Bağlama noktası geçersiz", "Objectstore forbidden" : "Nesne deposuna erişim kapalı", - "Invalid storage backend \"%s\"" : "\"%s\" depolama arka ucu geçersiz", - "Not permitted to use backend \"%s\"" : "\"%s\" arka ucunun kullanımına izin verilmiyor", + "Invalid storage backend \"%s\"" : "\"%s\" depolama arka yüzü geçersiz", + "Not permitted to use backend \"%s\"" : "\"%s\" arka yüzünün kullanılmasına izin verilmiyor", "Not permitted to use authentication mechanism \"%s\"" : "\"%s\" kimlik doğrulama mekanizmasına izin verilmiyor", - "Unsatisfied backend parameters" : "Arka uç parametreleri yetersiz", + "Unsatisfied backend parameters" : "Arka yüz parametreleri yetersiz", "Unsatisfied authentication mechanism parameters" : "Kimlik doğrulama yöntemi parametreleri yetersiz", "Insufficient data: %s" : "Veriler yetersiz: %s", "%s" : "%s", @@ -36,7 +36,7 @@ OC.L10N.register( "Login" : "Kullanıcı adı", "Password" : "Parola", "Tenant name" : "Kiracı adı", - "Identity endpoint URL" : "Kimlik arka uç noktası adresi", + "Identity endpoint URL" : "Kimlik arka yüzü noktası adresi", "OpenStack v3" : "OpenStack v3", "Domain" : "Etki alanı", "Rackspace" : "Rackspace", @@ -91,8 +91,8 @@ OC.L10N.register( "OpenStack Object Storage" : "OpenStack nesne depolama", "Service name" : "Hizmet adı", "Request timeout (seconds)" : "İstek zaman aşımı (saniye)", - "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.", - "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Kurulması için lütfen BT yöneticiniz ile görüşün.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Kurulması için lütfen BT yöneticiniz ile görüşün.", "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" kurulmamış. %2$s\" bağlanamaz. Lütfen kurulum için BT yöneticiniz ile görüşün.", "External storage" : "Dış depolama", "External storage support" : "Dış depolama desteği", @@ -135,9 +135,9 @@ OC.L10N.register( "Once every direct access" : "Her doğrudan erişimde bir kez", "Read only" : "Salt okunur", "Disconnect" : "Bağlantıyı kes", - "Unknown backend: {backendName}" : "Bilinmeyen arka uç: {backendName}", + "Unknown backend: {backendName}" : "Arka yüz bilinmiyor: {backendName}", "Admin defined" : "Yönetici ayarlamış", - "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama yapılandırılmış olduğundan otomatik durum denetimi kullanımdan kaldırıldı. Durumu denetlemek için tıklayın", + "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama alanı yapılandırılmış olduğundan otomatik durum denetimi kapatıldı. Durumu denetlemek için tıklayın", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Bu dış depolama biriminin bağlantısını kesmek istediğinize emin misiniz? Bu işlem, depolamayı Nextcloud üzerinden kaldırırarak, şu anda bağlı olan ve eşitlenen herhangi bir istemcide bu dosya ve klasörlerin silinmesine yol açar. Ancak dış depolama üzerindeki hiçbir dosya ve klasör silinmez.", "Delete storage?" : "Depolama silinsin mi?", "Click to recheck the configuration" : "Yapılandırmayı yeniden denetlemek için tıklayın", diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json index 20f805c4ea3..1bdba9f1a4d 100644 --- a/apps/files_external/l10n/tr.json +++ b/apps/files_external/l10n/tr.json @@ -12,10 +12,10 @@ "Invalid backend or authentication mechanism class" : "Arka yüz ya da kimlik doğrulama yöntemi sınıfı geçersiz", "Invalid mount point" : "Bağlama noktası geçersiz", "Objectstore forbidden" : "Nesne deposuna erişim kapalı", - "Invalid storage backend \"%s\"" : "\"%s\" depolama arka ucu geçersiz", - "Not permitted to use backend \"%s\"" : "\"%s\" arka ucunun kullanımına izin verilmiyor", + "Invalid storage backend \"%s\"" : "\"%s\" depolama arka yüzü geçersiz", + "Not permitted to use backend \"%s\"" : "\"%s\" arka yüzünün kullanılmasına izin verilmiyor", "Not permitted to use authentication mechanism \"%s\"" : "\"%s\" kimlik doğrulama mekanizmasına izin verilmiyor", - "Unsatisfied backend parameters" : "Arka uç parametreleri yetersiz", + "Unsatisfied backend parameters" : "Arka yüz parametreleri yetersiz", "Unsatisfied authentication mechanism parameters" : "Kimlik doğrulama yöntemi parametreleri yetersiz", "Insufficient data: %s" : "Veriler yetersiz: %s", "%s" : "%s", @@ -34,7 +34,7 @@ "Login" : "Kullanıcı adı", "Password" : "Parola", "Tenant name" : "Kiracı adı", - "Identity endpoint URL" : "Kimlik arka uç noktası adresi", + "Identity endpoint URL" : "Kimlik arka yüzü noktası adresi", "OpenStack v3" : "OpenStack v3", "Domain" : "Etki alanı", "Rackspace" : "Rackspace", @@ -89,8 +89,8 @@ "OpenStack Object Storage" : "OpenStack nesne depolama", "Service name" : "Hizmet adı", "Request timeout (seconds)" : "İstek zaman aşımı (saniye)", - "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.", - "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Kurulması için lütfen BT yöneticiniz ile görüşün.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Kurulması için lütfen BT yöneticiniz ile görüşün.", "\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" kurulmamış. %2$s\" bağlanamaz. Lütfen kurulum için BT yöneticiniz ile görüşün.", "External storage" : "Dış depolama", "External storage support" : "Dış depolama desteği", @@ -133,9 +133,9 @@ "Once every direct access" : "Her doğrudan erişimde bir kez", "Read only" : "Salt okunur", "Disconnect" : "Bağlantıyı kes", - "Unknown backend: {backendName}" : "Bilinmeyen arka uç: {backendName}", + "Unknown backend: {backendName}" : "Arka yüz bilinmiyor: {backendName}", "Admin defined" : "Yönetici ayarlamış", - "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama yapılandırılmış olduğundan otomatik durum denetimi kullanımdan kaldırıldı. Durumu denetlemek için tıklayın", + "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama alanı yapılandırılmış olduğundan otomatik durum denetimi kapatıldı. Durumu denetlemek için tıklayın", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Bu dış depolama biriminin bağlantısını kesmek istediğinize emin misiniz? Bu işlem, depolamayı Nextcloud üzerinden kaldırırarak, şu anda bağlı olan ve eşitlenen herhangi bir istemcide bu dosya ve klasörlerin silinmesine yol açar. Ancak dış depolama üzerindeki hiçbir dosya ve klasör silinmez.", "Delete storage?" : "Depolama silinsin mi?", "Click to recheck the configuration" : "Yapılandırmayı yeniden denetlemek için tıklayın", diff --git a/apps/files_external/l10n/uk.js b/apps/files_external/l10n/uk.js index f697df74fcb..36ca4ecc62a 100644 --- a/apps/files_external/l10n/uk.js +++ b/apps/files_external/l10n/uk.js @@ -64,6 +64,7 @@ OC.L10N.register( "Enable Path Style" : "Включити стиль шляху", "Legacy (v2) authentication" : "Застарілий метод авторизації (v2) ", "Enable multipart copy" : "Дозволити множинне копіювання", + "SSE-C encryption key" : "Ключ шифрування SSE-C", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Віддалений підкаталог", @@ -83,6 +84,7 @@ OC.L10N.register( "Case sensitive file system" : "Файлова система, чутлива до регістру символів", "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Вимкнення цього параметра дозволить використовувати файлову систему, нечутливу до регістру, але це також призведе до зниження продуктивності", "Verify ACL access when listing files" : "Перевірте доступ до ACL під час переліку файлів", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Перевірте ACL для кожного файлу або папки в каталозі, щоб відфільтрувати елементи, на які обліковий запис не має дозволів на читання, що призводить до зниження продуктивності", "Timeout" : "Час вичерпано", "SMB/CIFS using OC login" : "SMB/CIFS з використанням входу OC", "Login as share" : "Увійти під спільним доступом", @@ -95,10 +97,18 @@ OC.L10N.register( "External storage" : "Зовнішнє сховище", "External storage support" : "Підтримка зовнішнього сховища", "Adds basic external storage support" : "Додає базову підтримку зовнішньої пам’яті", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Ця програма дозволяє адміністраторам налаштовувати підключення до зовнішніх сховищ, таких як FTP-сервери, сховища об'єктів S3 або SWIFT, інші сервери Nextcloud, WebDAV-сервери тощо. Адміністрація може вибирати, які типи сховищ увімкнути, і може монтувати ці сховища для облікового запису, групи або всієї системи. Користувачі побачать нову папку в кореневому каталозі Nextcloud, до якої вони зможуть отримати доступ і використовувати її як будь-яку іншу папку Nextcloud. Зовнішнє сховище також дозволяє користувачам ділитися файлами, що зберігаються в цих зовнішніх сховищах. У цих випадках облікові дані власника файлу використовуються, коли одержувач запитує файл із зовнішнього сховища, таким чином гарантуючи, що одержувач зможе отримати доступ до файлу, до якого надано спільний доступ.\n\nЗовнішнє сховище можна налаштувати за допомогою графічного інтерфейсу або командного рядка. Другий варіант надає адміністратору більше можливостей для налаштування масового монтування зовнішнього сховища і встановлення пріоритетів монтування. Докладнішу інформацію можна знайти у документації до графічного інтерфейсу зовнішнього сховища та документації до файлу конфігурації зовнішнього сховища.", "Confirm" : "Підтвердити", + "Storage credentials" : "Облікові дані для зберігання", + "To access the storage, you need to provide the authentication credentials." : "Щоб отримати доступ до сховища, вам потрібно надати облікові дані для автентифікації.", + "Enter the storage login" : "Введіть логін до сховища", + "Enter the storage password" : "Введіть пароль до сховища", "Unable to update this external storage config. {statusMessage}" : "Не вдалося оновити конфігурацію цього зовнішнього сховища. {statusMessage}", "New configuration successfully saved" : "Нову конфігурацію успішно збережено", "Enter missing credentials" : "Зазначте відсутні дані авторизації", + "Credentials successfully set" : "Облікові дані успішно встановлено", + "Error while setting credentials: {error}" : "Помилка під час встановлення облікових даних: {error}", + "Checking storage …" : "Перевірка сховища ...", "There was an error with this external storage." : "З цим зовнішнім сховищем виникла помилка.", "We were unable to check the external storage {basename}" : "Нам не вдалося перевірити зовнішнє сховище {basename}", "Examine this faulty external storage configuration" : "Перевірте цю несправну конфігурацію зовнішнього сховища", @@ -125,6 +135,7 @@ OC.L10N.register( "Once every direct access" : "Один раз при кожному прямому доступі", "Read only" : "Тільки читання", "Disconnect" : "Від'єднати", + "Unknown backend: {backendName}" : "Невідомий бекенд: {backendName}", "Admin defined" : "Визначено адміністратором", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Автоматична перевірка статусу вимкнена через велику кількість налаштованих сховищ, натисніть, щоб перевірити статус", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Ви впевнені, що бажаєте від’єднати це зовнішнє сховище? Це призведе до того, що сховище стане недоступним у хмарі Nextcloud, а також вилучить файли та каталоги на клієнтських пристроях, які наразі синхронізуються з хмарою. Файли та каталоги у зовнішньому сховищі не буде вилучено.", @@ -133,8 +144,11 @@ OC.L10N.register( "Saved" : "Збережено", "Saving …" : "Збереження …", "Save" : "Зберегти", + "Failed to save global credentials" : "Не вдалося зберегти глобальні облікові дані", + "Failed to save global credentials: {message}" : "Не вдалося зберегти глобальні облікові дані: {повідомлення}", "No external storage configured or you don't have the permission to configure them" : "Зовнішнє сховище не налаштовано або ви не маєте дозволу на їх налаштування", "Open documentation" : "Відкрити документацію", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Зовнішнє сховище дає змогу підключати зовнішні сервіси та пристрої для зберігання даних як вторинні пристрої Nextcloud. Ви також можете дозволити користувачам монтувати власні зовнішні сховища.", "Folder name" : "Назва каталогу", "Authentication" : "Авторизація", "Configuration" : "Налаштування", diff --git a/apps/files_external/l10n/uk.json b/apps/files_external/l10n/uk.json index a650d9d93ce..6bed2dc94c7 100644 --- a/apps/files_external/l10n/uk.json +++ b/apps/files_external/l10n/uk.json @@ -62,6 +62,7 @@ "Enable Path Style" : "Включити стиль шляху", "Legacy (v2) authentication" : "Застарілий метод авторизації (v2) ", "Enable multipart copy" : "Дозволити множинне копіювання", + "SSE-C encryption key" : "Ключ шифрування SSE-C", "WebDAV" : "WebDAV", "URL" : "URL", "Remote subfolder" : "Віддалений підкаталог", @@ -81,6 +82,7 @@ "Case sensitive file system" : "Файлова система, чутлива до регістру символів", "Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Вимкнення цього параметра дозволить використовувати файлову систему, нечутливу до регістру, але це також призведе до зниження продуктивності", "Verify ACL access when listing files" : "Перевірте доступ до ACL під час переліку файлів", + "Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Перевірте ACL для кожного файлу або папки в каталозі, щоб відфільтрувати елементи, на які обліковий запис не має дозволів на читання, що призводить до зниження продуктивності", "Timeout" : "Час вичерпано", "SMB/CIFS using OC login" : "SMB/CIFS з використанням входу OC", "Login as share" : "Увійти під спільним доступом", @@ -93,10 +95,18 @@ "External storage" : "Зовнішнє сховище", "External storage support" : "Підтримка зовнішнього сховища", "Adds basic external storage support" : "Додає базову підтримку зовнішньої пам’яті", + "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Ця програма дозволяє адміністраторам налаштовувати підключення до зовнішніх сховищ, таких як FTP-сервери, сховища об'єктів S3 або SWIFT, інші сервери Nextcloud, WebDAV-сервери тощо. Адміністрація може вибирати, які типи сховищ увімкнути, і може монтувати ці сховища для облікового запису, групи або всієї системи. Користувачі побачать нову папку в кореневому каталозі Nextcloud, до якої вони зможуть отримати доступ і використовувати її як будь-яку іншу папку Nextcloud. Зовнішнє сховище також дозволяє користувачам ділитися файлами, що зберігаються в цих зовнішніх сховищах. У цих випадках облікові дані власника файлу використовуються, коли одержувач запитує файл із зовнішнього сховища, таким чином гарантуючи, що одержувач зможе отримати доступ до файлу, до якого надано спільний доступ.\n\nЗовнішнє сховище можна налаштувати за допомогою графічного інтерфейсу або командного рядка. Другий варіант надає адміністратору більше можливостей для налаштування масового монтування зовнішнього сховища і встановлення пріоритетів монтування. Докладнішу інформацію можна знайти у документації до графічного інтерфейсу зовнішнього сховища та документації до файлу конфігурації зовнішнього сховища.", "Confirm" : "Підтвердити", + "Storage credentials" : "Облікові дані для зберігання", + "To access the storage, you need to provide the authentication credentials." : "Щоб отримати доступ до сховища, вам потрібно надати облікові дані для автентифікації.", + "Enter the storage login" : "Введіть логін до сховища", + "Enter the storage password" : "Введіть пароль до сховища", "Unable to update this external storage config. {statusMessage}" : "Не вдалося оновити конфігурацію цього зовнішнього сховища. {statusMessage}", "New configuration successfully saved" : "Нову конфігурацію успішно збережено", "Enter missing credentials" : "Зазначте відсутні дані авторизації", + "Credentials successfully set" : "Облікові дані успішно встановлено", + "Error while setting credentials: {error}" : "Помилка під час встановлення облікових даних: {error}", + "Checking storage …" : "Перевірка сховища ...", "There was an error with this external storage." : "З цим зовнішнім сховищем виникла помилка.", "We were unable to check the external storage {basename}" : "Нам не вдалося перевірити зовнішнє сховище {basename}", "Examine this faulty external storage configuration" : "Перевірте цю несправну конфігурацію зовнішнього сховища", @@ -123,6 +133,7 @@ "Once every direct access" : "Один раз при кожному прямому доступі", "Read only" : "Тільки читання", "Disconnect" : "Від'єднати", + "Unknown backend: {backendName}" : "Невідомий бекенд: {backendName}", "Admin defined" : "Визначено адміністратором", "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Автоматична перевірка статусу вимкнена через велику кількість налаштованих сховищ, натисніть, щоб перевірити статус", "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Ви впевнені, що бажаєте від’єднати це зовнішнє сховище? Це призведе до того, що сховище стане недоступним у хмарі Nextcloud, а також вилучить файли та каталоги на клієнтських пристроях, які наразі синхронізуються з хмарою. Файли та каталоги у зовнішньому сховищі не буде вилучено.", @@ -131,8 +142,11 @@ "Saved" : "Збережено", "Saving …" : "Збереження …", "Save" : "Зберегти", + "Failed to save global credentials" : "Не вдалося зберегти глобальні облікові дані", + "Failed to save global credentials: {message}" : "Не вдалося зберегти глобальні облікові дані: {повідомлення}", "No external storage configured or you don't have the permission to configure them" : "Зовнішнє сховище не налаштовано або ви не маєте дозволу на їх налаштування", "Open documentation" : "Відкрити документацію", + "External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow people to mount their own external storage services." : "Зовнішнє сховище дає змогу підключати зовнішні сервіси та пристрої для зберігання даних як вторинні пристрої Nextcloud. Ви також можете дозволити користувачам монтувати власні зовнішні сховища.", "Folder name" : "Назва каталогу", "Authentication" : "Авторизація", "Configuration" : "Налаштування", diff --git a/apps/files_external/l10n/ur_PK.js b/apps/files_external/l10n/ur_PK.js deleted file mode 100644 index 34d519fc69b..00000000000 --- a/apps/files_external/l10n/ur_PK.js +++ /dev/null @@ -1,14 +0,0 @@ -OC.L10N.register( - "files_external", - { - "Personal" : "شخصی", - "Username" : "یوزر نیم", - "Password" : "پاسورڈ", - "Save" : "حفظ", - "URL" : "یو ار ایل", - "Location" : "مقام", - "Share" : "تقسیم", - "Name" : "اسم", - "Delete" : "حذف کریں" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/ur_PK.json b/apps/files_external/l10n/ur_PK.json deleted file mode 100644 index 5a51e9c5a31..00000000000 --- a/apps/files_external/l10n/ur_PK.json +++ /dev/null @@ -1,12 +0,0 @@ -{ "translations": { - "Personal" : "شخصی", - "Username" : "یوزر نیم", - "Password" : "پاسورڈ", - "Save" : "حفظ", - "URL" : "یو ار ایل", - "Location" : "مقام", - "Share" : "تقسیم", - "Name" : "اسم", - "Delete" : "حذف کریں" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_external/l10n/vi.js b/apps/files_external/l10n/vi.js deleted file mode 100644 index 0e99f70c3a4..00000000000 --- a/apps/files_external/l10n/vi.js +++ /dev/null @@ -1,27 +0,0 @@ -OC.L10N.register( - "files_external", - { - "External storage" : "Lưu trữ ngoài", - "Personal" : "Cá nhân", - "Grant access" : "Cấp quyền truy cập", - "Saved" : "Đã lưu", - "Username" : "Tên đăng nhập", - "Password" : "Mật khẩu", - "Save" : "Lưu", - "None" : "Không gì cả", - "Port" : "Cổng", - "Region" : "Vùng/miền", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Host" : "Máy chủ", - "Location" : "Vị trí", - "ownCloud" : "ownCloud", - "Share" : "Chia sẻ", - "Name" : "Tên", - "External Storage" : "Lưu trữ ngoài", - "Folder name" : "Tên thư mục", - "Configuration" : "Cấu hình", - "Add storage" : "Thêm bộ nhớ", - "Delete" : "Xóa" -}, -"nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/vi.json b/apps/files_external/l10n/vi.json deleted file mode 100644 index 90e2a0d97c3..00000000000 --- a/apps/files_external/l10n/vi.json +++ /dev/null @@ -1,25 +0,0 @@ -{ "translations": { - "External storage" : "Lưu trữ ngoài", - "Personal" : "Cá nhân", - "Grant access" : "Cấp quyền truy cập", - "Saved" : "Đã lưu", - "Username" : "Tên đăng nhập", - "Password" : "Mật khẩu", - "Save" : "Lưu", - "None" : "Không gì cả", - "Port" : "Cổng", - "Region" : "Vùng/miền", - "WebDAV" : "WebDAV", - "URL" : "URL", - "Host" : "Máy chủ", - "Location" : "Vị trí", - "ownCloud" : "ownCloud", - "Share" : "Chia sẻ", - "Name" : "Tên", - "External Storage" : "Lưu trữ ngoài", - "Folder name" : "Tên thư mục", - "Configuration" : "Cấu hình", - "Add storage" : "Thêm bộ nhớ", - "Delete" : "Xóa" -},"pluralForm" :"nplurals=1; plural=0;" -}
\ No newline at end of file diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index 5dae81d558c..3ded9f7cca0 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -53,8 +54,6 @@ use OCP\Files\Config\IMountProviderCollection; use OCP\Group\Events\GroupDeletedEvent; use OCP\User\Events\UserDeletedEvent; -require_once __DIR__ . '/../../3rdparty/autoload.php'; - /** * @package OCA\Files_External\AppInfo */ diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php index ecb635c052a..4d5e264bfaf 100644 --- a/apps/files_external/lib/Command/Applicable.php +++ b/apps/files_external/lib/Command/Applicable.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Backends.php b/apps/files_external/lib/Command/Backends.php index 399bdadcacf..7fab0477adf 100644 --- a/apps/files_external/lib/Command/Backends.php +++ b/apps/files_external/lib/Command/Backends.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index 0736749f6d9..883b4a2f3e7 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index 4396d2e2b13..3307015518a 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php index 3e6ccf751a8..9f121250f7d 100644 --- a/apps/files_external/lib/Command/Delete.php +++ b/apps/files_external/lib/Command/Delete.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Dependencies.php b/apps/files_external/lib/Command/Dependencies.php index 1bb57778129..d2db8a8c9af 100644 --- a/apps/files_external/lib/Command/Dependencies.php +++ b/apps/files_external/lib/Command/Dependencies.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only diff --git a/apps/files_external/lib/Command/Export.php b/apps/files_external/lib/Command/Export.php index 0735d94d89d..59484d0e788 100644 --- a/apps/files_external/lib/Command/Export.php +++ b/apps/files_external/lib/Command/Export.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php index bf36bf5d5c1..a9ed76fbe40 100644 --- a/apps/files_external/lib/Command/Import.php +++ b/apps/files_external/lib/Command/Import.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -112,10 +113,10 @@ class Import extends Base { foreach ($mounts as $mount) { foreach ($existingMounts as $existingMount) { if ( - $existingMount->getMountPoint() === $mount->getMountPoint() && - $existingMount->getApplicableGroups() === $mount->getApplicableGroups() && - $existingMount->getApplicableUsers() === $mount->getApplicableUsers() && - $existingMount->getBackendOptions() === $mount->getBackendOptions() + $existingMount->getMountPoint() === $mount->getMountPoint() + && $existingMount->getApplicableGroups() === $mount->getApplicableGroups() + && $existingMount->getApplicableUsers() === $mount->getApplicableUsers() + && $existingMount->getBackendOptions() === $mount->getBackendOptions() ) { $output->writeln('<error>Duplicate mount (' . $mount->getMountPoint() . ')</error>'); return self::FAILURE; diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index 84c1b569e9d..350916b6c2c 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Option.php b/apps/files_external/lib/Command/Option.php index 6051c9c5fbd..3fda3fcb3cf 100644 --- a/apps/files_external/lib/Command/Option.php +++ b/apps/files_external/lib/Command/Option.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Scan.php b/apps/files_external/lib/Command/Scan.php index 4f29dae1ce0..75d98878baa 100644 --- a/apps/files_external/lib/Command/Scan.php +++ b/apps/files_external/lib/Command/Scan.php @@ -54,6 +54,11 @@ class Scan extends StorageAuthBase { InputOption::VALUE_OPTIONAL, 'The path in the storage to scan', '' + )->addOption( + 'unscanned', + '', + InputOption::VALUE_NONE, + 'only scan files which are marked as not fully scanned' ); parent::configure(); } @@ -84,7 +89,15 @@ class Scan extends StorageAuthBase { }); try { - $scanner->scan($path); + if ($input->getOption('unscanned')) { + if ($path !== '') { + $output->writeln('<error>--unscanned is mutually exclusive with --path</error>'); + return 1; + } + $scanner->backgroundScan(); + } else { + $scanner->scan($path); + } } catch (LockedException $e) { if (is_string($e->getReadablePath()) && str_starts_with($e->getReadablePath(), 'scanner::')) { if ($e->getReadablePath() === 'scanner::') { diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php index 32c94fc582a..ecebbe0f7e6 100644 --- a/apps/files_external/lib/Command/Verify.php +++ b/apps/files_external/lib/Command/Verify.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -96,7 +97,6 @@ class Verify extends Base { MountConfig::getBackendStatus( $backend->getStorageClass(), $storage->getBackendOptions(), - false ) ); } catch (InsufficientDataForMeaningfulAnswerException $e) { diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php index db53c8cf6c9..a46c0fd5c66 100644 --- a/apps/files_external/lib/Config/ConfigAdapter.php +++ b/apps/files_external/lib/Config/ConfigAdapter.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Config/ExternalMountPoint.php b/apps/files_external/lib/Config/ExternalMountPoint.php index 0dc2eab5120..97569ed2913 100644 --- a/apps/files_external/lib/Config/ExternalMountPoint.php +++ b/apps/files_external/lib/Config/ExternalMountPoint.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Config/IConfigHandler.php b/apps/files_external/lib/Config/IConfigHandler.php index 2f1604e232b..9e8283cc58b 100644 --- a/apps/files_external/lib/Config/IConfigHandler.php +++ b/apps/files_external/lib/Config/IConfigHandler.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Config/SimpleSubstitutionTrait.php b/apps/files_external/lib/Config/SimpleSubstitutionTrait.php index 21269d7526e..85a76054fa8 100644 --- a/apps/files_external/lib/Config/SimpleSubstitutionTrait.php +++ b/apps/files_external/lib/Config/SimpleSubstitutionTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Config/UserContext.php b/apps/files_external/lib/Config/UserContext.php index 6fe679c60b2..fb5c79a9329 100644 --- a/apps/files_external/lib/Config/UserContext.php +++ b/apps/files_external/lib/Config/UserContext.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Config/UserPlaceholderHandler.php b/apps/files_external/lib/Config/UserPlaceholderHandler.php index ec91df5fb7a..d158e6923c1 100644 --- a/apps/files_external/lib/Config/UserPlaceholderHandler.php +++ b/apps/files_external/lib/Config/UserPlaceholderHandler.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/ConfigLexicon.php b/apps/files_external/lib/ConfigLexicon.php index e162efc92cf..154f76c1989 100644 --- a/apps/files_external/lib/ConfigLexicon.php +++ b/apps/files_external/lib/ConfigLexicon.php @@ -8,30 +8,30 @@ declare(strict_types=1); namespace OCA\Files_External; -use NCU\Config\Lexicon\ConfigLexiconEntry; -use NCU\Config\Lexicon\ConfigLexiconStrictness; -use NCU\Config\Lexicon\IConfigLexicon; -use NCU\Config\ValueType; +use OCP\Config\Lexicon\Entry; +use OCP\Config\Lexicon\ILexicon; +use OCP\Config\Lexicon\Strictness; +use OCP\Config\ValueType; /** * Config Lexicon for files_sharing. * * Please Add & Manage your Config Keys in that file and keep the Lexicon up to date! * - * {@see IConfigLexicon} + * {@see ILexicon} */ -class ConfigLexicon implements IConfigLexicon { +class ConfigLexicon implements ILexicon { public const ALLOW_USER_MOUNTING = 'allow_user_mounting'; public const USER_MOUNTING_BACKENDS = 'user_mounting_backends'; - public function getStrictness(): ConfigLexiconStrictness { - return ConfigLexiconStrictness::NOTICE; + public function getStrictness(): Strictness { + return Strictness::NOTICE; } public function getAppConfigs(): array { return [ - new ConfigLexiconEntry(self::ALLOW_USER_MOUNTING, ValueType::BOOL, false, 'allow users to mount their own external filesystems', true), - new ConfigLexiconEntry(self::USER_MOUNTING_BACKENDS, ValueType::STRING, '', 'list of mounting backends available for users', true), + new Entry(self::ALLOW_USER_MOUNTING, ValueType::BOOL, false, 'allow users to mount their own external filesystems', true), + new Entry(self::USER_MOUNTING_BACKENDS, ValueType::STRING, '', 'list of mounting backends available for users', true), ]; } diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php index 4d5497b73cb..5cee6422530 100644 --- a/apps/files_external/lib/Controller/AjaxController.php +++ b/apps/files_external/lib/Controller/AjaxController.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php index 466c4f6f551..e7274c9cfb6 100644 --- a/apps/files_external/lib/Controller/GlobalStoragesController.php +++ b/apps/files_external/lib/Controller/GlobalStoragesController.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -132,7 +133,6 @@ class GlobalStoragesController extends StoragesController { * @param array $applicableUsers users for which to mount the storage * @param array $applicableGroups groups for which to mount the storage * @param int $priority priority - * @param bool $testOnly whether to storage should only test the connection or do more things * * @return DataResponse */ @@ -147,7 +147,6 @@ class GlobalStoragesController extends StoragesController { $applicableUsers, $applicableGroups, $priority, - $testOnly = true, ) { $storage = $this->createStorage( $mountPoint, @@ -180,7 +179,7 @@ class GlobalStoragesController extends StoragesController { ); } - $this->updateStorageStatus($storage, $testOnly); + $this->updateStorageStatus($storage); return new DataResponse( $storage->jsonSerialize(true), diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index 72bcbd48a4c..df3a4528054 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -212,9 +213,8 @@ abstract class StoragesController extends Controller { * on whether the remote storage is available or not. * * @param StorageConfig $storage storage configuration - * @param bool $testOnly whether to storage should only test the connection or do more things */ - protected function updateStorageStatus(StorageConfig &$storage, $testOnly = true) { + protected function updateStorageStatus(StorageConfig &$storage) { try { $this->manipulateStorageConfig($storage); @@ -225,8 +225,6 @@ abstract class StoragesController extends Controller { MountConfig::getBackendStatus( $backend->getStorageClass(), $storage->getBackendOptions(), - false, - $testOnly ) ); } catch (InsufficientDataForMeaningfulAnswerException $e) { @@ -267,15 +265,14 @@ abstract class StoragesController extends Controller { * Get an external storage entry. * * @param int $id storage id - * @param bool $testOnly whether to storage should only test the connection or do more things * * @return DataResponse */ - public function show(int $id, $testOnly = true) { + public function show(int $id) { try { $storage = $this->service->getStorage($id); - $this->updateStorageStatus($storage, $testOnly); + $this->updateStorageStatus($storage); } catch (NotFoundException $e) { return new DataResponse( [ diff --git a/apps/files_external/lib/Controller/UserGlobalStoragesController.php b/apps/files_external/lib/Controller/UserGlobalStoragesController.php index a7c4fc61997..88a9f936401 100644 --- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php +++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -96,15 +97,14 @@ class UserGlobalStoragesController extends StoragesController { * Get an external storage entry. * * @param int $id storage id - * @param bool $testOnly whether to storage should only test the connection or do more things * @return DataResponse */ #[NoAdminRequired] - public function show($id, $testOnly = true) { + public function show($id) { try { $storage = $this->service->getStorage($id); - $this->updateStorageStatus($storage, $testOnly); + $this->updateStorageStatus($storage); } catch (NotFoundException $e) { return new DataResponse( [ @@ -132,7 +132,6 @@ class UserGlobalStoragesController extends StoragesController { * * @param int $id storage id * @param array $backendOptions backend-specific options - * @param bool $testOnly whether to storage should only test the connection or do more things * * @return DataResponse */ @@ -141,7 +140,6 @@ class UserGlobalStoragesController extends StoragesController { public function update( $id, $backendOptions, - $testOnly = true, ) { try { $storage = $this->service->getStorage($id); @@ -166,7 +164,7 @@ class UserGlobalStoragesController extends StoragesController { ); } - $this->updateStorageStatus($storage, $testOnly); + $this->updateStorageStatus($storage); $this->sanitizeStorage($storage); return new DataResponse( diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php index 6d797b5818d..7b564d57f7e 100644 --- a/apps/files_external/lib/Controller/UserStoragesController.php +++ b/apps/files_external/lib/Controller/UserStoragesController.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -84,8 +85,8 @@ class UserStoragesController extends StoragesController { * {@inheritdoc} */ #[NoAdminRequired] - public function show(int $id, $testOnly = true) { - return parent::show($id, $testOnly); + public function show(int $id) { + return parent::show($id); } /** @@ -151,7 +152,6 @@ class UserStoragesController extends StoragesController { * @param string $authMechanism authentication mechanism identifier * @param array $backendOptions backend-specific options * @param array $mountOptions backend-specific mount options - * @param bool $testOnly whether to storage should only test the connection or do more things * * @return DataResponse */ @@ -164,7 +164,6 @@ class UserStoragesController extends StoragesController { $authMechanism, $backendOptions, $mountOptions, - $testOnly = true, ) { $storage = $this->createStorage( $mountPoint, @@ -194,7 +193,7 @@ class UserStoragesController extends StoragesController { ); } - $this->updateStorageStatus($storage, $testOnly); + $this->updateStorageStatus($storage); return new DataResponse( $storage->jsonSerialize(true), diff --git a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php index 04019404a90..c86c88a13d7 100644 --- a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php +++ b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php index ebdf768cda3..dfe4a74b1b2 100644 --- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php +++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/Builtin.php b/apps/files_external/lib/Lib/Auth/Builtin.php index cd4b8a22af4..8e12a6daca6 100644 --- a/apps/files_external/lib/Lib/Auth/Builtin.php +++ b/apps/files_external/lib/Lib/Auth/Builtin.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/IUserProvided.php b/apps/files_external/lib/Lib/Auth/IUserProvided.php index 60f978f673d..2350d7f6db4 100644 --- a/apps/files_external/lib/Lib/Auth/IUserProvided.php +++ b/apps/files_external/lib/Lib/Auth/IUserProvided.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only diff --git a/apps/files_external/lib/Lib/Auth/InvalidAuth.php b/apps/files_external/lib/Lib/Auth/InvalidAuth.php index d5a6fdcbe5d..2af24f1ea07 100644 --- a/apps/files_external/lib/Lib/Auth/InvalidAuth.php +++ b/apps/files_external/lib/Lib/Auth/InvalidAuth.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud GmbH. diff --git a/apps/files_external/lib/Lib/Auth/NullMechanism.php b/apps/files_external/lib/Lib/Auth/NullMechanism.php index 7847c111415..8e2e5b656b2 100644 --- a/apps/files_external/lib/Lib/Auth/NullMechanism.php +++ b/apps/files_external/lib/Lib/Auth/NullMechanism.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php b/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php index 688e04c4210..054c33f3b50 100644 --- a/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php +++ b/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php b/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php index b6c1e1d9557..beaf73c2344 100644 --- a/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php +++ b/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php index 3be4169831b..3b1c9f123af 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php index a47d2ea0ca8..b1d1068e586 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php index ee23c28b993..916b496b506 100644 --- a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php +++ b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2015 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php index 57df6316361..ce38140b6ee 100644 --- a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php +++ b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2015 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/Password/Password.php b/apps/files_external/lib/Lib/Auth/Password/Password.php index e3393233840..d4291148e3e 100644 --- a/apps/files_external/lib/Lib/Auth/Password/Password.php +++ b/apps/files_external/lib/Lib/Auth/Password/Password.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php index 8af82ab228c..8f161073771 100644 --- a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php +++ b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php index 7f937cf14c1..b158392f6eb 100644 --- a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php +++ b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2015 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index 87072299d6d..ad95c743d2d 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php index 8c2e2f3d6ec..8f58b71d5ac 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php b/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php index e7a0884d1bd..9210209192a 100644 --- a/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php +++ b/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Lib/Backend/AmazonS3.php b/apps/files_external/lib/Lib/Backend/AmazonS3.php index f71ca40cdfc..464b03b55e0 100644 --- a/apps/files_external/lib/Lib/Backend/AmazonS3.php +++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php index f965e246d42..f7500ee24a4 100644 --- a/apps/files_external/lib/Lib/Backend/Backend.php +++ b/apps/files_external/lib/Lib/Backend/Backend.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/DAV.php b/apps/files_external/lib/Lib/Backend/DAV.php index 9eb206f0272..dea9e7c5e77 100644 --- a/apps/files_external/lib/Lib/Backend/DAV.php +++ b/apps/files_external/lib/Lib/Backend/DAV.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/FTP.php b/apps/files_external/lib/Lib/Backend/FTP.php index cdf7d187b4d..72a8184c9b9 100644 --- a/apps/files_external/lib/Lib/Backend/FTP.php +++ b/apps/files_external/lib/Lib/Backend/FTP.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/InvalidBackend.php b/apps/files_external/lib/Lib/Backend/InvalidBackend.php index 6082d46bd67..48912c0e49e 100644 --- a/apps/files_external/lib/Lib/Backend/InvalidBackend.php +++ b/apps/files_external/lib/Lib/Backend/InvalidBackend.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud GmbH. diff --git a/apps/files_external/lib/Lib/Backend/LegacyBackend.php b/apps/files_external/lib/Lib/Backend/LegacyBackend.php index a74412e8373..9c7e5b01bc3 100644 --- a/apps/files_external/lib/Lib/Backend/LegacyBackend.php +++ b/apps/files_external/lib/Lib/Backend/LegacyBackend.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/Local.php b/apps/files_external/lib/Lib/Backend/Local.php index 2902ba770c6..56940b8e83b 100644 --- a/apps/files_external/lib/Lib/Backend/Local.php +++ b/apps/files_external/lib/Lib/Backend/Local.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/OwnCloud.php b/apps/files_external/lib/Lib/Backend/OwnCloud.php index c0bd6891864..0c0e2c6d300 100644 --- a/apps/files_external/lib/Lib/Backend/OwnCloud.php +++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/SFTP.php b/apps/files_external/lib/Lib/Backend/SFTP.php index 93a5d87a5ff..0926cf7fd93 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP.php +++ b/apps/files_external/lib/Lib/Backend/SFTP.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/SFTP_Key.php b/apps/files_external/lib/Lib/Backend/SFTP_Key.php index a657dce66e5..278fae3fba7 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP_Key.php +++ b/apps/files_external/lib/Lib/Backend/SFTP_Key.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php index 3549f69cbe3..e86ad98880c 100644 --- a/apps/files_external/lib/Lib/Backend/SMB.php +++ b/apps/files_external/lib/Lib/Backend/SMB.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,8 +9,8 @@ namespace OCA\Files_External\Lib\Backend; use Icewind\SMB\BasicAuth; -use Icewind\SMB\KerberosApacheAuth; use Icewind\SMB\KerberosAuth; +use Icewind\SMB\KerberosTicket; use Icewind\SMB\Native\NativeServer; use Icewind\SMB\Wrapped\Server; use OCA\Files_External\Lib\Auth\AuthMechanism; @@ -59,10 +60,7 @@ class SMB extends Backend { ->setLegacyAuthMechanism($legacyAuth); } - /** - * @return void - */ - public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) { + public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null): void { $auth = $storage->getAuthMechanism(); if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) { if (!is_string($storage->getBackendOption('user')) || !is_string($storage->getBackendOption('password'))) { @@ -84,33 +82,33 @@ class SMB extends Backend { throw new \InvalidArgumentException('invalid authentication backend'); } $credentialsStore = $auth->getCredentialsStore(); - $kerbAuth = new KerberosApacheAuth(); + $kerbAuth = new KerberosAuth(); + $kerbAuth->setTicket(KerberosTicket::fromEnv()); // check if a kerberos ticket is available, else fallback to session credentials - if ($kerbAuth->checkTicket()) { + if ($kerbAuth->getTicket()?->isValid()) { $smbAuth = $kerbAuth; } else { try { $credentials = $credentialsStore->getLoginCredentials(); - $user = $credentials->getLoginName(); + $loginName = $credentials->getLoginName(); $pass = $credentials->getPassword(); - preg_match('/(.*)@(.*)/', $user, $matches); + preg_match('/(.*)@(.*)/', $loginName, $matches); $realm = $storage->getBackendOption('default_realm'); if (empty($realm)) { $realm = 'WORKGROUP'; } if (count($matches) === 0) { - $username = $user; + $username = $loginName; $workgroup = $realm; } else { - $username = $matches[1]; - $workgroup = $matches[2]; + [, $username, $workgroup] = $matches; } $smbAuth = new BasicAuth( $username, $workgroup, $pass ); - } catch (\Exception $e) { + } catch (\Exception) { throw new InsufficientDataForMeaningfulAnswerException('No session credentials saved'); } } @@ -124,7 +122,7 @@ class SMB extends Backend { $storage->setBackendOption('auth', $smbAuth); } - public function checkDependencies() { + public function checkDependencies(): array { $system = \OCP\Server::get(SystemBridge::class); if (NativeServer::available($system)) { return []; diff --git a/apps/files_external/lib/Lib/Backend/SMB_OC.php b/apps/files_external/lib/Lib/Backend/SMB_OC.php index 55edec8a464..bcb8d0fbf16 100644 --- a/apps/files_external/lib/Lib/Backend/SMB_OC.php +++ b/apps/files_external/lib/Lib/Backend/SMB_OC.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Backend/Swift.php b/apps/files_external/lib/Lib/Backend/Swift.php index 386604e6e1d..37527ba3dbb 100644 --- a/apps/files_external/lib/Lib/Backend/Swift.php +++ b/apps/files_external/lib/Lib/Backend/Swift.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php b/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php index 1d0cc3cca78..0c2e90a243c 100644 --- a/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php +++ b/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Config/IBackendProvider.php b/apps/files_external/lib/Lib/Config/IBackendProvider.php index 3f66966950d..44c460c3138 100644 --- a/apps/files_external/lib/Lib/Config/IBackendProvider.php +++ b/apps/files_external/lib/Lib/Config/IBackendProvider.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php index 3c668c6b83d..a73dd2df967 100644 --- a/apps/files_external/lib/Lib/DefinitionParameter.php +++ b/apps/files_external/lib/Lib/DefinitionParameter.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/DependencyTrait.php b/apps/files_external/lib/Lib/DependencyTrait.php index 1d112532128..644132b82bc 100644 --- a/apps/files_external/lib/Lib/DependencyTrait.php +++ b/apps/files_external/lib/Lib/DependencyTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/FrontendDefinitionTrait.php b/apps/files_external/lib/Lib/FrontendDefinitionTrait.php index 5602345fe89..0f280d1d486 100644 --- a/apps/files_external/lib/Lib/FrontendDefinitionTrait.php +++ b/apps/files_external/lib/Lib/FrontendDefinitionTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/IFrontendDefinition.php b/apps/files_external/lib/Lib/IFrontendDefinition.php index 0184d5f536c..c8b06a1c30b 100644 --- a/apps/files_external/lib/Lib/IFrontendDefinition.php +++ b/apps/files_external/lib/Lib/IFrontendDefinition.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Lib/IIdentifier.php b/apps/files_external/lib/Lib/IIdentifier.php index df77d02b542..0677409a3cf 100644 --- a/apps/files_external/lib/Lib/IIdentifier.php +++ b/apps/files_external/lib/Lib/IIdentifier.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Lib/IdentifierTrait.php b/apps/files_external/lib/Lib/IdentifierTrait.php index ff7bb8a465e..f5ffde32307 100644 --- a/apps/files_external/lib/Lib/IdentifierTrait.php +++ b/apps/files_external/lib/Lib/IdentifierTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php b/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php index b2400f4be28..1e872b35072 100644 --- a/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php +++ b/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php b/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php index 313d4ae8cb2..f6311fae83e 100644 --- a/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php +++ b/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/MissingDependency.php b/apps/files_external/lib/Lib/MissingDependency.php index da4cbb1de46..c2da7fcadbf 100644 --- a/apps/files_external/lib/Lib/MissingDependency.php +++ b/apps/files_external/lib/Lib/MissingDependency.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php b/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php index deaf005e2c6..2812df6ad6a 100644 --- a/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php +++ b/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Lib/PersonalMount.php b/apps/files_external/lib/Lib/PersonalMount.php index 01daddd7e2a..d9dbddd1449 100644 --- a/apps/files_external/lib/Lib/PersonalMount.php +++ b/apps/files_external/lib/Lib/PersonalMount.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/PriorityTrait.php b/apps/files_external/lib/Lib/PriorityTrait.php index fef308a56dd..fad2c07e58c 100644 --- a/apps/files_external/lib/Lib/PriorityTrait.php +++ b/apps/files_external/lib/Lib/PriorityTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/SessionStorageWrapper.php b/apps/files_external/lib/Lib/SessionStorageWrapper.php index 06bece3bf7c..8754041b2fa 100644 --- a/apps/files_external/lib/Lib/SessionStorageWrapper.php +++ b/apps/files_external/lib/Lib/SessionStorageWrapper.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 47967a3908d..5dc9e114532 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index e23fc791297..944964de7a6 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php index 1bcf19b460e..12c305de750 100644 --- a/apps/files_external/lib/Lib/Storage/OwnCloud.php +++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 2619e678565..a2f5bafcca1 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index fc1f9b9ecd1..0899d2ac093 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -198,7 +199,7 @@ class SMB extends Common implements INotifyStorage { try { $acls = $file->getAcls(); } catch (Exception $e) { - $this->logger->error('Error while getting file acls', ['exception' => $e]); + $this->logger->warning('Error while getting file acls', ['exception' => $e]); return null; } foreach ($acls as $user => $acl) { @@ -426,6 +427,7 @@ class SMB extends Common implements INotifyStorage { case 'r': case 'rb': if (!$this->file_exists($path)) { + $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', file doesn\'t exist.'); return false; } return $this->share->read($fullPath); @@ -453,11 +455,13 @@ class SMB extends Common implements INotifyStorage { } if ($this->file_exists($path)) { if (!$this->isUpdatable($path)) { + $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', file not updatable.'); return false; } $tmpFile = $this->getCachedFile($path); } else { if (!$this->isCreatable(dirname($path))) { + $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', parent directory not writable.'); return false; } $tmpFile = \OCP\Server::get(ITempManager::class)->getTemporaryFile($ext); @@ -472,13 +476,16 @@ class SMB extends Common implements INotifyStorage { } return false; } catch (NotFoundException $e) { + $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', not found.', ['exception' => $e]); return false; } catch (ForbiddenException $e) { + $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', forbidden.', ['exception' => $e]); return false; } catch (OutOfSpaceException $e) { + $this->logger->warning('Failed to open ' . $path . ' on ' . $this->getId() . ', out of space.', ['exception' => $e]); throw new EntityTooLargeException('not enough available space to create file', 0, $e); } catch (ConnectException $e) { - $this->logger->error('Error while opening file', ['exception' => $e]); + $this->logger->error('Error while opening file ' . $path . ' on ' . $this->getId(), ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } } diff --git a/apps/files_external/lib/Lib/Storage/StreamWrapper.php b/apps/files_external/lib/Lib/Storage/StreamWrapper.php index 0490acc98e1..1272b9d4d8a 100644 --- a/apps/files_external/lib/Lib/Storage/StreamWrapper.php +++ b/apps/files_external/lib/Lib/Storage/StreamWrapper.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php index a9a03528b8f..2cb82d3790a 100644 --- a/apps/files_external/lib/Lib/StorageConfig.php +++ b/apps/files_external/lib/Lib/StorageConfig.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/StorageModifierTrait.php b/apps/files_external/lib/Lib/StorageModifierTrait.php index 4b9264f4223..4062ff1635e 100644 --- a/apps/files_external/lib/Lib/StorageModifierTrait.php +++ b/apps/files_external/lib/Lib/StorageModifierTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Lib/VisibilityTrait.php b/apps/files_external/lib/Lib/VisibilityTrait.php index 63aa709b21c..62b26f3edb1 100644 --- a/apps/files_external/lib/Lib/VisibilityTrait.php +++ b/apps/files_external/lib/Lib/VisibilityTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Migration/DummyUserSession.php b/apps/files_external/lib/Migration/DummyUserSession.php index 3d9412bd755..1ebf0e1ec4f 100644 --- a/apps/files_external/lib/Migration/DummyUserSession.php +++ b/apps/files_external/lib/Migration/DummyUserSession.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/MountConfig.php b/apps/files_external/lib/MountConfig.php index 2289a5008e5..5637ee71ec1 100644 --- a/apps/files_external/lib/MountConfig.php +++ b/apps/files_external/lib/MountConfig.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -75,7 +76,7 @@ class MountConfig { * @return int see self::STATUS_* * @throws \Exception */ - public static function getBackendStatus($class, $options, $isPersonal, $testOnly = true) { + public static function getBackendStatus($class, $options) { if (self::$skipTest) { return StorageNotAvailableException::STATUS_SUCCESS; } @@ -92,7 +93,7 @@ class MountConfig { $storage = new $class($options); try { - $result = $storage->test($isPersonal, $testOnly); + $result = $storage->test(); $storage->setAvailability($result); if ($result) { return StorageNotAvailableException::STATUS_SUCCESS; diff --git a/apps/files_external/lib/NotFoundException.php b/apps/files_external/lib/NotFoundException.php index 78fbda2a4b8..411a2212513 100644 --- a/apps/files_external/lib/NotFoundException.php +++ b/apps/files_external/lib/NotFoundException.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php index 586ce5330ad..3a688ee66e6 100644 --- a/apps/files_external/lib/Service/BackendService.php +++ b/apps/files_external/lib/Service/BackendService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -258,8 +259,8 @@ class BackendService { * @return bool */ protected function isAllowedUserBackend(Backend $backend) { - if ($this->userMountingAllowed && - array_intersect($backend->getIdentifierAliases(), $this->userMountingBackends) + if ($this->userMountingAllowed + && array_intersect($backend->getIdentifierAliases(), $this->userMountingBackends) ) { return true; } diff --git a/apps/files_external/lib/Service/DBConfigService.php b/apps/files_external/lib/Service/DBConfigService.php index 3820f6b0d96..41ec4512d70 100644 --- a/apps/files_external/lib/Service/DBConfigService.php +++ b/apps/files_external/lib/Service/DBConfigService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/GlobalStoragesService.php b/apps/files_external/lib/Service/GlobalStoragesService.php index 92961d73228..5b1a9f41e48 100644 --- a/apps/files_external/lib/Service/GlobalStoragesService.php +++ b/apps/files_external/lib/Service/GlobalStoragesService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/ImportLegacyStoragesService.php b/apps/files_external/lib/Service/ImportLegacyStoragesService.php index fe5e71c1a47..7d9840e9f5e 100644 --- a/apps/files_external/lib/Service/ImportLegacyStoragesService.php +++ b/apps/files_external/lib/Service/ImportLegacyStoragesService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php index 5be1a084b66..9f199a89b3f 100644 --- a/apps/files_external/lib/Service/LegacyStoragesService.php +++ b/apps/files_external/lib/Service/LegacyStoragesService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php index 73642d85f88..a12a8fc245a 100644 --- a/apps/files_external/lib/Service/StoragesService.php +++ b/apps/files_external/lib/Service/StoragesService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/UserGlobalStoragesService.php b/apps/files_external/lib/Service/UserGlobalStoragesService.php index 01bc91ef3ff..aaa59c85d62 100644 --- a/apps/files_external/lib/Service/UserGlobalStoragesService.php +++ b/apps/files_external/lib/Service/UserGlobalStoragesService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/UserStoragesService.php b/apps/files_external/lib/Service/UserStoragesService.php index defa97451cd..9d4192734b6 100644 --- a/apps/files_external/lib/Service/UserStoragesService.php +++ b/apps/files_external/lib/Service/UserStoragesService.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Service/UserTrait.php b/apps/files_external/lib/Service/UserTrait.php index 25713894e1f..679066283a5 100644 --- a/apps/files_external/lib/Service/UserTrait.php +++ b/apps/files_external/lib/Service/UserTrait.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Settings/Admin.php b/apps/files_external/lib/Settings/Admin.php index 8476e87f3c6..9af0f3c61c1 100644 --- a/apps/files_external/lib/Settings/Admin.php +++ b/apps/files_external/lib/Settings/Admin.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Settings/Personal.php b/apps/files_external/lib/Settings/Personal.php index f691c14270e..8478badb842 100644 --- a/apps/files_external/lib/Settings/Personal.php +++ b/apps/files_external/lib/Settings/Personal.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Settings/PersonalSection.php b/apps/files_external/lib/Settings/PersonalSection.php index df494edce27..c6eb1c6b889 100644 --- a/apps/files_external/lib/Settings/PersonalSection.php +++ b/apps/files_external/lib/Settings/PersonalSection.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/lib/Settings/Section.php b/apps/files_external/lib/Settings/Section.php index 8bc0814bb67..cf3b73472d7 100644 --- a/apps/files_external/lib/Settings/Section.php +++ b/apps/files_external/lib/Settings/Section.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/apps/files_external/src/init.ts b/apps/files_external/src/init.ts index 3f33e9cf5b6..a8a265500dd 100644 --- a/apps/files_external/src/init.ts +++ b/apps/files_external/src/init.ts @@ -5,7 +5,7 @@ import { loadState } from '@nextcloud/initial-state' import { translate as t } from '@nextcloud/l10n' import { View, getNavigation, Column, registerFileAction } from '@nextcloud/files' -import FolderNetworkSvg from '@mdi/svg/svg/folder-network.svg?raw' +import FolderNetworkSvg from '@mdi/svg/svg/folder-network-outline.svg?raw' import { action as enterCredentialsAction } from './actions/enterCredentialsAction' import { action as inlineStorageCheckAction } from './actions/inlineStorageCheckAction' diff --git a/apps/files_external/tests/Auth/AuthMechanismTest.php b/apps/files_external/tests/Auth/AuthMechanismTest.php index 682d2e1326f..e999cecf181 100644 --- a/apps/files_external/tests/Auth/AuthMechanismTest.php +++ b/apps/files_external/tests/Auth/AuthMechanismTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -13,7 +15,7 @@ use OCA\Files_External\Lib\StorageConfig; class AuthMechanismTest extends \Test\TestCase { public function testJsonSerialization(): void { $mechanism = $this->getMockBuilder(AuthMechanism::class) - ->setMethods(['jsonSerializeDefinition']) + ->onlyMethods(['jsonSerializeDefinition']) ->getMock(); $mechanism->expects($this->once()) ->method('jsonSerializeDefinition') @@ -26,7 +28,7 @@ class AuthMechanismTest extends \Test\TestCase { $this->assertEquals('scheme', $json['scheme']); } - public function validateStorageProvider() { + public static function validateStorageProvider(): array { return [ [true, 'scheme', true], [false, 'scheme', false], @@ -35,12 +37,10 @@ class AuthMechanismTest extends \Test\TestCase { ]; } - /** - * @dataProvider validateStorageProvider - */ - public function testValidateStorage($expectedSuccess, $scheme, $definitionSuccess): void { + #[\PHPUnit\Framework\Attributes\DataProvider('validateStorageProvider')] + public function testValidateStorage(bool $expectedSuccess, string $scheme, bool $definitionSuccess): void { $mechanism = $this->getMockBuilder(AuthMechanism::class) - ->setMethods(['validateStorageDefinition']) + ->onlyMethods(['validateStorageDefinition']) ->getMock(); $mechanism->expects($this->atMost(1)) ->method('validateStorageDefinition') @@ -48,16 +48,12 @@ class AuthMechanismTest extends \Test\TestCase { $mechanism->setScheme($scheme); - $backend = $this->getMockBuilder(Backend::class) - ->disableOriginalConstructor() - ->getMock(); + $backend = $this->createMock(Backend::class); $backend->expects($this->once()) ->method('getAuthSchemes') ->willReturn(['scheme' => true, 'foobar' => true]); - $storageConfig = $this->getMockBuilder(StorageConfig::class) - ->disableOriginalConstructor() - ->getMock(); + $storageConfig = $this->createMock(StorageConfig::class); $storageConfig->expects($this->once()) ->method('getBackend') ->willReturn($backend); diff --git a/apps/files_external/tests/Auth/Password/GlobalAuth.php b/apps/files_external/tests/Auth/Password/GlobalAuthTest.php index 998db198b53..6d83655403e 100644 --- a/apps/files_external/tests/Auth/Password/GlobalAuth.php +++ b/apps/files_external/tests/Auth/Password/GlobalAuthTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,26 +10,16 @@ namespace OCA\Files_External\Tests\Auth\Password; use OCA\Files_External\Lib\Auth\Password\GlobalAuth; use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException; -use OCA\Files_external\Lib\StorageConfig; +use OCA\Files_External\Lib\StorageConfig; use OCP\IL10N; use OCP\Security\ICredentialsManager; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class GlobalAuthTest extends TestCase { - /** - * @var IL10N|\PHPUnit\Framework\MockObject\MockObject - */ - private $l10n; - - /** - * @var ICredentialsManager|\PHPUnit\Framework\MockObject\MockObject - */ - private $credentialsManager; - - /** - * @var GlobalAuth - */ - private $instance; + private IL10N&MockObject $l10n; + private ICredentialsManager&MockObject $credentialsManager; + private GlobalAuth $instance; protected function setUp(): void { parent::setUp(); @@ -37,7 +29,7 @@ class GlobalAuthTest extends TestCase { } private function getStorageConfig($type, $config = []) { - /** @var \OCA\Files_External\Lib\StorageConfig|\PHPUnit\Framework\MockObject\MockObject $storageConfig */ + /** @var StorageConfig&MockObject $storageConfig */ $storageConfig = $this->createMock(StorageConfig::class); $storageConfig->expects($this->any()) ->method('getType') diff --git a/apps/files_external/tests/Backend/BackendTest.php b/apps/files_external/tests/Backend/BackendTest.php index 26aa5ebe6af..1653c354e16 100644 --- a/apps/files_external/tests/Backend/BackendTest.php +++ b/apps/files_external/tests/Backend/BackendTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -12,7 +14,7 @@ use OCA\Files_External\Lib\StorageConfig; class BackendTest extends \Test\TestCase { public function testJsonSerialization(): void { $backend = $this->getMockBuilder(Backend::class) - ->setMethods(['jsonSerializeDefinition']) + ->onlyMethods(['jsonSerializeDefinition']) ->getMock(); $backend->expects($this->once()) ->method('jsonSerializeDefinition') @@ -32,19 +34,17 @@ class BackendTest extends \Test\TestCase { $this->assertContains('barauth', array_keys($json['authSchemes'])); } - public function validateStorageProvider() { + public static function validateStorageProvider(): array { return [ [true, true], [false, false], ]; } - /** - * @dataProvider validateStorageProvider - */ - public function testValidateStorage($expectedSuccess, $definitionSuccess): void { + #[\PHPUnit\Framework\Attributes\DataProvider('validateStorageProvider')] + public function testValidateStorage(bool $expectedSuccess, bool $definitionSuccess): void { $backend = $this->getMockBuilder(Backend::class) - ->setMethods(['validateStorageDefinition']) + ->onlyMethods(['validateStorageDefinition']) ->getMock(); $backend->expects($this->atMost(1)) ->method('validateStorageDefinition') diff --git a/apps/files_external/tests/Backend/LegacyBackendTest.php b/apps/files_external/tests/Backend/LegacyBackendTest.php index cea46c1a0cd..c4ddfedf6e2 100644 --- a/apps/files_external/tests/Backend/LegacyBackendTest.php +++ b/apps/files_external/tests/Backend/LegacyBackendTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -6,6 +7,7 @@ */ namespace OCA\Files_External\Tests\Backend; +use OCA\Files_External\Lib\Auth\Builtin; use OCA\Files_External\Lib\Backend\LegacyBackend; use OCA\Files_External\Lib\DefinitionParameter; use OCA\Files_External\Lib\MissingDependency; @@ -15,18 +17,16 @@ class LegacyBackendTest extends \Test\TestCase { /** * @return MissingDependency[] */ - public static function checkDependencies() { + public static function checkDependencies(): array { return [ (new MissingDependency('abc'))->setMessage('foobar') ]; } public function testConstructor(): void { - $auth = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\Builtin') - ->disableOriginalConstructor() - ->getMock(); + $auth = $this->createMock(Builtin::class); - $class = '\OCA\Files_External\Tests\Backend\LegacyBackendTest'; + $class = self::class; $definition = [ 'configuration' => [ 'textfield' => 'Text field', @@ -43,7 +43,7 @@ class LegacyBackendTest extends \Test\TestCase { $backend = new LegacyBackend($class, $definition, $auth); - $this->assertEquals('\OCA\Files_External\Tests\Backend\LegacyBackendTest', $backend->getStorageClass()); + $this->assertEquals(self::class, $backend->getStorageClass()); $this->assertEquals('Backend text', $backend->getText()); $this->assertEquals(123, $backend->getPriority()); $this->assertContains('foo/bar.js', $backend->getCustomJs()); @@ -74,11 +74,9 @@ class LegacyBackendTest extends \Test\TestCase { } public function testNoDependencies(): void { - $auth = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\Builtin') - ->disableOriginalConstructor() - ->getMock(); + $auth = $this->createMock(Builtin::class); - $class = '\OCA\Files_External\Tests\Backend\LegacyBackendTest'; + $class = self::class; $definition = [ 'configuration' => [ ], diff --git a/apps/files_external/tests/Command/ApplicableTest.php b/apps/files_external/tests/Command/ApplicableTest.php index 8854e4ad485..59db18a42de 100644 --- a/apps/files_external/tests/Command/ApplicableTest.php +++ b/apps/files_external/tests/Command/ApplicableTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,12 +11,13 @@ namespace OCA\Files_External\Tests\Command; use OCA\Files_External\Command\Applicable; use OCP\IGroupManager; use OCP\IUserManager; +use PHPUnit\Framework\MockObject\MockObject; -class ApplicableTest extends CommandTest { - private function getInstance($storageService) { - /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject $userManager */ +class ApplicableTest extends CommandTestCase { + private function getInstance($storageService): Applicable { + /** @var IUserManager&MockObject $userManager */ $userManager = $this->createMock(IUserManager::class); - /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject $groupManager */ + /** @var IGroupManager&MockObject $groupManager */ $groupManager = $this->createMock(IGroupManager::class); $userManager->expects($this->any()) diff --git a/apps/files_external/tests/Command/CommandTest.php b/apps/files_external/tests/Command/CommandTestCase.php index ed991fd784d..e42ad9cd68a 100644 --- a/apps/files_external/tests/Command/CommandTest.php +++ b/apps/files_external/tests/Command/CommandTestCase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,21 +10,20 @@ namespace OCA\Files_External\Tests\Command; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\NotFoundException; use OCA\Files_External\Service\GlobalStoragesService; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\Input; use Symfony\Component\Console\Output\BufferedOutput; use Test\TestCase; -abstract class CommandTest extends TestCase { +abstract class CommandTestCase extends TestCase { /** * @param StorageConfig[] $mounts - * @return GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject + * @return GlobalStoragesService&MockObject */ protected function getGlobalStorageService(array $mounts = []) { - $mock = $this->getMockBuilder('OCA\Files_External\Service\GlobalStoragesService') - ->disableOriginalConstructor() - ->getMock(); + $mock = $this->createMock(GlobalStoragesService::class); $this->bindMounts($mock, $mounts); @@ -31,10 +31,10 @@ abstract class CommandTest extends TestCase { } /** - * @param \PHPUnit\Framework\MockObject\MockObject $mock + * @param MockObject $mock * @param StorageConfig[] $mounts */ - protected function bindMounts(\PHPUnit\Framework\MockObject\MockObject $mock, array $mounts) { + protected function bindMounts(MockObject $mock, array $mounts) { $mock->expects($this->any()) ->method('getStorage') ->willReturnCallback(function ($id) use ($mounts) { @@ -70,7 +70,7 @@ abstract class CommandTest extends TestCase { return $mount; } - protected function getInput(Command $command, array $arguments = [], array $options = []) { + protected function getInput(Command $command, array $arguments = [], array $options = []): ArrayInput { $input = new ArrayInput([]); $input->bind($command->getDefinition()); foreach ($arguments as $key => $value) { @@ -82,7 +82,7 @@ abstract class CommandTest extends TestCase { return $input; } - protected function executeCommand(Command $command, Input $input) { + protected function executeCommand(Command $command, Input $input): string { $output = new BufferedOutput(); $this->invokePrivate($command, 'execute', [$input, $output]); return $output->fetch(); diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php index bd4430b4116..5b84e500e3f 100644 --- a/apps/files_external/tests/Command/ListCommandTest.php +++ b/apps/files_external/tests/Command/ListCommandTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -16,24 +18,20 @@ use OCA\Files_External\Service\GlobalStoragesService; use OCA\Files_External\Service\UserStoragesService; use OCP\Authentication\LoginCredentials\IStore; use OCP\IL10N; -use OCP\ISession; use OCP\IUserManager; use OCP\IUserSession; -use OCP\Security\ICrypto; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Console\Output\BufferedOutput; -class ListCommandTest extends CommandTest { - /** - * @return ListCommand|\PHPUnit\Framework\MockObject\MockObject - */ - private function getInstance() { - /** @var GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject $globalService */ +class ListCommandTest extends CommandTestCase { + private function getInstance(): ListCommand { + /** @var GlobalStoragesService&MockObject $globalService */ $globalService = $this->createMock(GlobalStoragesService::class); - /** @var UserStoragesService|\PHPUnit\Framework\MockObject\MockObject $userService */ + /** @var UserStoragesService&MockObject $userService */ $userService = $this->createMock(UserStoragesService::class); - /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject $userManager */ + /** @var IUserManager&MockObject $userManager */ $userManager = $this->createMock(IUserManager::class); - /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */ + /** @var IUserSession&MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); return new ListCommand($globalService, $userService, $userSession, $userManager); @@ -41,8 +39,6 @@ class ListCommandTest extends CommandTest { public function testListAuthIdentifier(): void { $l10n = $this->createMock(IL10N::class); - $session = $this->createMock(ISession::class); - $crypto = $this->createMock(ICrypto::class); $instance = $this->getInstance(); $mount1 = new StorageConfig(); $mount1->setAuthMechanism(new Password($l10n)); diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php index b3c7db9306f..13d25ce5075 100644 --- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php +++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php @@ -1,9 +1,11 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCA\files_external\tests\Config; +namespace OCA\Files_External\Tests\Config; use OCA\Files_External\Config\UserPlaceholderHandler; use OCP\IRequest; @@ -12,25 +14,15 @@ use OCP\IUserManager; use OCP\IUserSession; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; +use PHPUnit\Framework\MockObject\MockObject; class UserPlaceholderHandlerTest extends \Test\TestCase { - /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ - protected $user; - - /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ - protected $session; - - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - private $shareManager; - - /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ - private $request; - - /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ - private $userManager; - - /** @var UserPlaceholderHandler */ - protected $handler; + protected IUser&MockObject $user; + protected IUserSession&MockObject $session; + protected IManager&MockObject $shareManager; + protected IRequest&MockObject $request; + protected IUserManager&MockObject $userManager; + protected UserPlaceholderHandler $handler; protected function setUp(): void { parent::setUp(); @@ -47,13 +39,13 @@ class UserPlaceholderHandlerTest extends \Test\TestCase { $this->handler = new UserPlaceholderHandler($this->session, $this->shareManager, $this->request, $this->userManager); } - protected function setUser() { + protected function setUser(): void { $this->session->expects($this->any()) ->method('getUser') ->willReturn($this->user); } - public function optionProvider() { + public static function optionProvider(): array { return [ ['/foo/bar/$user/foobar', '/foo/bar/alice/foobar'], [['/foo/bar/$user/foobar'], ['/foo/bar/alice/foobar']], @@ -61,18 +53,14 @@ class UserPlaceholderHandlerTest extends \Test\TestCase { ]; } - /** - * @dataProvider optionProvider - */ - public function testHandle($option, $expected): void { + #[\PHPUnit\Framework\Attributes\DataProvider('optionProvider')] + public function testHandle(string|array $option, string|array $expected): void { $this->setUser(); $this->assertSame($expected, $this->handler->handle($option)); } - /** - * @dataProvider optionProvider - */ - public function testHandleNoUser($option): void { + #[\PHPUnit\Framework\Attributes\DataProvider('optionProvider')] + public function testHandleNoUser(string|array $option): void { $this->shareManager->expects($this->once()) ->method('getShareByToken') ->willThrowException(new ShareNotFound()); diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php index 005e6e9714c..b1ea7a2b1b1 100644 --- a/apps/files_external/tests/Controller/AjaxControllerTest.php +++ b/apps/files_external/tests/Controller/AjaxControllerTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -14,32 +16,22 @@ use OCP\IL10N; use OCP\IRequest; use OCP\IUser; use OCP\IUserSession; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class AjaxControllerTest extends TestCase { - /** @var IRequest */ - private $request; - /** @var RSA */ - private $rsa; - /** @var GlobalAuth */ - private $globalAuth; - /** @var IUserSession */ - private $userSession; - /** @var IGroupManager */ - private $groupManager; - /** @var AjaxController */ - private $ajaxController; - /** @var IL10N */ - private $l10n; + private IRequest&MockObject $request; + private RSA&MockObject $rsa; + private GlobalAuth&MockObject $globalAuth; + private IUserSession&MockObject $userSession; + private IGroupManager&MockObject $groupManager; + private IL10N&MockObject $l10n; + private AjaxController $ajaxController; protected function setUp(): void { $this->request = $this->createMock(IRequest::class); - $this->rsa = $this->getMockBuilder('\\OCA\\Files_External\\Lib\\Auth\\PublicKey\\RSA') - ->disableOriginalConstructor() - ->getMock(); - $this->globalAuth = $this->getMockBuilder('\\OCA\\Files_External\\Lib\\Auth\\Password\GlobalAuth') - ->disableOriginalConstructor() - ->getMock(); + $this->rsa = $this->createMock(RSA::class); + $this->globalAuth = $this->createMock(GlobalAuth::class); $this->userSession = $this->createMock(IUserSession::class); $this->groupManager = $this->createMock(IGroupManager::class); $this->l10n = $this->createMock(IL10N::class); diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index 4c318951d1b..74a27eb15e4 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,6 +10,7 @@ namespace OCA\Files_External\Tests\Controller; use OC\User\User; use OCA\Files_External\Controller\GlobalStoragesController; use OCA\Files_External\Service\BackendService; +use OCA\Files_External\Service\GlobalStoragesService; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IGroupManager; @@ -17,13 +19,11 @@ use OCP\IRequest; use OCP\IUserSession; use Psr\Log\LoggerInterface; -class GlobalStoragesControllerTest extends StoragesControllerTest { +class GlobalStoragesControllerTest extends StoragesControllerTestCase { protected function setUp(): void { parent::setUp(); - $this->service = $this->getMockBuilder('\OCA\Files_External\Service\GlobalStoragesService') - ->disableOriginalConstructor() - ->getMock(); + $this->service = $this->createMock(GlobalStoragesService::class); $this->service->method('getVisibilityType') ->willReturn(BackendService::VISIBILITY_ADMIN); @@ -31,7 +31,7 @@ class GlobalStoragesControllerTest extends StoragesControllerTest { $this->controller = $this->createController(true); } - private function createController($allowCreateLocal = true) { + private function createController(bool $allowCreateLocal = true): GlobalStoragesController { $session = $this->createMock(IUserSession::class); $session->method('getUser') ->willReturn(new User('test', null, $this->createMock(IEventDispatcher::class))); diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTestCase.php index 0d604ff2d47..1eb52f9b459 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTestCase.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,10 +9,12 @@ namespace OCA\Files_External\Tests\Controller; use OCA\Files_External\Controller\GlobalStoragesController; +use OCA\Files_External\Controller\UserStoragesController; use OCA\Files_External\Lib\Auth\AuthMechanism; +use OCA\Files_External\Lib\Auth\NullMechanism; use OCA\Files_External\Lib\Backend\Backend; +use OCA\Files_External\Lib\Backend\SMB; use OCA\Files_External\Lib\StorageConfig; - use OCA\Files_External\MountConfig; use OCA\Files_External\NotFoundException; use OCA\Files_External\Service\GlobalStoragesService; @@ -18,33 +22,25 @@ use OCA\Files_External\Service\UserStoragesService; use OCP\AppFramework\Http; use PHPUnit\Framework\MockObject\MockObject; -abstract class StoragesControllerTest extends \Test\TestCase { - - /** - * @var GlobalStoragesController - */ - protected $controller; - - /** - * @var GlobalStoragesService|UserStoragesService|MockObject - */ - protected $service; +abstract class StoragesControllerTestCase extends \Test\TestCase { + protected GlobalStoragesController|UserStoragesController $controller; + protected GlobalStoragesService|UserStoragesService|MockObject $service; protected function setUp(): void { + parent::setUp(); MountConfig::$skipTest = true; } protected function tearDown(): void { MountConfig::$skipTest = false; + parent::tearDown(); } /** - * @return \OCA\Files_External\Lib\Backend\Backend|MockObject + * @return \OCA\Files_External\Lib\Backend\Backend&MockObject */ - protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OCA\Files_External\Lib\Storage\SMB') { - $backend = $this->getMockBuilder(Backend::class) - ->disableOriginalConstructor() - ->getMock(); + protected function getBackendMock($class = SMB::class, $storageClass = \OCA\Files_External\Lib\Storage\SMB::class) { + $backend = $this->createMock(Backend::class); $backend->method('getStorageClass') ->willReturn($storageClass); $backend->method('getIdentifier') @@ -57,10 +53,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { /** * @return AuthMechanism|MockObject */ - protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') { - $authMech = $this->getMockBuilder(AuthMechanism::class) - ->disableOriginalConstructor() - ->getMock(); + protected function getAuthMechMock($scheme = 'null', $class = NullMechanism::class) { + $authMech = $this->createMock(AuthMechanism::class); $authMech->method('getScheme') ->willReturn($scheme); $authMech->method('getIdentifier') @@ -98,8 +92,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->create( 'mount', - '\OCA\Files_External\Lib\Storage\SMB', - '\OCA\Files_External\Lib\Auth\NullMechanism', + \OCA\Files_External\Lib\Storage\SMB::class, + NullMechanism::class, [], [], [], @@ -130,7 +124,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->create( 'mount', 'local', - '\OCA\Files_External\Lib\Auth\NullMechanism', + NullMechanism::class, [], [], [], @@ -170,8 +164,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->update( 1, 'mount', - '\OCA\Files_External\Lib\Storage\SMB', - '\OCA\Files_External\Lib\Auth\NullMechanism', + \OCA\Files_External\Lib\Storage\SMB::class, + NullMechanism::class, [], [], [], @@ -184,7 +178,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals($storageConfig->jsonSerialize(), $data); } - public function mountPointNamesProvider() { + public static function mountPointNamesProvider(): array { return [ [''], ['/'], @@ -192,9 +186,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { ]; } - /** - * @dataProvider mountPointNamesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('mountPointNamesProvider')] public function testAddOrUpdateStorageInvalidMountPoint($mountPoint): void { $storageConfig = new StorageConfig(1); $storageConfig->setMountPoint($mountPoint); @@ -212,8 +204,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->create( $mountPoint, - '\OCA\Files_External\Lib\Storage\SMB', - '\OCA\Files_External\Lib\Auth\NullMechanism', + \OCA\Files_External\Lib\Storage\SMB::class, + NullMechanism::class, [], [], [], @@ -226,8 +218,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->update( 1, $mountPoint, - '\OCA\Files_External\Lib\Storage\SMB', - '\OCA\Files_External\Lib\Auth\NullMechanism', + \OCA\Files_External\Lib\Storage\SMB::class, + NullMechanism::class, [], [], [], @@ -241,7 +233,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { public function testAddOrUpdateStorageInvalidBackend(): void { $this->service->expects($this->exactly(2)) ->method('createStorage') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); $this->service->expects($this->never()) ->method('addStorage'); $this->service->expects($this->never()) @@ -250,7 +242,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->create( 'mount', '\OC\Files\Storage\InvalidStorage', - '\OCA\Files_External\Lib\Auth\NullMechanism', + NullMechanism::class, [], [], [], @@ -264,7 +256,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { 1, 'mount', '\OC\Files\Storage\InvalidStorage', - '\OCA\Files_External\Lib\Auth\NullMechanism', + NullMechanism::class, [], [], [], @@ -298,13 +290,13 @@ abstract class StoragesControllerTest extends \Test\TestCase { ->willReturn($storageConfig); $this->service->expects($this->once()) ->method('updateStorage') - ->will($this->throwException(new NotFoundException())); + ->willThrowException(new NotFoundException()); $response = $this->controller->update( 255, 'mount', - '\OCA\Files_External\Lib\Storage\SMB', - '\OCA\Files_External\Lib\Auth\NullMechanism', + \OCA\Files_External\Lib\Storage\SMB::class, + NullMechanism::class, [], [], [], @@ -326,7 +318,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { public function testDeleteStorageNonExisting(): void { $this->service->expects($this->once()) ->method('removeStorage') - ->will($this->throwException(new NotFoundException())); + ->willThrowException(new NotFoundException()); $response = $this->controller->destroy(255); $this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus()); @@ -354,7 +346,7 @@ abstract class StoragesControllerTest extends \Test\TestCase { $this->assertEquals($expected, $response->getData()); } - public function validateStorageProvider() { + public static function validateStorageProvider(): array { return [ [true, true, true], [false, true, false], @@ -363,10 +355,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { ]; } - /** - * @dataProvider validateStorageProvider - */ - public function testValidateStorage($backendValidate, $authMechValidate, $expectSuccess): void { + #[\PHPUnit\Framework\Attributes\DataProvider('validateStorageProvider')] + public function testValidateStorage(bool $backendValidate, bool $authMechValidate, bool $expectSuccess): void { $backend = $this->getBackendMock(); $backend->method('validateStorage') ->willReturn($backendValidate); @@ -401,8 +391,8 @@ abstract class StoragesControllerTest extends \Test\TestCase { $response = $this->controller->create( 'mount', - '\OCA\Files_External\Lib\Storage\SMB', - '\OCA\Files_External\Lib\Auth\NullMechanism', + \OCA\Files_External\Lib\Storage\SMB::class, + NullMechanism::class, [], [], [], diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index c15ded48ea7..3e8d89ec060 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,8 +10,10 @@ namespace OCA\Files_External\Tests\Controller; use OC\User\User; use OCA\Files_External\Controller\UserStoragesController; +use OCA\Files_External\Lib\Storage\SMB; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Service\BackendService; +use OCA\Files_External\Service\UserStoragesService; use OCP\AppFramework\Http; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; @@ -19,18 +23,16 @@ use OCP\IRequest; use OCP\IUserSession; use Psr\Log\LoggerInterface; -class UserStoragesControllerTest extends StoragesControllerTest { +class UserStoragesControllerTest extends StoragesControllerTestCase { /** * @var array */ - private $oldAllowedBackends; + private array $oldAllowedBackends; protected function setUp(): void { parent::setUp(); - $this->service = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService') - ->disableOriginalConstructor() - ->getMock(); + $this->service = $this->createMock(UserStoragesService::class); $this->service->method('getVisibilityType') ->willReturn(BackendService::VISIBILITY_PERSONAL); @@ -38,7 +40,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { $this->controller = $this->createController(true); } - private function createController($allowCreateLocal = true) { + private function createController(bool $allowCreateLocal = true) { $session = $this->createMock(IUserSession::class); $session->method('getUser') ->willReturn(new User('test', null, $this->createMock(IEventDispatcher::class))); @@ -88,7 +90,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { $response = $this->controller->create( 'mount', - '\OCA\Files_External\Lib\Storage\SMB', + SMB::class, '\Auth\Mechanism', [], [], @@ -102,7 +104,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { $response = $this->controller->update( 1, 'mount', - '\OCA\Files_External\Lib\Storage\SMB', + SMB::class, '\Auth\Mechanism', [], [], diff --git a/apps/files_external/tests/DefinitionParameterTest.php b/apps/files_external/tests/DefinitionParameterTest.php index 3fc65eaf897..c535481bf66 100644 --- a/apps/files_external/tests/DefinitionParameterTest.php +++ b/apps/files_external/tests/DefinitionParameterTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -48,7 +50,7 @@ class DefinitionParameterTest extends \Test\TestCase { ], $param->jsonSerialize()); } - public function validateValueProvider() { + public static function validateValueProvider(): array { return [ [Param::VALUE_TEXT, Param::FLAG_NONE, 'abc', true], [Param::VALUE_TEXT, Param::FLAG_NONE, '', false], @@ -66,9 +68,7 @@ class DefinitionParameterTest extends \Test\TestCase { ]; } - /** - * @dataProvider validateValueProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validateValueProvider')] public function testValidateValue($type, $flags, $value, $success, $expectedValue = null): void { $param = new Param('foo', 'bar'); $param->setType($type); diff --git a/apps/files_external/tests/FrontendDefinitionTraitTest.php b/apps/files_external/tests/FrontendDefinitionTraitTest.php index bc5d88ff3f0..e0bf066e70a 100644 --- a/apps/files_external/tests/FrontendDefinitionTraitTest.php +++ b/apps/files_external/tests/FrontendDefinitionTraitTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,6 +8,7 @@ namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\DefinitionParameter; +use OCA\Files_External\Lib\FrontendDefinitionTrait; use OCA\Files_External\Lib\StorageConfig; class FrontendDefinitionTraitTest extends \Test\TestCase { @@ -16,7 +18,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { ->getMock(); $param->method('getName')->willReturn('foo'); - $trait = $this->getMockForTrait('\OCA\Files_External\Lib\FrontendDefinitionTrait'); + $trait = $this->getMockForTrait(FrontendDefinitionTrait::class); $trait->setText('test'); $trait->addParameters([$param]); $trait->addCustomJs('foo/bar.js'); @@ -32,17 +34,15 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { $this->assertArrayHasKey('foo', $configuration); } - public function validateStorageProvider() { + public static function validateStorageProvider(): array { return [ [true, ['foo' => true, 'bar' => true, 'baz' => true]], [false, ['foo' => true, 'bar' => false]] ]; } - /** - * @dataProvider validateStorageProvider - */ - public function testValidateStorage($expectedSuccess, $params): void { + #[\PHPUnit\Framework\Attributes\DataProvider('validateStorageProvider')] + public function testValidateStorage(bool $expectedSuccess, array $params): void { $backendParams = []; foreach ($params as $name => $valid) { $param = $this->getMockBuilder(DefinitionParameter::class) @@ -67,7 +67,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { $storageConfig->expects($this->any()) ->method('setBackendOption'); - $trait = $this->getMockForTrait('\OCA\Files_External\Lib\FrontendDefinitionTrait'); + $trait = $this->getMockForTrait(FrontendDefinitionTrait::class); $trait->setText('test'); $trait->addParameters($backendParams); @@ -98,7 +98,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { ->method('setBackendOption') ->with('param', 'foobar'); - $trait = $this->getMockForTrait('\OCA\Files_External\Lib\FrontendDefinitionTrait'); + $trait = $this->getMockForTrait(FrontendDefinitionTrait::class); $trait->setText('test'); $trait->addParameter($param); diff --git a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php index 5fcfe1dd1e6..d26aa752ea1 100644 --- a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php +++ b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -6,6 +8,7 @@ */ namespace OCA\Files_External\Tests; +use OCA\Files_External\Lib\LegacyDependencyCheckPolyfill; use OCA\Files_External\Lib\MissingDependency; class LegacyDependencyCheckPolyfillTest extends \Test\TestCase { @@ -13,7 +16,7 @@ class LegacyDependencyCheckPolyfillTest extends \Test\TestCase { /** * @return MissingDependency[] */ - public static function checkDependencies() { + public static function checkDependencies(): array { return [ (new MissingDependency('dependency'))->setMessage('missing dependency'), (new MissingDependency('program'))->setMessage('cannot find program'), @@ -21,10 +24,10 @@ class LegacyDependencyCheckPolyfillTest extends \Test\TestCase { } public function testCheckDependencies(): void { - $trait = $this->getMockForTrait('\OCA\Files_External\Lib\LegacyDependencyCheckPolyfill'); + $trait = $this->getMockForTrait(LegacyDependencyCheckPolyfill::class); $trait->expects($this->once()) ->method('getStorageClass') - ->willReturn('\OCA\Files_External\Tests\LegacyDependencyCheckPolyfillTest'); + ->willReturn(self::class); $dependencies = $trait->checkDependencies(); $this->assertCount(2, $dependencies); diff --git a/apps/files_external/tests/Listener/StorePasswordListenerTest.php b/apps/files_external/tests/Listener/StorePasswordListenerTest.php index ec278f84331..04635b7dafd 100644 --- a/apps/files_external/tests/Listener/StorePasswordListenerTest.php +++ b/apps/files_external/tests/Listener/StorePasswordListenerTest.php @@ -22,15 +22,12 @@ use Test\TestCase; * @group DB */ class StorePasswordListenerTest extends TestCase { - /** @var MockObject|IUser */ - protected $mockedUser; + protected IUser&MockObject $mockedUser; protected function setUp(): void { parent::setUp(); $this->mockedUser = $this->createMock(IUser::class); - $this->mockedUser - ->expects($this->any()) - ->method('getUID') + $this->mockedUser->method('getUID') ->willReturn('test'); } diff --git a/apps/files_external/tests/OwnCloudFunctionsTest.php b/apps/files_external/tests/OwnCloudFunctionsTest.php index 3488195d3e8..2e052cb86b0 100644 --- a/apps/files_external/tests/OwnCloudFunctionsTest.php +++ b/apps/files_external/tests/OwnCloudFunctionsTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -16,7 +18,7 @@ use OCA\Files_External\Lib\Storage\OwnCloud; * @package OCA\Files_External\Tests */ class OwnCloudFunctionsTest extends \Test\TestCase { - public function configUrlProvider() { + public static function configUrlProvider(): array { return [ [ [ @@ -85,10 +87,8 @@ class OwnCloudFunctionsTest extends \Test\TestCase { ]; } - /** - * @dataProvider configUrlProvider - */ - public function testConfig($config, $expectedUri): void { + #[\PHPUnit\Framework\Attributes\DataProvider('configUrlProvider')] + public function testConfig(array $config, string $expectedUri): void { $config['user'] = 'someuser'; $config['password'] = 'somepassword'; $instance = new OwnCloud($config); diff --git a/apps/files_external/tests/PersonalMountTest.php b/apps/files_external/tests/PersonalMountTest.php index b268d3b5142..618048c3335 100644 --- a/apps/files_external/tests/PersonalMountTest.php +++ b/apps/files_external/tests/PersonalMountTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +10,7 @@ namespace OCA\Files_External\Tests; use OC\Files\Mount\Manager; use OC\Files\SetupManagerFactory; +use OC\Files\Storage\Storage; use OCA\Files_External\Lib\PersonalMount; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Service\UserStoragesService; @@ -17,13 +20,9 @@ class PersonalMountTest extends TestCase { public function testFindByStorageId(): void { $storageConfig = $this->createMock(StorageConfig::class); /** @var UserStoragesService $storageService */ - $storageService = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService') - ->disableOriginalConstructor() - ->getMock(); + $storageService = $this->createMock(UserStoragesService::class); - $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') - ->disableOriginalConstructor() - ->getMock(); + $storage = $this->createMock(Storage::class); $storage->expects($this->any()) ->method('getId') diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index c3a77d81b67..ef545688040 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -13,25 +14,20 @@ use OCA\Files_External\Lib\Config\IAuthMechanismProvider; use OCA\Files_External\Lib\Config\IBackendProvider; use OCA\Files_External\Service\BackendService; use OCP\IAppConfig; +use PHPUnit\Framework\MockObject\MockObject; class BackendServiceTest extends \Test\TestCase { - - /** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */ - protected $appConfig; + protected IAppConfig&MockObject $appConfig; protected function setUp(): void { $this->appConfig = $this->createMock(IAppConfig::class); } /** - * @param string $class - * - * @return \OCA\Files_External\Lib\Backend\Backend|\PHPUnit\Framework\MockObject\MockObject + * @return \OCA\Files_External\Lib\Backend\Backend&MockObject */ - protected function getBackendMock($class) { - $backend = $this->getMockBuilder(Backend::class) - ->disableOriginalConstructor() - ->getMock(); + protected function getBackendMock(string $class) { + $backend = $this->createMock(Backend::class); $backend->method('getIdentifier')->willReturn('identifier:' . $class); $backend->method('getIdentifierAliases')->willReturn(['identifier:' . $class]); return $backend; @@ -40,12 +36,10 @@ class BackendServiceTest extends \Test\TestCase { /** * @param string $class * - * @return AuthMechanism|\PHPUnit\Framework\MockObject\MockObject + * @return AuthMechanism&MockObject */ protected function getAuthMechanismMock($class) { - $backend = $this->getMockBuilder(AuthMechanism::class) - ->disableOriginalConstructor() - ->getMock(); + $backend = $this->createMock(AuthMechanism::class); $backend->method('getIdentifier')->willReturn('identifier:' . $class); $backend->method('getIdentifierAliases')->willReturn(['identifier:' . $class]); return $backend; @@ -56,10 +50,8 @@ class BackendServiceTest extends \Test\TestCase { $backend = $this->getBackendMock('\Foo\Bar'); - /** @var \OCA\Files_External\Lib\Backend\Backend|\PHPUnit\Framework\MockObject\MockObject $backendAlias */ - $backendAlias = $this->getMockBuilder(Backend::class) - ->disableOriginalConstructor() - ->getMock(); + /** @var \OCA\Files_External\Lib\Backend\Backend&MockObject $backendAlias */ + $backendAlias = $this->createMock(Backend::class); $backendAlias->method('getIdentifierAliases') ->willReturn(['identifier_real', 'identifier_alias']); $backendAlias->method('getIdentifier') @@ -85,7 +77,7 @@ class BackendServiceTest extends \Test\TestCase { $backend1 = $this->getBackendMock('\Foo\Bar'); $backend2 = $this->getBackendMock('\Bar\Foo'); - /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $providerMock */ + /** @var IBackendProvider&MockObject $providerMock */ $providerMock = $this->createMock(IBackendProvider::class); $providerMock->expects($this->once()) ->method('getBackends') @@ -104,7 +96,7 @@ class BackendServiceTest extends \Test\TestCase { $backend1 = $this->getAuthMechanismMock('\Foo\Bar'); $backend2 = $this->getAuthMechanismMock('\Bar\Foo'); - /** @var IAuthMechanismProvider|\PHPUnit\Framework\MockObject\MockObject $providerMock */ + /** @var IAuthMechanismProvider&MockObject $providerMock */ $providerMock = $this->createMock(IAuthMechanismProvider::class); $providerMock->expects($this->once()) ->method('getAuthMechanisms') @@ -125,13 +117,13 @@ class BackendServiceTest extends \Test\TestCase { $backend2 = $this->getBackendMock('\Dead\Beef'); - /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $provider1Mock */ + /** @var IBackendProvider&MockObject $provider1Mock */ $provider1Mock = $this->createMock(IBackendProvider::class); $provider1Mock->expects($this->once()) ->method('getBackends') ->willReturn([$backend1a, $backend1b]); $service->registerBackendProvider($provider1Mock); - /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $provider2Mock */ + /** @var IBackendProvider&MockObject $provider2Mock */ $provider2Mock = $this->createMock(IBackendProvider::class); $provider2Mock->expects($this->once()) ->method('getBackends') @@ -202,7 +194,7 @@ class BackendServiceTest extends \Test\TestCase { $this->assertArrayNotHasKey('identifier:\Backend\NotAvailable', $availableBackends); } - public function invalidConfigPlaceholderProvider() { + public static function invalidConfigPlaceholderProvider(): array { return [ [['@user']], [['$user']], @@ -216,9 +208,7 @@ class BackendServiceTest extends \Test\TestCase { ]; } - /** - * @dataProvider invalidConfigPlaceholderProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidConfigPlaceholderProvider')] public function testRegisterConfigHandlerInvalid(array $placeholders): void { $this->expectException(\RuntimeException::class); diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php index 51051d6c9f2..85d8b70fda7 100644 --- a/apps/files_external/tests/Service/DBConfigServiceTest.php +++ b/apps/files_external/tests/Service/DBConfigServiceTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -16,17 +18,10 @@ use Test\TestCase; * @group DB */ class DBConfigServiceTest extends TestCase { - /** - * @var DBConfigService - */ - private $dbConfig; - - /** - * @var IDBConnection - */ - private $connection; + private IDBConnection $connection; + private DBConfigService $dbConfig; - private $mounts = []; + private array $mounts = []; protected function setUp(): void { parent::setUp(); @@ -39,9 +34,10 @@ class DBConfigServiceTest extends TestCase { $this->dbConfig->removeMount($mount); } $this->mounts = []; + parent::tearDown(); } - private function addMount($mountPoint, $storageBackend, $authBackend, $priority, $type) { + private function addMount(string $mountPoint, string $storageBackend, string $authBackend, int $priority, int $type) { $id = $this->dbConfig->addMount($mountPoint, $storageBackend, $authBackend, $priority, $type); $this->mounts[] = $id; return $id; @@ -74,7 +70,7 @@ class DBConfigServiceTest extends TestCase { $this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); $mount = $this->dbConfig->getMountById($id); - $this->assertEquals([ + $this->assertEqualsCanonicalizing([ ['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id], ['type' => DBConfigService::APPLICABLE_TYPE_GROUP, 'value' => 'bar', 'mount_id' => $id], ['type' => DBConfigService::APPLICABLE_TYPE_GLOBAL, 'value' => null, 'mount_id' => $id] diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index b4907f7f00f..0a3749981c8 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -14,7 +16,7 @@ use OCA\Files_External\Service\GlobalStoragesService; /** * @group DB */ -class GlobalStoragesServiceTest extends StoragesServiceTest { +class GlobalStoragesServiceTest extends StoragesServiceTestCase { protected function setUp(): void { parent::setUp(); $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache, $this->eventDispatcher); @@ -44,7 +46,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ]); } - public function storageDataProvider() { + public static function storageDataProvider(): array { return [ // all users [ @@ -113,9 +115,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ]; } - /** - * @dataProvider storageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageDataProvider')] public function testAddStorage($storageParams): void { $storage = $this->makeStorageConfig($storageParams); $newStorage = $this->service->addStorage($storage); @@ -137,9 +137,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $this->assertEquals($baseId + 1, $nextStorage->getId()); } - /** - * @dataProvider storageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('storageDataProvider')] public function testUpdateStorage($updatedStorageParams): void { $updatedStorage = $this->makeStorageConfig($updatedStorageParams); $storage = $this->makeStorageConfig([ @@ -166,13 +164,13 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { $this->assertEquals($updatedStorage->getMountPoint(), $newStorage->getMountPoint()); $this->assertEquals($updatedStorage->getBackendOptions()['password'], $newStorage->getBackendOptions()['password']); - $this->assertEquals($updatedStorage->getApplicableUsers(), $newStorage->getApplicableUsers()); + $this->assertEqualsCanonicalizing($updatedStorage->getApplicableUsers(), $newStorage->getApplicableUsers()); $this->assertEquals($updatedStorage->getApplicableGroups(), $newStorage->getApplicableGroups()); $this->assertEquals($updatedStorage->getPriority(), $newStorage->getPriority()); $this->assertEquals(0, $newStorage->getStatus()); } - public function hooksAddStorageDataProvider() { + public static function hooksAddStorageDataProvider(): array { return [ // applicable all [ @@ -279,9 +277,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ]; } - /** - * @dataProvider hooksAddStorageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hooksAddStorageDataProvider')] public function testHooksAddStorage($applicableUsers, $applicableGroups, $expectedCalls): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers($applicableUsers); @@ -301,7 +297,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { } } - public function hooksUpdateStorageDataProvider() { + public static function hooksUpdateStorageDataProvider(): array { return [ [ // nothing to multiple users and groups @@ -417,15 +413,14 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ]; } - /** - * @dataProvider hooksUpdateStorageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hooksUpdateStorageDataProvider')] public function testHooksUpdateStorage( - $sourceApplicableUsers, - $sourceApplicableGroups, - $updatedApplicableUsers, - $updatedApplicableGroups, - $expectedCalls): void { + array $sourceApplicableUsers, + array $sourceApplicableGroups, + array $updatedApplicableUsers, + array $updatedApplicableGroups, + array $expectedCalls, + ): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers($sourceApplicableUsers); $storage->setApplicableGroups($sourceApplicableGroups); @@ -532,7 +527,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { } } - public function hooksDeleteStorageDataProvider() { + public static function hooksDeleteStorageDataProvider(): array { return [ [ ['user1', 'user2'], @@ -576,13 +571,12 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ]; } - /** - * @dataProvider hooksDeleteStorageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('hooksDeleteStorageDataProvider')] public function testHooksDeleteStorage( - $sourceApplicableUsers, - $sourceApplicableGroups, - $expectedCalls): void { + array $sourceApplicableUsers, + array $sourceApplicableGroups, + array $expectedCalls, + ): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers($sourceApplicableUsers); $storage->setApplicableGroups($sourceApplicableGroups); diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTestCase.php index 8d24b98d6af..b41eb409468 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTestCase.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -10,9 +12,10 @@ use OC\Files\Cache\Storage; use OC\Files\Filesystem; use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\Auth\InvalidAuth; +use OCA\Files_External\Lib\Auth\NullMechanism; use OCA\Files_External\Lib\Backend\Backend; use OCA\Files_External\Lib\Backend\InvalidBackend; - +use OCA\Files_External\Lib\Backend\SMB; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\MountConfig; use OCA\Files_External\NotFoundException; @@ -31,9 +34,10 @@ use OCP\IUser; use OCP\Security\ICrypto; use OCP\Server; use OCP\Util; +use PHPUnit\Framework\MockObject\MockObject; class CleaningDBConfig extends DBConfigService { - private $mountIds = []; + private array $mountIds = []; public function addMount($mountPoint, $storageBackend, $authBackend, $priority, $type) { $id = parent::addMount($mountPoint, $storageBackend, $authBackend, $priority, $type); // TODO: Change the autogenerated stub @@ -51,41 +55,14 @@ class CleaningDBConfig extends DBConfigService { /** * @group DB */ -abstract class StoragesServiceTest extends \Test\TestCase { - /** - * @var StoragesService - */ - protected $service; - - /** @var BackendService */ - protected $backendService; - - /** - * Data directory - * - * @var string - */ - protected $dataDir; - - /** @var CleaningDBConfig */ - protected $dbConfig; - - /** - * Hook calls - * - * @var array - */ - protected static $hookCalls; - - /** - * @var \PHPUnit\Framework\MockObject\MockObject|IUserMountCache - */ - protected $mountCache; - - /** - * @var \PHPUnit\Framework\MockObject\MockObject|IEventDispatcher - */ - protected IEventDispatcher $eventDispatcher; +abstract class StoragesServiceTestCase extends \Test\TestCase { + protected StoragesService $service; + protected BackendService $backendService; + protected string $dataDir; + protected CleaningDBConfig $dbConfig; + protected static array $hookCalls; + protected IUserMountCache&MockObject $mountCache; + protected IEventDispatcher&MockObject $eventDispatcher; protected function setUp(): void { parent::setUp(); @@ -102,10 +79,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->eventDispatcher = $this->createMock(IEventDispatcher::class); // prepare BackendService mock - $this->backendService = - $this->getMockBuilder('\OCA\Files_External\Service\BackendService') - ->disableOriginalConstructor() - ->getMock(); + $this->backendService = $this->createMock(BackendService::class); $authMechanisms = [ 'identifier:\Auth\Mechanism' => $this->getAuthMechMock('null', '\Auth\Mechanism'), @@ -172,12 +146,11 @@ abstract class StoragesServiceTest extends \Test\TestCase { if ($this->dbConfig) { $this->dbConfig->clean(); } + parent::tearDown(); } - protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OCA\Files_External\Lib\Storage\SMB') { - $backend = $this->getMockBuilder(Backend::class) - ->disableOriginalConstructor() - ->getMock(); + protected function getBackendMock($class = SMB::class, $storageClass = \OCA\Files_External\Lib\Storage\SMB::class) { + $backend = $this->createMock(Backend::class); $backend->method('getStorageClass') ->willReturn($storageClass); $backend->method('getIdentifier') @@ -185,10 +158,8 @@ abstract class StoragesServiceTest extends \Test\TestCase { return $backend; } - protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') { - $authMech = $this->getMockBuilder(AuthMechanism::class) - ->disableOriginalConstructor() - ->getMock(); + protected function getAuthMechMock($scheme = 'null', $class = NullMechanism::class) { + $authMech = $this->createMock(AuthMechanism::class); $authMech->method('getScheme') ->willReturn($scheme); $authMech->method('getIdentifier') @@ -199,12 +170,8 @@ abstract class StoragesServiceTest extends \Test\TestCase { /** * Creates a StorageConfig instance based on array data - * - * @param array $data - * - * @return StorageConfig storage config instance */ - protected function makeStorageConfig($data) { + protected function makeStorageConfig(array $data): StorageConfig { $storage = new StorageConfig(); if (isset($data['id'])) { $storage->setId($data['id']); @@ -259,7 +226,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->ActualNonExistingStorageTest(); } - public function deleteStorageDataProvider() { + public static function deleteStorageDataProvider(): array { return [ // regular case, can properly delete the oc_storages entry [ @@ -283,10 +250,8 @@ abstract class StoragesServiceTest extends \Test\TestCase { ]; } - /** - * @dataProvider deleteStorageDataProvider - */ - public function testDeleteStorage($backendOptions, $rustyStorageId): void { + #[\PHPUnit\Framework\Attributes\DataProvider('deleteStorageDataProvider')] + public function testDeleteStorage(array $backendOptions, string $rustyStorageId): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\DAV'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); $storage = new StorageConfig(255); @@ -463,14 +428,14 @@ abstract class StoragesServiceTest extends \Test\TestCase { $this->assertEmpty($this->service->getStorages()); } - public static function createHookCallback($params) { + public static function createHookCallback($params): void { self::$hookCalls[] = [ 'signal' => Filesystem::signal_create_mount, 'params' => $params ]; } - public static function deleteHookCallback($params) { + public static function deleteHookCallback($params): void { self::$hookCalls[] = [ 'signal' => Filesystem::signal_delete_mount, 'params' => $params diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index e3c5cd486e9..2a2f4596fda 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -16,6 +17,7 @@ use OCP\IGroupManager; use OCP\IUser; use OCP\IUserSession; use OCP\Server; +use PHPUnit\Framework\MockObject\MockObject; use Test\Traits\UserTrait; /** @@ -24,20 +26,9 @@ use Test\Traits\UserTrait; class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { use UserTrait; - /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject groupManager */ - protected $groupManager; - - /** - * @var StoragesService - */ - protected $globalStoragesService; - - /** - * @var UserGlobalStoragesService - */ - protected $service; - - protected $user; + protected IGroupManager&MockObject $groupManager; + protected StoragesService $globalStoragesService; + protected User $user; public const USER_ID = 'test_user'; public const GROUP_ID = 'test_group'; @@ -49,7 +40,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->globalStoragesService = $this->service; $this->user = new User(self::USER_ID, null, Server::get(IEventDispatcher::class)); - /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */ + /** @var IUserSession&MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); $userSession ->expects($this->any()) @@ -87,7 +78,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { ); } - public function applicableStorageProvider() { + public static function applicableStorageProvider(): array { return [ [[], [], true], @@ -107,9 +98,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { ]; } - /** - * @dataProvider applicableStorageProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('applicableStorageProvider')] public function testGetStorageWithApplicable($applicableUsers, $applicableGroups, $isVisible): void { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); @@ -183,9 +172,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->ActualNonExistingStorageTest(); } - /** - * @dataProvider deleteStorageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('deleteStorageDataProvider')] public function testDeleteStorage($backendOptions, $rustyStorageId): void { $this->expectException(\DomainException::class); @@ -211,7 +198,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->actualDeletedUnexistingStorageTest(); } - public function getUniqueStoragesProvider() { + public static function getUniqueStoragesProvider(): array { return [ // 'all' vs group [100, [], [], 100, [], [self::GROUP_ID], 2], @@ -239,9 +226,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { ]; } - /** - * @dataProvider getUniqueStoragesProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('getUniqueStoragesProvider')] public function testGetUniqueStorages( $priority1, $applicableUsers1, $applicableGroups1, $priority2, $applicableUsers2, $applicableGroups2, diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index a7b9f200417..0a2f291f6e4 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -7,6 +8,7 @@ namespace OCA\Files_External\Tests\Service; use OC\Files\Filesystem; +use OC\User\User; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\MountConfig; use OCA\Files_External\NotFoundException; @@ -17,22 +19,19 @@ use OCA\Files_External\Service\UserStoragesService; use OCP\IUserManager; use OCP\IUserSession; use OCP\Server; +use PHPUnit\Framework\MockObject\MockObject; use Test\Traits\UserTrait; /** * @group DB */ -class UserStoragesServiceTest extends StoragesServiceTest { +class UserStoragesServiceTest extends StoragesServiceTestCase { use UserTrait; - private $user; - - private $userId; + protected User $user; - /** - * @var StoragesService - */ - protected $globalStoragesService; + protected string $userId; + protected StoragesService $globalStoragesService; protected function setUp(): void { parent::setUp(); @@ -43,7 +42,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { $this->createUser($this->userId, $this->userId); $this->user = Server::get(IUserManager::class)->get($this->userId); - /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */ + /** @var IUserSession&MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); $userSession ->expects($this->any()) @@ -129,9 +128,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { $this->assertEmpty(self::$hookCalls); } - /** - * @dataProvider deleteStorageDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('deleteStorageDataProvider')] public function testDeleteStorage($backendOptions, $rustyStorageId): void { parent::testDeleteStorage($backendOptions, $rustyStorageId); diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index aceb8d2e915..fd4a1949760 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -12,19 +14,15 @@ use OCA\Files_External\Service\GlobalStoragesService; use OCA\Files_External\Settings\Admin; use OCP\AppFramework\Http\TemplateResponse; use OCP\Encryption\IManager; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class AdminTest extends TestCase { - /** @var Admin */ - private $admin; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - private $encryptionManager; - /** @var GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject */ - private $globalStoragesService; - /** @var BackendService|\PHPUnit\Framework\MockObject\MockObject */ - private $backendService; - /** @var GlobalAuth|\PHPUnit\Framework\MockObject\MockObject */ - private $globalAuth; + private IManager&MockObject $encryptionManager; + private GlobalStoragesService&MockObject $globalStoragesService; + private BackendService&MockObject $backendService; + private GlobalAuth&MockObject $globalAuth; + private Admin $admin; protected function setUp(): void { parent::setUp(); diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php index 9154106ff8a..c64849ff7ba 100644 --- a/apps/files_external/tests/Settings/SectionTest.php +++ b/apps/files_external/tests/Settings/SectionTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -8,20 +10,18 @@ namespace OCA\Files_External\Tests\Settings; use OCA\Files_External\Settings\Section; use OCP\IL10N; use OCP\IURLGenerator; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class SectionTest extends TestCase { - /** @var IL10N */ - private $l; - /** @var IURLGenerator */ - private $urlGenerator; - /** @var Section */ - private $section; + private IL10N&MockObject $l; + private IURLGenerator&MockObject $urlGenerator; + private Section $section; protected function setUp(): void { parent::setUp(); - $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->disableOriginalConstructor()->getMock(); - $this->l = $this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock(); + $this->urlGenerator = $this->createMock(IURLGenerator::class); + $this->l = $this->createMock(IL10N::class); $this->section = new Section( $this->urlGenerator, diff --git a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php index 1ac18406d24..aa3925899f3 100644 --- a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php +++ b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php @@ -1,9 +1,11 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCA\files_external\tests\Storage; +namespace OCA\Files_External\Tests\Storage; use OCA\Files_External\Lib\Storage\AmazonS3; @@ -11,6 +13,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3; * Class Amazons3Test * * @group DB + * @group S3 * * @package OCA\Files_External\Tests\Storage */ @@ -23,7 +26,7 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage { parent::setUp(); $this->config = include('files_external/tests/config.amazons3.php'); - if (! is_array($this->config) or ! $this->config['run']) { + if (!is_array($this->config) || !$this->config['run']) { $this->markTestSkipped('AmazonS3 backend not configured'); } $this->instance = new AmazonS3($this->config + [ @@ -43,8 +46,4 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage { public function testStat(): void { $this->markTestSkipped('S3 doesn\'t update the parents folder mtime'); } - - public function testHashInFileName(): void { - $this->markTestSkipped('Localstack has a bug with hashes in filename'); - } } diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index fd7fd9225c9..d02dec0230c 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -12,11 +14,12 @@ use OCA\Files_External\Lib\Storage\AmazonS3; * Class Amazons3Test * * @group DB + * @group S3 * * @package OCA\Files_External\Tests\Storage */ class Amazons3Test extends \Test\Files\Storage\Storage { - private $config; + protected $config; /** @var AmazonS3 */ protected $instance; @@ -24,7 +27,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { parent::setUp(); $this->config = include('files_external/tests/config.amazons3.php'); - if (! is_array($this->config) or ! $this->config['run']) { + if (!is_array($this->config) || !$this->config['run']) { $this->markTestSkipped('AmazonS3 backend not configured'); } $this->instance = new AmazonS3($this->config); @@ -41,8 +44,4 @@ class Amazons3Test extends \Test\Files\Storage\Storage { public function testStat(): void { $this->markTestSkipped('S3 doesn\'t update the parents folder mtime'); } - - public function testHashInFileName(): void { - $this->markTestSkipped('Localstack has a bug with hashes in filename'); - } } diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index 81b92e0fae9..095a5236049 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 28041a665f8..ab6cd443dba 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index 9be3cb7d3e8..17e2087f91b 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -40,7 +42,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { parent::tearDown(); } - + public function testInvalidAddressShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); @@ -52,24 +54,24 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { $this->assertTrue($this->instance->assertHostAddressValid('localhost')); } - + public function testNegativePortNumberShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); $this->instance->assertPortNumberValid('-1'); } - + public function testNonNumericalPortNumberShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); $this->instance->assertPortNumberValid('a'); } - + public function testHighPortNumberShouldThrowException(): void { $this->expectException(\InvalidArgumentException::class); - + $this->instance->assertPortNumberValid('65536'); } diff --git a/apps/files_external/tests/Storage/SftpTest.php b/apps/files_external/tests/Storage/SftpTest.php index cc29486f426..ebfc8ab3c1f 100644 --- a/apps/files_external/tests/Storage/SftpTest.php +++ b/apps/files_external/tests/Storage/SftpTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -44,15 +46,13 @@ class SftpTest extends \Test\Files\Storage\Storage { parent::tearDown(); } - /** - * @dataProvider configProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('configProvider')] public function testStorageId($config, $expectedStorageId): void { $instance = new SFTP($config); $this->assertEquals($expectedStorageId, $instance->getId()); } - public function configProvider() { + public static function configProvider(): array { return [ [ // no root path diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php index 51737d05dc6..afcb5c1034f 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/tests/Storage/SwiftTest.php b/apps/files_external/tests/Storage/SwiftTest.php index c21c8c6f506..17037e76ee3 100644 --- a/apps/files_external/tests/Storage/SwiftTest.php +++ b/apps/files_external/tests/Storage/SwiftTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/tests/Storage/VersionedAmazonS3Test.php b/apps/files_external/tests/Storage/VersionedAmazonS3Test.php index 4d9d1e32067..9d413620292 100644 --- a/apps/files_external/tests/Storage/VersionedAmazonS3Test.php +++ b/apps/files_external/tests/Storage/VersionedAmazonS3Test.php @@ -10,6 +10,7 @@ namespace OCA\Files_External\Tests\Storage; /** * @group DB + * @group S3 */ class VersionedAmazonS3Test extends Amazons3Test { protected function setUp(): void { @@ -25,4 +26,12 @@ class VersionedAmazonS3Test extends Amazons3Test { $this->markTestSkipped("s3 backend doesn't seem to support versioning"); } } + + public function testCopyOverWriteDirectory(): void { + if (isset($this->config['minio'])) { + $this->markTestSkipped('MinIO has a bug with batch deletion on versioned storages, see https://github.com/minio/minio/issues/21366'); + } + + parent::testCopyOverWriteDirectory(); + } } diff --git a/apps/files_external/tests/Storage/WebdavTest.php b/apps/files_external/tests/Storage/WebdavTest.php index f1d3415e91e..a8de178effd 100644 --- a/apps/files_external/tests/Storage/WebdavTest.php +++ b/apps/files_external/tests/Storage/WebdavTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/tests/StorageConfigTest.php b/apps/files_external/tests/StorageConfigTest.php index b67d69a3ce7..b3024cb228c 100644 --- a/apps/files_external/tests/StorageConfigTest.php +++ b/apps/files_external/tests/StorageConfigTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -13,12 +15,8 @@ use OCA\Files_External\Lib\StorageConfig; class StorageConfigTest extends \Test\TestCase { public function testJsonSerialization(): void { - $backend = $this->getMockBuilder(Backend::class) - ->disableOriginalConstructor() - ->getMock(); - $parameter = $this->getMockBuilder(DefinitionParameter::class) - ->disableOriginalConstructor() - ->getMock(); + $backend = $this->createMock(Backend::class); + $parameter = $this->createMock(DefinitionParameter::class); $parameter ->expects($this->once()) ->method('getType') @@ -30,9 +28,7 @@ class StorageConfigTest extends \Test\TestCase { $backend->method('getIdentifier') ->willReturn('storage::identifier'); - $authMech = $this->getMockBuilder(AuthMechanism::class) - ->disableOriginalConstructor() - ->getMock(); + $authMech = $this->createMock(AuthMechanism::class); $authMech->method('getIdentifier') ->willReturn('auth::identifier'); diff --git a/apps/files_external/tests/appSpec.js b/apps/files_external/tests/appSpec.js deleted file mode 100644 index 4d150cd36bb..00000000000 --- a/apps/files_external/tests/appSpec.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2014 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ -import $ from 'jquery' - -describe('OCA.Files_External.App tests', function() { - const App = OCA.Files_External.App - let fileList - - beforeEach(function() { - $('#testArea').append( - '<div id="app-navigation">' - + '<ul><li data-id="files"><a>Files</a></li>' - + '<li data-id="sharingin"><a></a></li>' - + '<li data-id="sharingout"><a></a></li>' - + '</ul></div>' - + '<div id="app-content">' - + '<div id="app-content-files" class="hidden">' - + '</div>' - + '<div id="app-content-extstoragemounts" class="hidden">' - + '</div>' - + '</div>' - + '</div>', - ) - fileList = App.initList($('#app-content-extstoragemounts')) - }) - afterEach(function() { - App.fileList = null - fileList.destroy() - fileList = null - }) - - describe('initialization', function() { - it('inits external mounts list on show', function() { - expect(App.fileList).toBeDefined() - }) - }) - describe('file actions', function() { - it('provides default file actions', function() { - const fileActions = fileList.fileActions - - expect(fileActions.actions.all).toBeDefined() - expect(fileActions.actions.all.Delete).toBeDefined() - expect(fileActions.actions.all.Rename).toBeDefined() - expect(fileActions.actions.all.Download).toBeDefined() - - expect(fileActions.defaults.dir).toEqual('Open') - }) - it('redirects to files app when opening a directory', function() { - const oldList = OCA.Files.App.fileList - // dummy new list to make sure it exists - OCA.Files.App.fileList = new OCA.Files.FileList($('<table><thead></thead><tbody></tbody></table>')) - - const setActiveViewStub = sinon.stub(OCA.Files.App, 'setActiveView') - // create dummy table so we can click the dom - const $table = '<table><thead></thead><tbody class="files-fileList"></tbody></table>' - $('#app-content-extstoragemounts').append($table) - - App._inFileList = null - fileList = App.initList($('#app-content-extstoragemounts')) - - fileList.setFiles([{ - name: 'testdir', - type: 'dir', - path: '/somewhere/inside/subdir', - counterParts: ['user2'], - shareOwner: 'user2', - }]) - - fileList.findFileEl('testdir').find('td a.name').click() - - expect(OCA.Files.App.fileList.getCurrentDirectory()).toEqual('/somewhere/inside/subdir/testdir') - - expect(setActiveViewStub.calledOnce).toEqual(true) - expect(setActiveViewStub.calledWith('files')).toEqual(true) - - setActiveViewStub.restore() - - // restore old list - OCA.Files.App.fileList = oldList - }) - }) -}) diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php index 13fc0c2401e..ec860cf05a4 100644 --- a/apps/files_external/tests/config.php +++ b/apps/files_external/tests/config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc. diff --git a/apps/files_external/tests/js/mountsfilelistSpec.js b/apps/files_external/tests/js/mountsfilelistSpec.js deleted file mode 100644 index fa6de978c81..00000000000 --- a/apps/files_external/tests/js/mountsfilelistSpec.js +++ /dev/null @@ -1,148 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors - * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -describe('OCA.Files_External.FileList tests', function() { - var testFiles, alertStub, notificationStub, fileList; - - beforeEach(function() { - alertStub = sinon.stub(OC.dialogs, 'alert'); - notificationStub = sinon.stub(OC.Notification, 'show'); - - // init parameters and test table elements - $('#testArea').append( - '<div id="app-content">' + - // init horrible parameters - '<input type="hidden" id="permissions" value="31"></input>' + - // dummy controls - '<div class="files-controls">' + - ' <div class="actions creatable"></div>' + - ' <div class="notCreatable"></div>' + - '</div>' + - // dummy table - // TODO: at some point this will be rendered by the fileList class itself! - '<table class="files-filestable">' + - '<thead><tr>' + - '<th class="hidden column-name">' + - ' <div id="column-name-container">' + - ' <a class="name sort columntitle" data-sort="name"><span>Name</span><span class="sort-indicator"></span></a>' + - ' </div>' + - '</th>' + - '<th id="headerBackend" class="hidden column-backend">' + - ' <a class="backend sort columntitle" data-sort="backend"><span>Storage type</span><span class="sort-indicator"></span></a>' + - '</th>' + - '<th id="headerScope" class="hidden column-scope column-last">' + - ' <a class="scope sort columntitle" data-sort="scope"><span>Scope</span><span class="sort-indicator"></span></a>' + - '</th>' + - '</tr></thead>' + - '<tbody class="files-fileList"></tbody>' + - '<tfoot></tfoot>' + - '</table>' + - '<div class="emptyfilelist emptycontent">Empty content message</div>' + - '</div>' - ); - }); - afterEach(function() { - testFiles = undefined; - fileList.destroy(); - fileList = undefined; - - notificationStub.restore(); - alertStub.restore(); - }); - - describe('loading file list for external storage', function() { - var ocsResponse; - var reloading; - - beforeEach(function() { - fileList = new OCA.Files_External.FileList( - $('#app-content') - ); - - reloading = fileList.reload(); - - /* jshint camelcase: false */ - ocsResponse = { - ocs: { - meta: { - status: 'ok', - statuscode: 100, - message: null - }, - data: [{ - name: 'smb mount', - path: '/mount points', - type: 'dir', - backend: 'SMB', - scope: 'personal', - permissions: OC.PERMISSION_READ | OC.PERMISSION_DELETE - }, { - name: 'sftp mount', - path: '/another mount points', - type: 'dir', - backend: 'SFTP', - scope: 'system', - permissions: OC.PERMISSION_READ - }] - } - }; - }); - it('render storage list', function(done) { - var request; - var $rows; - var $tr; - - expect(fakeServer.requests.length).toEqual(1); - request = fakeServer.requests[0]; - expect(request.url).toEqual( - OC.linkToOCS('apps/files_external/api/v1') + 'mounts?format=json' - ); - - fakeServer.requests[0].respond( - 200, - { 'Content-Type': 'application/json' }, - JSON.stringify(ocsResponse) - ); - - return reloading.then(function() { - $rows = fileList.$el.find('tbody tr'); - expect($rows.length).toEqual(2); - - $tr = $rows.eq(0); - expect($tr.attr('data-id')).not.toBeDefined(); - expect($tr.attr('data-type')).toEqual('dir'); - expect($tr.attr('data-file')).toEqual('sftp mount'); - expect($tr.attr('data-path')).toEqual('/another mount points'); - expect($tr.attr('data-size')).not.toBeDefined(); - expect($tr.attr('data-permissions')).toEqual('1'); // read only - expect($tr.find('a.name').attr('href')).toEqual( - OC.getRootPath() + - '/index.php/apps/files' + - '?dir=/another%20mount%20points/sftp%20mount' - ); - expect($tr.find('.nametext').text().trim()).toEqual('sftp mount'); - expect($tr.find('.column-scope > span').text().trim()).toEqual('System'); - expect($tr.find('.column-backend').text().trim()).toEqual('SFTP'); - - $tr = $rows.eq(1); - expect($tr.attr('data-id')).not.toBeDefined(); - expect($tr.attr('data-type')).toEqual('dir'); - expect($tr.attr('data-file')).toEqual('smb mount'); - expect($tr.attr('data-path')).toEqual('/mount points'); - expect($tr.attr('data-size')).not.toBeDefined(); - expect($tr.attr('data-permissions')).toEqual('9'); // read and delete - expect($tr.find('a.name').attr('href')).toEqual( - OC.getRootPath() + - '/index.php/apps/files' + - '?dir=/mount%20points/smb%20mount' - ); - expect($tr.find('.nametext').text().trim()).toEqual('smb mount'); - expect($tr.find('.column-scope > span').text().trim()).toEqual('Personal'); - expect($tr.find('.column-backend').text().trim()).toEqual('SMB'); - }).then(done, done); - }); - }); -}); diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js deleted file mode 100644 index f79191151d1..00000000000 --- a/apps/files_external/tests/js/settingsSpec.js +++ /dev/null @@ -1,447 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors - * SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc. - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -describe('OCA.Files_External.Settings tests', function() { - var clock; - var select2Stub; - var select2ApplicableUsers; - - beforeEach(function() { - clock = sinon.useFakeTimers(); - select2ApplicableUsers = []; - select2Stub = sinon.stub($.fn, 'select2').callsFake(function(args) { - if (args === 'val') { - return select2ApplicableUsers; - } - return { - on: function() { return this; } - }; - }); - - // view still requires an existing DOM table - $('#testArea').append( - '<table id="externalStorage" data-admin="true">' + - '<thead></thead>' + - '<tbody>' + - '<tr id="addMountPoint" data-id="">' + - '<td class="status"></td>' + - '<td class="mountPoint"><input type="text" name="mountPoint"/></td>' + - '<td class="backend">' + - '<select class="selectBackend">' + - '<option disable selected>Add storage</option>' + - '<option value="\\OC\\TestBackend">Test Backend</option>' + - '<option value="\\OC\\AnotherTestBackend">Another Test Backend</option>' + - '<option value="\\OC\\InputsTestBackend">Inputs test backend</option>' + - '</select>' + - '</td>' + - '<td class="authentication"></td>' + - '<td class="configuration"></td>' + - '<td class="applicable">' + - '<input type="checkbox" class="applicableToAllUsers">' + - '<input type="hidden" class="applicableUsers">' + - '</td>' + - '<td class="mountOptionsToggle">'+ - '<div class="icon-more" title="Advanced settings" deluminate_imagetype="unknown"></div>'+ - '<input type="hidden" class="mountOptions"/>'+ - '</td>'+ - '<td class="save">'+ - '<div class="icon-checkmark" title="Save" deluminate_imagetype="unknown"></div>'+ - '</td>'+ - '</tr>' + - '</tbody>' + - '</table>' - ); - // these are usually appended into the data attribute - // within the DOM by the server template - $('#externalStorage .selectBackend:first').data('configurations', { - '\\OC\\TestBackend': { - 'identifier': '\\OC\\TestBackend', - 'name': 'Test Backend', - 'configuration': { - 'field1': { - 'value': 'Display Name 1' - }, - 'field2': { - 'value': 'Display Name 2', - 'flags': 1 - } - }, - 'authSchemes': { - 'builtin': true, - }, - 'priority': 11 - }, - '\\OC\\AnotherTestBackend': { - 'identifier': '\\OC\\AnotherTestBackend', - 'name': 'Another Test Backend', - 'configuration': { - 'field1': { - 'value': 'Display Name 1' - }, - 'field2': { - 'value': 'Display Name 2', - 'flags': 1 - } - }, - 'authSchemes': { - 'builtin': true, - }, - 'priority': 12 - }, - '\\OC\\InputsTestBackend': { - 'identifier': '\\OC\\InputsTestBackend', - 'name': 'Inputs test backend', - 'configuration': { - 'field_text': { - 'value': 'Text field' - }, - 'field_password': { - 'value': ',Password field', - 'type': 2 - }, - 'field_bool': { - 'value': 'Boolean field', - 'type': 1 - }, - 'field_hidden': { - 'value': 'Hidden field', - 'type': 3 - }, - 'field_text_optional': { - 'value': 'Text field optional', - 'flags': 1 - }, - 'field_password_optional': { - 'value': 'Password field optional', - 'flags': 1, - 'type': 2 - } - }, - 'authSchemes': { - 'builtin': true, - }, - 'priority': 13 - } - } - ); - - $('#externalStorage #addMountPoint .authentication:first').data('mechanisms', { - 'mechanism1': { - 'identifier': 'mechanism1', - 'name': 'Mechanism 1', - 'configuration': { - }, - 'scheme': 'builtin', - 'visibility': 3 - }, - }); - - }); - afterEach(function() { - select2Stub.restore(); - clock.restore(); - }); - - describe('storage configuration', function() { - var view; - - function selectBackend(backendName) { - view.$el.find('.selectBackend:first').val(backendName).trigger('change'); - view.$el.find('.applicableToAllUsers').prop('checked', true).trigger('change'); - } - - beforeEach(function() { - var $el = $('#externalStorage'); - view = new OCA.Files_External.Settings.MountConfigListView($el, {encryptionEnabled: false}); - }); - afterEach(function() { - view = null; - }); - describe('selecting backend', function() { - it('populates the row and creates a new empty one', function() { - selectBackend('\\OC\\TestBackend'); - var $firstRow = view.$el.find('tr:first'); - expect($firstRow.find('.backend').text()).toEqual('Test Backend'); - expect($firstRow.find('.selectBackend').length).toEqual(0); - - // TODO: check "remove" button visibility - - // the suggested mount point name - expect($firstRow.find('[name=mountPoint]').val()).toEqual('TestBackend'); - - // TODO: check that the options have been created - - // TODO: check select2 call on the ".applicableUsers" element - - var $emptyRow = $firstRow.next('tr'); - expect($emptyRow.length).toEqual(1); - expect($emptyRow.find('.selectBackend').length).toEqual(1); - expect($emptyRow.find('.applicable select').length).toEqual(0); - - // TODO: check "remove" button visibility - }); - it('shows row even if selection row is hidden', function() { - selectBackend('\\OC\\TestBackend'); - view.$el.find('tr#addMountPoint').hide(); - expect(view.$el.find('tr:first').is(':visible')).toBe(true); - expect(view.$el.find('tr#addMountPoint').is(':visible')).toBe(false); - }); - // TODO: test with personal mounts (no applicable fields) - // TODO: test suggested mount point logic - }); - describe('saving storages', function() { - var $tr; - - beforeEach(function() { - selectBackend('\\OC\\TestBackend'); - $tr = view.$el.find('tr:first'); - }); - it('saves storage after clicking the save button', function() { - var $field1 = $tr.find('input[data-parameter=field1]'); - expect($field1.length).toEqual(1); - $field1.val('test'); - $field1.trigger(new $.Event('keyup', {keyCode: 97})); - - var $mountOptionsField = $tr.find('input.mountOptions'); - expect($mountOptionsField.length).toEqual(1); - $mountOptionsField.val(JSON.stringify({previews:true})); - - var $saveButton = $tr.find('td.save .icon-checkmark'); - $saveButton.click(); - - expect(fakeServer.requests.length).toEqual(1); - var request = fakeServer.requests[0]; - expect(request.url).toEqual(OC.getRootPath() + '/index.php/apps/files_external/globalstorages'); - expect(JSON.parse(request.requestBody)).toEqual({ - backend: '\\OC\\TestBackend', - authMechanism: 'mechanism1', - backendOptions: { - 'field1': 'test', - 'field2': '' - }, - mountPoint: 'TestBackend', - priority: 11, - applicableUsers: [], - applicableGroups: [], - mountOptions: { - 'previews': true - }, - testOnly: true - }); - - // TODO: respond and check data-id - }); - it('saves storage with applicable users', function() { - var $field1 = $tr.find('input[data-parameter=field1]'); - expect($field1.length).toEqual(1); - $field1.val('test'); - $field1.trigger(new $.Event('keyup', {keyCode: 97})); - - $tr.find('.applicableToAllUsers').prop('checked', false).trigger('change'); - select2ApplicableUsers = ['user1', 'user2', 'group1(group)', 'group2(group)']; - - var $saveButton = $tr.find('td.save .icon-checkmark'); - $saveButton.click(); - - expect(fakeServer.requests.length).toEqual(1); - var request = fakeServer.requests[0]; - expect(request.url).toEqual(OC.getRootPath() + '/index.php/apps/files_external/globalstorages'); - expect(JSON.parse(request.requestBody)).toEqual({ - backend: '\\OC\\TestBackend', - authMechanism: 'mechanism1', - backendOptions: { - 'field1': 'test', - 'field2': '' - }, - mountPoint: 'TestBackend', - priority: 11, - applicableUsers: ['user1', 'user2'], - applicableGroups: ['group1', 'group2'], - mountOptions: { - encrypt: true, - previews: true, - enable_sharing: false, - filesystem_check_changes: 1, - encoding_compatibility: false, - readonly: false, - }, - testOnly: true - }); - - // TODO: respond and check data-id - }); - it('does not saves storage without applicable users and unchecked all users checkbox', function() { - var $field1 = $tr.find('input[data-parameter=field1]'); - expect($field1.length).toEqual(1); - $field1.val('test'); - $field1.trigger(new $.Event('keyup', {keyCode: 97})); - - $tr.find('.applicableToAllUsers').prop('checked', false).trigger('change'); - - var $saveButton = $tr.find('td.save .icon-checkmark'); - $saveButton.click(); - - expect(fakeServer.requests.length).toEqual(0); - }); - - it('saves storage after closing mount options popovermenu', function() { - $tr.find('.mountOptionsToggle .icon-more').click(); - $tr.find('[name=previews]').trigger(new $.Event('keyup', {keyCode: 97})); - $tr.find('input[data-parameter=field1]').val('test'); - - // does not save inside the popovermenu - expect(fakeServer.requests.length).toEqual(0); - - $('body').mouseup(); - - // but after closing the popovermenu - expect(fakeServer.requests.length).toEqual(1); - }); - // TODO: status indicator - }); - describe('validate storage configuration', function() { - var $tr; - - beforeEach(function() { - selectBackend('\\OC\\InputsTestBackend'); - $tr = view.$el.find('tr:first'); - }); - - it('lists missing fields in storage errors', function() { - $tr.find('.applicableToAllUsers').prop('checked', false).trigger('change'); - var storage = view.getStorageConfig($tr); - - expect(storage.errors).toEqual({ - backendOptions: ['field_text', 'field_password'], - requiredApplicable: true, - }); - }); - - it('does not list applicable when all users checkbox is ticked', function() { - var storage = view.getStorageConfig($tr); - - expect(storage.errors).toEqual({ - backendOptions: ['field_text', 'field_password'] - }); - }); - - it('highlights missing non-optional fields', function() { - _.each([ - 'field_text', - 'field_password' - ], function(param) { - expect($tr.find('input[data-parameter='+param+']').hasClass('warning-input')).toBe(true); - }); - _.each([ - 'field_bool', - 'field_hidden', - 'field_text_optional', - 'field_password_optional' - ], function(param) { - expect($tr.find('input[data-parameter='+param+']').hasClass('warning-input')).toBe(false); - }); - }); - - it('validates correct storage', function() { - $tr.find('[name=mountPoint]').val('mountpoint'); - - $tr.find('input[data-parameter=field_text]').val('foo'); - $tr.find('input[data-parameter=field_password]').val('bar'); - $tr.find('input[data-parameter=field_text_optional]').val('foobar'); - // don't set field_password_optional - $tr.find('input[data-parameter=field_hidden]').val('baz'); - - var storage = view.getStorageConfig($tr); - - expect(storage.validate()).toBe(true); - }); - - it('checks missing mount point', function() { - $tr.find('[name=mountPoint]').val(''); - - $tr.find('input[data-parameter=field_text]').val('foo'); - $tr.find('input[data-parameter=field_password]').val('bar'); - - var storage = view.getStorageConfig($tr); - - expect(storage.validate()).toBe(false); - }); - }); - describe('update storage', function() { - // TODO - }); - describe('delete storage', function() { - // TODO - }); - describe('recheck storages', function() { - // TODO - }); - describe('mount options popovermenu', function() { - var $tr; - var $td; - - beforeEach(function() { - selectBackend('\\OC\\TestBackend'); - $tr = view.$el.find('tr:first'); - $td = $tr.find('.mountOptionsToggle'); - }); - - it('shows popovermenu when clicking on toggle button, hides when clicking outside', function() { - $td.find('.icon-more').click(); - - expect($td.find('.popovermenu.open').length).toEqual(1); - - $('body').mouseup(); - - expect($td.find('.popovermenu.open').length).toEqual(0); - }); - - it('doesnt show the encryption option when encryption is disabled', function () { - view._encryptionEnabled = false; - $td.find('.icon-more').click(); - - expect($td.find('.popovermenu [name=encrypt]:visible').length).toEqual(0); - - $('body').mouseup(); - - expect($td.find('.popovermenu.open').length).toEqual(0); - }); - - it('reads config from mountOptions field', function() { - $tr.find('input.mountOptions').val(JSON.stringify({previews:false})); - - $td.find('.icon-more').click(); - expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(false); - $('body').mouseup(); - - $tr.find('input.mountOptions').val(JSON.stringify({previews:true})); - $td.find('.icon-more').click(); - expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(true); - }); - - it('writes config into mountOptions field', function() { - $td.find('.icon-more').click(); - // defaults to true - var $field = $td.find('.popovermenu [name=previews]'); - expect($field.prop('checked')).toEqual(true); - $td.find('.popovermenu [name=filesystem_check_changes]').val(0); - $('body').mouseup(); - - expect(JSON.parse($tr.find('input.mountOptions').val())).toEqual({ - encrypt: true, - previews: true, - enable_sharing: false, - filesystem_check_changes: 0, - encoding_compatibility: false, - readonly: false - }); - }); - }); - }); - describe('allow user mounts section', function() { - // TODO: test allowUserMounting section - }); -}); |