diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-10-22 11:47:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 11:47:37 +0200 |
commit | e673ec0b879e4d32bb468825c549738e342df0f2 (patch) | |
tree | a7a01e82ac7b7aaddb07232a2d71aee85c17d8a9 /lib | |
parent | 7995c6e1dce83becf1e948de960894d481775a6f (diff) | |
parent | 0a359376628b36256aa8332d79b1af1dfc513ce8 (diff) | |
download | nextcloud-server-e673ec0b879e4d32bb468825c549738e342df0f2.tar.gz nextcloud-server-e673ec0b879e4d32bb468825c549738e342df0f2.zip |
Merge branch 'master' into imountpoint-ocp-storage
Diffstat (limited to 'lib')
1462 files changed, 13453 insertions, 7591 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php index cf25f4498a8..c8eebee3e0c 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -9,6 +9,7 @@ declare(strict_types=1); * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Markus Goetz <markus@woboq.com> @@ -33,7 +34,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use \OCP\AutoloadNotAllowedException; @@ -68,7 +68,7 @@ class Autoloader { * * @param string $root */ - public function addValidRoot(string $root) { + public function addValidRoot(string $root): void { $root = stream_resolve_include_path($root); $this->validRoots[$root] = true; } @@ -76,14 +76,14 @@ class Autoloader { /** * disable the usage of the global classpath \OC::$CLASSPATH */ - public function disableGlobalClassPath() { + public function disableGlobalClassPath(): void { $this->useGlobalClassPath = false; } /** * enable the usage of the global classpath \OC::$CLASSPATH */ - public function enableGlobalClassPath() { + public function enableGlobalClassPath(): void { $this->useGlobalClassPath = true; } @@ -184,7 +184,7 @@ class Autoloader { * * @param \OC\Memcache\Cache $memoryCache Instance of memory cache. */ - public function setMemoryCache(\OC\Memcache\Cache $memoryCache = null) { + public function setMemoryCache(\OC\Memcache\Cache $memoryCache = null): void { $this->memoryCache = $memoryCache; } } diff --git a/lib/base.php b/lib/base.php index 7e3f6d9567b..78dba4f835e 100644 --- a/lib/base.php +++ b/lib/base.php @@ -16,12 +16,13 @@ * @author Eric Masseran <rico.masseran@gmail.com> * @author Florin Peter <github@florin-peter.de> * @author Greta Doci <gretadoci@gmail.com> + * @author J0WI <J0WI@users.noreply.github.com> * @author Jakob Sack <mail@jakobsack.de> * @author jaltek <jaltek@mailbox.org> * @author Jan-Christoph Borchardt <hey@jancborchardt.net> * @author Joachim Sokolowski <github@sokolowski.org> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Jose Quinteiro <github@quinteiro.org> * @author Juan Pablo Villafáñez <jvillafanez@solidgear.es> @@ -60,7 +61,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - use OCP\EventDispatcher\IEventDispatcher; use OCP\Group\Events\UserRemovedEvent; use OCP\ILogger; @@ -68,6 +68,7 @@ use OCP\Share; use OC\Encryption\HookManager; use OC\Files\Filesystem; use OC\Share20\Hooks; +use OCP\User\Events\UserChangedEvent; require_once 'public/Constants.php'; @@ -249,17 +250,17 @@ class OC { if (self::$CLI) { echo $l->t('Cannot write into "config" directory!')."\n"; - echo $l->t('This can usually be fixed by giving the webserver write access to the config directory')."\n"; + echo $l->t('This can usually be fixed by giving the webserver write access to the config directory.')."\n"; echo "\n"; - echo $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.')."\n"; + echo $l->t('But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.')."\n"; echo $l->t('See %s', [ $urlGenerator->linkToDocs('admin-config') ])."\n"; exit; } else { OC_Template::printErrorPage( $l->t('Cannot write into "config" directory!'), - $l->t('This can usually be fixed by giving the webserver write access to the config directory.') . '. ' - . $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s', - [ $urlGenerator->linkToDocs('admin-config') ]), + $l->t('This can usually be fixed by giving the webserver write access to the config directory.') . ' ' + . $l->t('But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.') . ' ' + . $l->t('See %s', [ $urlGenerator->linkToDocs('admin-config') ]), 503 ); } @@ -387,7 +388,7 @@ class OC { if (!empty($incompatibleShippedApps)) { $l = \OC::$server->getL10N('core'); $hint = $l->t('The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server.', [implode(', ', $incompatibleShippedApps)]); - throw new \OC\HintException('The files of the app ' . implode(', ', $incompatibleShippedApps) . ' were not replaced correctly. Make sure it is a version compatible with the server.', $hint); + throw new \OCP\HintException('The files of the app ' . implode(', ', $incompatibleShippedApps) . ' were not replaced correctly. Make sure it is a version compatible with the server.', $hint); } $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); @@ -404,7 +405,7 @@ class OC { public static function initSession() { if (self::$server->getRequest()->getServerProtocol() === 'https') { - ini_set('session.cookie_secure', true); + ini_set('session.cookie_secure', 'true'); } // prevents javascript from accessing php session cookies @@ -843,8 +844,9 @@ class OC { } private static function registerAccountHooks() { - $hookHandler = \OC::$server->get(\OC\Accounts\Hooks::class); - \OCP\Util::connectHook('OC_User', 'changeUser', $hookHandler, 'changeUserHook'); + /** @var IEventDispatcher $dispatcher */ + $dispatcher = \OC::$server->get(IEventDispatcher::class); + $dispatcher->addServiceListener(UserChangedEvent::class, \OC\Accounts\Hooks::class); } private static function registerAppRestrictionsHooks() { @@ -929,7 +931,7 @@ class OC { \OC::$server->get(\bantu\IniGetWrapper\IniGetWrapper::class), \OC::$server->getL10N('lib'), \OC::$server->query(\OCP\Defaults::class), - \OC::$server->getLogger(), + \OC::$server->get(\Psr\Log\LoggerInterface::class), \OC::$server->getSecureRandom(), \OC::$server->query(\OC\Installer::class) ); @@ -985,7 +987,13 @@ class OC { } else { // For guests: Load only filesystem and logging OC_App::loadApps(['filesystem', 'logging']); - self::handleLogin($request); + + // Don't try to login when a client is trying to get a OAuth token. + // OAuth needs to support basic auth too, so the login is not valid + // inside Nextcloud and the Login exception would ruin it. + if ($request->getRawPathInfo() !== '/apps/oauth2/api/v1/token') { + self::handleLogin($request); + } } } @@ -1019,12 +1027,10 @@ class OC { OC_App::loadApps(); OC_User::setupBackends(); OC_Util::setupFS(); - // FIXME - // Redirect to default application - OC_Util::redirectToDefaultPage(); + header('Location: ' . \OC::$server->getURLGenerator()->linkToDefaultPageUrl()); } else { // Not handled and not logged in - header('Location: '.\OC::$server->getURLGenerator()->linkToRouteAbsolute('core.login.showLoginForm')); + header('Location: ' . \OC::$server->getURLGenerator()->linkToRouteAbsolute('core.login.showLoginForm')); } } diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php index 247294d66ee..0cd6055d1b7 100644 --- a/lib/composer/composer/ClassLoader.php +++ b/lib/composer/composer/ClassLoader.php @@ -42,30 +42,75 @@ namespace Composer\Autoload; */ class ClassLoader { + /** @var ?string */ private $vendorDir; // PSR-4 + /** + * @var array[] + * @psalm-var array<string, array<string, int>> + */ private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array<string, array<int, string>> + */ private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array<string, string> + */ private $fallbackDirsPsr4 = array(); // PSR-0 + /** + * @var array[] + * @psalm-var array<string, array<string, string[]>> + */ private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array<string, string> + */ private $fallbackDirsPsr0 = array(); + /** @var bool */ private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array<string, string> + */ private $classMap = array(); + + /** @var bool */ private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array<string, bool> + */ private $missingClasses = array(); + + /** @var ?string */ private $apcuPrefix; + /** + * @var self[] + */ private static $registeredLoaders = array(); + /** + * @param ?string $vendorDir + */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; } + /** + * @return string[] + */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { @@ -75,28 +120,47 @@ class ClassLoader return array(); } + /** + * @return array[] + * @psalm-return array<string, array<int, string>> + */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } + /** + * @return array[] + * @psalm-return array<string, string> + */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } + /** + * @return array[] + * @psalm-return array<string, string> + */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } + /** + * @return string[] Array of classname => path + * @psalm-var array<string, string> + */ public function getClassMap() { return $this->classMap; } /** - * @param array $classMap Class to filename map + * @param string[] $classMap Class to filename map + * @psalm-param array<string, string> $classMap + * + * @return void */ public function addClassMap(array $classMap) { @@ -111,9 +175,11 @@ class ClassLoader * 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 array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param 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) { @@ -156,11 +222,13 @@ class ClassLoader * 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 array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param 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) { @@ -204,8 +272,10 @@ class ClassLoader * 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 array|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void */ public function set($prefix, $paths) { @@ -220,10 +290,12 @@ class ClassLoader * 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 array|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException + * + * @return void */ public function setPsr4($prefix, $paths) { @@ -243,6 +315,8 @@ class ClassLoader * Turns on searching the include path for class files. * * @param bool $useIncludePath + * + * @return void */ public function setUseIncludePath($useIncludePath) { @@ -265,6 +339,8 @@ class ClassLoader * that have not been registered with the class map. * * @param bool $classMapAuthoritative + * + * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { @@ -285,6 +361,8 @@ class ClassLoader * 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) { @@ -305,6 +383,8 @@ class ClassLoader * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void */ public function register($prepend = false) { @@ -324,6 +404,8 @@ class ClassLoader /** * Unregisters this instance as an autoloader. + * + * @return void */ public function unregister() { @@ -338,7 +420,7 @@ class ClassLoader * Loads the given class or interface. * * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise + * @return true|null True if loaded, null otherwise */ public function loadClass($class) { @@ -347,6 +429,8 @@ class ClassLoader return true; } + + return null; } /** @@ -401,6 +485,11 @@ class ClassLoader return self::$registeredLoaders; } + /** + * @param string $class + * @param string $ext + * @return string|false + */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -472,6 +561,10 @@ class ClassLoader * Scope isolated include. * * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private */ function includeFile($file) { diff --git a/lib/composer/composer/InstalledVersions.php b/lib/composer/composer/InstalledVersions.php new file mode 100644 index 00000000000..b3a4e1611e6 --- /dev/null +++ b/lib/composer/composer/InstalledVersions.php @@ -0,0 +1,337 @@ +<?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 it's presence, you can require `composer-runtime-api ^2.0` + */ +class InstalledVersions +{ + private static $installed; + private static $canGetVendors; + 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 || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + 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($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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} + */ + 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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: 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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: 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, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: 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')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + 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') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 560ae8845e3..f40f3c92be7 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -10,6 +10,7 @@ return array( 'OCP\\Accounts\\IAccount' => $baseDir . '/lib/public/Accounts/IAccount.php', 'OCP\\Accounts\\IAccountManager' => $baseDir . '/lib/public/Accounts/IAccountManager.php', 'OCP\\Accounts\\IAccountProperty' => $baseDir . '/lib/public/Accounts/IAccountProperty.php', + 'OCP\\Accounts\\IAccountPropertyCollection' => $baseDir . '/lib/public/Accounts/IAccountPropertyCollection.php', 'OCP\\Accounts\\PropertyDoesNotExistException' => $baseDir . '/lib/public/Accounts/PropertyDoesNotExistException.php', 'OCP\\Activity\\ActivitySettings' => $baseDir . '/lib/public/Activity/ActivitySettings.php', 'OCP\\Activity\\IConsumer' => $baseDir . '/lib/public/Activity/IConsumer.php', @@ -63,6 +64,7 @@ return array( 'OCP\\AppFramework\\Http\\Template\\LinkMenuAction' => $baseDir . '/lib/public/AppFramework/Http/Template/LinkMenuAction.php', 'OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse' => $baseDir . '/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php', 'OCP\\AppFramework\\Http\\Template\\SimpleMenuAction' => $baseDir . '/lib/public/AppFramework/Http/Template/SimpleMenuAction.php', + 'OCP\\AppFramework\\Http\\TextPlainResponse' => $baseDir . '/lib/public/AppFramework/Http/TextPlainResponse.php', 'OCP\\AppFramework\\Http\\TooManyRequestsResponse' => $baseDir . '/lib/public/AppFramework/Http/TooManyRequestsResponse.php', 'OCP\\AppFramework\\Http\\ZipResponse' => $baseDir . '/lib/public/AppFramework/Http/ZipResponse.php', 'OCP\\AppFramework\\IAppContainer' => $baseDir . '/lib/public/AppFramework/IAppContainer.php', @@ -103,6 +105,8 @@ return array( 'OCP\\Authentication\\TwoFactorAuth\\RegistryEvent' => $baseDir . '/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php', 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorException' => $baseDir . '/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php', 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorProviderDisabled' => $baseDir . '/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php', + 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorProviderForUserDisabled' => $baseDir . '/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php', + 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorProviderForUserEnabled' => $baseDir . '/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php', 'OCP\\AutoloadNotAllowedException' => $baseDir . '/lib/public/AutoloadNotAllowedException.php', 'OCP\\BackgroundJob' => $baseDir . '/lib/public/BackgroundJob.php', 'OCP\\BackgroundJob\\IJob' => $baseDir . '/lib/public/BackgroundJob/IJob.php', @@ -112,7 +116,11 @@ return array( 'OCP\\BackgroundJob\\TimedJob' => $baseDir . '/lib/public/BackgroundJob/TimedJob.php', 'OCP\\Broadcast\\Events\\IBroadcastEvent' => $baseDir . '/lib/public/Broadcast/Events/IBroadcastEvent.php', 'OCP\\Calendar\\BackendTemporarilyUnavailableException' => $baseDir . '/lib/public/Calendar/BackendTemporarilyUnavailableException.php', + 'OCP\\Calendar\\Exceptions\\CalendarException' => $baseDir . '/lib/public/Calendar/Exceptions/CalendarException.php', 'OCP\\Calendar\\ICalendar' => $baseDir . '/lib/public/Calendar/ICalendar.php', + 'OCP\\Calendar\\ICalendarProvider' => $baseDir . '/lib/public/Calendar/ICalendarProvider.php', + 'OCP\\Calendar\\ICalendarQuery' => $baseDir . '/lib/public/Calendar/ICalendarQuery.php', + 'OCP\\Calendar\\ICreateFromString' => $baseDir . '/lib/public/Calendar/ICreateFromString.php', 'OCP\\Calendar\\IManager' => $baseDir . '/lib/public/Calendar/IManager.php', 'OCP\\Calendar\\IMetadataProvider' => $baseDir . '/lib/public/Calendar/IMetadataProvider.php', 'OCP\\Calendar\\Resource\\IBackend' => $baseDir . '/lib/public/Calendar/Resource/IBackend.php', @@ -173,12 +181,14 @@ return array( 'OCP\\DB\\QueryBuilder\\IQueryFunction' => $baseDir . '/lib/public/DB/QueryBuilder/IQueryFunction.php', 'OCP\\DB\\Types' => $baseDir . '/lib/public/DB/Types.php', 'OCP\\Dashboard\\Exceptions\\DashboardAppNotAvailableException' => $baseDir . '/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php', + 'OCP\\Dashboard\\IAPIWidget' => $baseDir . '/lib/public/Dashboard/IAPIWidget.php', 'OCP\\Dashboard\\IDashboardManager' => $baseDir . '/lib/public/Dashboard/IDashboardManager.php', 'OCP\\Dashboard\\IDashboardWidget' => $baseDir . '/lib/public/Dashboard/IDashboardWidget.php', 'OCP\\Dashboard\\IManager' => $baseDir . '/lib/public/Dashboard/IManager.php', 'OCP\\Dashboard\\IWidget' => $baseDir . '/lib/public/Dashboard/IWidget.php', 'OCP\\Dashboard\\Model\\IWidgetConfig' => $baseDir . '/lib/public/Dashboard/Model/IWidgetConfig.php', 'OCP\\Dashboard\\Model\\IWidgetRequest' => $baseDir . '/lib/public/Dashboard/Model/IWidgetRequest.php', + 'OCP\\Dashboard\\Model\\WidgetItem' => $baseDir . '/lib/public/Dashboard/Model/WidgetItem.php', 'OCP\\Dashboard\\Model\\WidgetSetting' => $baseDir . '/lib/public/Dashboard/Model/WidgetSetting.php', 'OCP\\Dashboard\\Model\\WidgetSetup' => $baseDir . '/lib/public/Dashboard/Model/WidgetSetup.php', 'OCP\\Dashboard\\Model\\WidgetTemplate' => $baseDir . '/lib/public/Dashboard/Model/WidgetTemplate.php', @@ -365,6 +375,7 @@ return array( 'OCP\\Group\\Events\\UserAddedEvent' => $baseDir . '/lib/public/Group/Events/UserAddedEvent.php', 'OCP\\Group\\Events\\UserRemovedEvent' => $baseDir . '/lib/public/Group/Events/UserRemovedEvent.php', 'OCP\\Group\\ISubAdmin' => $baseDir . '/lib/public/Group/ISubAdmin.php', + 'OCP\\HintException' => $baseDir . '/lib/public/HintException.php', 'OCP\\Http\\Client\\IClient' => $baseDir . '/lib/public/Http/Client/IClient.php', 'OCP\\Http\\Client\\IClientService' => $baseDir . '/lib/public/Http/Client/IClientService.php', 'OCP\\Http\\Client\\IResponse' => $baseDir . '/lib/public/Http/Client/IResponse.php', @@ -420,6 +431,7 @@ return array( 'OCP\\Lock\\LockedException' => $baseDir . '/lib/public/Lock/LockedException.php', 'OCP\\Lock\\ManuallyLockedException' => $baseDir . '/lib/public/Lock/ManuallyLockedException.php', 'OCP\\Lockdown\\ILockdownManager' => $baseDir . '/lib/public/Lockdown/ILockdownManager.php', + 'OCP\\Log\\Audit\\CriticalActionPerformedEvent' => $baseDir . '/lib/public/Log/Audit/CriticalActionPerformedEvent.php', 'OCP\\Log\\IDataLogger' => $baseDir . '/lib/public/Log/IDataLogger.php', 'OCP\\Log\\IFileBased' => $baseDir . '/lib/public/Log/IFileBased.php', 'OCP\\Log\\ILogFactory' => $baseDir . '/lib/public/Log/ILogFactory.php', @@ -448,6 +460,8 @@ return array( 'OCP\\Preview\\IProvider' => $baseDir . '/lib/public/Preview/IProvider.php', 'OCP\\Preview\\IProviderV2' => $baseDir . '/lib/public/Preview/IProviderV2.php', 'OCP\\Preview\\IVersionedPreviewFile' => $baseDir . '/lib/public/Preview/IVersionedPreviewFile.php', + 'OCP\\Profile\\ILinkAction' => $baseDir . '/lib/public/Profile/ILinkAction.php', + 'OCP\\Profile\\ParameterDoesNotExistException' => $baseDir . '/lib/public/Profile/ParameterDoesNotExistException.php', 'OCP\\Remote\\Api\\IApiCollection' => $baseDir . '/lib/public/Remote/Api/IApiCollection.php', 'OCP\\Remote\\Api\\IApiFactory' => $baseDir . '/lib/public/Remote/Api/IApiFactory.php', 'OCP\\Remote\\Api\\ICapabilitiesApi' => $baseDir . '/lib/public/Remote/Api/ICapabilitiesApi.php', @@ -480,7 +494,10 @@ return array( 'OCP\\Security\\ICrypto' => $baseDir . '/lib/public/Security/ICrypto.php', 'OCP\\Security\\IHasher' => $baseDir . '/lib/public/Security/IHasher.php', 'OCP\\Security\\ISecureRandom' => $baseDir . '/lib/public/Security/ISecureRandom.php', + 'OCP\\Security\\VerificationToken\\IVerificationToken' => $baseDir . '/lib/public/Security/VerificationToken/IVerificationToken.php', + 'OCP\\Security\\VerificationToken\\InvalidTokenException' => $baseDir . '/lib/public/Security/VerificationToken/InvalidTokenException.php', 'OCP\\Session\\Exceptions\\SessionNotAvailableException' => $baseDir . '/lib/public/Session/Exceptions/SessionNotAvailableException.php', + 'OCP\\Settings\\IDelegatedSettings' => $baseDir . '/lib/public/Settings/IDelegatedSettings.php', 'OCP\\Settings\\IIconSection' => $baseDir . '/lib/public/Settings/IIconSection.php', 'OCP\\Settings\\IManager' => $baseDir . '/lib/public/Settings/IManager.php', 'OCP\\Settings\\ISettings' => $baseDir . '/lib/public/Settings/ISettings.php', @@ -519,7 +536,6 @@ return array( 'OCP\\SystemTag\\TagAlreadyExistsException' => $baseDir . '/lib/public/SystemTag/TagAlreadyExistsException.php', 'OCP\\SystemTag\\TagNotFoundException' => $baseDir . '/lib/public/SystemTag/TagNotFoundException.php', 'OCP\\Template' => $baseDir . '/lib/public/Template.php', - 'OCP\\User' => $baseDir . '/lib/public/User.php', 'OCP\\UserInterface' => $baseDir . '/lib/public/UserInterface.php', 'OCP\\UserStatus\\IManager' => $baseDir . '/lib/public/UserStatus/IManager.php', 'OCP\\UserStatus\\IProvider' => $baseDir . '/lib/public/UserStatus/IProvider.php', @@ -579,7 +595,9 @@ return array( 'OC\\Accounts\\Account' => $baseDir . '/lib/private/Accounts/Account.php', 'OC\\Accounts\\AccountManager' => $baseDir . '/lib/private/Accounts/AccountManager.php', 'OC\\Accounts\\AccountProperty' => $baseDir . '/lib/private/Accounts/AccountProperty.php', + 'OC\\Accounts\\AccountPropertyCollection' => $baseDir . '/lib/private/Accounts/AccountPropertyCollection.php', 'OC\\Accounts\\Hooks' => $baseDir . '/lib/private/Accounts/Hooks.php', + 'OC\\Accounts\\TAccountsHelper' => $baseDir . '/lib/private/Accounts/TAccountsHelper.php', 'OC\\Activity\\ActivitySettingsAdapter' => $baseDir . '/lib/private/Activity/ActivitySettingsAdapter.php', 'OC\\Activity\\Event' => $baseDir . '/lib/private/Activity/Event.php', 'OC\\Activity\\EventMerger' => $baseDir . '/lib/private/Activity/EventMerger.php', @@ -593,6 +611,7 @@ return array( 'OC\\AppFramework\\Bootstrap\\EventListenerRegistration' => $baseDir . '/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php', 'OC\\AppFramework\\Bootstrap\\FunctionInjector' => $baseDir . '/lib/private/AppFramework/Bootstrap/FunctionInjector.php', 'OC\\AppFramework\\Bootstrap\\ParameterRegistration' => $baseDir . '/lib/private/AppFramework/Bootstrap/ParameterRegistration.php', + 'OC\\AppFramework\\Bootstrap\\PreviewProviderRegistration' => $baseDir . '/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php', 'OC\\AppFramework\\Bootstrap\\RegistrationContext' => $baseDir . '/lib/private/AppFramework/Bootstrap/RegistrationContext.php', 'OC\\AppFramework\\Bootstrap\\ServiceAliasRegistration' => $baseDir . '/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php', 'OC\\AppFramework\\Bootstrap\\ServiceFactoryRegistration' => $baseDir . '/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php', @@ -682,8 +701,10 @@ return array( 'OC\\Authentication\\Listeners\\RemoteWipeActivityListener' => $baseDir . '/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php', 'OC\\Authentication\\Listeners\\RemoteWipeEmailListener' => $baseDir . '/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php', 'OC\\Authentication\\Listeners\\RemoteWipeNotificationsListener' => $baseDir . '/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php', + 'OC\\Authentication\\Listeners\\UserDeletedFilesCleanupListener' => $baseDir . '/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php', 'OC\\Authentication\\Listeners\\UserDeletedStoreCleanupListener' => $baseDir . '/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php', 'OC\\Authentication\\Listeners\\UserDeletedTokenCleanupListener' => $baseDir . '/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php', + 'OC\\Authentication\\Listeners\\UserDeletedWebAuthnCleanupListener' => $baseDir . '/lib/private/Authentication/Listeners/UserDeletedWebAuthnCleanupListener.php', 'OC\\Authentication\\Listeners\\UserLoggedInListener' => $baseDir . '/lib/private/Authentication/Listeners/UserLoggedInListener.php', 'OC\\Authentication\\LoginCredentials\\Credentials' => $baseDir . '/lib/private/Authentication/LoginCredentials/Credentials.php', 'OC\\Authentication\\LoginCredentials\\Store' => $baseDir . '/lib/private/Authentication/LoginCredentials/Store.php', @@ -734,6 +755,7 @@ return array( 'OC\\Avatar\\Avatar' => $baseDir . '/lib/private/Avatar/Avatar.php', 'OC\\Avatar\\AvatarManager' => $baseDir . '/lib/private/Avatar/AvatarManager.php', 'OC\\Avatar\\GuestAvatar' => $baseDir . '/lib/private/Avatar/GuestAvatar.php', + 'OC\\Avatar\\PlaceholderAvatar' => $baseDir . '/lib/private/Avatar/PlaceholderAvatar.php', 'OC\\Avatar\\UserAvatar' => $baseDir . '/lib/private/Avatar/UserAvatar.php', 'OC\\BackgroundJob\\Job' => $baseDir . '/lib/private/BackgroundJob/Job.php', 'OC\\BackgroundJob\\JobList' => $baseDir . '/lib/private/BackgroundJob/JobList.php', @@ -744,6 +766,7 @@ return array( 'OC\\Broadcast\\Events\\BroadcastEvent' => $baseDir . '/lib/private/Broadcast/Events/BroadcastEvent.php', 'OC\\Cache\\CappedMemoryCache' => $baseDir . '/lib/private/Cache/CappedMemoryCache.php', 'OC\\Cache\\File' => $baseDir . '/lib/private/Cache/File.php', + 'OC\\Calendar\\CalendarQuery' => $baseDir . '/lib/private/Calendar/CalendarQuery.php', 'OC\\Calendar\\Manager' => $baseDir . '/lib/private/Calendar/Manager.php', 'OC\\Calendar\\Resource\\Manager' => $baseDir . '/lib/private/Calendar/Resource/Manager.php', 'OC\\Calendar\\Room\\Manager' => $baseDir . '/lib/private/Calendar/Room/Manager.php', @@ -784,10 +807,12 @@ return array( 'OC\\Contacts\\ContactsMenu\\Entry' => $baseDir . '/lib/private/Contacts/ContactsMenu/Entry.php', 'OC\\Contacts\\ContactsMenu\\Manager' => $baseDir . '/lib/private/Contacts/ContactsMenu/Manager.php', 'OC\\Contacts\\ContactsMenu\\Providers\\EMailProvider' => $baseDir . '/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php', + 'OC\\Contacts\\ContactsMenu\\Providers\\ProfileProvider' => $baseDir . '/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php', 'OC\\Core\\Application' => $baseDir . '/core/Application.php', 'OC\\Core\\BackgroundJobs\\BackgroundCleanupUpdaterBackupsJob' => $baseDir . '/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php', 'OC\\Core\\BackgroundJobs\\CheckForUserCertificates' => $baseDir . '/core/BackgroundJobs/CheckForUserCertificates.php', 'OC\\Core\\BackgroundJobs\\CleanupLoginFlowV2' => $baseDir . '/core/BackgroundJobs/CleanupLoginFlowV2.php', + 'OC\\Core\\BackgroundJobs\\LookupServerSendCheckBackgroundJob' => $baseDir . '/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php', 'OC\\Core\\Command\\App\\CheckCode' => $baseDir . '/core/Command/App/CheckCode.php', 'OC\\Core\\Command\\App\\Disable' => $baseDir . '/core/Command/App/Disable.php', 'OC\\Core\\Command\\App\\Enable' => $baseDir . '/core/Command/App/Enable.php', @@ -799,6 +824,7 @@ return array( 'OC\\Core\\Command\\Background\\Ajax' => $baseDir . '/core/Command/Background/Ajax.php', 'OC\\Core\\Command\\Background\\Base' => $baseDir . '/core/Command/Background/Base.php', 'OC\\Core\\Command\\Background\\Cron' => $baseDir . '/core/Command/Background/Cron.php', + 'OC\\Core\\Command\\Background\\Job' => $baseDir . '/core/Command/Background/Job.php', 'OC\\Core\\Command\\Background\\WebCron' => $baseDir . '/core/Command/Background/WebCron.php', 'OC\\Core\\Command\\Base' => $baseDir . '/core/Command/Base.php', 'OC\\Core\\Command\\Broadcast\\Test' => $baseDir . '/core/Command/Broadcast/Test.php', @@ -821,7 +847,6 @@ return array( 'OC\\Core\\Command\\Db\\ConvertType' => $baseDir . '/core/Command/Db/ConvertType.php', 'OC\\Core\\Command\\Db\\Migrations\\ExecuteCommand' => $baseDir . '/core/Command/Db/Migrations/ExecuteCommand.php', 'OC\\Core\\Command\\Db\\Migrations\\GenerateCommand' => $baseDir . '/core/Command/Db/Migrations/GenerateCommand.php', - 'OC\\Core\\Command\\Db\\Migrations\\GenerateFromSchemaFileCommand' => $baseDir . '/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php', 'OC\\Core\\Command\\Db\\Migrations\\MigrateCommand' => $baseDir . '/core/Command/Db/Migrations/MigrateCommand.php', 'OC\\Core\\Command\\Db\\Migrations\\StatusCommand' => $baseDir . '/core/Command/Db/Migrations/StatusCommand.php', 'OC\\Core\\Command\\Encryption\\ChangeKeyStorageRoot' => $baseDir . '/core/Command/Encryption/ChangeKeyStorageRoot.php', @@ -864,6 +889,10 @@ return array( 'OC\\Core\\Command\\Security\\RemoveCertificate' => $baseDir . '/core/Command/Security/RemoveCertificate.php', 'OC\\Core\\Command\\Security\\ResetBruteforceAttempts' => $baseDir . '/core/Command/Security/ResetBruteforceAttempts.php', 'OC\\Core\\Command\\Status' => $baseDir . '/core/Command/Status.php', + 'OC\\Core\\Command\\SystemTag\\Add' => $baseDir . '/core/Command/SystemTag/Add.php', + 'OC\\Core\\Command\\SystemTag\\Delete' => $baseDir . '/core/Command/SystemTag/Delete.php', + 'OC\\Core\\Command\\SystemTag\\Edit' => $baseDir . '/core/Command/SystemTag/Edit.php', + 'OC\\Core\\Command\\SystemTag\\ListCommand' => $baseDir . '/core/Command/SystemTag/ListCommand.php', 'OC\\Core\\Command\\TwoFactorAuth\\Base' => $baseDir . '/core/Command/TwoFactorAuth/Base.php', 'OC\\Core\\Command\\TwoFactorAuth\\Cleanup' => $baseDir . '/core/Command/TwoFactorAuth/Cleanup.php', 'OC\\Core\\Command\\TwoFactorAuth\\Disable' => $baseDir . '/core/Command/TwoFactorAuth/Disable.php', @@ -892,6 +921,7 @@ return array( 'OC\\Core\\Controller\\ContactsMenuController' => $baseDir . '/core/Controller/ContactsMenuController.php', 'OC\\Core\\Controller\\CssController' => $baseDir . '/core/Controller/CssController.php', 'OC\\Core\\Controller\\GuestAvatarController' => $baseDir . '/core/Controller/GuestAvatarController.php', + 'OC\\Core\\Controller\\HoverCardController' => $baseDir . '/core/Controller/HoverCardController.php', 'OC\\Core\\Controller\\JsController' => $baseDir . '/core/Controller/JsController.php', 'OC\\Core\\Controller\\LoginController' => $baseDir . '/core/Controller/LoginController.php', 'OC\\Core\\Controller\\LostController' => $baseDir . '/core/Controller/LostController.php', @@ -899,6 +929,8 @@ return array( 'OC\\Core\\Controller\\OCJSController' => $baseDir . '/core/Controller/OCJSController.php', 'OC\\Core\\Controller\\OCSController' => $baseDir . '/core/Controller/OCSController.php', 'OC\\Core\\Controller\\PreviewController' => $baseDir . '/core/Controller/PreviewController.php', + 'OC\\Core\\Controller\\ProfileApiController' => $baseDir . '/core/Controller/ProfileApiController.php', + 'OC\\Core\\Controller\\ProfilePageController' => $baseDir . '/core/Controller/ProfilePageController.php', 'OC\\Core\\Controller\\RecommendedAppsController' => $baseDir . '/core/Controller/RecommendedAppsController.php', 'OC\\Core\\Controller\\SearchController' => $baseDir . '/core/Controller/SearchController.php', 'OC\\Core\\Controller\\SetupController' => $baseDir . '/core/Controller/SetupController.php', @@ -915,6 +947,8 @@ return array( 'OC\\Core\\Data\\LoginFlowV2Tokens' => $baseDir . '/core/Data/LoginFlowV2Tokens.php', 'OC\\Core\\Db\\LoginFlowV2' => $baseDir . '/core/Db/LoginFlowV2.php', 'OC\\Core\\Db\\LoginFlowV2Mapper' => $baseDir . '/core/Db/LoginFlowV2Mapper.php', + 'OC\\Core\\Db\\ProfileConfig' => $baseDir . '/core/Db/ProfileConfig.php', + 'OC\\Core\\Db\\ProfileConfigMapper' => $baseDir . '/core/Db/ProfileConfigMapper.php', 'OC\\Core\\Exception\\LoginFlowV2NotFoundException' => $baseDir . '/core/Exception/LoginFlowV2NotFoundException.php', 'OC\\Core\\Exception\\ResetPasswordException' => $baseDir . '/core/Exception/ResetPasswordException.php', 'OC\\Core\\Middleware\\TwoFactorMiddleware' => $baseDir . '/core/Middleware/TwoFactorMiddleware.php', @@ -953,6 +987,9 @@ return array( 'OC\\Core\\Migrations\\Version21000Date20210309185126' => $baseDir . '/core/Migrations/Version21000Date20210309185126.php', 'OC\\Core\\Migrations\\Version21000Date20210309185127' => $baseDir . '/core/Migrations/Version21000Date20210309185127.php', 'OC\\Core\\Migrations\\Version22000Date20210216080825' => $baseDir . '/core/Migrations/Version22000Date20210216080825.php', + 'OC\\Core\\Migrations\\Version23000Date20210721100600' => $baseDir . '/core/Migrations/Version23000Date20210721100600.php', + 'OC\\Core\\Migrations\\Version23000Date20210906132259' => $baseDir . '/core/Migrations/Version23000Date20210906132259.php', + 'OC\\Core\\Migrations\\Version23000Date20210930122352' => $baseDir . '/core/Migrations/Version23000Date20210930122352.php', 'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php', 'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php', 'OC\\DB\\Adapter' => $baseDir . '/lib/private/DB/Adapter.php', @@ -964,8 +1001,6 @@ return array( 'OC\\DB\\ConnectionAdapter' => $baseDir . '/lib/private/DB/ConnectionAdapter.php', 'OC\\DB\\ConnectionFactory' => $baseDir . '/lib/private/DB/ConnectionFactory.php', 'OC\\DB\\Exceptions\\DbalException' => $baseDir . '/lib/private/DB/Exceptions/DbalException.php', - 'OC\\DB\\MDB2SchemaManager' => $baseDir . '/lib/private/DB/MDB2SchemaManager.php', - 'OC\\DB\\MDB2SchemaReader' => $baseDir . '/lib/private/DB/MDB2SchemaReader.php', 'OC\\DB\\MigrationException' => $baseDir . '/lib/private/DB/MigrationException.php', 'OC\\DB\\MigrationService' => $baseDir . '/lib/private/DB/MigrationService.php', 'OC\\DB\\Migrator' => $baseDir . '/lib/private/DB/Migrator.php', @@ -1052,6 +1087,7 @@ return array( 'OC\\Files\\Cache\\Propagator' => $baseDir . '/lib/private/Files/Cache/Propagator.php', 'OC\\Files\\Cache\\QuerySearchHelper' => $baseDir . '/lib/private/Files/Cache/QuerySearchHelper.php', 'OC\\Files\\Cache\\Scanner' => $baseDir . '/lib/private/Files/Cache/Scanner.php', + 'OC\\Files\\Cache\\SearchBuilder' => $baseDir . '/lib/private/Files/Cache/SearchBuilder.php', 'OC\\Files\\Cache\\Storage' => $baseDir . '/lib/private/Files/Cache/Storage.php', 'OC\\Files\\Cache\\StorageGlobal' => $baseDir . '/lib/private/Files/Cache/StorageGlobal.php', 'OC\\Files\\Cache\\Updater' => $baseDir . '/lib/private/Files/Cache/Updater.php', @@ -1100,6 +1136,9 @@ return array( 'OC\\Files\\ObjectStore\\Swift' => $baseDir . '/lib/private/Files/ObjectStore/Swift.php', 'OC\\Files\\ObjectStore\\SwiftFactory' => $baseDir . '/lib/private/Files/ObjectStore/SwiftFactory.php', 'OC\\Files\\ObjectStore\\SwiftV2CachingAuthService' => $baseDir . '/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php', + 'OC\\Files\\Search\\QueryOptimizer\\PathPrefixOptimizer' => $baseDir . '/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php', + 'OC\\Files\\Search\\QueryOptimizer\\QueryOptimizer' => $baseDir . '/lib/private/Files/Search/QueryOptimizer/QueryOptimizer.php', + 'OC\\Files\\Search\\QueryOptimizer\\QueryOptimizerStep' => $baseDir . '/lib/private/Files/Search/QueryOptimizer/QueryOptimizerStep.php', 'OC\\Files\\Search\\SearchBinaryOperator' => $baseDir . '/lib/private/Files/Search/SearchBinaryOperator.php', 'OC\\Files\\Search\\SearchComparison' => $baseDir . '/lib/private/Files/Search/SearchComparison.php', 'OC\\Files\\Search\\SearchOrder' => $baseDir . '/lib/private/Files/Search/SearchOrder.php', @@ -1111,7 +1150,6 @@ return array( 'OC\\Files\\Storage\\CommonTest' => $baseDir . '/lib/private/Files/Storage/CommonTest.php', 'OC\\Files\\Storage\\DAV' => $baseDir . '/lib/private/Files/Storage/DAV.php', 'OC\\Files\\Storage\\FailedStorage' => $baseDir . '/lib/private/Files/Storage/FailedStorage.php', - 'OC\\Files\\Storage\\Flysystem' => $baseDir . '/lib/private/Files/Storage/Flysystem.php', 'OC\\Files\\Storage\\Home' => $baseDir . '/lib/private/Files/Storage/Home.php', 'OC\\Files\\Storage\\Local' => $baseDir . '/lib/private/Files/Storage/Local.php', 'OC\\Files\\Storage\\LocalRootStorage' => $baseDir . '/lib/private/Files/Storage/LocalRootStorage.php', @@ -1157,6 +1195,9 @@ return array( 'OC\\Hooks\\PublicEmitter' => $baseDir . '/lib/private/Hooks/PublicEmitter.php', 'OC\\Http\\Client\\Client' => $baseDir . '/lib/private/Http/Client/Client.php', 'OC\\Http\\Client\\ClientService' => $baseDir . '/lib/private/Http/Client/ClientService.php', + 'OC\\Http\\Client\\DnsPinMiddleware' => $baseDir . '/lib/private/Http/Client/DnsPinMiddleware.php', + 'OC\\Http\\Client\\LocalAddressChecker' => $baseDir . '/lib/private/Http/Client/LocalAddressChecker.php', + 'OC\\Http\\Client\\NegativeDnsCache' => $baseDir . '/lib/private/Http/Client/NegativeDnsCache.php', 'OC\\Http\\Client\\Response' => $baseDir . '/lib/private/Http/Client/Response.php', 'OC\\Http\\CookieHelper' => $baseDir . '/lib/private/Http/CookieHelper.php', 'OC\\Http\\WellKnown\\RequestManager' => $baseDir . '/lib/private/Http/WellKnown/RequestManager.php', @@ -1178,6 +1219,7 @@ return array( 'OC\\L10N\\LanguageIterator' => $baseDir . '/lib/private/L10N/LanguageIterator.php', 'OC\\L10N\\LanguageNotFoundException' => $baseDir . '/lib/private/L10N/LanguageNotFoundException.php', 'OC\\L10N\\LazyL10N' => $baseDir . '/lib/private/L10N/LazyL10N.php', + 'OC\\LDAP\\NullLDAPProviderFactory' => $baseDir . '/lib/private/LDAP/NullLDAPProviderFactory.php', 'OC\\LargeFileHelper' => $baseDir . '/lib/private/LargeFileHelper.php', 'OC\\Lock\\AbstractLockingProvider' => $baseDir . '/lib/private/Lock/AbstractLockingProvider.php', 'OC\\Lock\\DBLockingProvider' => $baseDir . '/lib/private/Lock/DBLockingProvider.php', @@ -1268,6 +1310,12 @@ return array( 'OC\\Preview\\WatcherConnector' => $baseDir . '/lib/private/Preview/WatcherConnector.php', 'OC\\Preview\\WebP' => $baseDir . '/lib/private/Preview/WebP.php', 'OC\\Preview\\XBitmap' => $baseDir . '/lib/private/Preview/XBitmap.php', + 'OC\\Profile\\Actions\\EmailAction' => $baseDir . '/lib/private/Profile/Actions/EmailAction.php', + 'OC\\Profile\\Actions\\PhoneAction' => $baseDir . '/lib/private/Profile/Actions/PhoneAction.php', + 'OC\\Profile\\Actions\\TwitterAction' => $baseDir . '/lib/private/Profile/Actions/TwitterAction.php', + 'OC\\Profile\\Actions\\WebsiteAction' => $baseDir . '/lib/private/Profile/Actions/WebsiteAction.php', + 'OC\\Profile\\ProfileManager' => $baseDir . '/lib/private/Profile/ProfileManager.php', + 'OC\\Profile\\TProfileHelper' => $baseDir . '/lib/private/Profile/TProfileHelper.php', 'OC\\RedisFactory' => $baseDir . '/lib/private/RedisFactory.php', 'OC\\Remote\\Api\\ApiBase' => $baseDir . '/lib/private/Remote/Api/ApiBase.php', 'OC\\Remote\\Api\\ApiCollection' => $baseDir . '/lib/private/Remote/Api/ApiCollection.php', @@ -1299,6 +1347,7 @@ return array( 'OC\\Repair\\NC20\\ShippedDashboardEnable' => $baseDir . '/lib/private/Repair/NC20/ShippedDashboardEnable.php', 'OC\\Repair\\NC21\\AddCheckForUserCertificatesJob' => $baseDir . '/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php', 'OC\\Repair\\NC21\\ValidatePhoneNumber' => $baseDir . '/lib/private/Repair/NC21/ValidatePhoneNumber.php', + 'OC\\Repair\\NC22\\LookupServerSendCheck' => $baseDir . '/lib/private/Repair/NC22/LookupServerSendCheck.php', 'OC\\Repair\\OldGroupMembershipShares' => $baseDir . '/lib/private/Repair/OldGroupMembershipShares.php', 'OC\\Repair\\Owncloud\\CleanPreviews' => $baseDir . '/lib/private/Repair/Owncloud/CleanPreviews.php', 'OC\\Repair\\Owncloud\\CleanPreviewsBackgroundJob' => $baseDir . '/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php', @@ -1346,12 +1395,15 @@ return array( 'OC\\Security\\IdentityProof\\Manager' => $baseDir . '/lib/private/Security/IdentityProof/Manager.php', 'OC\\Security\\IdentityProof\\Signer' => $baseDir . '/lib/private/Security/IdentityProof/Signer.php', 'OC\\Security\\Normalizer\\IpAddress' => $baseDir . '/lib/private/Security/Normalizer/IpAddress.php', + 'OC\\Security\\RateLimiting\\Backend\\DatabaseBackend' => $baseDir . '/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php', 'OC\\Security\\RateLimiting\\Backend\\IBackend' => $baseDir . '/lib/private/Security/RateLimiting/Backend/IBackend.php', - 'OC\\Security\\RateLimiting\\Backend\\MemoryCache' => $baseDir . '/lib/private/Security/RateLimiting/Backend/MemoryCache.php', + 'OC\\Security\\RateLimiting\\Backend\\MemoryCacheBackend' => $baseDir . '/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php', 'OC\\Security\\RateLimiting\\Exception\\RateLimitExceededException' => $baseDir . '/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php', 'OC\\Security\\RateLimiting\\Limiter' => $baseDir . '/lib/private/Security/RateLimiting/Limiter.php', 'OC\\Security\\SecureRandom' => $baseDir . '/lib/private/Security/SecureRandom.php', 'OC\\Security\\TrustedDomainHelper' => $baseDir . '/lib/private/Security/TrustedDomainHelper.php', + 'OC\\Security\\VerificationToken\\CleanUpJob' => $baseDir . '/lib/private/Security/VerificationToken/CleanUpJob.php', + 'OC\\Security\\VerificationToken\\VerificationToken' => $baseDir . '/lib/private/Security/VerificationToken/VerificationToken.php', 'OC\\Server' => $baseDir . '/lib/private/Server.php', 'OC\\ServerContainer' => $baseDir . '/lib/private/ServerContainer.php', 'OC\\ServerNotAvailableException' => $baseDir . '/lib/private/ServerNotAvailableException.php', @@ -1361,6 +1413,8 @@ return array( 'OC\\Session\\Internal' => $baseDir . '/lib/private/Session/Internal.php', 'OC\\Session\\Memory' => $baseDir . '/lib/private/Session/Memory.php', 'OC\\Session\\Session' => $baseDir . '/lib/private/Session/Session.php', + 'OC\\Settings\\AuthorizedGroup' => $baseDir . '/lib/private/Settings/AuthorizedGroup.php', + 'OC\\Settings\\AuthorizedGroupMapper' => $baseDir . '/lib/private/Settings/AuthorizedGroupMapper.php', 'OC\\Settings\\Manager' => $baseDir . '/lib/private/Settings/Manager.php', 'OC\\Settings\\Section' => $baseDir . '/lib/private/Settings/Section.php', 'OC\\Setup' => $baseDir . '/lib/private/Setup.php', @@ -1415,6 +1469,7 @@ return array( 'OC\\Updater\\ChangesMapper' => $baseDir . '/lib/private/Updater/ChangesMapper.php', 'OC\\Updater\\ChangesResult' => $baseDir . '/lib/private/Updater/ChangesResult.php', 'OC\\Updater\\VersionCheck' => $baseDir . '/lib/private/Updater/VersionCheck.php', + 'OC\\UserStatus\\ISettableProvider' => $baseDir . '/lib/private/UserStatus/ISettableProvider.php', 'OC\\UserStatus\\Manager' => $baseDir . '/lib/private/UserStatus/Manager.php', 'OC\\User\\Backend' => $baseDir . '/lib/private/User/Backend.php', 'OC\\User\\Database' => $baseDir . '/lib/private/User/Database.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index ce243e4ce3a..13fffdd53ad 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -39,6 +39,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Accounts\\IAccount' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccount.php', 'OCP\\Accounts\\IAccountManager' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccountManager.php', 'OCP\\Accounts\\IAccountProperty' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccountProperty.php', + 'OCP\\Accounts\\IAccountPropertyCollection' => __DIR__ . '/../../..' . '/lib/public/Accounts/IAccountPropertyCollection.php', 'OCP\\Accounts\\PropertyDoesNotExistException' => __DIR__ . '/../../..' . '/lib/public/Accounts/PropertyDoesNotExistException.php', 'OCP\\Activity\\ActivitySettings' => __DIR__ . '/../../..' . '/lib/public/Activity/ActivitySettings.php', 'OCP\\Activity\\IConsumer' => __DIR__ . '/../../..' . '/lib/public/Activity/IConsumer.php', @@ -92,6 +93,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\AppFramework\\Http\\Template\\LinkMenuAction' => __DIR__ . '/../../..' . '/lib/public/AppFramework/Http/Template/LinkMenuAction.php', 'OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse' => __DIR__ . '/../../..' . '/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php', 'OCP\\AppFramework\\Http\\Template\\SimpleMenuAction' => __DIR__ . '/../../..' . '/lib/public/AppFramework/Http/Template/SimpleMenuAction.php', + 'OCP\\AppFramework\\Http\\TextPlainResponse' => __DIR__ . '/../../..' . '/lib/public/AppFramework/Http/TextPlainResponse.php', 'OCP\\AppFramework\\Http\\TooManyRequestsResponse' => __DIR__ . '/../../..' . '/lib/public/AppFramework/Http/TooManyRequestsResponse.php', 'OCP\\AppFramework\\Http\\ZipResponse' => __DIR__ . '/../../..' . '/lib/public/AppFramework/Http/ZipResponse.php', 'OCP\\AppFramework\\IAppContainer' => __DIR__ . '/../../..' . '/lib/public/AppFramework/IAppContainer.php', @@ -132,6 +134,8 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Authentication\\TwoFactorAuth\\RegistryEvent' => __DIR__ . '/../../..' . '/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php', 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorException' => __DIR__ . '/../../..' . '/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php', 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorProviderDisabled' => __DIR__ . '/../../..' . '/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php', + 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorProviderForUserDisabled' => __DIR__ . '/../../..' . '/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php', + 'OCP\\Authentication\\TwoFactorAuth\\TwoFactorProviderForUserEnabled' => __DIR__ . '/../../..' . '/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php', 'OCP\\AutoloadNotAllowedException' => __DIR__ . '/../../..' . '/lib/public/AutoloadNotAllowedException.php', 'OCP\\BackgroundJob' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob.php', 'OCP\\BackgroundJob\\IJob' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob/IJob.php', @@ -141,7 +145,11 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\BackgroundJob\\TimedJob' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob/TimedJob.php', 'OCP\\Broadcast\\Events\\IBroadcastEvent' => __DIR__ . '/../../..' . '/lib/public/Broadcast/Events/IBroadcastEvent.php', 'OCP\\Calendar\\BackendTemporarilyUnavailableException' => __DIR__ . '/../../..' . '/lib/public/Calendar/BackendTemporarilyUnavailableException.php', + 'OCP\\Calendar\\Exceptions\\CalendarException' => __DIR__ . '/../../..' . '/lib/public/Calendar/Exceptions/CalendarException.php', 'OCP\\Calendar\\ICalendar' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendar.php', + 'OCP\\Calendar\\ICalendarProvider' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarProvider.php', + 'OCP\\Calendar\\ICalendarQuery' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarQuery.php', + 'OCP\\Calendar\\ICreateFromString' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICreateFromString.php', 'OCP\\Calendar\\IManager' => __DIR__ . '/../../..' . '/lib/public/Calendar/IManager.php', 'OCP\\Calendar\\IMetadataProvider' => __DIR__ . '/../../..' . '/lib/public/Calendar/IMetadataProvider.php', 'OCP\\Calendar\\Resource\\IBackend' => __DIR__ . '/../../..' . '/lib/public/Calendar/Resource/IBackend.php', @@ -202,12 +210,14 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\DB\\QueryBuilder\\IQueryFunction' => __DIR__ . '/../../..' . '/lib/public/DB/QueryBuilder/IQueryFunction.php', 'OCP\\DB\\Types' => __DIR__ . '/../../..' . '/lib/public/DB/Types.php', 'OCP\\Dashboard\\Exceptions\\DashboardAppNotAvailableException' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php', + 'OCP\\Dashboard\\IAPIWidget' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IAPIWidget.php', 'OCP\\Dashboard\\IDashboardManager' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IDashboardManager.php', 'OCP\\Dashboard\\IDashboardWidget' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IDashboardWidget.php', 'OCP\\Dashboard\\IManager' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IManager.php', 'OCP\\Dashboard\\IWidget' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IWidget.php', 'OCP\\Dashboard\\Model\\IWidgetConfig' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Model/IWidgetConfig.php', 'OCP\\Dashboard\\Model\\IWidgetRequest' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Model/IWidgetRequest.php', + 'OCP\\Dashboard\\Model\\WidgetItem' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Model/WidgetItem.php', 'OCP\\Dashboard\\Model\\WidgetSetting' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Model/WidgetSetting.php', 'OCP\\Dashboard\\Model\\WidgetSetup' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Model/WidgetSetup.php', 'OCP\\Dashboard\\Model\\WidgetTemplate' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Model/WidgetTemplate.php', @@ -394,6 +404,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Group\\Events\\UserAddedEvent' => __DIR__ . '/../../..' . '/lib/public/Group/Events/UserAddedEvent.php', 'OCP\\Group\\Events\\UserRemovedEvent' => __DIR__ . '/../../..' . '/lib/public/Group/Events/UserRemovedEvent.php', 'OCP\\Group\\ISubAdmin' => __DIR__ . '/../../..' . '/lib/public/Group/ISubAdmin.php', + 'OCP\\HintException' => __DIR__ . '/../../..' . '/lib/public/HintException.php', 'OCP\\Http\\Client\\IClient' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IClient.php', 'OCP\\Http\\Client\\IClientService' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IClientService.php', 'OCP\\Http\\Client\\IResponse' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IResponse.php', @@ -449,6 +460,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Lock\\LockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/LockedException.php', 'OCP\\Lock\\ManuallyLockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/ManuallyLockedException.php', 'OCP\\Lockdown\\ILockdownManager' => __DIR__ . '/../../..' . '/lib/public/Lockdown/ILockdownManager.php', + 'OCP\\Log\\Audit\\CriticalActionPerformedEvent' => __DIR__ . '/../../..' . '/lib/public/Log/Audit/CriticalActionPerformedEvent.php', 'OCP\\Log\\IDataLogger' => __DIR__ . '/../../..' . '/lib/public/Log/IDataLogger.php', 'OCP\\Log\\IFileBased' => __DIR__ . '/../../..' . '/lib/public/Log/IFileBased.php', 'OCP\\Log\\ILogFactory' => __DIR__ . '/../../..' . '/lib/public/Log/ILogFactory.php', @@ -477,6 +489,8 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Preview\\IProvider' => __DIR__ . '/../../..' . '/lib/public/Preview/IProvider.php', 'OCP\\Preview\\IProviderV2' => __DIR__ . '/../../..' . '/lib/public/Preview/IProviderV2.php', 'OCP\\Preview\\IVersionedPreviewFile' => __DIR__ . '/../../..' . '/lib/public/Preview/IVersionedPreviewFile.php', + 'OCP\\Profile\\ILinkAction' => __DIR__ . '/../../..' . '/lib/public/Profile/ILinkAction.php', + 'OCP\\Profile\\ParameterDoesNotExistException' => __DIR__ . '/../../..' . '/lib/public/Profile/ParameterDoesNotExistException.php', 'OCP\\Remote\\Api\\IApiCollection' => __DIR__ . '/../../..' . '/lib/public/Remote/Api/IApiCollection.php', 'OCP\\Remote\\Api\\IApiFactory' => __DIR__ . '/../../..' . '/lib/public/Remote/Api/IApiFactory.php', 'OCP\\Remote\\Api\\ICapabilitiesApi' => __DIR__ . '/../../..' . '/lib/public/Remote/Api/ICapabilitiesApi.php', @@ -509,7 +523,10 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Security\\ICrypto' => __DIR__ . '/../../..' . '/lib/public/Security/ICrypto.php', 'OCP\\Security\\IHasher' => __DIR__ . '/../../..' . '/lib/public/Security/IHasher.php', 'OCP\\Security\\ISecureRandom' => __DIR__ . '/../../..' . '/lib/public/Security/ISecureRandom.php', + 'OCP\\Security\\VerificationToken\\IVerificationToken' => __DIR__ . '/../../..' . '/lib/public/Security/VerificationToken/IVerificationToken.php', + 'OCP\\Security\\VerificationToken\\InvalidTokenException' => __DIR__ . '/../../..' . '/lib/public/Security/VerificationToken/InvalidTokenException.php', 'OCP\\Session\\Exceptions\\SessionNotAvailableException' => __DIR__ . '/../../..' . '/lib/public/Session/Exceptions/SessionNotAvailableException.php', + 'OCP\\Settings\\IDelegatedSettings' => __DIR__ . '/../../..' . '/lib/public/Settings/IDelegatedSettings.php', 'OCP\\Settings\\IIconSection' => __DIR__ . '/../../..' . '/lib/public/Settings/IIconSection.php', 'OCP\\Settings\\IManager' => __DIR__ . '/../../..' . '/lib/public/Settings/IManager.php', 'OCP\\Settings\\ISettings' => __DIR__ . '/../../..' . '/lib/public/Settings/ISettings.php', @@ -548,7 +565,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\SystemTag\\TagAlreadyExistsException' => __DIR__ . '/../../..' . '/lib/public/SystemTag/TagAlreadyExistsException.php', 'OCP\\SystemTag\\TagNotFoundException' => __DIR__ . '/../../..' . '/lib/public/SystemTag/TagNotFoundException.php', 'OCP\\Template' => __DIR__ . '/../../..' . '/lib/public/Template.php', - 'OCP\\User' => __DIR__ . '/../../..' . '/lib/public/User.php', 'OCP\\UserInterface' => __DIR__ . '/../../..' . '/lib/public/UserInterface.php', 'OCP\\UserStatus\\IManager' => __DIR__ . '/../../..' . '/lib/public/UserStatus/IManager.php', 'OCP\\UserStatus\\IProvider' => __DIR__ . '/../../..' . '/lib/public/UserStatus/IProvider.php', @@ -608,7 +624,9 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Accounts\\Account' => __DIR__ . '/../../..' . '/lib/private/Accounts/Account.php', 'OC\\Accounts\\AccountManager' => __DIR__ . '/../../..' . '/lib/private/Accounts/AccountManager.php', 'OC\\Accounts\\AccountProperty' => __DIR__ . '/../../..' . '/lib/private/Accounts/AccountProperty.php', + 'OC\\Accounts\\AccountPropertyCollection' => __DIR__ . '/../../..' . '/lib/private/Accounts/AccountPropertyCollection.php', 'OC\\Accounts\\Hooks' => __DIR__ . '/../../..' . '/lib/private/Accounts/Hooks.php', + 'OC\\Accounts\\TAccountsHelper' => __DIR__ . '/../../..' . '/lib/private/Accounts/TAccountsHelper.php', 'OC\\Activity\\ActivitySettingsAdapter' => __DIR__ . '/../../..' . '/lib/private/Activity/ActivitySettingsAdapter.php', 'OC\\Activity\\Event' => __DIR__ . '/../../..' . '/lib/private/Activity/Event.php', 'OC\\Activity\\EventMerger' => __DIR__ . '/../../..' . '/lib/private/Activity/EventMerger.php', @@ -622,6 +640,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\AppFramework\\Bootstrap\\EventListenerRegistration' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php', 'OC\\AppFramework\\Bootstrap\\FunctionInjector' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/FunctionInjector.php', 'OC\\AppFramework\\Bootstrap\\ParameterRegistration' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/ParameterRegistration.php', + 'OC\\AppFramework\\Bootstrap\\PreviewProviderRegistration' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php', 'OC\\AppFramework\\Bootstrap\\RegistrationContext' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/RegistrationContext.php', 'OC\\AppFramework\\Bootstrap\\ServiceAliasRegistration' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php', 'OC\\AppFramework\\Bootstrap\\ServiceFactoryRegistration' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php', @@ -711,8 +730,10 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Authentication\\Listeners\\RemoteWipeActivityListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php', 'OC\\Authentication\\Listeners\\RemoteWipeEmailListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php', 'OC\\Authentication\\Listeners\\RemoteWipeNotificationsListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php', + 'OC\\Authentication\\Listeners\\UserDeletedFilesCleanupListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php', 'OC\\Authentication\\Listeners\\UserDeletedStoreCleanupListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php', 'OC\\Authentication\\Listeners\\UserDeletedTokenCleanupListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php', + 'OC\\Authentication\\Listeners\\UserDeletedWebAuthnCleanupListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/UserDeletedWebAuthnCleanupListener.php', 'OC\\Authentication\\Listeners\\UserLoggedInListener' => __DIR__ . '/../../..' . '/lib/private/Authentication/Listeners/UserLoggedInListener.php', 'OC\\Authentication\\LoginCredentials\\Credentials' => __DIR__ . '/../../..' . '/lib/private/Authentication/LoginCredentials/Credentials.php', 'OC\\Authentication\\LoginCredentials\\Store' => __DIR__ . '/../../..' . '/lib/private/Authentication/LoginCredentials/Store.php', @@ -763,6 +784,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Avatar\\Avatar' => __DIR__ . '/../../..' . '/lib/private/Avatar/Avatar.php', 'OC\\Avatar\\AvatarManager' => __DIR__ . '/../../..' . '/lib/private/Avatar/AvatarManager.php', 'OC\\Avatar\\GuestAvatar' => __DIR__ . '/../../..' . '/lib/private/Avatar/GuestAvatar.php', + 'OC\\Avatar\\PlaceholderAvatar' => __DIR__ . '/../../..' . '/lib/private/Avatar/PlaceholderAvatar.php', 'OC\\Avatar\\UserAvatar' => __DIR__ . '/../../..' . '/lib/private/Avatar/UserAvatar.php', 'OC\\BackgroundJob\\Job' => __DIR__ . '/../../..' . '/lib/private/BackgroundJob/Job.php', 'OC\\BackgroundJob\\JobList' => __DIR__ . '/../../..' . '/lib/private/BackgroundJob/JobList.php', @@ -773,6 +795,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Broadcast\\Events\\BroadcastEvent' => __DIR__ . '/../../..' . '/lib/private/Broadcast/Events/BroadcastEvent.php', 'OC\\Cache\\CappedMemoryCache' => __DIR__ . '/../../..' . '/lib/private/Cache/CappedMemoryCache.php', 'OC\\Cache\\File' => __DIR__ . '/../../..' . '/lib/private/Cache/File.php', + 'OC\\Calendar\\CalendarQuery' => __DIR__ . '/../../..' . '/lib/private/Calendar/CalendarQuery.php', 'OC\\Calendar\\Manager' => __DIR__ . '/../../..' . '/lib/private/Calendar/Manager.php', 'OC\\Calendar\\Resource\\Manager' => __DIR__ . '/../../..' . '/lib/private/Calendar/Resource/Manager.php', 'OC\\Calendar\\Room\\Manager' => __DIR__ . '/../../..' . '/lib/private/Calendar/Room/Manager.php', @@ -813,10 +836,12 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Contacts\\ContactsMenu\\Entry' => __DIR__ . '/../../..' . '/lib/private/Contacts/ContactsMenu/Entry.php', 'OC\\Contacts\\ContactsMenu\\Manager' => __DIR__ . '/../../..' . '/lib/private/Contacts/ContactsMenu/Manager.php', 'OC\\Contacts\\ContactsMenu\\Providers\\EMailProvider' => __DIR__ . '/../../..' . '/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php', + 'OC\\Contacts\\ContactsMenu\\Providers\\ProfileProvider' => __DIR__ . '/../../..' . '/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php', 'OC\\Core\\Application' => __DIR__ . '/../../..' . '/core/Application.php', 'OC\\Core\\BackgroundJobs\\BackgroundCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php', 'OC\\Core\\BackgroundJobs\\CheckForUserCertificates' => __DIR__ . '/../../..' . '/core/BackgroundJobs/CheckForUserCertificates.php', 'OC\\Core\\BackgroundJobs\\CleanupLoginFlowV2' => __DIR__ . '/../../..' . '/core/BackgroundJobs/CleanupLoginFlowV2.php', + 'OC\\Core\\BackgroundJobs\\LookupServerSendCheckBackgroundJob' => __DIR__ . '/../../..' . '/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php', 'OC\\Core\\Command\\App\\CheckCode' => __DIR__ . '/../../..' . '/core/Command/App/CheckCode.php', 'OC\\Core\\Command\\App\\Disable' => __DIR__ . '/../../..' . '/core/Command/App/Disable.php', 'OC\\Core\\Command\\App\\Enable' => __DIR__ . '/../../..' . '/core/Command/App/Enable.php', @@ -828,6 +853,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Command\\Background\\Ajax' => __DIR__ . '/../../..' . '/core/Command/Background/Ajax.php', 'OC\\Core\\Command\\Background\\Base' => __DIR__ . '/../../..' . '/core/Command/Background/Base.php', 'OC\\Core\\Command\\Background\\Cron' => __DIR__ . '/../../..' . '/core/Command/Background/Cron.php', + 'OC\\Core\\Command\\Background\\Job' => __DIR__ . '/../../..' . '/core/Command/Background/Job.php', 'OC\\Core\\Command\\Background\\WebCron' => __DIR__ . '/../../..' . '/core/Command/Background/WebCron.php', 'OC\\Core\\Command\\Base' => __DIR__ . '/../../..' . '/core/Command/Base.php', 'OC\\Core\\Command\\Broadcast\\Test' => __DIR__ . '/../../..' . '/core/Command/Broadcast/Test.php', @@ -850,7 +876,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Command\\Db\\ConvertType' => __DIR__ . '/../../..' . '/core/Command/Db/ConvertType.php', 'OC\\Core\\Command\\Db\\Migrations\\ExecuteCommand' => __DIR__ . '/../../..' . '/core/Command/Db/Migrations/ExecuteCommand.php', 'OC\\Core\\Command\\Db\\Migrations\\GenerateCommand' => __DIR__ . '/../../..' . '/core/Command/Db/Migrations/GenerateCommand.php', - 'OC\\Core\\Command\\Db\\Migrations\\GenerateFromSchemaFileCommand' => __DIR__ . '/../../..' . '/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php', 'OC\\Core\\Command\\Db\\Migrations\\MigrateCommand' => __DIR__ . '/../../..' . '/core/Command/Db/Migrations/MigrateCommand.php', 'OC\\Core\\Command\\Db\\Migrations\\StatusCommand' => __DIR__ . '/../../..' . '/core/Command/Db/Migrations/StatusCommand.php', 'OC\\Core\\Command\\Encryption\\ChangeKeyStorageRoot' => __DIR__ . '/../../..' . '/core/Command/Encryption/ChangeKeyStorageRoot.php', @@ -893,6 +918,10 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Command\\Security\\RemoveCertificate' => __DIR__ . '/../../..' . '/core/Command/Security/RemoveCertificate.php', 'OC\\Core\\Command\\Security\\ResetBruteforceAttempts' => __DIR__ . '/../../..' . '/core/Command/Security/ResetBruteforceAttempts.php', 'OC\\Core\\Command\\Status' => __DIR__ . '/../../..' . '/core/Command/Status.php', + 'OC\\Core\\Command\\SystemTag\\Add' => __DIR__ . '/../../..' . '/core/Command/SystemTag/Add.php', + 'OC\\Core\\Command\\SystemTag\\Delete' => __DIR__ . '/../../..' . '/core/Command/SystemTag/Delete.php', + 'OC\\Core\\Command\\SystemTag\\Edit' => __DIR__ . '/../../..' . '/core/Command/SystemTag/Edit.php', + 'OC\\Core\\Command\\SystemTag\\ListCommand' => __DIR__ . '/../../..' . '/core/Command/SystemTag/ListCommand.php', 'OC\\Core\\Command\\TwoFactorAuth\\Base' => __DIR__ . '/../../..' . '/core/Command/TwoFactorAuth/Base.php', 'OC\\Core\\Command\\TwoFactorAuth\\Cleanup' => __DIR__ . '/../../..' . '/core/Command/TwoFactorAuth/Cleanup.php', 'OC\\Core\\Command\\TwoFactorAuth\\Disable' => __DIR__ . '/../../..' . '/core/Command/TwoFactorAuth/Disable.php', @@ -921,6 +950,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Controller\\ContactsMenuController' => __DIR__ . '/../../..' . '/core/Controller/ContactsMenuController.php', 'OC\\Core\\Controller\\CssController' => __DIR__ . '/../../..' . '/core/Controller/CssController.php', 'OC\\Core\\Controller\\GuestAvatarController' => __DIR__ . '/../../..' . '/core/Controller/GuestAvatarController.php', + 'OC\\Core\\Controller\\HoverCardController' => __DIR__ . '/../../..' . '/core/Controller/HoverCardController.php', 'OC\\Core\\Controller\\JsController' => __DIR__ . '/../../..' . '/core/Controller/JsController.php', 'OC\\Core\\Controller\\LoginController' => __DIR__ . '/../../..' . '/core/Controller/LoginController.php', 'OC\\Core\\Controller\\LostController' => __DIR__ . '/../../..' . '/core/Controller/LostController.php', @@ -928,6 +958,8 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Controller\\OCJSController' => __DIR__ . '/../../..' . '/core/Controller/OCJSController.php', 'OC\\Core\\Controller\\OCSController' => __DIR__ . '/../../..' . '/core/Controller/OCSController.php', 'OC\\Core\\Controller\\PreviewController' => __DIR__ . '/../../..' . '/core/Controller/PreviewController.php', + 'OC\\Core\\Controller\\ProfileApiController' => __DIR__ . '/../../..' . '/core/Controller/ProfileApiController.php', + 'OC\\Core\\Controller\\ProfilePageController' => __DIR__ . '/../../..' . '/core/Controller/ProfilePageController.php', 'OC\\Core\\Controller\\RecommendedAppsController' => __DIR__ . '/../../..' . '/core/Controller/RecommendedAppsController.php', 'OC\\Core\\Controller\\SearchController' => __DIR__ . '/../../..' . '/core/Controller/SearchController.php', 'OC\\Core\\Controller\\SetupController' => __DIR__ . '/../../..' . '/core/Controller/SetupController.php', @@ -944,6 +976,8 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Data\\LoginFlowV2Tokens' => __DIR__ . '/../../..' . '/core/Data/LoginFlowV2Tokens.php', 'OC\\Core\\Db\\LoginFlowV2' => __DIR__ . '/../../..' . '/core/Db/LoginFlowV2.php', 'OC\\Core\\Db\\LoginFlowV2Mapper' => __DIR__ . '/../../..' . '/core/Db/LoginFlowV2Mapper.php', + 'OC\\Core\\Db\\ProfileConfig' => __DIR__ . '/../../..' . '/core/Db/ProfileConfig.php', + 'OC\\Core\\Db\\ProfileConfigMapper' => __DIR__ . '/../../..' . '/core/Db/ProfileConfigMapper.php', 'OC\\Core\\Exception\\LoginFlowV2NotFoundException' => __DIR__ . '/../../..' . '/core/Exception/LoginFlowV2NotFoundException.php', 'OC\\Core\\Exception\\ResetPasswordException' => __DIR__ . '/../../..' . '/core/Exception/ResetPasswordException.php', 'OC\\Core\\Middleware\\TwoFactorMiddleware' => __DIR__ . '/../../..' . '/core/Middleware/TwoFactorMiddleware.php', @@ -982,6 +1016,9 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Core\\Migrations\\Version21000Date20210309185126' => __DIR__ . '/../../..' . '/core/Migrations/Version21000Date20210309185126.php', 'OC\\Core\\Migrations\\Version21000Date20210309185127' => __DIR__ . '/../../..' . '/core/Migrations/Version21000Date20210309185127.php', 'OC\\Core\\Migrations\\Version22000Date20210216080825' => __DIR__ . '/../../..' . '/core/Migrations/Version22000Date20210216080825.php', + 'OC\\Core\\Migrations\\Version23000Date20210721100600' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20210721100600.php', + 'OC\\Core\\Migrations\\Version23000Date20210906132259' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20210906132259.php', + 'OC\\Core\\Migrations\\Version23000Date20210930122352' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20210930122352.php', 'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php', 'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php', 'OC\\DB\\Adapter' => __DIR__ . '/../../..' . '/lib/private/DB/Adapter.php', @@ -993,8 +1030,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\DB\\ConnectionAdapter' => __DIR__ . '/../../..' . '/lib/private/DB/ConnectionAdapter.php', 'OC\\DB\\ConnectionFactory' => __DIR__ . '/../../..' . '/lib/private/DB/ConnectionFactory.php', 'OC\\DB\\Exceptions\\DbalException' => __DIR__ . '/../../..' . '/lib/private/DB/Exceptions/DbalException.php', - 'OC\\DB\\MDB2SchemaManager' => __DIR__ . '/../../..' . '/lib/private/DB/MDB2SchemaManager.php', - 'OC\\DB\\MDB2SchemaReader' => __DIR__ . '/../../..' . '/lib/private/DB/MDB2SchemaReader.php', 'OC\\DB\\MigrationException' => __DIR__ . '/../../..' . '/lib/private/DB/MigrationException.php', 'OC\\DB\\MigrationService' => __DIR__ . '/../../..' . '/lib/private/DB/MigrationService.php', 'OC\\DB\\Migrator' => __DIR__ . '/../../..' . '/lib/private/DB/Migrator.php', @@ -1081,6 +1116,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Files\\Cache\\Propagator' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Propagator.php', 'OC\\Files\\Cache\\QuerySearchHelper' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/QuerySearchHelper.php', 'OC\\Files\\Cache\\Scanner' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Scanner.php', + 'OC\\Files\\Cache\\SearchBuilder' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/SearchBuilder.php', 'OC\\Files\\Cache\\Storage' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Storage.php', 'OC\\Files\\Cache\\StorageGlobal' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/StorageGlobal.php', 'OC\\Files\\Cache\\Updater' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Updater.php', @@ -1129,6 +1165,9 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Files\\ObjectStore\\Swift' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/Swift.php', 'OC\\Files\\ObjectStore\\SwiftFactory' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/SwiftFactory.php', 'OC\\Files\\ObjectStore\\SwiftV2CachingAuthService' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php', + 'OC\\Files\\Search\\QueryOptimizer\\PathPrefixOptimizer' => __DIR__ . '/../../..' . '/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php', + 'OC\\Files\\Search\\QueryOptimizer\\QueryOptimizer' => __DIR__ . '/../../..' . '/lib/private/Files/Search/QueryOptimizer/QueryOptimizer.php', + 'OC\\Files\\Search\\QueryOptimizer\\QueryOptimizerStep' => __DIR__ . '/../../..' . '/lib/private/Files/Search/QueryOptimizer/QueryOptimizerStep.php', 'OC\\Files\\Search\\SearchBinaryOperator' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchBinaryOperator.php', 'OC\\Files\\Search\\SearchComparison' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchComparison.php', 'OC\\Files\\Search\\SearchOrder' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchOrder.php', @@ -1140,7 +1179,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Files\\Storage\\CommonTest' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/CommonTest.php', 'OC\\Files\\Storage\\DAV' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/DAV.php', 'OC\\Files\\Storage\\FailedStorage' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/FailedStorage.php', - 'OC\\Files\\Storage\\Flysystem' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/Flysystem.php', 'OC\\Files\\Storage\\Home' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/Home.php', 'OC\\Files\\Storage\\Local' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/Local.php', 'OC\\Files\\Storage\\LocalRootStorage' => __DIR__ . '/../../..' . '/lib/private/Files/Storage/LocalRootStorage.php', @@ -1186,6 +1224,9 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Hooks\\PublicEmitter' => __DIR__ . '/../../..' . '/lib/private/Hooks/PublicEmitter.php', 'OC\\Http\\Client\\Client' => __DIR__ . '/../../..' . '/lib/private/Http/Client/Client.php', 'OC\\Http\\Client\\ClientService' => __DIR__ . '/../../..' . '/lib/private/Http/Client/ClientService.php', + 'OC\\Http\\Client\\DnsPinMiddleware' => __DIR__ . '/../../..' . '/lib/private/Http/Client/DnsPinMiddleware.php', + 'OC\\Http\\Client\\LocalAddressChecker' => __DIR__ . '/../../..' . '/lib/private/Http/Client/LocalAddressChecker.php', + 'OC\\Http\\Client\\NegativeDnsCache' => __DIR__ . '/../../..' . '/lib/private/Http/Client/NegativeDnsCache.php', 'OC\\Http\\Client\\Response' => __DIR__ . '/../../..' . '/lib/private/Http/Client/Response.php', 'OC\\Http\\CookieHelper' => __DIR__ . '/../../..' . '/lib/private/Http/CookieHelper.php', 'OC\\Http\\WellKnown\\RequestManager' => __DIR__ . '/../../..' . '/lib/private/Http/WellKnown/RequestManager.php', @@ -1207,6 +1248,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\L10N\\LanguageIterator' => __DIR__ . '/../../..' . '/lib/private/L10N/LanguageIterator.php', 'OC\\L10N\\LanguageNotFoundException' => __DIR__ . '/../../..' . '/lib/private/L10N/LanguageNotFoundException.php', 'OC\\L10N\\LazyL10N' => __DIR__ . '/../../..' . '/lib/private/L10N/LazyL10N.php', + 'OC\\LDAP\\NullLDAPProviderFactory' => __DIR__ . '/../../..' . '/lib/private/LDAP/NullLDAPProviderFactory.php', 'OC\\LargeFileHelper' => __DIR__ . '/../../..' . '/lib/private/LargeFileHelper.php', 'OC\\Lock\\AbstractLockingProvider' => __DIR__ . '/../../..' . '/lib/private/Lock/AbstractLockingProvider.php', 'OC\\Lock\\DBLockingProvider' => __DIR__ . '/../../..' . '/lib/private/Lock/DBLockingProvider.php', @@ -1297,6 +1339,12 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Preview\\WatcherConnector' => __DIR__ . '/../../..' . '/lib/private/Preview/WatcherConnector.php', 'OC\\Preview\\WebP' => __DIR__ . '/../../..' . '/lib/private/Preview/WebP.php', 'OC\\Preview\\XBitmap' => __DIR__ . '/../../..' . '/lib/private/Preview/XBitmap.php', + 'OC\\Profile\\Actions\\EmailAction' => __DIR__ . '/../../..' . '/lib/private/Profile/Actions/EmailAction.php', + 'OC\\Profile\\Actions\\PhoneAction' => __DIR__ . '/../../..' . '/lib/private/Profile/Actions/PhoneAction.php', + 'OC\\Profile\\Actions\\TwitterAction' => __DIR__ . '/../../..' . '/lib/private/Profile/Actions/TwitterAction.php', + 'OC\\Profile\\Actions\\WebsiteAction' => __DIR__ . '/../../..' . '/lib/private/Profile/Actions/WebsiteAction.php', + 'OC\\Profile\\ProfileManager' => __DIR__ . '/../../..' . '/lib/private/Profile/ProfileManager.php', + 'OC\\Profile\\TProfileHelper' => __DIR__ . '/../../..' . '/lib/private/Profile/TProfileHelper.php', 'OC\\RedisFactory' => __DIR__ . '/../../..' . '/lib/private/RedisFactory.php', 'OC\\Remote\\Api\\ApiBase' => __DIR__ . '/../../..' . '/lib/private/Remote/Api/ApiBase.php', 'OC\\Remote\\Api\\ApiCollection' => __DIR__ . '/../../..' . '/lib/private/Remote/Api/ApiCollection.php', @@ -1328,6 +1376,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Repair\\NC20\\ShippedDashboardEnable' => __DIR__ . '/../../..' . '/lib/private/Repair/NC20/ShippedDashboardEnable.php', 'OC\\Repair\\NC21\\AddCheckForUserCertificatesJob' => __DIR__ . '/../../..' . '/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php', 'OC\\Repair\\NC21\\ValidatePhoneNumber' => __DIR__ . '/../../..' . '/lib/private/Repair/NC21/ValidatePhoneNumber.php', + 'OC\\Repair\\NC22\\LookupServerSendCheck' => __DIR__ . '/../../..' . '/lib/private/Repair/NC22/LookupServerSendCheck.php', 'OC\\Repair\\OldGroupMembershipShares' => __DIR__ . '/../../..' . '/lib/private/Repair/OldGroupMembershipShares.php', 'OC\\Repair\\Owncloud\\CleanPreviews' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/CleanPreviews.php', 'OC\\Repair\\Owncloud\\CleanPreviewsBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php', @@ -1375,12 +1424,15 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Security\\IdentityProof\\Manager' => __DIR__ . '/../../..' . '/lib/private/Security/IdentityProof/Manager.php', 'OC\\Security\\IdentityProof\\Signer' => __DIR__ . '/../../..' . '/lib/private/Security/IdentityProof/Signer.php', 'OC\\Security\\Normalizer\\IpAddress' => __DIR__ . '/../../..' . '/lib/private/Security/Normalizer/IpAddress.php', + 'OC\\Security\\RateLimiting\\Backend\\DatabaseBackend' => __DIR__ . '/../../..' . '/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php', 'OC\\Security\\RateLimiting\\Backend\\IBackend' => __DIR__ . '/../../..' . '/lib/private/Security/RateLimiting/Backend/IBackend.php', - 'OC\\Security\\RateLimiting\\Backend\\MemoryCache' => __DIR__ . '/../../..' . '/lib/private/Security/RateLimiting/Backend/MemoryCache.php', + 'OC\\Security\\RateLimiting\\Backend\\MemoryCacheBackend' => __DIR__ . '/../../..' . '/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php', 'OC\\Security\\RateLimiting\\Exception\\RateLimitExceededException' => __DIR__ . '/../../..' . '/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php', 'OC\\Security\\RateLimiting\\Limiter' => __DIR__ . '/../../..' . '/lib/private/Security/RateLimiting/Limiter.php', 'OC\\Security\\SecureRandom' => __DIR__ . '/../../..' . '/lib/private/Security/SecureRandom.php', 'OC\\Security\\TrustedDomainHelper' => __DIR__ . '/../../..' . '/lib/private/Security/TrustedDomainHelper.php', + 'OC\\Security\\VerificationToken\\CleanUpJob' => __DIR__ . '/../../..' . '/lib/private/Security/VerificationToken/CleanUpJob.php', + 'OC\\Security\\VerificationToken\\VerificationToken' => __DIR__ . '/../../..' . '/lib/private/Security/VerificationToken/VerificationToken.php', 'OC\\Server' => __DIR__ . '/../../..' . '/lib/private/Server.php', 'OC\\ServerContainer' => __DIR__ . '/../../..' . '/lib/private/ServerContainer.php', 'OC\\ServerNotAvailableException' => __DIR__ . '/../../..' . '/lib/private/ServerNotAvailableException.php', @@ -1390,6 +1442,8 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Session\\Internal' => __DIR__ . '/../../..' . '/lib/private/Session/Internal.php', 'OC\\Session\\Memory' => __DIR__ . '/../../..' . '/lib/private/Session/Memory.php', 'OC\\Session\\Session' => __DIR__ . '/../../..' . '/lib/private/Session/Session.php', + 'OC\\Settings\\AuthorizedGroup' => __DIR__ . '/../../..' . '/lib/private/Settings/AuthorizedGroup.php', + 'OC\\Settings\\AuthorizedGroupMapper' => __DIR__ . '/../../..' . '/lib/private/Settings/AuthorizedGroupMapper.php', 'OC\\Settings\\Manager' => __DIR__ . '/../../..' . '/lib/private/Settings/Manager.php', 'OC\\Settings\\Section' => __DIR__ . '/../../..' . '/lib/private/Settings/Section.php', 'OC\\Setup' => __DIR__ . '/../../..' . '/lib/private/Setup.php', @@ -1444,6 +1498,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Updater\\ChangesMapper' => __DIR__ . '/../../..' . '/lib/private/Updater/ChangesMapper.php', 'OC\\Updater\\ChangesResult' => __DIR__ . '/../../..' . '/lib/private/Updater/ChangesResult.php', 'OC\\Updater\\VersionCheck' => __DIR__ . '/../../..' . '/lib/private/Updater/VersionCheck.php', + 'OC\\UserStatus\\ISettableProvider' => __DIR__ . '/../../..' . '/lib/private/UserStatus/ISettableProvider.php', 'OC\\UserStatus\\Manager' => __DIR__ . '/../../..' . '/lib/private/UserStatus/Manager.php', 'OC\\User\\Backend' => __DIR__ . '/../../..' . '/lib/private/User/Backend.php', 'OC\\User\\Database' => __DIR__ . '/../../..' . '/lib/private/User/Database.php', diff --git a/lib/composer/composer/installed.php b/lib/composer/composer/installed.php new file mode 100644 index 00000000000..b811738fbd0 --- /dev/null +++ b/lib/composer/composer/installed.php @@ -0,0 +1,23 @@ +<?php return array( + 'root' => array( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../../', + 'aliases' => array(), + 'reference' => '66144c300395458ff38b86e50cd92174443cd85e', + 'name' => '__root__', + 'dev' => false, + ), + 'versions' => array( + '__root__' => array( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../../', + 'aliases' => array(), + 'reference' => '66144c300395458ff38b86e50cd92174443cd85e', + 'dev_requirement' => false, + ), + ), +); diff --git a/lib/l10n/ar.js b/lib/l10n/ar.js index 4ccd98c8d94..fe47e92e361 100644 --- a/lib/l10n/ar.js +++ b/lib/l10n/ar.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "الكتابة في مجلد \"config\" غير ممكنة!", - "This can usually be fixed by giving the webserver write access to the config directory" : "يمكن حل هذا عادة بإعطاء خادم الوب صلاحية الكتابة في مجلد config", "See %s" : "أنظر %s", "Sample configuration detected" : "تم اكتشاف إعدادات عيّنة", "%1$s and %2$s" : "%1$s و %2$s", @@ -55,7 +54,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "فضلاً إحذف إعداد open_basedir من ملف php.ini لديك أو حوّل إلى PHP إصدار 64 بت.", "Set an admin username." : "اعداد اسم مستخدم للمدير", "Set an admin password." : "اعداد كلمة مرور للمدير", - "Can't create or write into the data directory %s" : "لا يمكن الإنشاء أو الكتابة في مجلد البيانات %s", "You are not allowed to share %s" : "أنت غير مسموح لك أن تشارك %s", "Click the button below to open it." : "أنقر على الزر أدناه لفتحه.", "Could not find category \"%s\"" : "تعذر العثور على المجلد \"%s\"", @@ -112,13 +110,14 @@ OC.L10N.register( "Login canceled by app" : "تم إلغاء الدخول مِن طرف التطبيق", "a safe home for all your data" : "المكان الآمن لجميع بياناتك", "File is currently busy, please try again later" : "إنّ الملف مشغول الآمن، يرجى إعادة المحاولة لاحقًا", - "Can't read file" : "لا يمكن قراءة الملف", "Application is not enabled" : "التطبيق غير مفعّل", "Authentication error" : "لم يتم التأكد من الشخصية بنجاح", "Token expired. Please reload page." : "انتهت صلاحية الكلمة , يرجى اعادة تحميل الصفحة", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "يمكن إصلاح هذا الخطا بإعطاء مخدّم الموقع صلاحيات التعديل على مجلد الإعدادات. أنظر %s", "Storage is temporarily not available" : "وحدة التخزين غير متوفرة", - "Following databases are supported: %s" : "قواعد البيانات التالية مدعومة: %s", - "Invalid Federated Cloud ID" : "معرّف سحابة الاتحاد غير صالح" + "This can usually be fixed by giving the webserver write access to the config directory" : "يمكن حل هذا عادة بإعطاء خادم الوب صلاحية الكتابة في مجلد config", + "Can't create or write into the data directory %s" : "لا يمكن الإنشاء أو الكتابة في مجلد البيانات %s", + "Invalid Federated Cloud ID" : "معرّف سحابة الاتحاد غير صالح", + "Can't read file" : "لا يمكن قراءة الملف" }, "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"); diff --git a/lib/l10n/ar.json b/lib/l10n/ar.json index 2bb0c94022e..7ecbf10f148 100644 --- a/lib/l10n/ar.json +++ b/lib/l10n/ar.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "الكتابة في مجلد \"config\" غير ممكنة!", - "This can usually be fixed by giving the webserver write access to the config directory" : "يمكن حل هذا عادة بإعطاء خادم الوب صلاحية الكتابة في مجلد config", "See %s" : "أنظر %s", "Sample configuration detected" : "تم اكتشاف إعدادات عيّنة", "%1$s and %2$s" : "%1$s و %2$s", @@ -53,7 +52,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "فضلاً إحذف إعداد open_basedir من ملف php.ini لديك أو حوّل إلى PHP إصدار 64 بت.", "Set an admin username." : "اعداد اسم مستخدم للمدير", "Set an admin password." : "اعداد كلمة مرور للمدير", - "Can't create or write into the data directory %s" : "لا يمكن الإنشاء أو الكتابة في مجلد البيانات %s", "You are not allowed to share %s" : "أنت غير مسموح لك أن تشارك %s", "Click the button below to open it." : "أنقر على الزر أدناه لفتحه.", "Could not find category \"%s\"" : "تعذر العثور على المجلد \"%s\"", @@ -110,13 +108,14 @@ "Login canceled by app" : "تم إلغاء الدخول مِن طرف التطبيق", "a safe home for all your data" : "المكان الآمن لجميع بياناتك", "File is currently busy, please try again later" : "إنّ الملف مشغول الآمن، يرجى إعادة المحاولة لاحقًا", - "Can't read file" : "لا يمكن قراءة الملف", "Application is not enabled" : "التطبيق غير مفعّل", "Authentication error" : "لم يتم التأكد من الشخصية بنجاح", "Token expired. Please reload page." : "انتهت صلاحية الكلمة , يرجى اعادة تحميل الصفحة", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "يمكن إصلاح هذا الخطا بإعطاء مخدّم الموقع صلاحيات التعديل على مجلد الإعدادات. أنظر %s", "Storage is temporarily not available" : "وحدة التخزين غير متوفرة", - "Following databases are supported: %s" : "قواعد البيانات التالية مدعومة: %s", - "Invalid Federated Cloud ID" : "معرّف سحابة الاتحاد غير صالح" + "This can usually be fixed by giving the webserver write access to the config directory" : "يمكن حل هذا عادة بإعطاء خادم الوب صلاحية الكتابة في مجلد config", + "Can't create or write into the data directory %s" : "لا يمكن الإنشاء أو الكتابة في مجلد البيانات %s", + "Invalid Federated Cloud ID" : "معرّف سحابة الاتحاد غير صالح", + "Can't read file" : "لا يمكن قراءة الملف" },"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" }
\ No newline at end of file diff --git a/lib/l10n/ast.js b/lib/l10n/ast.js index bc9fa59f1b1..51f29bbbb69 100644 --- a/lib/l10n/ast.js +++ b/lib/l10n/ast.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡Nun pue escribise nel direutoriu «config»!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Davezu esto pue iguase dándo-y al sirvidor web accesu d'escritura al direutoriu de configuración", "See %s" : "Mira %s", "Sample configuration detected" : "Configuración d'amuesa detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectose que la configuración d'amuesa copiose. Esto pue encaboxar la instalación y dexala ensín soporte. Llee la documentación enantes de facer cambéos en config.php", @@ -58,17 +57,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, desanicia la configuración open_basedir dientro la so php.ini o camude a PHP 64 bits.", "Set an admin username." : "Afitar nome d'usuariu p'almin", "Set an admin password." : "Afitar contraseña p'almin", - "Can't create or write into the data directory %s" : "Nun pue crease o escribir dientro los datos del direutoriu %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El motor compartíu %s tien d'implementar la interfaz OCP\\Share_Backend", "Sharing backend %s not found" : "Nun s'alcontró'l botón de compartición %s", "Sharing backend for %s not found" : "Nun s'alcontró'l botón de partición pa %s", "Open »%s«" : "Abrir «%s»", "You are not allowed to share %s" : "Nun tienes permisu pa compartir %s", - "Can’t increase permissions of %s" : "Nun pue aumentase los permisos de %s", - "Files can’t be shared with delete permissions" : "Los ficheros nun puen compartise colos permisos de desaniciu", - "Files can’t be shared with create permissions" : "Los ficheros nun puen compartise colos permisos de creación", "Expiration date is in the past" : "La data de caducidá ta nel pasáu.", - "Can’t set expiration date more than %s days in the future" : "Nun pue afitase la data de caducidá más de %s díes nel futuru", "Click the button below to open it." : "Primi'l botón d'embaxo p'abrilu.", "Could not find category \"%s\"" : "Nun pudo alcontrase la estaya \"%s.\"", "Sunday" : "Domingu", @@ -126,7 +120,6 @@ OC.L10N.register( "Login canceled by app" : "Aniciar sesión canceláu pola aplicación", "a safe home for all your data" : "un llar seguru pa tolos tos datos", "File is currently busy, please try again later" : "Fichaeru ta ocupáu, por favor intentelo de nuevu más tarde", - "Can't read file" : "Nun ye a lleese'l ficheru", "Application is not enabled" : "L'aplicación nun ta habilitada", "Authentication error" : "Fallu d'autenticación", "Token expired. Please reload page." : "Token caducáu. Recarga la páxina.", @@ -159,8 +152,13 @@ OC.L10N.register( "Storage connection error. %s" : "Fallu de conexón al almacenamientu. %s", "Storage is temporarily not available" : "L'almacenamientu ta temporalmente non disponible", "Storage connection timeout. %s" : "Tiempu escosao de conexón al almacenamientu. %s", - "Following databases are supported: %s" : "Les siguientes bases de datos tan sofitaes: %s", - "Following platforms are supported: %s" : "Les siguientes plataformes tan sofitaes: %s", - "Invalid Federated Cloud ID" : "ID non válida de ñube federada" + "This can usually be fixed by giving the webserver write access to the config directory" : "Davezu esto pue iguase dándo-y al sirvidor web accesu d'escritura al direutoriu de configuración", + "Can't create or write into the data directory %s" : "Nun pue crease o escribir dientro los datos del direutoriu %s", + "Invalid Federated Cloud ID" : "ID non válida de ñube federada", + "Can’t increase permissions of %s" : "Nun pue aumentase los permisos de %s", + "Files can’t be shared with delete permissions" : "Los ficheros nun puen compartise colos permisos de desaniciu", + "Files can’t be shared with create permissions" : "Los ficheros nun puen compartise colos permisos de creación", + "Can’t set expiration date more than %s days in the future" : "Nun pue afitase la data de caducidá más de %s díes nel futuru", + "Can't read file" : "Nun ye a lleese'l ficheru" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/ast.json b/lib/l10n/ast.json index a5c8e40afd2..508e4be8899 100644 --- a/lib/l10n/ast.json +++ b/lib/l10n/ast.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡Nun pue escribise nel direutoriu «config»!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Davezu esto pue iguase dándo-y al sirvidor web accesu d'escritura al direutoriu de configuración", "See %s" : "Mira %s", "Sample configuration detected" : "Configuración d'amuesa detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectose que la configuración d'amuesa copiose. Esto pue encaboxar la instalación y dexala ensín soporte. Llee la documentación enantes de facer cambéos en config.php", @@ -56,17 +55,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, desanicia la configuración open_basedir dientro la so php.ini o camude a PHP 64 bits.", "Set an admin username." : "Afitar nome d'usuariu p'almin", "Set an admin password." : "Afitar contraseña p'almin", - "Can't create or write into the data directory %s" : "Nun pue crease o escribir dientro los datos del direutoriu %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El motor compartíu %s tien d'implementar la interfaz OCP\\Share_Backend", "Sharing backend %s not found" : "Nun s'alcontró'l botón de compartición %s", "Sharing backend for %s not found" : "Nun s'alcontró'l botón de partición pa %s", "Open »%s«" : "Abrir «%s»", "You are not allowed to share %s" : "Nun tienes permisu pa compartir %s", - "Can’t increase permissions of %s" : "Nun pue aumentase los permisos de %s", - "Files can’t be shared with delete permissions" : "Los ficheros nun puen compartise colos permisos de desaniciu", - "Files can’t be shared with create permissions" : "Los ficheros nun puen compartise colos permisos de creación", "Expiration date is in the past" : "La data de caducidá ta nel pasáu.", - "Can’t set expiration date more than %s days in the future" : "Nun pue afitase la data de caducidá más de %s díes nel futuru", "Click the button below to open it." : "Primi'l botón d'embaxo p'abrilu.", "Could not find category \"%s\"" : "Nun pudo alcontrase la estaya \"%s.\"", "Sunday" : "Domingu", @@ -124,7 +118,6 @@ "Login canceled by app" : "Aniciar sesión canceláu pola aplicación", "a safe home for all your data" : "un llar seguru pa tolos tos datos", "File is currently busy, please try again later" : "Fichaeru ta ocupáu, por favor intentelo de nuevu más tarde", - "Can't read file" : "Nun ye a lleese'l ficheru", "Application is not enabled" : "L'aplicación nun ta habilitada", "Authentication error" : "Fallu d'autenticación", "Token expired. Please reload page." : "Token caducáu. Recarga la páxina.", @@ -157,8 +150,13 @@ "Storage connection error. %s" : "Fallu de conexón al almacenamientu. %s", "Storage is temporarily not available" : "L'almacenamientu ta temporalmente non disponible", "Storage connection timeout. %s" : "Tiempu escosao de conexón al almacenamientu. %s", - "Following databases are supported: %s" : "Les siguientes bases de datos tan sofitaes: %s", - "Following platforms are supported: %s" : "Les siguientes plataformes tan sofitaes: %s", - "Invalid Federated Cloud ID" : "ID non válida de ñube federada" + "This can usually be fixed by giving the webserver write access to the config directory" : "Davezu esto pue iguase dándo-y al sirvidor web accesu d'escritura al direutoriu de configuración", + "Can't create or write into the data directory %s" : "Nun pue crease o escribir dientro los datos del direutoriu %s", + "Invalid Federated Cloud ID" : "ID non válida de ñube federada", + "Can’t increase permissions of %s" : "Nun pue aumentase los permisos de %s", + "Files can’t be shared with delete permissions" : "Los ficheros nun puen compartise colos permisos de desaniciu", + "Files can’t be shared with create permissions" : "Los ficheros nun puen compartise colos permisos de creación", + "Can’t set expiration date more than %s days in the future" : "Nun pue afitase la data de caducidá más de %s díes nel futuru", + "Can't read file" : "Nun ye a lleese'l ficheru" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/az.js b/lib/l10n/az.js index d6ded0ff289..7bbb135cf37 100644 --- a/lib/l10n/az.js +++ b/lib/l10n/az.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "\"configurasiya\" direktoriyasının daxilində yazmaq mümkün deyil", - "This can usually be fixed by giving the webserver write access to the config directory" : "Adətən tez həll etmək üçün WEB serverdə yazma yetkisi verilir", "See %s" : "Bax %s", "Sample configuration detected" : "Konfiqurasiya nüsxəsi təyin edildi", "Unknown filetype" : "Fayl tipi bəlli deyil.", @@ -64,6 +63,7 @@ OC.L10N.register( "Application is not enabled" : "Proqram təminatı aktiv edilməyib", "Authentication error" : "Təyinat metodikası", "Token expired. Please reload page." : "Token vaxtı bitib. Xahiş olunur səhifəni yenidən yükləyəsiniz.", - "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu ola bilər ki, cache/accelerator such tərəfindən cağırılıb hansi ki, Zend OPcache və eAccelerator-da olduğu kimidir." + "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu ola bilər ki, cache/accelerator such tərəfindən cağırılıb hansi ki, Zend OPcache və eAccelerator-da olduğu kimidir.", + "This can usually be fixed by giving the webserver write access to the config directory" : "Adətən tez həll etmək üçün WEB serverdə yazma yetkisi verilir" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/az.json b/lib/l10n/az.json index 44aec9e012b..ad157d8687f 100644 --- a/lib/l10n/az.json +++ b/lib/l10n/az.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "\"configurasiya\" direktoriyasının daxilində yazmaq mümkün deyil", - "This can usually be fixed by giving the webserver write access to the config directory" : "Adətən tez həll etmək üçün WEB serverdə yazma yetkisi verilir", "See %s" : "Bax %s", "Sample configuration detected" : "Konfiqurasiya nüsxəsi təyin edildi", "Unknown filetype" : "Fayl tipi bəlli deyil.", @@ -62,6 +61,7 @@ "Application is not enabled" : "Proqram təminatı aktiv edilməyib", "Authentication error" : "Təyinat metodikası", "Token expired. Please reload page." : "Token vaxtı bitib. Xahiş olunur səhifəni yenidən yükləyəsiniz.", - "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu ola bilər ki, cache/accelerator such tərəfindən cağırılıb hansi ki, Zend OPcache və eAccelerator-da olduğu kimidir." + "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu ola bilər ki, cache/accelerator such tərəfindən cağırılıb hansi ki, Zend OPcache və eAccelerator-da olduğu kimidir.", + "This can usually be fixed by giving the webserver write access to the config directory" : "Adətən tez həll etmək üçün WEB serverdə yazma yetkisi verilir" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/bg.js b/lib/l10n/bg.js index ee117a2cfb1..2b3be1a5c1f 100644 --- a/lib/l10n/bg.js +++ b/lib/l10n/bg.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Неуспешен опит за запис в \"config\" папката!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Това може да бъде решено единствено като разрешиш на уеб сървъра да пише в config папката.", "See %s" : "Вижте %s", "Sample configuration detected" : "Открита е примерна конфигурация", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Усетено беше че примерната конфигурация е копирана. Това може да развли инсталацията ти и не се поддържа. Моля, прочети документацията преди да правиш промени на config.php", @@ -52,13 +51,11 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Моля, премахтене настройката за open_basedir от вашия php.ini или преминете към 64-битово PHP.", "Set an admin username." : "Задайте потребителско име за администратор.", "Set an admin password." : "Задай парола за администратор.", - "Can't create or write into the data directory %s" : "Неуспешно създаване или записване в \"data\" папката %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Споделянето на сървърния %s трябва да поддържа OCP\\Share_Backend интерфейс.", "Sharing backend %s not found" : "Споделянето на сървърния %s не е открито.", "Sharing backend for %s not found" : "Споделянето на сървъра за %s не е открито.", "Open »%s«" : "Отвори »%s«", "You are not allowed to share %s" : "Не ти е разрешено да споделяш %s.", - "Can’t set expiration date more than %s days in the future" : "Неуспешно задаване на срок на валидност повече от %s дни в бъдещето", "%1$s shared »%2$s« with you" : "%1$s сподели »%2$s« с вас", "%1$s shared »%2$s« with you." : "%1$s сподели »%2$s« с вас.", "Could not find category \"%s\"" : "Невъзможно откриване на категорията \"%s\".", @@ -114,7 +111,6 @@ OC.L10N.register( "The username is already being used" : "Потребителското име е вече заето.", "User disabled" : "Потребителят е деактивиран", "a safe home for all your data" : "безопасен дом за всички ваши данни", - "Can't read file" : "Файлът не може да бъде прочетен", "Application is not enabled" : "Приложението не е включено", "Authentication error" : "Грешка при удостоверяването", "Token expired. Please reload page." : "Изтекла сесия. Моля, презареди страницата.", @@ -133,8 +129,10 @@ OC.L10N.register( "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Моля, променете правата за достъп на 0770, за да не може директорията да бъде видяна от други потребители.", "Could not obtain lock type %d on \"%s\"." : "Неуспешен опит за ексклузивен достъп от типa %d върху \"%s\".", "Storage is temporarily not available" : "Временно хранилището не е налично", - "Following databases are supported: %s" : "Следните бази данни са поддържани: %s", - "Following platforms are supported: %s" : "Поддържани са следните платформи: %s", - "Invalid Federated Cloud ID" : "Невалиден Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Това може да бъде решено единствено като разрешиш на уеб сървъра да пише в config папката.", + "Can't create or write into the data directory %s" : "Неуспешно създаване или записване в \"data\" папката %s", + "Invalid Federated Cloud ID" : "Невалиден Federated Cloud ID", + "Can’t set expiration date more than %s days in the future" : "Неуспешно задаване на срок на валидност повече от %s дни в бъдещето", + "Can't read file" : "Файлът не може да бъде прочетен" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/bg.json b/lib/l10n/bg.json index 2c0ed5eada9..e581e40768d 100644 --- a/lib/l10n/bg.json +++ b/lib/l10n/bg.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Неуспешен опит за запис в \"config\" папката!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Това може да бъде решено единствено като разрешиш на уеб сървъра да пише в config папката.", "See %s" : "Вижте %s", "Sample configuration detected" : "Открита е примерна конфигурация", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Усетено беше че примерната конфигурация е копирана. Това може да развли инсталацията ти и не се поддържа. Моля, прочети документацията преди да правиш промени на config.php", @@ -50,13 +49,11 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Моля, премахтене настройката за open_basedir от вашия php.ini или преминете към 64-битово PHP.", "Set an admin username." : "Задайте потребителско име за администратор.", "Set an admin password." : "Задай парола за администратор.", - "Can't create or write into the data directory %s" : "Неуспешно създаване или записване в \"data\" папката %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Споделянето на сървърния %s трябва да поддържа OCP\\Share_Backend интерфейс.", "Sharing backend %s not found" : "Споделянето на сървърния %s не е открито.", "Sharing backend for %s not found" : "Споделянето на сървъра за %s не е открито.", "Open »%s«" : "Отвори »%s«", "You are not allowed to share %s" : "Не ти е разрешено да споделяш %s.", - "Can’t set expiration date more than %s days in the future" : "Неуспешно задаване на срок на валидност повече от %s дни в бъдещето", "%1$s shared »%2$s« with you" : "%1$s сподели »%2$s« с вас", "%1$s shared »%2$s« with you." : "%1$s сподели »%2$s« с вас.", "Could not find category \"%s\"" : "Невъзможно откриване на категорията \"%s\".", @@ -112,7 +109,6 @@ "The username is already being used" : "Потребителското име е вече заето.", "User disabled" : "Потребителят е деактивиран", "a safe home for all your data" : "безопасен дом за всички ваши данни", - "Can't read file" : "Файлът не може да бъде прочетен", "Application is not enabled" : "Приложението не е включено", "Authentication error" : "Грешка при удостоверяването", "Token expired. Please reload page." : "Изтекла сесия. Моля, презареди страницата.", @@ -131,8 +127,10 @@ "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Моля, променете правата за достъп на 0770, за да не може директорията да бъде видяна от други потребители.", "Could not obtain lock type %d on \"%s\"." : "Неуспешен опит за ексклузивен достъп от типa %d върху \"%s\".", "Storage is temporarily not available" : "Временно хранилището не е налично", - "Following databases are supported: %s" : "Следните бази данни са поддържани: %s", - "Following platforms are supported: %s" : "Поддържани са следните платформи: %s", - "Invalid Federated Cloud ID" : "Невалиден Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Това може да бъде решено единствено като разрешиш на уеб сървъра да пише в config папката.", + "Can't create or write into the data directory %s" : "Неуспешно създаване или записване в \"data\" папката %s", + "Invalid Federated Cloud ID" : "Невалиден Federated Cloud ID", + "Can’t set expiration date more than %s days in the future" : "Неуспешно задаване на срок на валидност повече от %s дни в бъдещето", + "Can't read file" : "Файлът не може да бъде прочетен" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/bn_BD.js b/lib/l10n/bn_BD.js index 813198ca15a..313a5ce1885 100644 --- a/lib/l10n/bn_BD.js +++ b/lib/l10n/bn_BD.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "\"config\" ডিরেক্টরিতে লেখা যায়না!", - "This can usually be fixed by giving the webserver write access to the config directory" : "সাধারণতঃ ওয়বসার্ভারকে কনফিগ ডিরেক্টরিতে লেখার অধিকার দিয়ে এই সমস্যা সমাধান করা যায়", "See %s" : "%s দেখ", "Sample configuration detected" : "নমুনা কনফিগারেশন পাওয়া গেছে", "Unknown filetype" : "অজানা প্রকৃতির ফাইল", @@ -60,6 +59,7 @@ OC.L10N.register( "Dec." : "ডিসে.", "Application is not enabled" : "অ্যাপ্লিকেসনটি সক্রিয় নয়", "Authentication error" : "অনুমোদন ঘটিত সমস্যা", - "Token expired. Please reload page." : "টোকেন মেয়াদোত্তীর্ণ। দয়া করে পৃষ্ঠাটি পূনরায় লোড করুন।" + "Token expired. Please reload page." : "টোকেন মেয়াদোত্তীর্ণ। দয়া করে পৃষ্ঠাটি পূনরায় লোড করুন।", + "This can usually be fixed by giving the webserver write access to the config directory" : "সাধারণতঃ ওয়বসার্ভারকে কনফিগ ডিরেক্টরিতে লেখার অধিকার দিয়ে এই সমস্যা সমাধান করা যায়" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/bn_BD.json b/lib/l10n/bn_BD.json index 76a24aee562..3e2cb93d361 100644 --- a/lib/l10n/bn_BD.json +++ b/lib/l10n/bn_BD.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "\"config\" ডিরেক্টরিতে লেখা যায়না!", - "This can usually be fixed by giving the webserver write access to the config directory" : "সাধারণতঃ ওয়বসার্ভারকে কনফিগ ডিরেক্টরিতে লেখার অধিকার দিয়ে এই সমস্যা সমাধান করা যায়", "See %s" : "%s দেখ", "Sample configuration detected" : "নমুনা কনফিগারেশন পাওয়া গেছে", "Unknown filetype" : "অজানা প্রকৃতির ফাইল", @@ -58,6 +57,7 @@ "Dec." : "ডিসে.", "Application is not enabled" : "অ্যাপ্লিকেসনটি সক্রিয় নয়", "Authentication error" : "অনুমোদন ঘটিত সমস্যা", - "Token expired. Please reload page." : "টোকেন মেয়াদোত্তীর্ণ। দয়া করে পৃষ্ঠাটি পূনরায় লোড করুন।" + "Token expired. Please reload page." : "টোকেন মেয়াদোত্তীর্ণ। দয়া করে পৃষ্ঠাটি পূনরায় লোড করুন।", + "This can usually be fixed by giving the webserver write access to the config directory" : "সাধারণতঃ ওয়বসার্ভারকে কনফিগ ডিরেক্টরিতে লেখার অধিকার দিয়ে এই সমস্যা সমাধান করা যায়" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/br.js b/lib/l10n/br.js index e5c8ae9e7d5..f64cb123570 100644 --- a/lib/l10n/br.js +++ b/lib/l10n/br.js @@ -37,12 +37,12 @@ OC.L10N.register( "The username is already being used" : "An anv-implijet a zo dija implijet", "User disabled" : "Implijer disaotreet", "Login canceled by app" : "Mont tre arrestet gant ar meziant", - "Can't read file" : "N'eo ket posupl lenn ar restr", "Application is not enabled" : "N'eo ket aotreet ar meziant", "Authentication error" : "Fazi dilesa", "Token expired. Please reload page." : "Jedouer re gozh. Adkargit ar bajenn.", "PHP module %s not installed." : "Modul %s PHPn n'eo ket staliet.", "Storage connection error. %s" : "Fazi renkañ kenstag. %s", - "Storage is temporarily not available" : "N'haller ket tizhout ar skor roadennoù evit ar poent" + "Storage is temporarily not available" : "N'haller ket tizhout ar skor roadennoù evit ar poent", + "Can't read file" : "N'eo ket posupl lenn ar restr" }, "nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);"); diff --git a/lib/l10n/br.json b/lib/l10n/br.json index 13909e665ae..fd2f2738603 100644 --- a/lib/l10n/br.json +++ b/lib/l10n/br.json @@ -35,12 +35,12 @@ "The username is already being used" : "An anv-implijet a zo dija implijet", "User disabled" : "Implijer disaotreet", "Login canceled by app" : "Mont tre arrestet gant ar meziant", - "Can't read file" : "N'eo ket posupl lenn ar restr", "Application is not enabled" : "N'eo ket aotreet ar meziant", "Authentication error" : "Fazi dilesa", "Token expired. Please reload page." : "Jedouer re gozh. Adkargit ar bajenn.", "PHP module %s not installed." : "Modul %s PHPn n'eo ket staliet.", "Storage connection error. %s" : "Fazi renkañ kenstag. %s", - "Storage is temporarily not available" : "N'haller ket tizhout ar skor roadennoù evit ar poent" + "Storage is temporarily not available" : "N'haller ket tizhout ar skor roadennoù evit ar poent", + "Can't read file" : "N'eo ket posupl lenn ar restr" },"pluralForm" :"nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);" }
\ No newline at end of file diff --git a/lib/l10n/ca.js b/lib/l10n/ca.js index 15a2e167794..6fe1192ffb0 100644 --- a/lib/l10n/ca.js +++ b/lib/l10n/ca.js @@ -2,11 +2,8 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "No es pot escriure al directori \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori de configuració", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true).", - "See %s" : "Vegeu %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Això normalment es pot arreglar donant al servidor web accés d'escriptura al directori de configuració.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true). Vegeu %s", + "See %s" : "Vegeu %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Els fitxers de l’aplicació %1$s no s’han substituït correctament. Assegureu-vos que és una versió compatible amb el servidor.", "Sample configuration detected" : "S'ha detectat una configuració d'exemple", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "S'ha detectat que la configuració d'exemple ha estat copiada. Això no està suportat, i podria corrompre la vostra instalació. Si us plau, llegiu la documentació abans de fer cap canvi a config.php", @@ -53,19 +50,19 @@ OC.L10N.register( "today" : "avui", "tomorrow" : "demà", "yesterday" : "ahir", - "_in %n day_::_in %n days_" : ["d'aquí a %n dia","d'aquí a %n dies"], + "_in %n day_::_in %n days_" : ["d'aquí %n dia","d'aquí %n dies"], "_%n day ago_::_%n days ago_" : ["fa %n dia","fa %n dies"], "next month" : "mes següent", "last month" : "el mes passat", - "_in %n month_::_in %n months_" : ["d'aquí a %n mes","d'aquí a %n mesos"], + "_in %n month_::_in %n months_" : ["d'aquí %n mes","d'aquí %n mesos"], "_%n month ago_::_%n months ago_" : ["fa %n mes","fa %n mesos"], "next year" : "any següent", "last year" : "l'any passat", - "_in %n year_::_in %n years_" : ["d'aquí a %n any","d'aquí a %n anys"], + "_in %n year_::_in %n years_" : ["d'aquí %n any","d'aquí %n anys"], "_%n year ago_::_%n years ago_" : ["fa %n any","fa %n anys"], - "_in %n hour_::_in %n hours_" : ["d'aquí a %n hora","d'aquí a %n hores"], + "_in %n hour_::_in %n hours_" : ["d'aquí %n hora","d'aquí %n hores"], "_%n hour ago_::_%n hours ago_" : ["fa %n hora","fa %n hores"], - "_in %n minute_::_in %n minutes_" : ["d'aquí a %n minut","d'aquí a %n minuts"], + "_in %n minute_::_in %n minutes_" : ["d'aquí %n minut","d'aquí %n minuts"], "_%n minute ago_::_%n minutes ago_" : ["fa %n minut","fa %n minuts"], "in a few seconds" : "d'aquí uns segons", "seconds ago" : "fa uns segons", @@ -102,7 +99,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Si us plau, suprimiu l’opció open_basedir del vostre php.ini o canvieu a PHP de 64 bits.", "Set an admin username." : "Establiu un nom d'usuari per l'administrador.", "Set an admin password." : "Establiu una contrasenya per l'administrador.", - "Can't create or write into the data directory %s" : "No es pot crear o escriure al directori de dades %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El rerefons de compartició %s ha d'implementar la interfície OCP\\Share_Backend", "Sharing backend %s not found" : "El rerefons de compartició %s no s'ha trobat", "Sharing backend for %s not found" : "El rerefons de compartició per a %s no s'ha trobat", @@ -112,11 +108,7 @@ OC.L10N.register( "Open »%s«" : "Obre »%s«", "%1$s via %2$s" : "%1$s mitjançant %2$s", "You are not allowed to share %s" : "No se us permet compartir %s", - "Can’t increase permissions of %s" : "No es poden augmentar els permisos de %s", - "Files can’t be shared with delete permissions" : "No es poden compartir els fitxers amb permisos de supressió", - "Files can’t be shared with create permissions" : "No es poden compartir els fitxers amb permisos de creació", "Expiration date is in the past" : "La data de caducitat és del passat", - "Can’t set expiration date more than %s days in the future" : "No es pot establir la data de caducitat més de %s dies en el futur", "%1$s shared »%2$s« with you" : "%1$s us ha compartit »%2$s«", "%1$s shared »%2$s« with you." : "%1$s us ha compartit »%2$s«.", "Click the button below to open it." : "Feu clic al botó de sota per obrir-lo.", @@ -181,15 +173,14 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "L'aplicació \"%1$s\" no es pot instal·lar perquè no es compleixen les dependències següents: %2$s", "a safe home for all your data" : "un lloc segur per a les vostres dades", "File is currently busy, please try again later" : "El fitxer està ocupat actualment, si us plau torneu-ho a provar més tard", - "Can't read file" : "No es pot llegir el fitxer", "Application is not enabled" : "L'aplicació no està activada", "Authentication error" : "Error d'autenticació", "Token expired. Please reload page." : "El testimoni ha expirat. Torneu a carregar la pàgina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "No hi ha instal·lats controladors de bases de dades (sqlite, mysql o postgresql).", "Cannot write into \"config\" directory" : "No es pot escriure al directori \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori de configuració. Vegeu %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true). Vegeu %s", "Cannot write into \"apps\" directory" : "No es pot escriure al directori \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Això normalment es pot arreglar donant al servidor web escriure accés al directori d'aplicacions o desactivar la botiga d’apps al fitxer de configuració.", "Cannot create \"data\" directory" : "No es pot crear el directori \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori arrel. Vegeu %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Els permisos generalment es poden solucionar donant al servidor web accés d’escriptura al directori arrel. Vegeu %s.", @@ -226,8 +217,15 @@ OC.L10N.register( "Storage connection error. %s" : "Error de connexió d’emmagatzematge. %s", "Storage is temporarily not available" : "Emmagatzematge temporalment no disponible", "Storage connection timeout. %s" : "Temps d’espera exhaurit en la connexió d’emmagatzematge. %s", - "Following databases are supported: %s" : "S'admeten les següents bases de dades: %s", - "Following platforms are supported: %s" : "S'admeten les següents plataformes: %s", - "Invalid Federated Cloud ID" : "ID de Núvol Federat no vàlid" + "This can usually be fixed by giving the webserver write access to the config directory" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori de configuració", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true).", + "Can't create or write into the data directory %s" : "No es pot crear o escriure al directori de dades %s", + "Invalid Federated Cloud ID" : "ID de Núvol Federat no vàlid", + "Can’t increase permissions of %s" : "No es poden augmentar els permisos de %s", + "Files can’t be shared with delete permissions" : "No es poden compartir els fitxers amb permisos de supressió", + "Files can’t be shared with create permissions" : "No es poden compartir els fitxers amb permisos de creació", + "Can’t set expiration date more than %s days in the future" : "No es pot establir la data de caducitat més de %s dies en el futur", + "Can't read file" : "No es pot llegir el fitxer", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Això normalment es pot arreglar donant al servidor web escriure accés al directori d'aplicacions o desactivar la botiga d’apps al fitxer de configuració." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/ca.json b/lib/l10n/ca.json index 57177fc6fb1..fd79c04c5e6 100644 --- a/lib/l10n/ca.json +++ b/lib/l10n/ca.json @@ -1,10 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "No es pot escriure al directori \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori de configuració", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true).", - "See %s" : "Vegeu %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Això normalment es pot arreglar donant al servidor web accés d'escriptura al directori de configuració.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true). Vegeu %s", + "See %s" : "Vegeu %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Els fitxers de l’aplicació %1$s no s’han substituït correctament. Assegureu-vos que és una versió compatible amb el servidor.", "Sample configuration detected" : "S'ha detectat una configuració d'exemple", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "S'ha detectat que la configuració d'exemple ha estat copiada. Això no està suportat, i podria corrompre la vostra instalació. Si us plau, llegiu la documentació abans de fer cap canvi a config.php", @@ -51,19 +48,19 @@ "today" : "avui", "tomorrow" : "demà", "yesterday" : "ahir", - "_in %n day_::_in %n days_" : ["d'aquí a %n dia","d'aquí a %n dies"], + "_in %n day_::_in %n days_" : ["d'aquí %n dia","d'aquí %n dies"], "_%n day ago_::_%n days ago_" : ["fa %n dia","fa %n dies"], "next month" : "mes següent", "last month" : "el mes passat", - "_in %n month_::_in %n months_" : ["d'aquí a %n mes","d'aquí a %n mesos"], + "_in %n month_::_in %n months_" : ["d'aquí %n mes","d'aquí %n mesos"], "_%n month ago_::_%n months ago_" : ["fa %n mes","fa %n mesos"], "next year" : "any següent", "last year" : "l'any passat", - "_in %n year_::_in %n years_" : ["d'aquí a %n any","d'aquí a %n anys"], + "_in %n year_::_in %n years_" : ["d'aquí %n any","d'aquí %n anys"], "_%n year ago_::_%n years ago_" : ["fa %n any","fa %n anys"], - "_in %n hour_::_in %n hours_" : ["d'aquí a %n hora","d'aquí a %n hores"], + "_in %n hour_::_in %n hours_" : ["d'aquí %n hora","d'aquí %n hores"], "_%n hour ago_::_%n hours ago_" : ["fa %n hora","fa %n hores"], - "_in %n minute_::_in %n minutes_" : ["d'aquí a %n minut","d'aquí a %n minuts"], + "_in %n minute_::_in %n minutes_" : ["d'aquí %n minut","d'aquí %n minuts"], "_%n minute ago_::_%n minutes ago_" : ["fa %n minut","fa %n minuts"], "in a few seconds" : "d'aquí uns segons", "seconds ago" : "fa uns segons", @@ -100,7 +97,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Si us plau, suprimiu l’opció open_basedir del vostre php.ini o canvieu a PHP de 64 bits.", "Set an admin username." : "Establiu un nom d'usuari per l'administrador.", "Set an admin password." : "Establiu una contrasenya per l'administrador.", - "Can't create or write into the data directory %s" : "No es pot crear o escriure al directori de dades %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El rerefons de compartició %s ha d'implementar la interfície OCP\\Share_Backend", "Sharing backend %s not found" : "El rerefons de compartició %s no s'ha trobat", "Sharing backend for %s not found" : "El rerefons de compartició per a %s no s'ha trobat", @@ -110,11 +106,7 @@ "Open »%s«" : "Obre »%s«", "%1$s via %2$s" : "%1$s mitjançant %2$s", "You are not allowed to share %s" : "No se us permet compartir %s", - "Can’t increase permissions of %s" : "No es poden augmentar els permisos de %s", - "Files can’t be shared with delete permissions" : "No es poden compartir els fitxers amb permisos de supressió", - "Files can’t be shared with create permissions" : "No es poden compartir els fitxers amb permisos de creació", "Expiration date is in the past" : "La data de caducitat és del passat", - "Can’t set expiration date more than %s days in the future" : "No es pot establir la data de caducitat més de %s dies en el futur", "%1$s shared »%2$s« with you" : "%1$s us ha compartit »%2$s«", "%1$s shared »%2$s« with you." : "%1$s us ha compartit »%2$s«.", "Click the button below to open it." : "Feu clic al botó de sota per obrir-lo.", @@ -179,15 +171,14 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "L'aplicació \"%1$s\" no es pot instal·lar perquè no es compleixen les dependències següents: %2$s", "a safe home for all your data" : "un lloc segur per a les vostres dades", "File is currently busy, please try again later" : "El fitxer està ocupat actualment, si us plau torneu-ho a provar més tard", - "Can't read file" : "No es pot llegir el fitxer", "Application is not enabled" : "L'aplicació no està activada", "Authentication error" : "Error d'autenticació", "Token expired. Please reload page." : "El testimoni ha expirat. Torneu a carregar la pàgina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "No hi ha instal·lats controladors de bases de dades (sqlite, mysql o postgresql).", "Cannot write into \"config\" directory" : "No es pot escriure al directori \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori de configuració. Vegeu %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true). Vegeu %s", "Cannot write into \"apps\" directory" : "No es pot escriure al directori \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Això normalment es pot arreglar donant al servidor web escriure accés al directori d'aplicacions o desactivar la botiga d’apps al fitxer de configuració.", "Cannot create \"data\" directory" : "No es pot crear el directori \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori arrel. Vegeu %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Els permisos generalment es poden solucionar donant al servidor web accés d’escriptura al directori arrel. Vegeu %s.", @@ -224,8 +215,15 @@ "Storage connection error. %s" : "Error de connexió d’emmagatzematge. %s", "Storage is temporarily not available" : "Emmagatzematge temporalment no disponible", "Storage connection timeout. %s" : "Temps d’espera exhaurit en la connexió d’emmagatzematge. %s", - "Following databases are supported: %s" : "S'admeten les següents bases de dades: %s", - "Following platforms are supported: %s" : "S'admeten les següents plataformes: %s", - "Invalid Federated Cloud ID" : "ID de Núvol Federat no vàlid" + "This can usually be fixed by giving the webserver write access to the config directory" : "Això normalment es pot solucionar donant al servidor web permís d'escriptura al directori de configuració", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si preferiu mantenir el fitxer config.php només de lectura, establiu-hi l’opció \"config_is_read_only\" com a certa (true).", + "Can't create or write into the data directory %s" : "No es pot crear o escriure al directori de dades %s", + "Invalid Federated Cloud ID" : "ID de Núvol Federat no vàlid", + "Can’t increase permissions of %s" : "No es poden augmentar els permisos de %s", + "Files can’t be shared with delete permissions" : "No es poden compartir els fitxers amb permisos de supressió", + "Files can’t be shared with create permissions" : "No es poden compartir els fitxers amb permisos de creació", + "Can’t set expiration date more than %s days in the future" : "No es pot establir la data de caducitat més de %s dies en el futur", + "Can't read file" : "No es pot llegir el fitxer", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Això normalment es pot arreglar donant al servidor web escriure accés al directori d'aplicacions o desactivar la botiga d’apps al fitxer de configuració." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/cs.js b/lib/l10n/cs.js index f1d757a88ff..8d55d8941b4 100644 --- a/lib/l10n/cs.js +++ b/lib/l10n/cs.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nedaří se zapisovat do adresáře „config“!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do adresáře s nastaveními pro účet, pod kterým je provozován webový server", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true.", - "See %s" : "Viz %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Toto je obvykle možné vyřešit udělením webovému serveru oprávnění k zápisu do adresáře s nastaveními.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true. Viz %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ale, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true.", + "See %s" : "Viz %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Soubory aplikace %1$s nebyly nahrazeny řádně. Ověřte, že se jedná o verzi, která je kompatibilní se serverem.", "Sample configuration detected" : "Bylo zjištěno setrvání u předváděcího nastavení", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Pravděpodobně byla zkopírována nastavení ze vzorových souborů. Toto není podporováno a může poškodit vaši instalaci. Před prováděním změn v souboru config.php si přečtěte dokumentaci", + "%s email verification" : "%s ověřování e-mailem", + "Email verification" : "Ověřování e-mailem", + "Click the following button to confirm your email." : "Pokud chcete potvrdit svůj e-mail, klikněte na následující tlačítko.", + "Click the following link to confirm your email." : "Pokud chcete potvrdit svůj e-mail, klikněte na následující odkaz.", + "Confirm your email" : "Potvrďte svůj e-mail", "Other activities" : "Ostatní aktivity", "%1$s and %2$s" : "%1$s a %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s a %3$s", @@ -21,7 +24,7 @@ OC.L10N.register( "Hub bundle" : "Sada pro centrum aktivity (hub)", "Social sharing bundle" : "Balíček pro sdílení na sociálních sítích", "PHP %s or higher is required." : "Je vyžadováno PHP %s nebo novější.", - "PHP with a version lower than %s is required." : "Je vyžadováno PHP ve verzi nižší než %s.", + "PHP with a version lower than %s is required." : "Je vyžadováno PHP ve verzi starší než %s.", "%sbit or higher PHP required." : "Je vyžadováno PHP %sbit nebo vyšší.", "The following architectures are supported: %s" : "Jsou podporovány následující architektury: %s", "The following databases are supported: %s" : "Jsou podporovány následující databáze: %s", @@ -32,14 +35,15 @@ OC.L10N.register( "The following platforms are supported: %s" : "Jsou podporovány následující systémy: %s", "Server version %s or higher is required." : "Je potřeba verze serveru %s nebo novější.", "Server version %s or lower is required." : "Je potřeba verze serveru %s nebo starší.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Aby mohl přistupovat k tomuto nastavení je třeba, aby přihlášený uživatel byl správce, dílčí správce nebo obdržel speciální oprávnění", "Logged in user must be an admin or sub admin" : "Je třeba, aby přihlášený uživatel byl správcem či správcem pro dílčí oblast", "Logged in user must be an admin" : "Je třeba, aby přihlášený uživatel byl správce", - "Wiping of device %s has started" : "Vymazávání zařízení %s zahájeno", - "Wiping of device »%s« has started" : "Vymazávání zařízení „%s“ zahájeno", + "Wiping of device %s has started" : "Vymazávání ze zařízení %s zahájeno", + "Wiping of device »%s« has started" : "Vymazávání ze zařízení „%s“ zahájeno", "»%s« started remote wipe" : "„%s“ zahájilo vymazávání na dálku", "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "Přístroj či aplikace »%s« spustila proces vzdáleného vymazání. Obdržíte další e-mail poté co bude proces ukončen", - "Wiping of device %s has finished" : "Vymazávání zařízení %s dokončeno", - "Wiping of device »%s« has finished" : "Vymazávání zařízení „%s“ dokončeno", + "Wiping of device %s has finished" : "Vymazávání ze zařízení %s dokončeno", + "Wiping of device »%s« has finished" : "Vymazávání ze zařízení „%s“ dokončeno", "»%s« finished remote wipe" : "„%s“ dokončilo vymazání na dálku", "Device or application »%s« has finished the remote wipe process." : "Přístroj či aplikace „%s“ dokončila proces vymazání na dálku.", "Remote wipe started" : "Vymazání na dálku zahájeno", @@ -49,7 +53,8 @@ OC.L10N.register( "Authentication" : "Ověření", "Unknown filetype" : "Neznámý typ souboru", "Invalid image" : "Neplatný obrázek", - "Avatar image is not square" : "Obrázek s avatarem není čtvercový", + "Avatar image is not square" : "Profilový obrázek není čtvercový", + "View profile" : "Zobrazit profil ", "today" : "dnes", "tomorrow" : "zítra", "yesterday" : "včera", @@ -61,7 +66,7 @@ OC.L10N.register( "_%n month ago_::_%n months ago_" : ["před %n měsícem","před %n měsíci","před %n měsíci","před %n měsíci"], "next year" : "následující rok", "last year" : "minulý rok", - "_in %n year_::_in %n years_" : ["během %n roku","během %n roků","během %n roků","během %n roků"], + "_in %n year_::_in %n years_" : ["během %n roku","během %n let","během %n let","během %n let"], "_%n year ago_::_%n years ago_" : ["před rokem","před %n lety","před %n lety","před %n lety"], "_in %n hour_::_in %n hours_" : ["během %n hodiny","během %n hodin","během %n hodin","během %n hodin"], "_%n hour ago_::_%n hours ago_" : ["před %n hodinou","před %n hodinami","před %n hodinami","před %n hodinami"], @@ -72,12 +77,13 @@ OC.L10N.register( "Empty file" : "Prázdný soubor", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul s identifikátorem: %s neexistuje. Povolte ho v nastavení aplikací, nebo se obraťte na správce.", "File already exists" : "Soubor už existuje", + "Invalid path" : "Neplatný popis umístění", "Failed to create file from template" : "Vytvoření souboru ze šablony selhalo", "Templates" : "Šablony", "File name is a reserved word" : "Název souboru je rezervované slovo", - "File name contains at least one invalid character" : "Název souboru obsahuje nejméně jeden neplatný znak", + "File name contains at least one invalid character" : "Název souboru obsahuje přinejmenším jeden neplatný znak", "File name is too long" : "Název souboru je příliš dlouhý", - "Dot files are not allowed" : "Názvy souborů, začínající na tečku nejsou povolené", + "Dot files are not allowed" : "Názvy souborů, začínající na tečku nejsou dovolené", "Empty filename is not allowed" : "Je třeba vyplnit název souboru", "App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikace „%s“ nemůže být nainstalována protože soubor appinfo nelze přečíst.", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikaci „%s“ nelze nainstalovat, protože není kompatibilní s touto verzí serveru.", @@ -88,11 +94,26 @@ OC.L10N.register( "Settings" : "Nastavení", "Log out" : "Odhlásit se", "Users" : "Uživatelé", + "Email" : "E-mail", + "Mail %s" : "Poslat e-mail %s", + "Phone" : "Telefon", + "Call %s" : "Zavolat %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Zobrazit %s na Twitteru", + "Website" : "Webová stránka", + "Visit %s" : "Navštívit %s", + "Address" : "Adresa", + "Avatar" : "Profilový obrázek", + "About" : "O uživateli", + "Full name" : "Celé jméno", + "Headline" : "Nadpis", + "Organisation" : "Organizace", + "Role" : "Role", "Unknown user" : "Neznámý uživatel", "Additional settings" : "Další nastavení", "%s enter the database username and name." : "%s zadejte databázové uživatelské jméno a jméno.", "%s enter the database username." : "Zadejte uživatelské jméno %s databáze.", - "%s enter the database name." : "Zadejte název databáze pro %s databáze.", + "%s enter the database name." : "Zadejte název databáze pro %s databázi.", "%s you may not use dots in the database name" : "V názvu databáze %s není možné používat tečky.", "MySQL username and/or password not valid" : "Neplatné uživatelské jméno a/nebo heslo do MySQL", "You need to enter details of an existing account." : "Je třeba zadat podrobnosti existujícího účtu.", @@ -105,8 +126,8 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Odstraňte z php.ini nastavení volby open_basedir nebo přejděte na 64-bitové PHP.", "Set an admin username." : "Nastavte uživatelské jméno správce.", "Set an admin password." : "Nastavte heslo pro účet správce.", - "Can't create or write into the data directory %s" : "Nedaří se vytvořit nebo zapisovat do datového adresáře %s", - "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Úložiště pro sdílení %s musí implementovat rozhraní OCP\\Share_Backend", + "Cannot create or write into the data directory %s" : "Nedaří se vytvořit nebo zapisovat do datového adresáře %s", + "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Je třeba, aby podpůrná vrstva pro sdílení %s implementovala rozhraní OCP\\Share_Backend", "Sharing backend %s not found" : "Úložiště sdílení %s nenalezeno", "Sharing backend for %s not found" : "Úložiště sdílení pro %s nenalezeno", "%1$s shared »%2$s« with you and wants to add:" : "%1$s sdílí „%2$s“ a dodává:", @@ -115,14 +136,14 @@ OC.L10N.register( "Open »%s«" : "Otevřít „%s“", "%1$s via %2$s" : "%1$s prostřednictvím %2$s", "You are not allowed to share %s" : "Nemáte povoleno sdílet %s", - "Can’t increase permissions of %s" : "Nelze zvýšit oprávnění %s", - "Files can’t be shared with delete permissions" : "Soubory nelze sdílet s oprávněními k odstranění", - "Files can’t be shared with create permissions" : "Soubory nelze sdílet s oprávněními k vytváření", + "Cannot increase permissions of %s" : "Nelze navýšit oprávnění u %s", + "Files cannot be shared with delete permissions" : "Soubory nelze sdílet s oprávněními k odstranění", + "Files cannot be shared with create permissions" : "Soubory nelze sdílet s oprávněními k vytváření", "Expiration date is in the past" : "Datum skončení platnosti je v minulosti", - "Can’t set expiration date more than %s days in the future" : "Nelze nastavit datum skončení platnosti více než %s dní v budoucnu", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Datum vypršení nelze nastavit na více než %n den do budoucnosti","Datum vypršení nelze nastavit na více než %n dny do budoucnosti","Datum vypršení nelze nastavit na více než %n dnů do budoucnosti","Datum vypršení nelze nastavit na více než %n dny do budoucnosti"], "Sharing is only allowed with group members" : "Je povoleno pouze sdílení s členy skupiny", "Sharing %s failed, because this item is already shared with user %s" : "Sdílení %s se nezdařilo, protože tato položka už je sdílena s uživatelem %s", - "%1$s shared »%2$s« with you" : "%1$s s vámi sdílí „%2$s“", + "%1$s shared »%2$s« with you" : "%1$s vám sdílí „%2$s“", "%1$s shared »%2$s« with you." : "%1$s vám nasdílel(a) „%2$s“.", "Click the button below to open it." : "Pro otevření klikněte na tlačítko níže.", "The requested share does not exist anymore" : "Požadované sdílení už neexistuje", @@ -175,7 +196,7 @@ OC.L10N.register( "The user limit has been reached and the user was not created." : "Bylo dosaženo limitu uživatelů a uživatel nebyl vytvořen.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Pouze následující znaky jsou povoleny pro uživatelské jméno: „a-z“, „A-Z“, „0-9“, a „_.@-'“", "A valid username must be provided" : "Je třeba zadat platné uživatelské jméno", - "Username contains whitespace at the beginning or at the end" : "Uživatelské jméno obsahuje mezery na svém začátku nebo konci", + "Username contains whitespace at the beginning or at the end" : "Uživatelské jméno je chybné – na jeho začátku či konci se nachází prázdný znak (mezera, tabulátor, atp.)", "Username must not consist of dots only" : "Uživatelské jméno se nemůže skládat pouze ze samých teček", "Username is invalid because files already exist for this user" : "Uživatelské jméno není platné, protože protože pro tohoto uživatele už existují soubory", "A valid password must be provided" : "Je třeba zadat platné heslo", @@ -185,35 +206,36 @@ OC.L10N.register( "Login canceled by app" : "Přihlášení zrušeno aplikací", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Aplikaci „%1$s“ nelze nainstalovat, protože nejsou splněny následující závislosti: %2$s", "a safe home for all your data" : "bezpečný domov pro všechna vaše data", - "File is currently busy, please try again later" : "Soubor je používán, zkuste to později", - "Can't read file" : "Nelze přečíst soubor", + "File is currently busy, please try again later" : "Soubor je nyní používán, zkuste to později", + "Cannot read file" : "Nelze přečíst soubor", "Application is not enabled" : "Aplikace není povolena", "Authentication error" : "Chyba při ověřování se", "Token expired. Please reload page." : "Platnost tokenu skončila. Načtěte stránku znovu.", - "No database drivers (sqlite, mysql, or postgresql) installed." : "Nejsou instalovány ovladače databází (sqlite, mysql nebo postresql).", + "No database drivers (sqlite, mysql, or postgresql) installed." : "Nejsou nainstalovány ovladače databází (sqlite, mysql nebo postresql).", "Cannot write into \"config\" directory" : "Nelze zapisovat do adresáře „config“", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do kořenové složky webu pro účet, pod kterým je provozován webový server. Viz %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true. Viz %s", "Cannot write into \"apps\" directory" : "Nedaří se zapisovat do adresáře „apps“", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto je obvykle možné napravit udělením přístupu ke čtení adresáře s aplikací pro webový server nebo vypnutím katalogu s aplikacemi v souboru s nastaveními.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Toto je obvykle možné napravit udělením přístupu ke čtení adresáře s aplikací pro webový server nebo vypnutím katalogu s aplikacemi v souboru s nastaveními.", "Cannot create \"data\" directory" : "Nedaří se vytvořit adresář „data“", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do kořenové složky webu pro účet, pod kterým je provozován webový server. Viz %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Oprávnění lze obvykle napravit umožněním zápisu do kořene webu pro účet, pod kterým je provozován webový server. Viz %s.", "Setting locale to %s failed" : "Nastavení místních a jazykových nastavení na %s se nezdařilo", - "Please install one of these locales on your system and restart your webserver." : "Do svého systému nainstalujte alespoň jeden z těchto jazyků a restartujte webový server.", + "Please install one of these locales on your system and restart your webserver." : "Do svého systému nainstalujte alespoň jeden z těchto jazyků a restartujte webový server.", "PHP module %s not installed." : "PHP modul %s není nainstalován.", "Please ask your server administrator to install the module." : "Požádejte správce serveru, který využíváte o instalaci tohoto modulu.", - "PHP setting \"%s\" is not set to \"%s\"." : "Hodnota PHP nastavení „%s“ není nastavená na „%s“.", + "PHP setting \"%s\" is not set to \"%s\"." : "Hodnota v konfiguraci PHP „%s“ není nastavená na „%s“.", "Adjusting this setting in php.ini will make Nextcloud run again" : "Úprava tohoto nastavení v php.ini umožní Nextcloud opět zprovoznit", - "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload je nastaven na „%s“ namísto očekávané hodnoty „0“", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload je nastaveno na „%s“ namísto očekávané hodnoty „0“", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Pro nápravu nastavte v souboru php.ini parametr <code>mbstring.func_overload</code> na <code>0</code>", - "libxml2 2.7.0 is at least required. Currently %s is installed." : "Je požadována verze softwarové knihovny libxml2 minimálně 2.7.0. Nyní je nainstalována verze %s.", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "Je zapotřebí verze softwarové knihovny libxml2 přinejmenším 2.7.0. Nyní je nainstalována verze %s.", "To fix this issue update your libxml2 version and restart your web server." : "Tento problém opravíte instalací novější verze knihovny libxml2 a restartem webového serveru.", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP je patrně nastaveno tak, aby odstraňovalo bloky komentářů. Toto bude mít za následek znepřístupnění mnoha důležitých aplikací.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Toto je pravděpodobně způsobeno aplikacemi pro urychlení načítání jako jsou Zend OPcache nebo eAccelerator.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduly jsou nainstalovány, ale stále se tváří jako chybějící?", "Please ask your server administrator to restart the web server." : "Požádejte správce serveru, který využíváte o restart webového serveru.", "PostgreSQL >= 9 required" : "Je vyžadováno PostgreSQL verze 9 a novější", - "Please upgrade your database version" : "Aktualizujte verzi své databáze", + "Please upgrade your database version" : "Aktualizujte verzi vámi využívané databáze", "Your data directory is readable by other users" : "Váš adresář data je čitelný ostatním uživatelům", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Změňte práva na 0770, aby obsah adresáře nemohl být vypisován ostatními uživateli.", "Your data directory must be an absolute path" : "Je třeba, aby váš adresář data byl zadán jako úplný popis umístění", @@ -231,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "Chyba připojení úložiště. %s", "Storage is temporarily not available" : "Úložiště je dočasně nedostupné", "Storage connection timeout. %s" : "Překročen časový limit připojování k úložišti. %s", - "Following databases are supported: %s" : "Jsou podporovány následující databáze: %s", - "Following platforms are supported: %s" : "Jsou podporovány následující systémy: %s", - "Invalid Federated Cloud ID" : "Neplatný identifikátor v rámci federovaného cloudu" + "This can usually be fixed by giving the webserver write access to the config directory" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do adresáře s nastaveními pro účet, pod kterým je provozován webový server", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true.", + "Can't create or write into the data directory %s" : "Nedaří se vytvořit nebo zapisovat do datového adresáře %s", + "Invalid Federated Cloud ID" : "Neplatný identifikátor v rámci federovaného cloudu", + "Can’t increase permissions of %s" : "Nelze zvýšit oprávnění %s", + "Files can’t be shared with delete permissions" : "Soubory nelze sdílet s oprávněními k odstranění", + "Files can’t be shared with create permissions" : "Soubory nelze sdílet s oprávněními k vytváření", + "Can’t set expiration date more than %s days in the future" : "Nelze nastavit datum skončení platnosti více než %s dní v budoucnu", + "Can't read file" : "Nelze přečíst soubor", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto je obvykle možné napravit udělením přístupu ke čtení adresáře s aplikací pro webový server nebo vypnutím katalogu s aplikacemi v souboru s nastaveními." }, "nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"); diff --git a/lib/l10n/cs.json b/lib/l10n/cs.json index c92a4a4e1d6..092bc29f49d 100644 --- a/lib/l10n/cs.json +++ b/lib/l10n/cs.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nedaří se zapisovat do adresáře „config“!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do adresáře s nastaveními pro účet, pod kterým je provozován webový server", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true.", - "See %s" : "Viz %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Toto je obvykle možné vyřešit udělením webovému serveru oprávnění k zápisu do adresáře s nastaveními.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true. Viz %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ale, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true.", + "See %s" : "Viz %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Soubory aplikace %1$s nebyly nahrazeny řádně. Ověřte, že se jedná o verzi, která je kompatibilní se serverem.", "Sample configuration detected" : "Bylo zjištěno setrvání u předváděcího nastavení", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Pravděpodobně byla zkopírována nastavení ze vzorových souborů. Toto není podporováno a může poškodit vaši instalaci. Před prováděním změn v souboru config.php si přečtěte dokumentaci", + "%s email verification" : "%s ověřování e-mailem", + "Email verification" : "Ověřování e-mailem", + "Click the following button to confirm your email." : "Pokud chcete potvrdit svůj e-mail, klikněte na následující tlačítko.", + "Click the following link to confirm your email." : "Pokud chcete potvrdit svůj e-mail, klikněte na následující odkaz.", + "Confirm your email" : "Potvrďte svůj e-mail", "Other activities" : "Ostatní aktivity", "%1$s and %2$s" : "%1$s a %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s a %3$s", @@ -19,7 +22,7 @@ "Hub bundle" : "Sada pro centrum aktivity (hub)", "Social sharing bundle" : "Balíček pro sdílení na sociálních sítích", "PHP %s or higher is required." : "Je vyžadováno PHP %s nebo novější.", - "PHP with a version lower than %s is required." : "Je vyžadováno PHP ve verzi nižší než %s.", + "PHP with a version lower than %s is required." : "Je vyžadováno PHP ve verzi starší než %s.", "%sbit or higher PHP required." : "Je vyžadováno PHP %sbit nebo vyšší.", "The following architectures are supported: %s" : "Jsou podporovány následující architektury: %s", "The following databases are supported: %s" : "Jsou podporovány následující databáze: %s", @@ -30,14 +33,15 @@ "The following platforms are supported: %s" : "Jsou podporovány následující systémy: %s", "Server version %s or higher is required." : "Je potřeba verze serveru %s nebo novější.", "Server version %s or lower is required." : "Je potřeba verze serveru %s nebo starší.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Aby mohl přistupovat k tomuto nastavení je třeba, aby přihlášený uživatel byl správce, dílčí správce nebo obdržel speciální oprávnění", "Logged in user must be an admin or sub admin" : "Je třeba, aby přihlášený uživatel byl správcem či správcem pro dílčí oblast", "Logged in user must be an admin" : "Je třeba, aby přihlášený uživatel byl správce", - "Wiping of device %s has started" : "Vymazávání zařízení %s zahájeno", - "Wiping of device »%s« has started" : "Vymazávání zařízení „%s“ zahájeno", + "Wiping of device %s has started" : "Vymazávání ze zařízení %s zahájeno", + "Wiping of device »%s« has started" : "Vymazávání ze zařízení „%s“ zahájeno", "»%s« started remote wipe" : "„%s“ zahájilo vymazávání na dálku", "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "Přístroj či aplikace »%s« spustila proces vzdáleného vymazání. Obdržíte další e-mail poté co bude proces ukončen", - "Wiping of device %s has finished" : "Vymazávání zařízení %s dokončeno", - "Wiping of device »%s« has finished" : "Vymazávání zařízení „%s“ dokončeno", + "Wiping of device %s has finished" : "Vymazávání ze zařízení %s dokončeno", + "Wiping of device »%s« has finished" : "Vymazávání ze zařízení „%s“ dokončeno", "»%s« finished remote wipe" : "„%s“ dokončilo vymazání na dálku", "Device or application »%s« has finished the remote wipe process." : "Přístroj či aplikace „%s“ dokončila proces vymazání na dálku.", "Remote wipe started" : "Vymazání na dálku zahájeno", @@ -47,7 +51,8 @@ "Authentication" : "Ověření", "Unknown filetype" : "Neznámý typ souboru", "Invalid image" : "Neplatný obrázek", - "Avatar image is not square" : "Obrázek s avatarem není čtvercový", + "Avatar image is not square" : "Profilový obrázek není čtvercový", + "View profile" : "Zobrazit profil ", "today" : "dnes", "tomorrow" : "zítra", "yesterday" : "včera", @@ -59,7 +64,7 @@ "_%n month ago_::_%n months ago_" : ["před %n měsícem","před %n měsíci","před %n měsíci","před %n měsíci"], "next year" : "následující rok", "last year" : "minulý rok", - "_in %n year_::_in %n years_" : ["během %n roku","během %n roků","během %n roků","během %n roků"], + "_in %n year_::_in %n years_" : ["během %n roku","během %n let","během %n let","během %n let"], "_%n year ago_::_%n years ago_" : ["před rokem","před %n lety","před %n lety","před %n lety"], "_in %n hour_::_in %n hours_" : ["během %n hodiny","během %n hodin","během %n hodin","během %n hodin"], "_%n hour ago_::_%n hours ago_" : ["před %n hodinou","před %n hodinami","před %n hodinami","před %n hodinami"], @@ -70,12 +75,13 @@ "Empty file" : "Prázdný soubor", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul s identifikátorem: %s neexistuje. Povolte ho v nastavení aplikací, nebo se obraťte na správce.", "File already exists" : "Soubor už existuje", + "Invalid path" : "Neplatný popis umístění", "Failed to create file from template" : "Vytvoření souboru ze šablony selhalo", "Templates" : "Šablony", "File name is a reserved word" : "Název souboru je rezervované slovo", - "File name contains at least one invalid character" : "Název souboru obsahuje nejméně jeden neplatný znak", + "File name contains at least one invalid character" : "Název souboru obsahuje přinejmenším jeden neplatný znak", "File name is too long" : "Název souboru je příliš dlouhý", - "Dot files are not allowed" : "Názvy souborů, začínající na tečku nejsou povolené", + "Dot files are not allowed" : "Názvy souborů, začínající na tečku nejsou dovolené", "Empty filename is not allowed" : "Je třeba vyplnit název souboru", "App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikace „%s“ nemůže být nainstalována protože soubor appinfo nelze přečíst.", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikaci „%s“ nelze nainstalovat, protože není kompatibilní s touto verzí serveru.", @@ -86,11 +92,26 @@ "Settings" : "Nastavení", "Log out" : "Odhlásit se", "Users" : "Uživatelé", + "Email" : "E-mail", + "Mail %s" : "Poslat e-mail %s", + "Phone" : "Telefon", + "Call %s" : "Zavolat %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Zobrazit %s na Twitteru", + "Website" : "Webová stránka", + "Visit %s" : "Navštívit %s", + "Address" : "Adresa", + "Avatar" : "Profilový obrázek", + "About" : "O uživateli", + "Full name" : "Celé jméno", + "Headline" : "Nadpis", + "Organisation" : "Organizace", + "Role" : "Role", "Unknown user" : "Neznámý uživatel", "Additional settings" : "Další nastavení", "%s enter the database username and name." : "%s zadejte databázové uživatelské jméno a jméno.", "%s enter the database username." : "Zadejte uživatelské jméno %s databáze.", - "%s enter the database name." : "Zadejte název databáze pro %s databáze.", + "%s enter the database name." : "Zadejte název databáze pro %s databázi.", "%s you may not use dots in the database name" : "V názvu databáze %s není možné používat tečky.", "MySQL username and/or password not valid" : "Neplatné uživatelské jméno a/nebo heslo do MySQL", "You need to enter details of an existing account." : "Je třeba zadat podrobnosti existujícího účtu.", @@ -103,8 +124,8 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Odstraňte z php.ini nastavení volby open_basedir nebo přejděte na 64-bitové PHP.", "Set an admin username." : "Nastavte uživatelské jméno správce.", "Set an admin password." : "Nastavte heslo pro účet správce.", - "Can't create or write into the data directory %s" : "Nedaří se vytvořit nebo zapisovat do datového adresáře %s", - "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Úložiště pro sdílení %s musí implementovat rozhraní OCP\\Share_Backend", + "Cannot create or write into the data directory %s" : "Nedaří se vytvořit nebo zapisovat do datového adresáře %s", + "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Je třeba, aby podpůrná vrstva pro sdílení %s implementovala rozhraní OCP\\Share_Backend", "Sharing backend %s not found" : "Úložiště sdílení %s nenalezeno", "Sharing backend for %s not found" : "Úložiště sdílení pro %s nenalezeno", "%1$s shared »%2$s« with you and wants to add:" : "%1$s sdílí „%2$s“ a dodává:", @@ -113,14 +134,14 @@ "Open »%s«" : "Otevřít „%s“", "%1$s via %2$s" : "%1$s prostřednictvím %2$s", "You are not allowed to share %s" : "Nemáte povoleno sdílet %s", - "Can’t increase permissions of %s" : "Nelze zvýšit oprávnění %s", - "Files can’t be shared with delete permissions" : "Soubory nelze sdílet s oprávněními k odstranění", - "Files can’t be shared with create permissions" : "Soubory nelze sdílet s oprávněními k vytváření", + "Cannot increase permissions of %s" : "Nelze navýšit oprávnění u %s", + "Files cannot be shared with delete permissions" : "Soubory nelze sdílet s oprávněními k odstranění", + "Files cannot be shared with create permissions" : "Soubory nelze sdílet s oprávněními k vytváření", "Expiration date is in the past" : "Datum skončení platnosti je v minulosti", - "Can’t set expiration date more than %s days in the future" : "Nelze nastavit datum skončení platnosti více než %s dní v budoucnu", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Datum vypršení nelze nastavit na více než %n den do budoucnosti","Datum vypršení nelze nastavit na více než %n dny do budoucnosti","Datum vypršení nelze nastavit na více než %n dnů do budoucnosti","Datum vypršení nelze nastavit na více než %n dny do budoucnosti"], "Sharing is only allowed with group members" : "Je povoleno pouze sdílení s členy skupiny", "Sharing %s failed, because this item is already shared with user %s" : "Sdílení %s se nezdařilo, protože tato položka už je sdílena s uživatelem %s", - "%1$s shared »%2$s« with you" : "%1$s s vámi sdílí „%2$s“", + "%1$s shared »%2$s« with you" : "%1$s vám sdílí „%2$s“", "%1$s shared »%2$s« with you." : "%1$s vám nasdílel(a) „%2$s“.", "Click the button below to open it." : "Pro otevření klikněte na tlačítko níže.", "The requested share does not exist anymore" : "Požadované sdílení už neexistuje", @@ -173,7 +194,7 @@ "The user limit has been reached and the user was not created." : "Bylo dosaženo limitu uživatelů a uživatel nebyl vytvořen.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Pouze následující znaky jsou povoleny pro uživatelské jméno: „a-z“, „A-Z“, „0-9“, a „_.@-'“", "A valid username must be provided" : "Je třeba zadat platné uživatelské jméno", - "Username contains whitespace at the beginning or at the end" : "Uživatelské jméno obsahuje mezery na svém začátku nebo konci", + "Username contains whitespace at the beginning or at the end" : "Uživatelské jméno je chybné – na jeho začátku či konci se nachází prázdný znak (mezera, tabulátor, atp.)", "Username must not consist of dots only" : "Uživatelské jméno se nemůže skládat pouze ze samých teček", "Username is invalid because files already exist for this user" : "Uživatelské jméno není platné, protože protože pro tohoto uživatele už existují soubory", "A valid password must be provided" : "Je třeba zadat platné heslo", @@ -183,35 +204,36 @@ "Login canceled by app" : "Přihlášení zrušeno aplikací", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Aplikaci „%1$s“ nelze nainstalovat, protože nejsou splněny následující závislosti: %2$s", "a safe home for all your data" : "bezpečný domov pro všechna vaše data", - "File is currently busy, please try again later" : "Soubor je používán, zkuste to později", - "Can't read file" : "Nelze přečíst soubor", + "File is currently busy, please try again later" : "Soubor je nyní používán, zkuste to později", + "Cannot read file" : "Nelze přečíst soubor", "Application is not enabled" : "Aplikace není povolena", "Authentication error" : "Chyba při ověřování se", "Token expired. Please reload page." : "Platnost tokenu skončila. Načtěte stránku znovu.", - "No database drivers (sqlite, mysql, or postgresql) installed." : "Nejsou instalovány ovladače databází (sqlite, mysql nebo postresql).", + "No database drivers (sqlite, mysql, or postgresql) installed." : "Nejsou nainstalovány ovladače databází (sqlite, mysql nebo postresql).", "Cannot write into \"config\" directory" : "Nelze zapisovat do adresáře „config“", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do kořenové složky webu pro účet, pod kterým je provozován webový server. Viz %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true. Viz %s", "Cannot write into \"apps\" directory" : "Nedaří se zapisovat do adresáře „apps“", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto je obvykle možné napravit udělením přístupu ke čtení adresáře s aplikací pro webový server nebo vypnutím katalogu s aplikacemi v souboru s nastaveními.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Toto je obvykle možné napravit udělením přístupu ke čtení adresáře s aplikací pro webový server nebo vypnutím katalogu s aplikacemi v souboru s nastaveními.", "Cannot create \"data\" directory" : "Nedaří se vytvořit adresář „data“", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do kořenové složky webu pro účet, pod kterým je provozován webový server. Viz %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Oprávnění lze obvykle napravit umožněním zápisu do kořene webu pro účet, pod kterým je provozován webový server. Viz %s.", "Setting locale to %s failed" : "Nastavení místních a jazykových nastavení na %s se nezdařilo", - "Please install one of these locales on your system and restart your webserver." : "Do svého systému nainstalujte alespoň jeden z těchto jazyků a restartujte webový server.", + "Please install one of these locales on your system and restart your webserver." : "Do svého systému nainstalujte alespoň jeden z těchto jazyků a restartujte webový server.", "PHP module %s not installed." : "PHP modul %s není nainstalován.", "Please ask your server administrator to install the module." : "Požádejte správce serveru, který využíváte o instalaci tohoto modulu.", - "PHP setting \"%s\" is not set to \"%s\"." : "Hodnota PHP nastavení „%s“ není nastavená na „%s“.", + "PHP setting \"%s\" is not set to \"%s\"." : "Hodnota v konfiguraci PHP „%s“ není nastavená na „%s“.", "Adjusting this setting in php.ini will make Nextcloud run again" : "Úprava tohoto nastavení v php.ini umožní Nextcloud opět zprovoznit", - "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload je nastaven na „%s“ namísto očekávané hodnoty „0“", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload je nastaveno na „%s“ namísto očekávané hodnoty „0“", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Pro nápravu nastavte v souboru php.ini parametr <code>mbstring.func_overload</code> na <code>0</code>", - "libxml2 2.7.0 is at least required. Currently %s is installed." : "Je požadována verze softwarové knihovny libxml2 minimálně 2.7.0. Nyní je nainstalována verze %s.", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "Je zapotřebí verze softwarové knihovny libxml2 přinejmenším 2.7.0. Nyní je nainstalována verze %s.", "To fix this issue update your libxml2 version and restart your web server." : "Tento problém opravíte instalací novější verze knihovny libxml2 a restartem webového serveru.", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP je patrně nastaveno tak, aby odstraňovalo bloky komentářů. Toto bude mít za následek znepřístupnění mnoha důležitých aplikací.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Toto je pravděpodobně způsobeno aplikacemi pro urychlení načítání jako jsou Zend OPcache nebo eAccelerator.", "PHP modules have been installed, but they are still listed as missing?" : "PHP moduly jsou nainstalovány, ale stále se tváří jako chybějící?", "Please ask your server administrator to restart the web server." : "Požádejte správce serveru, který využíváte o restart webového serveru.", "PostgreSQL >= 9 required" : "Je vyžadováno PostgreSQL verze 9 a novější", - "Please upgrade your database version" : "Aktualizujte verzi své databáze", + "Please upgrade your database version" : "Aktualizujte verzi vámi využívané databáze", "Your data directory is readable by other users" : "Váš adresář data je čitelný ostatním uživatelům", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Změňte práva na 0770, aby obsah adresáře nemohl být vypisován ostatními uživateli.", "Your data directory must be an absolute path" : "Je třeba, aby váš adresář data byl zadán jako úplný popis umístění", @@ -229,8 +251,15 @@ "Storage connection error. %s" : "Chyba připojení úložiště. %s", "Storage is temporarily not available" : "Úložiště je dočasně nedostupné", "Storage connection timeout. %s" : "Překročen časový limit připojování k úložišti. %s", - "Following databases are supported: %s" : "Jsou podporovány následující databáze: %s", - "Following platforms are supported: %s" : "Jsou podporovány následující systémy: %s", - "Invalid Federated Cloud ID" : "Neplatný identifikátor v rámci federovaného cloudu" + "This can usually be fixed by giving the webserver write access to the config directory" : "Toto obvykle lze vyřešit udělením oprávnění k zápisu do adresáře s nastaveními pro účet, pod kterým je provozován webový server", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Nebo, pokud chcete mít soubor config.php pouze pro čtení, nastavte v něm volbu „config_is_read_only“ na hodnotu true.", + "Can't create or write into the data directory %s" : "Nedaří se vytvořit nebo zapisovat do datového adresáře %s", + "Invalid Federated Cloud ID" : "Neplatný identifikátor v rámci federovaného cloudu", + "Can’t increase permissions of %s" : "Nelze zvýšit oprávnění %s", + "Files can’t be shared with delete permissions" : "Soubory nelze sdílet s oprávněními k odstranění", + "Files can’t be shared with create permissions" : "Soubory nelze sdílet s oprávněními k vytváření", + "Can’t set expiration date more than %s days in the future" : "Nelze nastavit datum skončení platnosti více než %s dní v budoucnu", + "Can't read file" : "Nelze přečíst soubor", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto je obvykle možné napravit udělením přístupu ke čtení adresáře s aplikací pro webový server nebo vypnutím katalogu s aplikacemi v souboru s nastaveními." },"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;" }
\ No newline at end of file diff --git a/lib/l10n/da.js b/lib/l10n/da.js index f917b45f523..eb9b4030016 100644 --- a/lib/l10n/da.js +++ b/lib/l10n/da.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Kan ikke skrive til mappen \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan som regel ordnes ved at give webserveren skrive adgang til config mappen", "See %s" : "Se %s", "Sample configuration detected" : "Eksempel for konfiguration registreret", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Der er registreret at eksempel for konfiguration er blevet kopieret. Dette kan ødelægge din installation og understøttes ikke. Læs venligst dokumentationen før der foretages ændringer i config.php", @@ -65,7 +64,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Fjern venligst indstillingen for open_basedir inde i din php.ini eller skift til 64-bit PHP.", "Set an admin username." : "Angiv et admin brugernavn.", "Set an admin password." : "Angiv et admin kodeord.", - "Can't create or write into the data directory %s" : "Kan ikke oprette eller skrive ind i datamappen %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Delingsbackend'en %s skal implementere grænsefladen OCP\\Share_Backend", "Sharing backend %s not found" : "Delingsbackend'en %s blev ikke fundet", "Sharing backend for %s not found" : "Delingsbackend'en for %s blev ikke fundet", @@ -129,7 +127,6 @@ OC.L10N.register( "Login canceled by app" : "Login annulleret af app", "a safe home for all your data" : "et sikkert hjem til alle dine data", "File is currently busy, please try again later" : "Filen er i øjeblikket optaget - forsøg igen senere", - "Can't read file" : "Kan ikke læse filen", "Application is not enabled" : "Programmet er ikke aktiveret", "Authentication error" : "Adgangsfejl", "Token expired. Please reload page." : "Adgang er udløbet. Genindlæs siden.", @@ -156,8 +153,9 @@ OC.L10N.register( "Check the value of \"datadirectory\" in your configuration" : "Tjek værdien for \"databibliotek\" i din konfiguration", "Could not obtain lock type %d on \"%s\"." : "Kunne ikke opnå en låsetype %d på \"%s\".", "Storage is temporarily not available" : "Lagerplads er midlertidigt ikke tilgængeligt", - "Following databases are supported: %s" : "Følgende databaser understøttes: %s", - "Following platforms are supported: %s" : "Følgende platforme understøttes: %s", - "Invalid Federated Cloud ID" : "Ugyldigt Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan som regel ordnes ved at give webserveren skrive adgang til config mappen", + "Can't create or write into the data directory %s" : "Kan ikke oprette eller skrive ind i datamappen %s", + "Invalid Federated Cloud ID" : "Ugyldigt Federated Cloud ID", + "Can't read file" : "Kan ikke læse filen" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/da.json b/lib/l10n/da.json index 329b951b008..98d070771dd 100644 --- a/lib/l10n/da.json +++ b/lib/l10n/da.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Kan ikke skrive til mappen \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan som regel ordnes ved at give webserveren skrive adgang til config mappen", "See %s" : "Se %s", "Sample configuration detected" : "Eksempel for konfiguration registreret", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Der er registreret at eksempel for konfiguration er blevet kopieret. Dette kan ødelægge din installation og understøttes ikke. Læs venligst dokumentationen før der foretages ændringer i config.php", @@ -63,7 +62,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Fjern venligst indstillingen for open_basedir inde i din php.ini eller skift til 64-bit PHP.", "Set an admin username." : "Angiv et admin brugernavn.", "Set an admin password." : "Angiv et admin kodeord.", - "Can't create or write into the data directory %s" : "Kan ikke oprette eller skrive ind i datamappen %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Delingsbackend'en %s skal implementere grænsefladen OCP\\Share_Backend", "Sharing backend %s not found" : "Delingsbackend'en %s blev ikke fundet", "Sharing backend for %s not found" : "Delingsbackend'en for %s blev ikke fundet", @@ -127,7 +125,6 @@ "Login canceled by app" : "Login annulleret af app", "a safe home for all your data" : "et sikkert hjem til alle dine data", "File is currently busy, please try again later" : "Filen er i øjeblikket optaget - forsøg igen senere", - "Can't read file" : "Kan ikke læse filen", "Application is not enabled" : "Programmet er ikke aktiveret", "Authentication error" : "Adgangsfejl", "Token expired. Please reload page." : "Adgang er udløbet. Genindlæs siden.", @@ -154,8 +151,9 @@ "Check the value of \"datadirectory\" in your configuration" : "Tjek værdien for \"databibliotek\" i din konfiguration", "Could not obtain lock type %d on \"%s\"." : "Kunne ikke opnå en låsetype %d på \"%s\".", "Storage is temporarily not available" : "Lagerplads er midlertidigt ikke tilgængeligt", - "Following databases are supported: %s" : "Følgende databaser understøttes: %s", - "Following platforms are supported: %s" : "Følgende platforme understøttes: %s", - "Invalid Federated Cloud ID" : "Ugyldigt Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan som regel ordnes ved at give webserveren skrive adgang til config mappen", + "Can't create or write into the data directory %s" : "Kan ikke oprette eller skrive ind i datamappen %s", + "Invalid Federated Cloud ID" : "Ugyldigt Federated Cloud ID", + "Can't read file" : "Kan ikke læse filen" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/de.js b/lib/l10n/de.js index 3ca3f5e26e6..85d960687ee 100644 --- a/lib/l10n/de.js +++ b/lib/l10n/de.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true.", - "See %s" : "Siehe %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true. Siehe %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Wenn Du jedoch möchtest dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true.", + "See %s" : "Siehe %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Die Dateien der App %1$swurden nicht korrekt ersetzt. Stelle sicher, dass es sich um eine mit dem Server kompatible Version handelt.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Deine Installation zerstören und wird nicht unterstützt. Bitte die Dokumentation lesen, bevor Änderungen an der config.php vorgenommen werden.", + "%s email verification" : "%s E-Mail-Überprüfung", + "Email verification" : "E-Mail-Überprüfung", + "Click the following button to confirm your email." : "Klicke die folgende Schaltfläche, um Deine E-Mail-Adresse zu bestätigen.", + "Click the following link to confirm your email." : "Klicke den nachfolgenden Link, um Deine E-Mail-Adresse zu bestätigen", + "Confirm your email" : "Bestätige Deine E-Mail-Adresse", "Other activities" : "Andere Aktivitäten", "%1$s and %2$s" : "%1$s und %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s und %3$s", @@ -50,6 +53,7 @@ OC.L10N.register( "Unknown filetype" : "Unbekannter Dateityp", "Invalid image" : "Ungültiges Bild", "Avatar image is not square" : "Benutzerbild ist nicht quadratisch", + "View profile" : "Profil ansehen", "today" : "Heute", "tomorrow" : "Morgen", "yesterday" : "Gestern", @@ -72,6 +76,7 @@ OC.L10N.register( "Empty file" : "Leere Datei", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Das Modul mit der ID: %s existiert nicht. Bitte die App in den App-Einstellungen aktivieren oder den Administrator kontaktieren.", "File already exists" : "Datei bereits vorhanden", + "Invalid path" : "Ungültiger Pfad", "Failed to create file from template" : "Fehler beim Erstellen der Datei aus Vorlage", "Templates" : "Vorlagen", "File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort", @@ -88,6 +93,12 @@ OC.L10N.register( "Settings" : "Einstellungen", "Log out" : "Abmelden", "Users" : "Benutzer", + "Email" : "E-Mail", + "Mail %s" : "E-Mail %s", + "Phone" : "Telefon", + "Twitter" : "Twitter", + "View %s on Twitter" : "%s auf Twitter anzeigen", + "Address" : "Adresse", "Unknown user" : "Unbekannter Benutzer", "Additional settings" : "Zusätzliche Einstellungen", "%s enter the database username and name." : "%s gebe den Datenbank-Benutzernamen und den Datenbanknamen ein.", @@ -105,7 +116,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Bitte entferne die open_basedir-Einstellung in Deiner php.ini oder wechsele zu 64-Bit-PHP.", "Set an admin username." : "Einen Administrator-Benutzernamen setzen.", "Set an admin password." : "Ein Administrator-Passwort setzen.", - "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Cannot create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden", "Sharing backend %s not found" : "Freigabe-Backend %s nicht gefunden", "Sharing backend for %s not found" : "Freigabe-Backend für %s nicht gefunden", @@ -115,11 +126,11 @@ OC.L10N.register( "Open »%s«" : "»%s« öffnen", "%1$s via %2$s" : "%1$s über %2$s", "You are not allowed to share %s" : "Die Freigabe von %s ist Dir nicht erlaubt", - "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", - "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", - "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Cannot increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files cannot be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files cannot be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", "Expiration date is in the past" : "Das Ablaufdatum liegt in der Vergangenheit.", - "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Das Ablaufdatum kann nicht mehr als %n Tag in der Zukunft liegen","Das Ablaufdatum kann nicht mehr als %n Tage in der Zukunft liegen"], "Sharing is only allowed with group members" : "Teilen ist nur mit Gruppenmitgliedern erlaubt", "Sharing %s failed, because this item is already shared with user %s" : "Freigabe von %s fehlgeschlagen, da dieses Element schon mit dem Benutzer %s geteilt wird", "%1$s shared »%2$s« with you" : "%1$s hat »%2$s« mit Dir geteilt", @@ -186,15 +197,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Die App „%1$s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %2$s", "a safe home for all your data" : "ein sicherer Ort für all Deine Daten", "File is currently busy, please try again later" : "Die Datei ist in Benutzung, bitte versuche es später noch einmal", - "Can't read file" : "Datei kann nicht gelesen werden", + "Cannot read file" : "Datei kann nicht gelesen werden", "Application is not enabled" : "Die Anwendung ist nicht aktiviert", "Authentication error" : "Authentifizierungsfehler", "Token expired. Please reload page." : "Token abgelaufen. Bitte lade die Seite neu.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MySQL oder PostgreSQL) installiert.", "Cannot write into \"config\" directory" : "Schreiben in das „config“-Verzeichnis ist nicht möglich", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Konfigurationsverzeichnis eingeräumt wird. Siehe auch %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true. Siehe %s", "Cannot write into \"apps\" directory" : "Schreiben in das „apps“-Verzeichnis ist nicht möglich", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App-Store in der Konfigurationsdatei deaktiviert wird.", "Cannot create \"data\" directory" : "Kann das \"Daten\"-Verzeichnis nicht erstellen", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Berechtigungen können zumeist korrigiert werden indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s.", @@ -231,8 +243,15 @@ OC.L10N.register( "Storage connection error. %s" : "Verbindungsfehler zum Speicherplatz. %s", "Storage is temporarily not available" : "Speicher ist vorübergehend nicht verfügbar", "Storage connection timeout. %s" : "Zeitüberschreitung der Verbindung zum Speicherplatz. %s", - "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", - "Following platforms are supported: %s" : "Die folgenden Plattformen werden unterstützt: %s", - "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true.", + "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID", + "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "Can't read file" : "Datei kann nicht gelesen werden", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/de.json b/lib/l10n/de.json index 8d519bd38d1..cc23f816377 100644 --- a/lib/l10n/de.json +++ b/lib/l10n/de.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true.", - "See %s" : "Siehe %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true. Siehe %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Wenn Du jedoch möchtest dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true.", + "See %s" : "Siehe %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Die Dateien der App %1$swurden nicht korrekt ersetzt. Stelle sicher, dass es sich um eine mit dem Server kompatible Version handelt.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Deine Installation zerstören und wird nicht unterstützt. Bitte die Dokumentation lesen, bevor Änderungen an der config.php vorgenommen werden.", + "%s email verification" : "%s E-Mail-Überprüfung", + "Email verification" : "E-Mail-Überprüfung", + "Click the following button to confirm your email." : "Klicke die folgende Schaltfläche, um Deine E-Mail-Adresse zu bestätigen.", + "Click the following link to confirm your email." : "Klicke den nachfolgenden Link, um Deine E-Mail-Adresse zu bestätigen", + "Confirm your email" : "Bestätige Deine E-Mail-Adresse", "Other activities" : "Andere Aktivitäten", "%1$s and %2$s" : "%1$s und %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s und %3$s", @@ -48,6 +51,7 @@ "Unknown filetype" : "Unbekannter Dateityp", "Invalid image" : "Ungültiges Bild", "Avatar image is not square" : "Benutzerbild ist nicht quadratisch", + "View profile" : "Profil ansehen", "today" : "Heute", "tomorrow" : "Morgen", "yesterday" : "Gestern", @@ -70,6 +74,7 @@ "Empty file" : "Leere Datei", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Das Modul mit der ID: %s existiert nicht. Bitte die App in den App-Einstellungen aktivieren oder den Administrator kontaktieren.", "File already exists" : "Datei bereits vorhanden", + "Invalid path" : "Ungültiger Pfad", "Failed to create file from template" : "Fehler beim Erstellen der Datei aus Vorlage", "Templates" : "Vorlagen", "File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort", @@ -86,6 +91,12 @@ "Settings" : "Einstellungen", "Log out" : "Abmelden", "Users" : "Benutzer", + "Email" : "E-Mail", + "Mail %s" : "E-Mail %s", + "Phone" : "Telefon", + "Twitter" : "Twitter", + "View %s on Twitter" : "%s auf Twitter anzeigen", + "Address" : "Adresse", "Unknown user" : "Unbekannter Benutzer", "Additional settings" : "Zusätzliche Einstellungen", "%s enter the database username and name." : "%s gebe den Datenbank-Benutzernamen und den Datenbanknamen ein.", @@ -103,7 +114,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Bitte entferne die open_basedir-Einstellung in Deiner php.ini oder wechsele zu 64-Bit-PHP.", "Set an admin username." : "Einen Administrator-Benutzernamen setzen.", "Set an admin password." : "Ein Administrator-Passwort setzen.", - "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Cannot create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden", "Sharing backend %s not found" : "Freigabe-Backend %s nicht gefunden", "Sharing backend for %s not found" : "Freigabe-Backend für %s nicht gefunden", @@ -113,11 +124,11 @@ "Open »%s«" : "»%s« öffnen", "%1$s via %2$s" : "%1$s über %2$s", "You are not allowed to share %s" : "Die Freigabe von %s ist Dir nicht erlaubt", - "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", - "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", - "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Cannot increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files cannot be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files cannot be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", "Expiration date is in the past" : "Das Ablaufdatum liegt in der Vergangenheit.", - "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Das Ablaufdatum kann nicht mehr als %n Tag in der Zukunft liegen","Das Ablaufdatum kann nicht mehr als %n Tage in der Zukunft liegen"], "Sharing is only allowed with group members" : "Teilen ist nur mit Gruppenmitgliedern erlaubt", "Sharing %s failed, because this item is already shared with user %s" : "Freigabe von %s fehlgeschlagen, da dieses Element schon mit dem Benutzer %s geteilt wird", "%1$s shared »%2$s« with you" : "%1$s hat »%2$s« mit Dir geteilt", @@ -184,15 +195,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Die App „%1$s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %2$s", "a safe home for all your data" : "ein sicherer Ort für all Deine Daten", "File is currently busy, please try again later" : "Die Datei ist in Benutzung, bitte versuche es später noch einmal", - "Can't read file" : "Datei kann nicht gelesen werden", + "Cannot read file" : "Datei kann nicht gelesen werden", "Application is not enabled" : "Die Anwendung ist nicht aktiviert", "Authentication error" : "Authentifizierungsfehler", "Token expired. Please reload page." : "Token abgelaufen. Bitte lade die Seite neu.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MySQL oder PostgreSQL) installiert.", "Cannot write into \"config\" directory" : "Schreiben in das „config“-Verzeichnis ist nicht möglich", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Konfigurationsverzeichnis eingeräumt wird. Siehe auch %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true. Siehe %s", "Cannot write into \"apps\" directory" : "Schreiben in das „apps“-Verzeichnis ist nicht möglich", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App-Store in der Konfigurationsdatei deaktiviert wird.", "Cannot create \"data\" directory" : "Kann das \"Daten\"-Verzeichnis nicht erstellen", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Berechtigungen können zumeist korrigiert werden indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s.", @@ -229,8 +241,15 @@ "Storage connection error. %s" : "Verbindungsfehler zum Speicherplatz. %s", "Storage is temporarily not available" : "Speicher ist vorübergehend nicht verfügbar", "Storage connection timeout. %s" : "Zeitüberschreitung der Verbindung zum Speicherplatz. %s", - "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", - "Following platforms are supported: %s" : "Die folgenden Plattformen werden unterstützt: %s", - "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Du lieber möchtest, dass die Datei config.php schreibgeschützt bleiben soll, dann setze die Option \"config_is_read_only\" in der Datei auf true.", + "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID", + "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "Can't read file" : "Datei kann nicht gelesen werden", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js index d41d375d8e1..6abb627887c 100644 --- a/lib/l10n/de_DE.js +++ b/lib/l10n/de_DE.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True.", - "See %s" : "Siehe %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True. Siehe %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Wenn Sie jedoch möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf true.", + "See %s" : "Siehe %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Die Dateien der App %1$s wurden nicht korrekt ersetzt. Stellen Sie sicher, dass es sich um eine mit dem Server kompatible Version handelt.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Ihre Installation zerstören und wird nicht unterstützt. Bitte die Dokumentation lesen, bevor Änderungen an der config.php vorgenommen werden.", + "%s email verification" : "%s E-Mail-Überprüfung", + "Email verification" : "E-Mail-Überprüfung", + "Click the following button to confirm your email." : "Klicken Sie auf die folgende Schaltfläche, um Ihre E-Mail zu bestätigen.", + "Click the following link to confirm your email." : "Auf den nachfolgenden Link klicken um Ihre E-Mail-Adresse zu bestätigen", + "Confirm your email" : "Ihre E-Mail-Adresse bestätigen", "Other activities" : "Andere Aktivitäten", "%1$s and %2$s" : "%1$s und %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s und %3$s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "Folgende Plattformen werden unterstützt: %s", "Server version %s or higher is required." : "Server Version %s oder höher wird benötigt.", "Server version %s or lower is required." : "Server Version %s oder niedriger wird benötigt.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Der angemeldete Benutzer muss ein Administrator, ein Teil-Administrator sein oder ein Sonderrecht haben, um auf diese Einstellung zuzugreifen. ", "Logged in user must be an admin or sub admin" : "Der angemeldete Benutzer muss ein (Sub-)Administrator sein", "Logged in user must be an admin" : "Der angemeldete Benutzer muss ein Administrator sein", "Wiping of device %s has started" : "Löschen von Gerät %s wurde gestartet", @@ -50,28 +54,30 @@ OC.L10N.register( "Unknown filetype" : "Unbekannter Dateityp", "Invalid image" : "Ungültiges Bild", "Avatar image is not square" : "Benutzerbild ist nicht quadratisch", + "View profile" : "Profil ansehen", "today" : "Heute", "tomorrow" : "Morgen", "yesterday" : "Gestern", - "_in %n day_::_in %n days_" : ["in %n Tag","in %n Tagen"], + "_in %n day_::_in %n days_" : ["In %n Tag","In %n Tagen"], "_%n day ago_::_%n days ago_" : ["Vor %n Tag","Vor %n Tagen"], "next month" : "Nächsten Monat", "last month" : "Letzten Monat", - "_in %n month_::_in %n months_" : ["in %n Monat","in %n Monaten"], + "_in %n month_::_in %n months_" : ["In %n Monat","In %n Monaten"], "_%n month ago_::_%n months ago_" : ["Vor %n Monat","Vor %n Monaten"], - "next year" : "nächstes Jahr", + "next year" : "Nächstes Jahr", "last year" : "Letztes Jahr", - "_in %n year_::_in %n years_" : ["in %n Jahr","in %n Jahren"], + "_in %n year_::_in %n years_" : ["In %n Jahr","In %n Jahren"], "_%n year ago_::_%n years ago_" : ["Vor %n Jahr","Vor %n Jahren"], - "_in %n hour_::_in %n hours_" : ["in %n Stunde","in %n Stunden"], + "_in %n hour_::_in %n hours_" : ["In %n Stunde","In %n Stunden"], "_%n hour ago_::_%n hours ago_" : ["Vor %n Stunde","Vor %n Stunden"], - "_in %n minute_::_in %n minutes_" : ["in %n Minute","in %n Minuten"], + "_in %n minute_::_in %n minutes_" : ["In %n Minute","In %n Minuten"], "_%n minute ago_::_%n minutes ago_" : ["Vor %n Minute","Vor %n Minuten"], - "in a few seconds" : "in wenigen Sekunden", + "in a few seconds" : "In wenigen Sekunden", "seconds ago" : "Gerade eben", "Empty file" : "Leere Datei", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Das Modul mit der ID: %s existiert nicht. Bitte aktivieren Sie es in Ihren Einstellungen oder kontaktieren Sie Ihren Administrator.", "File already exists" : "Datei bereits vorhanden", + "Invalid path" : "Ungültiger Pfad", "Failed to create file from template" : "Fehler beim Erstellen der Datei aus Vorlage", "Templates" : "Vorlagen", "File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort", @@ -88,6 +94,21 @@ OC.L10N.register( "Settings" : "Einstellungen", "Log out" : "Abmelden", "Users" : "Benutzer", + "Email" : "E-Mail", + "Mail %s" : "E-Mail %s", + "Phone" : "Telefon", + "Call %s" : "%s anrufen", + "Twitter" : "Twitter", + "View %s on Twitter" : "%s auf Twitter anzeigen", + "Website" : "Webseite", + "Visit %s" : "%s besuchen", + "Address" : "Adresse", + "Avatar" : "Avatar", + "About" : "Über", + "Full name" : "Vollständiger Name", + "Headline" : "Überschrift", + "Organisation" : "Organisation", + "Role" : "Funktion", "Unknown user" : "Unbekannter Benutzer", "Additional settings" : "Zusätzliche Einstellungen", "%s enter the database username and name." : "%s geben Sie den Datenbank-Benutzernamen und den Datenbanknamen an.", @@ -105,7 +126,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Bitte entfernen Sie die open_basedir-Einstellung in Ihrer php.ini oder wechseln Sie zu 64-Bit-PHP.", "Set an admin username." : "Einen Administrator-Benutzernamen setzen.", "Set an admin password." : "Ein Administrator-Passwort setzen.", - "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Cannot create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden", "Sharing backend %s not found" : "Freigabe-Backend %s nicht gefunden", "Sharing backend for %s not found" : "Freigabe-Backend für %s nicht gefunden", @@ -115,11 +136,11 @@ OC.L10N.register( "Open »%s«" : "»%s« öffnen", "%1$s via %2$s" : "%1$s über %2$s", "You are not allowed to share %s" : "Die Freigabe von %s ist Ihnen nicht erlaubt", - "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", - "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", - "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Cannot increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files cannot be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files cannot be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", "Expiration date is in the past" : "Das Ablaufdatum liegt in der Vergangenheit.", - "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Das Ablaufdatum kann nicht mehr als %n Tag in der Zukunft liegen","Das Ablaufdatum kann nicht mehr als %n Tage in der Zukunft liegen"], "Sharing is only allowed with group members" : "Teilen ist nur mit Gruppenmitgliedern erlaubt", "Sharing %s failed, because this item is already shared with user %s" : "Freigabe von %s fehlgeschlagen, da dieses Element schon mit dem Benutzer %s geteilt wird", "%1$s shared »%2$s« with you" : "%1$s hat »%2$s« mit Ihnen geteilt", @@ -186,15 +207,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Die App „%1$s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %2$s", "a safe home for all your data" : "ein sicherer Ort für all Ihre Daten", "File is currently busy, please try again later" : "Die Datei ist in Benutzung, bitte versuchen Sie es später noch einmal", - "Can't read file" : "Datei kann nicht gelesen werden", + "Cannot read file" : "Datei kann nicht gelesen werden", "Application is not enabled" : "Die Anwendung ist nicht aktiviert", "Authentication error" : "Authentifizierungsfehler", "Token expired. Please reload page." : "Token abgelaufen. Bitte laden Sie die Seite neu.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MySQL oder PostgreSQL) installiert.", "Cannot write into \"config\" directory" : "Schreiben in das „config“-Verzeichnis ist nicht möglich", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Konfigurationsverzeichnis eingeräumt wird. Siehe auch %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True. Siehe %s", "Cannot write into \"apps\" directory" : "Schreiben in das „apps“-Verzeichnis ist nicht möglich", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App-Store in der Konfigurationsdatei deaktiviert wird.", "Cannot create \"data\" directory" : "Kann das \"Daten\"-Verzeichnis nicht erstellen", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Berechtigungen können zumeist korrigiert werden indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s. ", @@ -231,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "Verbindungsfehler zum Speicherplatz. %s", "Storage is temporarily not available" : "Speicher ist vorübergehend nicht verfügbar", "Storage connection timeout. %s" : "Zeitüberschreitung der Verbindung zum Speicherplatz. %s", - "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", - "Following platforms are supported: %s" : "Die folgenden Plattformen werden unterstützt: %s", - "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True.", + "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID", + "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "Can't read file" : "Datei kann nicht gelesen werden", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json index 7193030931a..32568e0ef0d 100644 --- a/lib/l10n/de_DE.json +++ b/lib/l10n/de_DE.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True.", - "See %s" : "Siehe %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True. Siehe %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Wenn Sie jedoch möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf true.", + "See %s" : "Siehe %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Die Dateien der App %1$s wurden nicht korrekt ersetzt. Stellen Sie sicher, dass es sich um eine mit dem Server kompatible Version handelt.", "Sample configuration detected" : "Beispielkonfiguration gefunden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Ihre Installation zerstören und wird nicht unterstützt. Bitte die Dokumentation lesen, bevor Änderungen an der config.php vorgenommen werden.", + "%s email verification" : "%s E-Mail-Überprüfung", + "Email verification" : "E-Mail-Überprüfung", + "Click the following button to confirm your email." : "Klicken Sie auf die folgende Schaltfläche, um Ihre E-Mail zu bestätigen.", + "Click the following link to confirm your email." : "Auf den nachfolgenden Link klicken um Ihre E-Mail-Adresse zu bestätigen", + "Confirm your email" : "Ihre E-Mail-Adresse bestätigen", "Other activities" : "Andere Aktivitäten", "%1$s and %2$s" : "%1$s und %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s und %3$s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "Folgende Plattformen werden unterstützt: %s", "Server version %s or higher is required." : "Server Version %s oder höher wird benötigt.", "Server version %s or lower is required." : "Server Version %s oder niedriger wird benötigt.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Der angemeldete Benutzer muss ein Administrator, ein Teil-Administrator sein oder ein Sonderrecht haben, um auf diese Einstellung zuzugreifen. ", "Logged in user must be an admin or sub admin" : "Der angemeldete Benutzer muss ein (Sub-)Administrator sein", "Logged in user must be an admin" : "Der angemeldete Benutzer muss ein Administrator sein", "Wiping of device %s has started" : "Löschen von Gerät %s wurde gestartet", @@ -48,28 +52,30 @@ "Unknown filetype" : "Unbekannter Dateityp", "Invalid image" : "Ungültiges Bild", "Avatar image is not square" : "Benutzerbild ist nicht quadratisch", + "View profile" : "Profil ansehen", "today" : "Heute", "tomorrow" : "Morgen", "yesterday" : "Gestern", - "_in %n day_::_in %n days_" : ["in %n Tag","in %n Tagen"], + "_in %n day_::_in %n days_" : ["In %n Tag","In %n Tagen"], "_%n day ago_::_%n days ago_" : ["Vor %n Tag","Vor %n Tagen"], "next month" : "Nächsten Monat", "last month" : "Letzten Monat", - "_in %n month_::_in %n months_" : ["in %n Monat","in %n Monaten"], + "_in %n month_::_in %n months_" : ["In %n Monat","In %n Monaten"], "_%n month ago_::_%n months ago_" : ["Vor %n Monat","Vor %n Monaten"], - "next year" : "nächstes Jahr", + "next year" : "Nächstes Jahr", "last year" : "Letztes Jahr", - "_in %n year_::_in %n years_" : ["in %n Jahr","in %n Jahren"], + "_in %n year_::_in %n years_" : ["In %n Jahr","In %n Jahren"], "_%n year ago_::_%n years ago_" : ["Vor %n Jahr","Vor %n Jahren"], - "_in %n hour_::_in %n hours_" : ["in %n Stunde","in %n Stunden"], + "_in %n hour_::_in %n hours_" : ["In %n Stunde","In %n Stunden"], "_%n hour ago_::_%n hours ago_" : ["Vor %n Stunde","Vor %n Stunden"], - "_in %n minute_::_in %n minutes_" : ["in %n Minute","in %n Minuten"], + "_in %n minute_::_in %n minutes_" : ["In %n Minute","In %n Minuten"], "_%n minute ago_::_%n minutes ago_" : ["Vor %n Minute","Vor %n Minuten"], - "in a few seconds" : "in wenigen Sekunden", + "in a few seconds" : "In wenigen Sekunden", "seconds ago" : "Gerade eben", "Empty file" : "Leere Datei", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Das Modul mit der ID: %s existiert nicht. Bitte aktivieren Sie es in Ihren Einstellungen oder kontaktieren Sie Ihren Administrator.", "File already exists" : "Datei bereits vorhanden", + "Invalid path" : "Ungültiger Pfad", "Failed to create file from template" : "Fehler beim Erstellen der Datei aus Vorlage", "Templates" : "Vorlagen", "File name is a reserved word" : "Der Dateiname ist ein reserviertes Wort", @@ -86,6 +92,21 @@ "Settings" : "Einstellungen", "Log out" : "Abmelden", "Users" : "Benutzer", + "Email" : "E-Mail", + "Mail %s" : "E-Mail %s", + "Phone" : "Telefon", + "Call %s" : "%s anrufen", + "Twitter" : "Twitter", + "View %s on Twitter" : "%s auf Twitter anzeigen", + "Website" : "Webseite", + "Visit %s" : "%s besuchen", + "Address" : "Adresse", + "Avatar" : "Avatar", + "About" : "Über", + "Full name" : "Vollständiger Name", + "Headline" : "Überschrift", + "Organisation" : "Organisation", + "Role" : "Funktion", "Unknown user" : "Unbekannter Benutzer", "Additional settings" : "Zusätzliche Einstellungen", "%s enter the database username and name." : "%s geben Sie den Datenbank-Benutzernamen und den Datenbanknamen an.", @@ -103,7 +124,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Bitte entfernen Sie die open_basedir-Einstellung in Ihrer php.ini oder wechseln Sie zu 64-Bit-PHP.", "Set an admin username." : "Einen Administrator-Benutzernamen setzen.", "Set an admin password." : "Ein Administrator-Passwort setzen.", - "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Cannot create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Freigabe-Backend %s muss in der OCP\\Share_Backend - Schnittstelle implementiert werden", "Sharing backend %s not found" : "Freigabe-Backend %s nicht gefunden", "Sharing backend for %s not found" : "Freigabe-Backend für %s nicht gefunden", @@ -113,11 +134,11 @@ "Open »%s«" : "»%s« öffnen", "%1$s via %2$s" : "%1$s über %2$s", "You are not allowed to share %s" : "Die Freigabe von %s ist Ihnen nicht erlaubt", - "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", - "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", - "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Cannot increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files cannot be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files cannot be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", "Expiration date is in the past" : "Das Ablaufdatum liegt in der Vergangenheit.", - "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Das Ablaufdatum kann nicht mehr als %n Tag in der Zukunft liegen","Das Ablaufdatum kann nicht mehr als %n Tage in der Zukunft liegen"], "Sharing is only allowed with group members" : "Teilen ist nur mit Gruppenmitgliedern erlaubt", "Sharing %s failed, because this item is already shared with user %s" : "Freigabe von %s fehlgeschlagen, da dieses Element schon mit dem Benutzer %s geteilt wird", "%1$s shared »%2$s« with you" : "%1$s hat »%2$s« mit Ihnen geteilt", @@ -184,15 +205,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Die App „%1$s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %2$s", "a safe home for all your data" : "ein sicherer Ort für all Ihre Daten", "File is currently busy, please try again later" : "Die Datei ist in Benutzung, bitte versuchen Sie es später noch einmal", - "Can't read file" : "Datei kann nicht gelesen werden", + "Cannot read file" : "Datei kann nicht gelesen werden", "Application is not enabled" : "Die Anwendung ist nicht aktiviert", "Authentication error" : "Authentifizierungsfehler", "Token expired. Please reload page." : "Token abgelaufen. Bitte laden Sie die Seite neu.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MySQL oder PostgreSQL) installiert.", "Cannot write into \"config\" directory" : "Schreiben in das „config“-Verzeichnis ist nicht möglich", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Konfigurationsverzeichnis eingeräumt wird. Siehe auch %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True. Siehe %s", "Cannot write into \"apps\" directory" : "Schreiben in das „apps“-Verzeichnis ist nicht möglich", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App-Store in der Konfigurationsdatei deaktiviert wird.", "Cannot create \"data\" directory" : "Kann das \"Daten\"-Verzeichnis nicht erstellen", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dies kann zumeist behoben werden, indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Berechtigungen können zumeist korrigiert werden indem dem Web-Server Schreibzugriff auf das Wurzel-Verzeichnis eingeräumt wird. Siehe auch %s. ", @@ -229,8 +251,15 @@ "Storage connection error. %s" : "Verbindungsfehler zum Speicherplatz. %s", "Storage is temporarily not available" : "Speicher ist vorübergehend nicht verfügbar", "Storage connection timeout. %s" : "Zeitüberschreitung der Verbindung zum Speicherplatz. %s", - "Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s", - "Following platforms are supported: %s" : "Die folgenden Plattformen werden unterstützt: %s", - "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Oder wenn Sie möchten, dass die Datei config.php schreibgeschützt bleiben soll, dann setzen Sie die Option \"config_is_read_only\" in der Datei auf True.", + "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.", + "Invalid Federated Cloud ID" : "Ungültige Federated-Cloud-ID", + "Can’t increase permissions of %s" : "Kann die Berechtigungen von %s nicht erhöhen", + "Files can’t be shared with delete permissions" : "Dateien mit Lösch-Berechtigungen können nicht geteilt werden", + "Files can’t be shared with create permissions" : "Dateien mit Erstell-Berechtigungen können nicht geteilt werden", + "Can’t set expiration date more than %s days in the future" : "Das Ablaufdatum kann nicht mehr als %s Tage in der Zukunft liegen", + "Can't read file" : "Datei kann nicht gelesen werden", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, indem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird oder der App Store in der Konfigurationsdatei deaktiviert wird." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/el.js b/lib/l10n/el.js index 333b3a89cb6..d082a37916c 100644 --- a/lib/l10n/el.js +++ b/lib/l10n/el.js @@ -2,11 +2,8 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Αδυναμία εγγραφής στον κατάλογο \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Αυτό μπορεί συνήθως να διορθωθεί παρέχοντας δικαιώματα εγγραφής για το φάκελο config στο διακομιστή δικτύου", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\".", - "See %s" : "Δείτε %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Αυτό μπορεί συνήθως να διορθωθεί παρέχοντας δικαιώματα εγγραφής για το φάκελο config στον διακομιστή ιστού.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\". Δείτε %s", + "See %s" : "Δείτε %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Τα αρχεία της εφαρμογής %1$s δεν αντικαταστάθηκαν σωστά. Βεβαιωθείτε ότι πρόκειται για συμβατή έκδοση με το διακομιστή.", "Sample configuration detected" : "Ανιχνεύθηκε δείγμα εγκατάστασης", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Έχει ανιχνευθεί ότι το δείγμα εγκατάστασης έχει αντιγραφεί. Αυτό μπορεί να σπάσει την εγκατάστασή σας και δεν υποστηρίζεται. Παρακαλούμε διαβάστε την τεκμηρίωση πριν εκτελέσετε αλλαγές στο config.php", @@ -71,6 +68,8 @@ OC.L10N.register( "seconds ago" : "δευτερόλεπτα πριν", "Empty file" : "Κενό αρχείο", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Το άρθρωμα με ID: %sδεν υπάρχει. Παρακαλούμε ενεργοποιήστε το στις ρυθμίσεις των εφαρμογών σας ή επικοινωνήστε με τον διαχειριστή.", + "File already exists" : "Το αρχείο υπάρχει ήδη", + "Templates" : "Πρότυπα", "File name is a reserved word" : "Το όνομα αρχείου είναι λέξη που έχει δεσμευτεί", "File name contains at least one invalid character" : "Το όνομα αρχείου περιέχει έναν τουλάχιστον μη έγκυρο χαρακτήρα", "File name is too long" : "Το όνομα αρχείου είναι πολύ μεγάλο", @@ -102,7 +101,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Παρακαλούμε αφαιρέστε την ρύθμιση open_basedir μέσα στο αρχείο php.ini ή αλλάξτε σε 64-bit PHP.", "Set an admin username." : "Εισάγετε όνομα χρήστη διαχειριστή.", "Set an admin password." : "Εισάγετε συνθηματικό διαχειριστή.", - "Can't create or write into the data directory %s" : "Αδύνατη η δημιουργία ή συγγραφή στον κατάλογο δεδομένων %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Το σύστημα διαμοιρασμού %s πρέπει να υλοποιεί την διεπαφή OCP\\Share_Backend", "Sharing backend %s not found" : "Το σύστημα διαμοιρασμού %s δεν βρέθηκε", "Sharing backend for %s not found" : "Το σύστημα διαμοιρασμού για το %s δεν βρέθηκε", @@ -112,11 +110,7 @@ OC.L10N.register( "Open »%s«" : "Άνοιγμα »%s«", "%1$s via %2$s" : "%1$s μέσω %2$s", "You are not allowed to share %s" : "Δεν σας επιτρέπεται ο επαναδιαμοιρασμός %s", - "Can’t increase permissions of %s" : "Αδυναμία αύξησης των δικαιωμάτων του %s", - "Files can’t be shared with delete permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα διαγραφής", - "Files can’t be shared with create permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα δημιουργίας", "Expiration date is in the past" : "Η ημερομηνία λήξης είναι στο παρελθόν", - "Can’t set expiration date more than %s days in the future" : "Δεν είναι δυνατό να τεθεί η ημερομηνία λήξης σε περισσότερες από %s ημέρες στο μέλλον", "%1$s shared »%2$s« with you" : "Ο %1$s διαμοιράστηκε το »%2$s« με εσάς.", "%1$s shared »%2$s« with you." : "%1$s διαμοιράστηκε »%2$s« με εσάς.", "Click the button below to open it." : "Κάντε κλικ στο παρακάτω κουμπί για να το ανοίξετε.", @@ -181,15 +175,14 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Η εφαρμογή \"%1$s\" δεν μπορεί να εγκατασταθεί επειδή δεν πληρούνται τα προαπαιτούμενα: %2$s", "a safe home for all your data" : "ένα ασφαλές μέρος για όλα τα δεδομένα σας", "File is currently busy, please try again later" : "Το αρχείο χρησιμοποιείται αυτή τη στιγμή, παρακαλούμε προσπαθήστε αργότερα", - "Can't read file" : "Αδυναμία ανάγνωσης αρχείου", "Application is not enabled" : "Δεν ενεργοποιήθηκε η εφαρμογή", "Authentication error" : "Σφάλμα πιστοποίησης", "Token expired. Please reload page." : "Το αναγνωριστικό έληξε. Παρακαλούμε φορτώστε ξανά την σελίδα.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Δεν βρέθηκαν εγκατεστημένοι οδηγοί βάσεων δεδομένων (sqlite, mysql, or postgresql).", "Cannot write into \"config\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας στον διακομιστή γραπτή πρόσβαση στον κατάλογο εκχώρησης. Βλέπε%s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\". Δείτε %s", "Cannot write into \"apps\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας δικαιώματα εγγραφής για τον κατάλογο εφαρμογών στον διακομιστή ιστού ή απενεργοποιώντας το κέντρο εφαρμογών στο αρχείο config.", "Cannot create \"data\" directory" : "Αδυναμία δημιουργίας του καταλόγου \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας στον διακομιστή ιστού δικαιώματα εγγραφής στον βασικό κατάλογο. Δείτε το%s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Τα δικαιώματα πρόσβασης μπορούν συνήθως να διορθωθούν δίνοντας δικαιώματα εγγραφής στον βασικό κατάλογο στον διακομιστή ιστού. Δείτε το%s.", @@ -226,8 +219,15 @@ OC.L10N.register( "Storage connection error. %s" : "Σφάλμα σύνδεσης με αποθηκευτικό χώρο. %s", "Storage is temporarily not available" : "Μη διαθέσιμος χώρος αποθήκευσης προσωρινά", "Storage connection timeout. %s" : "Λήξη χρονικού ορίου σύνδεσης με αποθηκευτικό χώρο.%s", - "Following databases are supported: %s" : " Υποστηρίζονται οι ακόλουθες βάσεις δεδομένων: %s", - "Following platforms are supported: %s" : "Οι ακόλουθες πλατφόρμες υποστηρίζονται: %s", - "Invalid Federated Cloud ID" : "Μη έγκυρο Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Αυτό μπορεί συνήθως να διορθωθεί παρέχοντας δικαιώματα εγγραφής για το φάκελο config στο διακομιστή δικτύου", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\".", + "Can't create or write into the data directory %s" : "Αδύνατη η δημιουργία ή συγγραφή στον κατάλογο δεδομένων %s", + "Invalid Federated Cloud ID" : "Μη έγκυρο Federated Cloud ID", + "Can’t increase permissions of %s" : "Αδυναμία αύξησης των δικαιωμάτων του %s", + "Files can’t be shared with delete permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα διαγραφής", + "Files can’t be shared with create permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα δημιουργίας", + "Can’t set expiration date more than %s days in the future" : "Δεν είναι δυνατό να τεθεί η ημερομηνία λήξης σε περισσότερες από %s ημέρες στο μέλλον", + "Can't read file" : "Αδυναμία ανάγνωσης αρχείου", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας δικαιώματα εγγραφής για τον κατάλογο εφαρμογών στον διακομιστή ιστού ή απενεργοποιώντας το κέντρο εφαρμογών στο αρχείο config." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/el.json b/lib/l10n/el.json index efa2d0089ba..9f4b11fe2ab 100644 --- a/lib/l10n/el.json +++ b/lib/l10n/el.json @@ -1,10 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "Αδυναμία εγγραφής στον κατάλογο \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Αυτό μπορεί συνήθως να διορθωθεί παρέχοντας δικαιώματα εγγραφής για το φάκελο config στο διακομιστή δικτύου", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\".", - "See %s" : "Δείτε %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Αυτό μπορεί συνήθως να διορθωθεί παρέχοντας δικαιώματα εγγραφής για το φάκελο config στον διακομιστή ιστού.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\". Δείτε %s", + "See %s" : "Δείτε %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Τα αρχεία της εφαρμογής %1$s δεν αντικαταστάθηκαν σωστά. Βεβαιωθείτε ότι πρόκειται για συμβατή έκδοση με το διακομιστή.", "Sample configuration detected" : "Ανιχνεύθηκε δείγμα εγκατάστασης", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Έχει ανιχνευθεί ότι το δείγμα εγκατάστασης έχει αντιγραφεί. Αυτό μπορεί να σπάσει την εγκατάστασή σας και δεν υποστηρίζεται. Παρακαλούμε διαβάστε την τεκμηρίωση πριν εκτελέσετε αλλαγές στο config.php", @@ -69,6 +66,8 @@ "seconds ago" : "δευτερόλεπτα πριν", "Empty file" : "Κενό αρχείο", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Το άρθρωμα με ID: %sδεν υπάρχει. Παρακαλούμε ενεργοποιήστε το στις ρυθμίσεις των εφαρμογών σας ή επικοινωνήστε με τον διαχειριστή.", + "File already exists" : "Το αρχείο υπάρχει ήδη", + "Templates" : "Πρότυπα", "File name is a reserved word" : "Το όνομα αρχείου είναι λέξη που έχει δεσμευτεί", "File name contains at least one invalid character" : "Το όνομα αρχείου περιέχει έναν τουλάχιστον μη έγκυρο χαρακτήρα", "File name is too long" : "Το όνομα αρχείου είναι πολύ μεγάλο", @@ -100,7 +99,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Παρακαλούμε αφαιρέστε την ρύθμιση open_basedir μέσα στο αρχείο php.ini ή αλλάξτε σε 64-bit PHP.", "Set an admin username." : "Εισάγετε όνομα χρήστη διαχειριστή.", "Set an admin password." : "Εισάγετε συνθηματικό διαχειριστή.", - "Can't create or write into the data directory %s" : "Αδύνατη η δημιουργία ή συγγραφή στον κατάλογο δεδομένων %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Το σύστημα διαμοιρασμού %s πρέπει να υλοποιεί την διεπαφή OCP\\Share_Backend", "Sharing backend %s not found" : "Το σύστημα διαμοιρασμού %s δεν βρέθηκε", "Sharing backend for %s not found" : "Το σύστημα διαμοιρασμού για το %s δεν βρέθηκε", @@ -110,11 +108,7 @@ "Open »%s«" : "Άνοιγμα »%s«", "%1$s via %2$s" : "%1$s μέσω %2$s", "You are not allowed to share %s" : "Δεν σας επιτρέπεται ο επαναδιαμοιρασμός %s", - "Can’t increase permissions of %s" : "Αδυναμία αύξησης των δικαιωμάτων του %s", - "Files can’t be shared with delete permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα διαγραφής", - "Files can’t be shared with create permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα δημιουργίας", "Expiration date is in the past" : "Η ημερομηνία λήξης είναι στο παρελθόν", - "Can’t set expiration date more than %s days in the future" : "Δεν είναι δυνατό να τεθεί η ημερομηνία λήξης σε περισσότερες από %s ημέρες στο μέλλον", "%1$s shared »%2$s« with you" : "Ο %1$s διαμοιράστηκε το »%2$s« με εσάς.", "%1$s shared »%2$s« with you." : "%1$s διαμοιράστηκε »%2$s« με εσάς.", "Click the button below to open it." : "Κάντε κλικ στο παρακάτω κουμπί για να το ανοίξετε.", @@ -179,15 +173,14 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Η εφαρμογή \"%1$s\" δεν μπορεί να εγκατασταθεί επειδή δεν πληρούνται τα προαπαιτούμενα: %2$s", "a safe home for all your data" : "ένα ασφαλές μέρος για όλα τα δεδομένα σας", "File is currently busy, please try again later" : "Το αρχείο χρησιμοποιείται αυτή τη στιγμή, παρακαλούμε προσπαθήστε αργότερα", - "Can't read file" : "Αδυναμία ανάγνωσης αρχείου", "Application is not enabled" : "Δεν ενεργοποιήθηκε η εφαρμογή", "Authentication error" : "Σφάλμα πιστοποίησης", "Token expired. Please reload page." : "Το αναγνωριστικό έληξε. Παρακαλούμε φορτώστε ξανά την σελίδα.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Δεν βρέθηκαν εγκατεστημένοι οδηγοί βάσεων δεδομένων (sqlite, mysql, or postgresql).", "Cannot write into \"config\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας στον διακομιστή γραπτή πρόσβαση στον κατάλογο εκχώρησης. Βλέπε%s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\". Δείτε %s", "Cannot write into \"apps\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας δικαιώματα εγγραφής για τον κατάλογο εφαρμογών στον διακομιστή ιστού ή απενεργοποιώντας το κέντρο εφαρμογών στο αρχείο config.", "Cannot create \"data\" directory" : "Αδυναμία δημιουργίας του καταλόγου \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας στον διακομιστή ιστού δικαιώματα εγγραφής στον βασικό κατάλογο. Δείτε το%s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Τα δικαιώματα πρόσβασης μπορούν συνήθως να διορθωθούν δίνοντας δικαιώματα εγγραφής στον βασικό κατάλογο στον διακομιστή ιστού. Δείτε το%s.", @@ -224,8 +217,15 @@ "Storage connection error. %s" : "Σφάλμα σύνδεσης με αποθηκευτικό χώρο. %s", "Storage is temporarily not available" : "Μη διαθέσιμος χώρος αποθήκευσης προσωρινά", "Storage connection timeout. %s" : "Λήξη χρονικού ορίου σύνδεσης με αποθηκευτικό χώρο.%s", - "Following databases are supported: %s" : " Υποστηρίζονται οι ακόλουθες βάσεις δεδομένων: %s", - "Following platforms are supported: %s" : "Οι ακόλουθες πλατφόρμες υποστηρίζονται: %s", - "Invalid Federated Cloud ID" : "Μη έγκυρο Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Αυτό μπορεί συνήθως να διορθωθεί παρέχοντας δικαιώματα εγγραφής για το φάκελο config στο διακομιστή δικτύου", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ή εάν επιθυμείτε να διατηρήσετε το config.php σε κατάσταση ανάγνωσης μόνο, καθορίστετο από τις επιλογές του σε true του \"config_is_read_only\".", + "Can't create or write into the data directory %s" : "Αδύνατη η δημιουργία ή συγγραφή στον κατάλογο δεδομένων %s", + "Invalid Federated Cloud ID" : "Μη έγκυρο Federated Cloud ID", + "Can’t increase permissions of %s" : "Αδυναμία αύξησης των δικαιωμάτων του %s", + "Files can’t be shared with delete permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα διαγραφής", + "Files can’t be shared with create permissions" : "Δεν μπορεί να γίνει διαμοιρασμός αρχείων με δικαιώματα δημιουργίας", + "Can’t set expiration date more than %s days in the future" : "Δεν είναι δυνατό να τεθεί η ημερομηνία λήξης σε περισσότερες από %s ημέρες στο μέλλον", + "Can't read file" : "Αδυναμία ανάγνωσης αρχείου", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Αυτό μπορεί συνήθως να διορθωθεί δίνοντας δικαιώματα εγγραφής για τον κατάλογο εφαρμογών στον διακομιστή ιστού ή απενεργοποιώντας το κέντρο εφαρμογών στο αρχείο config." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js index d6570e3b233..626d998fa36 100644 --- a/lib/l10n/en_GB.js +++ b/lib/l10n/en_GB.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Cannot write into \"config\" directory!", - "This can usually be fixed by giving the webserver write access to the config directory" : "This can usually be fixed by giving the webserver write access to the config directory", "See %s" : "See %s", "Sample configuration detected" : "Sample configuration detected", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php", @@ -21,6 +20,7 @@ OC.L10N.register( "The library %s is not available." : "The library %s is not available.", "Server version %s or higher is required." : "Server version %s or higher is required.", "Server version %s or lower is required." : "Server version %s or lower is required.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Logged in user must be an admin, a sub-admin or has special right to access this setting", "Logged in user must be an admin" : "Logged in user must be an admin", "Authentication" : "Authentication", "Unknown filetype" : "Unknown filetype", @@ -76,18 +76,13 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.", "Set an admin username." : "Set an admin username.", "Set an admin password." : "Set an admin password.", - "Can't create or write into the data directory %s" : "Can't create or write into the data directory %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Sharing backend %s must implement the interface OCP\\Share_Backend", "Sharing backend %s not found" : "Sharing backend %s not found", "Sharing backend for %s not found" : "Sharing backend for %s not found", "Open »%s«" : "Open »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "You are not allowed to share %s", - "Can’t increase permissions of %s" : "Can’t increase permissions of %s", - "Files can’t be shared with delete permissions" : "Files can’t be shared with delete permissions", - "Files can’t be shared with create permissions" : "Files can’t be shared with create permissions", "Expiration date is in the past" : "Expiration date is in the past", - "Can’t set expiration date more than %s days in the future" : "Can’t set expiration date more than %s days in the future", "Click the button below to open it." : "Click the button below to open it.", "The requested share does not exist anymore" : "The requested share does not exist anymore", "Could not find category \"%s\"" : "Could not find category \"%s\"", @@ -147,7 +142,6 @@ OC.L10N.register( "Login canceled by app" : "Login cancelled by app", "a safe home for all your data" : "a safe home for all your data", "File is currently busy, please try again later" : "File is currently busy, please try again later", - "Can't read file" : "Can't read file", "Application is not enabled" : "Application is not enabled", "Authentication error" : "Authentication error", "Token expired. Please reload page." : "Token expired. Please reload page.", @@ -186,8 +180,13 @@ OC.L10N.register( "Storage connection error. %s" : "Storage connection error. %s", "Storage is temporarily not available" : "Storage is temporarily not available", "Storage connection timeout. %s" : "Storage connection timeout. %s", - "Following databases are supported: %s" : "Following databases are supported: %s", - "Following platforms are supported: %s" : "Following platforms are supported: %s", - "Invalid Federated Cloud ID" : "Invalid Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "This can usually be fixed by giving the webserver write access to the config directory", + "Can't create or write into the data directory %s" : "Can't create or write into the data directory %s", + "Invalid Federated Cloud ID" : "Invalid Federated Cloud ID", + "Can’t increase permissions of %s" : "Can’t increase permissions of %s", + "Files can’t be shared with delete permissions" : "Files can’t be shared with delete permissions", + "Files can’t be shared with create permissions" : "Files can’t be shared with create permissions", + "Can’t set expiration date more than %s days in the future" : "Can’t set expiration date more than %s days in the future", + "Can't read file" : "Can't read file" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json index c4c7c5b839c..7dd5f3a05a6 100644 --- a/lib/l10n/en_GB.json +++ b/lib/l10n/en_GB.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Cannot write into \"config\" directory!", - "This can usually be fixed by giving the webserver write access to the config directory" : "This can usually be fixed by giving the webserver write access to the config directory", "See %s" : "See %s", "Sample configuration detected" : "Sample configuration detected", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php", @@ -19,6 +18,7 @@ "The library %s is not available." : "The library %s is not available.", "Server version %s or higher is required." : "Server version %s or higher is required.", "Server version %s or lower is required." : "Server version %s or lower is required.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Logged in user must be an admin, a sub-admin or has special right to access this setting", "Logged in user must be an admin" : "Logged in user must be an admin", "Authentication" : "Authentication", "Unknown filetype" : "Unknown filetype", @@ -74,18 +74,13 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.", "Set an admin username." : "Set an admin username.", "Set an admin password." : "Set an admin password.", - "Can't create or write into the data directory %s" : "Can't create or write into the data directory %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Sharing backend %s must implement the interface OCP\\Share_Backend", "Sharing backend %s not found" : "Sharing backend %s not found", "Sharing backend for %s not found" : "Sharing backend for %s not found", "Open »%s«" : "Open »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "You are not allowed to share %s", - "Can’t increase permissions of %s" : "Can’t increase permissions of %s", - "Files can’t be shared with delete permissions" : "Files can’t be shared with delete permissions", - "Files can’t be shared with create permissions" : "Files can’t be shared with create permissions", "Expiration date is in the past" : "Expiration date is in the past", - "Can’t set expiration date more than %s days in the future" : "Can’t set expiration date more than %s days in the future", "Click the button below to open it." : "Click the button below to open it.", "The requested share does not exist anymore" : "The requested share does not exist anymore", "Could not find category \"%s\"" : "Could not find category \"%s\"", @@ -145,7 +140,6 @@ "Login canceled by app" : "Login cancelled by app", "a safe home for all your data" : "a safe home for all your data", "File is currently busy, please try again later" : "File is currently busy, please try again later", - "Can't read file" : "Can't read file", "Application is not enabled" : "Application is not enabled", "Authentication error" : "Authentication error", "Token expired. Please reload page." : "Token expired. Please reload page.", @@ -184,8 +178,13 @@ "Storage connection error. %s" : "Storage connection error. %s", "Storage is temporarily not available" : "Storage is temporarily not available", "Storage connection timeout. %s" : "Storage connection timeout. %s", - "Following databases are supported: %s" : "Following databases are supported: %s", - "Following platforms are supported: %s" : "Following platforms are supported: %s", - "Invalid Federated Cloud ID" : "Invalid Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "This can usually be fixed by giving the webserver write access to the config directory", + "Can't create or write into the data directory %s" : "Can't create or write into the data directory %s", + "Invalid Federated Cloud ID" : "Invalid Federated Cloud ID", + "Can’t increase permissions of %s" : "Can’t increase permissions of %s", + "Files can’t be shared with delete permissions" : "Files can’t be shared with delete permissions", + "Files can’t be shared with create permissions" : "Files can’t be shared with create permissions", + "Can’t set expiration date more than %s days in the future" : "Can’t set expiration date more than %s days in the future", + "Can't read file" : "Can't read file" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/eo.js b/lib/l10n/eo.js index 8d2333e5148..c213f978fed 100644 --- a/lib/l10n/eo.js +++ b/lib/l10n/eo.js @@ -2,11 +2,8 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Ne povas skribi en la dosierujon „config“!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Igi la dosierujojn de agordo ŝanĝebla por la servilo kutime solvas tiun problemon", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi.", - "See %s" : "Vidi %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Igi la dosierujojn de agordo ŝanĝebla por la servilo kutime solvas tiun problemon", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi. Vidu %s", + "See %s" : "Vidi %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "La dosieroj de la aplikaĵo %1$s ne estis ĝuste anstataŭigitaj. Certigu, ke tiu aplikaĵa versio kongruas la servilon.", "Sample configuration detected" : "Ekzempla agordo trovita", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Ekzempla agordo estis kopiita en via sistemo. Tio povas paneigi vian instalaĵon, kaj ne estas subtenata. Bv. legi la dokumentaron antaŭ ol fari ŝanĝojn en config.php", @@ -102,7 +99,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Bv. forigi la agordon „open_basedir“ de via php.ini, aŭ uzu 64-bitan version de PHP.", "Set an admin username." : "Agordi uzantnomon de administranto.", "Set an admin password." : "Agordi pasvorton de administranto.", - "Can't create or write into the data directory %s" : "Ne kreeblas aŭ ne skribeblas la datumdosierujo %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Kunhava interna servo %s devas realigi la interfacon „OCP\\Share_Backend“", "Sharing backend %s not found" : "Kunhava interna servo %s ne troviĝas", "Sharing backend for %s not found" : "Kunhava interna servo por %s ne troviĝas", @@ -112,11 +108,7 @@ OC.L10N.register( "Open »%s«" : "Malfermi „%s“", "%1$s via %2$s" : "%1$s pere de %2$s", "You are not allowed to share %s" : "Vi ne permesatas kunhavigi %s", - "Can’t increase permissions of %s" : "Ne eblas pliigi permesojn de %s", - "Files can’t be shared with delete permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de forigo", - "Files can’t be shared with create permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de kreado", "Expiration date is in the past" : "Limdato troviĝas en la estinteco", - "Can’t set expiration date more than %s days in the future" : "Ne eblas agordi limdaton pli ol %s tagojn en la estonteco", "%1$s shared »%2$s« with you" : "%1$s kunhavigis „%2$s“ kun vi", "%1$s shared »%2$s« with you." : "%1$s kunhavigis „%2$s“ kun vi.", "Click the button below to open it." : "Alklaku la butonon ĉi-sube por malfermi ĝin.", @@ -181,15 +173,14 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "La aplikaĵo „%1$s“ ne instaliĝas, ĉar la jenaj dependecoj ne plenumiĝas: %2$s", "a safe home for all your data" : "sekura hejmo por ĉiuj viaj datumoj", "File is currently busy, please try again later" : "La dosiero estas nun okupita, bv. reprovi poste", - "Can't read file" : "Ne povas legi dosieron", "Application is not enabled" : "La aplikaĵo ne estas ŝaltita", "Authentication error" : "Aŭtentiga eraro", "Token expired. Please reload page." : "Ĵetono eksvalidiĝis. Bonvolu reŝargi la paĝon.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Neniu datumbaza pelilo (sqlite, mysql, or postgresql) instalita.", "Cannot write into \"config\" directory" : "Ne skribeblas la dosierujo „config“", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Igi la agordodosierujon alirebla de la servilo kutime solvas tiun problemon. Vidu %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi. Vidu %s", "Cannot write into \"apps\" directory" : "Ne skribeblas la dosierujo „apps“", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Igi la dosierujojn de aplikaĵo ŝanĝebla por la servilo aŭ malŝalti aplikaĵfonton en agorda dosiero kutime solvas tiun problemon", "Cannot create \"data\" directory" : "Ne kreeblas la dosierujo „data“", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Igi la radikan dosierujon alirebla de la servilo kutime solvas tiun problemon. Vidu %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Igi la radikan dosierujon skribebla de la servilo kutime solvas tiun problemon. Vidu %s.", @@ -226,8 +217,15 @@ OC.L10N.register( "Storage connection error. %s" : "Konekta eraro al konservejo. %s", "Storage is temporarily not available" : "Konservejo provizore ne disponeblas", "Storage connection timeout. %s" : "Konekto al konservejo eltempiĝis. %s", - "Following databases are supported: %s" : "La jenaj datumbazoj estas subtenataj: %s", - "Following platforms are supported: %s" : "La jenaj platformoj estas subtenataj: %s", - "Invalid Federated Cloud ID" : "Nevalida federnuba identigilo" + "This can usually be fixed by giving the webserver write access to the config directory" : "Igi la dosierujojn de agordo ŝanĝebla por la servilo kutime solvas tiun problemon", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi.", + "Can't create or write into the data directory %s" : "Ne kreeblas aŭ ne skribeblas la datumdosierujo %s", + "Invalid Federated Cloud ID" : "Nevalida federnuba identigilo", + "Can’t increase permissions of %s" : "Ne eblas pliigi permesojn de %s", + "Files can’t be shared with delete permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de forigo", + "Files can’t be shared with create permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de kreado", + "Can’t set expiration date more than %s days in the future" : "Ne eblas agordi limdaton pli ol %s tagojn en la estonteco", + "Can't read file" : "Ne povas legi dosieron", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Igi la dosierujojn de aplikaĵo ŝanĝebla por la servilo aŭ malŝalti aplikaĵfonton en agorda dosiero kutime solvas tiun problemon" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/eo.json b/lib/l10n/eo.json index 8b7eed747e0..8c84d49193f 100644 --- a/lib/l10n/eo.json +++ b/lib/l10n/eo.json @@ -1,10 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "Ne povas skribi en la dosierujon „config“!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Igi la dosierujojn de agordo ŝanĝebla por la servilo kutime solvas tiun problemon", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi.", - "See %s" : "Vidi %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Igi la dosierujojn de agordo ŝanĝebla por la servilo kutime solvas tiun problemon", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi. Vidu %s", + "See %s" : "Vidi %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "La dosieroj de la aplikaĵo %1$s ne estis ĝuste anstataŭigitaj. Certigu, ke tiu aplikaĵa versio kongruas la servilon.", "Sample configuration detected" : "Ekzempla agordo trovita", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Ekzempla agordo estis kopiita en via sistemo. Tio povas paneigi vian instalaĵon, kaj ne estas subtenata. Bv. legi la dokumentaron antaŭ ol fari ŝanĝojn en config.php", @@ -100,7 +97,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Bv. forigi la agordon „open_basedir“ de via php.ini, aŭ uzu 64-bitan version de PHP.", "Set an admin username." : "Agordi uzantnomon de administranto.", "Set an admin password." : "Agordi pasvorton de administranto.", - "Can't create or write into the data directory %s" : "Ne kreeblas aŭ ne skribeblas la datumdosierujo %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Kunhava interna servo %s devas realigi la interfacon „OCP\\Share_Backend“", "Sharing backend %s not found" : "Kunhava interna servo %s ne troviĝas", "Sharing backend for %s not found" : "Kunhava interna servo por %s ne troviĝas", @@ -110,11 +106,7 @@ "Open »%s«" : "Malfermi „%s“", "%1$s via %2$s" : "%1$s pere de %2$s", "You are not allowed to share %s" : "Vi ne permesatas kunhavigi %s", - "Can’t increase permissions of %s" : "Ne eblas pliigi permesojn de %s", - "Files can’t be shared with delete permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de forigo", - "Files can’t be shared with create permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de kreado", "Expiration date is in the past" : "Limdato troviĝas en la estinteco", - "Can’t set expiration date more than %s days in the future" : "Ne eblas agordi limdaton pli ol %s tagojn en la estonteco", "%1$s shared »%2$s« with you" : "%1$s kunhavigis „%2$s“ kun vi", "%1$s shared »%2$s« with you." : "%1$s kunhavigis „%2$s“ kun vi.", "Click the button below to open it." : "Alklaku la butonon ĉi-sube por malfermi ĝin.", @@ -179,15 +171,14 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "La aplikaĵo „%1$s“ ne instaliĝas, ĉar la jenaj dependecoj ne plenumiĝas: %2$s", "a safe home for all your data" : "sekura hejmo por ĉiuj viaj datumoj", "File is currently busy, please try again later" : "La dosiero estas nun okupita, bv. reprovi poste", - "Can't read file" : "Ne povas legi dosieron", "Application is not enabled" : "La aplikaĵo ne estas ŝaltita", "Authentication error" : "Aŭtentiga eraro", "Token expired. Please reload page." : "Ĵetono eksvalidiĝis. Bonvolu reŝargi la paĝon.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Neniu datumbaza pelilo (sqlite, mysql, or postgresql) instalita.", "Cannot write into \"config\" directory" : "Ne skribeblas la dosierujo „config“", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Igi la agordodosierujon alirebla de la servilo kutime solvas tiun problemon. Vidu %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi. Vidu %s", "Cannot write into \"apps\" directory" : "Ne skribeblas la dosierujo „apps“", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Igi la dosierujojn de aplikaĵo ŝanĝebla por la servilo aŭ malŝalti aplikaĵfonton en agorda dosiero kutime solvas tiun problemon", "Cannot create \"data\" directory" : "Ne kreeblas la dosierujo „data“", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Igi la radikan dosierujon alirebla de la servilo kutime solvas tiun problemon. Vidu %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Igi la radikan dosierujon skribebla de la servilo kutime solvas tiun problemon. Vidu %s.", @@ -224,8 +215,15 @@ "Storage connection error. %s" : "Konekta eraro al konservejo. %s", "Storage is temporarily not available" : "Konservejo provizore ne disponeblas", "Storage connection timeout. %s" : "Konekto al konservejo eltempiĝis. %s", - "Following databases are supported: %s" : "La jenaj datumbazoj estas subtenataj: %s", - "Following platforms are supported: %s" : "La jenaj platformoj estas subtenataj: %s", - "Invalid Federated Cloud ID" : "Nevalida federnuba identigilo" + "This can usually be fixed by giving the webserver write access to the config directory" : "Igi la dosierujojn de agordo ŝanĝebla por la servilo kutime solvas tiun problemon", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Aŭ, se vi preferas lasi la dosieron config.php nurlega, valorigu la opcion \"config_is_read_only“ al vero („true“) en ĝi.", + "Can't create or write into the data directory %s" : "Ne kreeblas aŭ ne skribeblas la datumdosierujo %s", + "Invalid Federated Cloud ID" : "Nevalida federnuba identigilo", + "Can’t increase permissions of %s" : "Ne eblas pliigi permesojn de %s", + "Files can’t be shared with delete permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de forigo", + "Files can’t be shared with create permissions" : "Dosieroj ne estas kunhavigitaj kun permesoj de kreado", + "Can’t set expiration date more than %s days in the future" : "Ne eblas agordi limdaton pli ol %s tagojn en la estonteco", + "Can't read file" : "Ne povas legi dosieron", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Igi la dosierujojn de aplikaĵo ŝanĝebla por la servilo aŭ malŝalti aplikaĵfonton en agorda dosiero kutime solvas tiun problemon" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es.js b/lib/l10n/es.js index 7eb8fef6640..c43109fe74e 100644 --- a/lib/l10n/es.js +++ b/lib/l10n/es.js @@ -2,14 +2,15 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "No se puede escribir en la carpeta \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él.", - "See %s" : "Ver %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él. Ver %s", + "See %s" : "Ver %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Los archivos de la app %1$s no se han reemplazado correctamente. Asegúrate de que es una versión compatible con el servidor.", "Sample configuration detected" : "Configuración de ejemplo detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que el ejemplo de configuración ha sido copiado. Esto podría afectar a su instalación, por lo que no tiene soporte. Lea la documentación antes de hacer cambios en config.php", + "Email verification" : "Verificación del correo electrónico", + "Click the following button to confirm your email." : "Haz clic en el botón siguiente para confirmar tu correo electrónico.", + "Click the following link to confirm your email." : "Haz clic en el enlace siguiente para confirmar tu correo electrónico.", + "Confirm your email" : "Confirma tu correo electrónico", "Other activities" : "Otras actividades", "%1$s and %2$s" : "%1$s y %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s y %3$s", @@ -72,6 +73,7 @@ OC.L10N.register( "Empty file" : "Archivo vacío", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "El módulo con ID %s no existe. Por favor, actívalo en la configuración de apps o contacta con tu administrador.", "File already exists" : "El archivo ya existe", + "Invalid path" : "Ruta no válida", "Failed to create file from template" : "Fallo al crear el archivo desde plantilla", "Templates" : "Plantillas", "File name is a reserved word" : "El nombre de archivo es una palabra reservada", @@ -105,7 +107,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, quite el ajuste de open_basedir —dentro de su php.ini— o pásese a PHP de 64 bits.", "Set an admin username." : "Configurar un nombre de usuario del administrador", "Set an admin password." : "Configurar la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Cannot create or write into the data directory %s" : "No se puede crear o escribir en la carpeta de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El motor compartido %s debe implementar la interfaz OCP\\Share_Backend", "Sharing backend %s not found" : "El motor compartido %s no se ha encontrado", "Sharing backend for %s not found" : "Motor compartido para %s no encontrado", @@ -115,12 +117,13 @@ OC.L10N.register( "Open »%s«" : "Abrir »%s« ", "%1$s via %2$s" : "%1$s vía %2$s", "You are not allowed to share %s" : "Usted no está autorizado para compartir %s", - "Can’t increase permissions of %s" : "No se pueden aumentar los permisos de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Cannot increase permissions of %s" : "No se pueden incrementar los permisos de %s", + "Files cannot be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files cannot be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "Ha pasado la fecha de caducidad", - "Can’t set expiration date more than %s days in the future" : "No se puede establecer la fecha de expiración a más de %s días en el futuro", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["No se puede fijar la fecha de caducidad más de %n día en el futuro.","No se puede fijar la fecha de caducidad más de %n días en el futuro."], "Sharing is only allowed with group members" : "Sólo está permitido compartir a los integrantes del grupo", + "Sharing %s failed, because this item is already shared with user %s" : "No se pudo compartir %s, porque este elemento ya está compartido con el usuario %s", "%1$s shared »%2$s« with you" : "%1$s ha compartido «%2$s» contigo", "%1$s shared »%2$s« with you." : "%1$s ha compartido «%2$s» contigo.", "Click the button below to open it." : "Haz clic en el botón de abajo para abrirlo.", @@ -185,15 +188,15 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "No se ha podido instlaar la app «%1$s» porque no se cumplen las siguientes dependencias: %2$s", "a safe home for all your data" : "un hogar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente ocupado, por favor inténtelo de nuevo más tarde", - "Can't read file" : "No se puede leer archivo", + "Cannot read file" : "No se puede leer archivo", "Application is not enabled" : "La aplicación no está habilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "Token caducado. Por favor, recarge la página.", "No database drivers (sqlite, mysql, or postgresql) installed." : "No están instalados los drivers de BBDD (sqlite, mysql, o postgresql)", "Cannot write into \"config\" directory" : "No se puede escribir el el directorio de configuración", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración. Ver %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él. Ver %s", "Cannot write into \"apps\" directory" : "No se puede escribir en el directorio de \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Se podría solucionar esto dando al servidor web acceso de escritura al directorio de apps o desactivando la tienda de apps en el archivo de configuración.", "Cannot create \"data\" directory" : "No se puede crear el directorio \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Habitualmente, esto puede arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Habitualmente, los permisos pueden arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s", @@ -230,8 +233,15 @@ OC.L10N.register( "Storage connection error. %s" : "Error de conexión de almacenamiento. %s", "Storage is temporarily not available" : "El almacenamiento no esta disponible temporalmente", "Storage connection timeout. %s" : "Tiempo de conexión de almacenamiento agotado. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID de Nube federada no válida" + "This can usually be fixed by giving the webserver write access to the config directory" : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él.", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID de Nube federada no válida", + "Can’t increase permissions of %s" : "No se pueden aumentar los permisos de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No se puede establecer la fecha de expiración a más de %s días en el futuro", + "Can't read file" : "No se puede leer archivo", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Se podría solucionar esto dando al servidor web acceso de escritura al directorio de apps o desactivando la tienda de apps en el archivo de configuración." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es.json b/lib/l10n/es.json index 0ad202345a5..4fb35a65eda 100644 --- a/lib/l10n/es.json +++ b/lib/l10n/es.json @@ -1,13 +1,14 @@ { "translations": { "Cannot write into \"config\" directory!" : "No se puede escribir en la carpeta \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él.", - "See %s" : "Ver %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él. Ver %s", + "See %s" : "Ver %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Los archivos de la app %1$s no se han reemplazado correctamente. Asegúrate de que es una versión compatible con el servidor.", "Sample configuration detected" : "Configuración de ejemplo detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que el ejemplo de configuración ha sido copiado. Esto podría afectar a su instalación, por lo que no tiene soporte. Lea la documentación antes de hacer cambios en config.php", + "Email verification" : "Verificación del correo electrónico", + "Click the following button to confirm your email." : "Haz clic en el botón siguiente para confirmar tu correo electrónico.", + "Click the following link to confirm your email." : "Haz clic en el enlace siguiente para confirmar tu correo electrónico.", + "Confirm your email" : "Confirma tu correo electrónico", "Other activities" : "Otras actividades", "%1$s and %2$s" : "%1$s y %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s y %3$s", @@ -70,6 +71,7 @@ "Empty file" : "Archivo vacío", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "El módulo con ID %s no existe. Por favor, actívalo en la configuración de apps o contacta con tu administrador.", "File already exists" : "El archivo ya existe", + "Invalid path" : "Ruta no válida", "Failed to create file from template" : "Fallo al crear el archivo desde plantilla", "Templates" : "Plantillas", "File name is a reserved word" : "El nombre de archivo es una palabra reservada", @@ -103,7 +105,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, quite el ajuste de open_basedir —dentro de su php.ini— o pásese a PHP de 64 bits.", "Set an admin username." : "Configurar un nombre de usuario del administrador", "Set an admin password." : "Configurar la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Cannot create or write into the data directory %s" : "No se puede crear o escribir en la carpeta de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El motor compartido %s debe implementar la interfaz OCP\\Share_Backend", "Sharing backend %s not found" : "El motor compartido %s no se ha encontrado", "Sharing backend for %s not found" : "Motor compartido para %s no encontrado", @@ -113,12 +115,13 @@ "Open »%s«" : "Abrir »%s« ", "%1$s via %2$s" : "%1$s vía %2$s", "You are not allowed to share %s" : "Usted no está autorizado para compartir %s", - "Can’t increase permissions of %s" : "No se pueden aumentar los permisos de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Cannot increase permissions of %s" : "No se pueden incrementar los permisos de %s", + "Files cannot be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files cannot be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "Ha pasado la fecha de caducidad", - "Can’t set expiration date more than %s days in the future" : "No se puede establecer la fecha de expiración a más de %s días en el futuro", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["No se puede fijar la fecha de caducidad más de %n día en el futuro.","No se puede fijar la fecha de caducidad más de %n días en el futuro."], "Sharing is only allowed with group members" : "Sólo está permitido compartir a los integrantes del grupo", + "Sharing %s failed, because this item is already shared with user %s" : "No se pudo compartir %s, porque este elemento ya está compartido con el usuario %s", "%1$s shared »%2$s« with you" : "%1$s ha compartido «%2$s» contigo", "%1$s shared »%2$s« with you." : "%1$s ha compartido «%2$s» contigo.", "Click the button below to open it." : "Haz clic en el botón de abajo para abrirlo.", @@ -183,15 +186,15 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "No se ha podido instlaar la app «%1$s» porque no se cumplen las siguientes dependencias: %2$s", "a safe home for all your data" : "un hogar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente ocupado, por favor inténtelo de nuevo más tarde", - "Can't read file" : "No se puede leer archivo", + "Cannot read file" : "No se puede leer archivo", "Application is not enabled" : "La aplicación no está habilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "Token caducado. Por favor, recarge la página.", "No database drivers (sqlite, mysql, or postgresql) installed." : "No están instalados los drivers de BBDD (sqlite, mysql, o postgresql)", "Cannot write into \"config\" directory" : "No se puede escribir el el directorio de configuración", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración. Ver %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él. Ver %s", "Cannot write into \"apps\" directory" : "No se puede escribir en el directorio de \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Se podría solucionar esto dando al servidor web acceso de escritura al directorio de apps o desactivando la tienda de apps en el archivo de configuración.", "Cannot create \"data\" directory" : "No se puede crear el directorio \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Habitualmente, esto puede arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Habitualmente, los permisos pueden arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s", @@ -228,8 +231,15 @@ "Storage connection error. %s" : "Error de conexión de almacenamiento. %s", "Storage is temporarily not available" : "El almacenamiento no esta disponible temporalmente", "Storage connection timeout. %s" : "Tiempo de conexión de almacenamiento agotado. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID de Nube federada no válida" + "This can usually be fixed by giving the webserver write access to the config directory" : "Se podría solucionar esto dándole al servidor permisos de escritura del directorio de configuración", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, si prefieres mantener el archivo config.php como de solo lectura, marca la opción \"config_is_read_only\" a 'true' en él.", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID de Nube federada no válida", + "Can’t increase permissions of %s" : "No se pueden aumentar los permisos de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No se puede establecer la fecha de expiración a más de %s días en el futuro", + "Can't read file" : "No se puede leer archivo", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Se podría solucionar esto dando al servidor web acceso de escritura al directorio de apps o desactivando la tienda de apps en el archivo de configuración." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_419.js b/lib/l10n/es_419.js index 5e4c95c9d82..e55ff3398ec 100644 --- a/lib/l10n/es_419.js +++ b/lib/l10n/es_419.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_419.json b/lib/l10n/es_419.json index e385e0c9eb1..96946b77afc 100644 --- a/lib/l10n/es_419.json +++ b/lib/l10n/es_419.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_AR.js b/lib/l10n/es_AR.js index 11c68a729cc..84de3ebd13c 100644 --- a/lib/l10n/es_AR.js +++ b/lib/l10n/es_AR.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se soluciona dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede descomponer su instalacón y no está soportado. Favor de leer la documentación antes de hacer cambios en el archivo config.php", @@ -65,7 +64,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Favor de eliminar el ajuste open_basedir de su archivo php.ini o cambie a PHP de 64 bits. ", "Set an admin username." : "Configurar un nombre de usuario del administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", @@ -129,7 +127,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos sus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, favor de intentarlo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Favor de recarga la página.", @@ -167,8 +164,9 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "Se agotó el tiempo de conexión del almacenamiento. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID de Nube Federada Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se soluciona dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID de Nube Federada Inválido", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_AR.json b/lib/l10n/es_AR.json index d18563ecfa8..f1a580c3a7b 100644 --- a/lib/l10n/es_AR.json +++ b/lib/l10n/es_AR.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se soluciona dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede descomponer su instalacón y no está soportado. Favor de leer la documentación antes de hacer cambios en el archivo config.php", @@ -63,7 +62,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Favor de eliminar el ajuste open_basedir de su archivo php.ini o cambie a PHP de 64 bits. ", "Set an admin username." : "Configurar un nombre de usuario del administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", @@ -127,7 +125,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos sus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, favor de intentarlo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Favor de recarga la página.", @@ -165,8 +162,9 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "Se agotó el tiempo de conexión del almacenamiento. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID de Nube Federada Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se soluciona dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID de Nube Federada Inválido", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_CL.js b/lib/l10n/es_CL.js index 02851c3e936..86c0dd904aa 100644 --- a/lib/l10n/es_CL.js +++ b/lib/l10n/es_CL.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_CL.json b/lib/l10n/es_CL.json index aa47e25a605..f146a22bbdd 100644 --- a/lib/l10n/es_CL.json +++ b/lib/l10n/es_CL.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_CO.js b/lib/l10n/es_CO.js index a05619f1b6f..ce5f503ba61 100644 --- a/lib/l10n/es_CO.js +++ b/lib/l10n/es_CO.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_CO.json b/lib/l10n/es_CO.json index 334e5afc245..294ed835a26 100644 --- a/lib/l10n/es_CO.json +++ b/lib/l10n/es_CO.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_CR.js b/lib/l10n/es_CR.js index 0dc60dfadd7..b9614cf8660 100644 --- a/lib/l10n/es_CR.js +++ b/lib/l10n/es_CR.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_CR.json b/lib/l10n/es_CR.json index e138525aaf2..6d69448de40 100644 --- a/lib/l10n/es_CR.json +++ b/lib/l10n/es_CR.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_DO.js b/lib/l10n/es_DO.js index efc55a62d7b..10766e88df2 100644 --- a/lib/l10n/es_DO.js +++ b/lib/l10n/es_DO.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_DO.json b/lib/l10n/es_DO.json index 44389377a13..97460f90f0f 100644 --- a/lib/l10n/es_DO.json +++ b/lib/l10n/es_DO.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_EC.js b/lib/l10n/es_EC.js index b2dc06f642f..ad783537217 100644 --- a/lib/l10n/es_EC.js +++ b/lib/l10n/es_EC.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_EC.json b/lib/l10n/es_EC.json index e1a6be08a19..e78073af038 100644 --- a/lib/l10n/es_EC.json +++ b/lib/l10n/es_EC.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_GT.js b/lib/l10n/es_GT.js index ce9637128c5..02146bfaf18 100644 --- a/lib/l10n/es_GT.js +++ b/lib/l10n/es_GT.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_GT.json b/lib/l10n/es_GT.json index c969eb038ef..83d9a9afcd3 100644 --- a/lib/l10n/es_GT.json +++ b/lib/l10n/es_GT.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_HN.js b/lib/l10n/es_HN.js index 881d5670b46..64b4272667c 100644 --- a/lib/l10n/es_HN.js +++ b/lib/l10n/es_HN.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_HN.json b/lib/l10n/es_HN.json index 5cef5b1b9d4..7cc8ea84044 100644 --- a/lib/l10n/es_HN.json +++ b/lib/l10n/es_HN.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_MX.js b/lib/l10n/es_MX.js index 1bbb64e7531..11336a65965 100644 --- a/lib/l10n/es_MX.js +++ b/lib/l10n/es_MX.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_MX.json b/lib/l10n/es_MX.json index c44f10ee651..ec58b306e4a 100644 --- a/lib/l10n/es_MX.json +++ b/lib/l10n/es_MX.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_NI.js b/lib/l10n/es_NI.js index 0a26cd59c53..3d15975c740 100644 --- a/lib/l10n/es_NI.js +++ b/lib/l10n/es_NI.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_NI.json b/lib/l10n/es_NI.json index 6dd72f07483..a23d066a9c7 100644 --- a/lib/l10n/es_NI.json +++ b/lib/l10n/es_NI.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_PA.js b/lib/l10n/es_PA.js index aa82cb00055..2eb8c5cf15d 100644 --- a/lib/l10n/es_PA.js +++ b/lib/l10n/es_PA.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_PA.json b/lib/l10n/es_PA.json index 8bcbab3a8bd..b72423885bd 100644 --- a/lib/l10n/es_PA.json +++ b/lib/l10n/es_PA.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_PE.js b/lib/l10n/es_PE.js index 39959ddd3c6..d757b98050f 100644 --- a/lib/l10n/es_PE.js +++ b/lib/l10n/es_PE.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_PE.json b/lib/l10n/es_PE.json index 3b52a2fec8d..7c850e3ee0e 100644 --- a/lib/l10n/es_PE.json +++ b/lib/l10n/es_PE.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_PR.js b/lib/l10n/es_PR.js index 2593df33635..ab4c7f191b2 100644 --- a/lib/l10n/es_PR.js +++ b/lib/l10n/es_PR.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_PR.json b/lib/l10n/es_PR.json index e2d542f0b8d..2e90178ad5c 100644 --- a/lib/l10n/es_PR.json +++ b/lib/l10n/es_PR.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_PY.js b/lib/l10n/es_PY.js index 8df977d3571..2637087ca90 100644 --- a/lib/l10n/es_PY.js +++ b/lib/l10n/es_PY.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_PY.json b/lib/l10n/es_PY.json index 9491090e82d..73eb0b028ee 100644 --- a/lib/l10n/es_PY.json +++ b/lib/l10n/es_PY.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_SV.js b/lib/l10n/es_SV.js index 699f61e07ad..2e7f7df3fd8 100644 --- a/lib/l10n/es_SV.js +++ b/lib/l10n/es_SV.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_SV.json b/lib/l10n/es_SV.json index 1f56397263c..b8747c320bd 100644 --- a/lib/l10n/es_SV.json +++ b/lib/l10n/es_SV.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -144,7 +138,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/es_UY.js b/lib/l10n/es_UY.js index 9d704840f62..38bdd0533fc 100644 --- a/lib/l10n/es_UY.js +++ b/lib/l10n/es_UY.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -75,17 +74,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -145,7 +139,6 @@ OC.L10N.register( "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -184,8 +177,13 @@ OC.L10N.register( "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/es_UY.json b/lib/l10n/es_UY.json index 73c67c95cb9..6879ce8fab0 100644 --- a/lib/l10n/es_UY.json +++ b/lib/l10n/es_UY.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", "See %s" : "Ver %s", "Sample configuration detected" : "Se ha detectado la configuración de muestra", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Se ha detectado que la configuración de muestra ha sido copiada. Esto puede arruiniar tu instalacón y no está soportado. Por favor lee la documentación antes de hacer cambios en el archivo config.php", @@ -73,17 +72,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor elimina el ajuste open_basedir de tu archivo php.ini o cambia a PHP de 64 bits. ", "Set an admin username." : "Establecer un Usuario administrador", "Set an admin password." : "Establecer la contraseña del administrador.", - "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", "Open »%s«" : "Abrir »%s«", "You are not allowed to share %s" : "No tienes permitido compartir %s", - "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", - "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", - "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", "Expiration date is in the past" : "La fecha de expiración se encuentra en el pasado", - "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", "Click the button below to open it." : "Haz click en el botón inferior para abrirlo. ", "The requested share does not exist anymore" : "El recurso compartido solicitado ya no existe", "Could not find category \"%s\"" : "No fue posible encontrar la categoria \"%s\"", @@ -143,7 +137,6 @@ "Login canceled by app" : "Inicio de sesión cancelado por la aplicación", "a safe home for all your data" : "un lugar seguro para todos tus datos", "File is currently busy, please try again later" : "El archivo se encuentra actualmente en uso, por favor intentalo más tarde. ", - "Can't read file" : "No se puede leer el archivo", "Application is not enabled" : "La aplicación está deshabilitada", "Authentication error" : "Error de autenticación", "Token expired. Please reload page." : "La ficha ha expirado. Por favor recarga la página.", @@ -182,8 +175,13 @@ "Storage connection error. %s" : "Se presentó un error con la conexión al almacenamiento. %s", "Storage is temporarily not available" : "El almacenamieto se encuentra temporalmente no disponible", "Storage connection timeout. %s" : "El tiempo de la conexión del almacenamiento se agotó. %s", - "Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s", - "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s", - "Invalid Federated Cloud ID" : "ID Inválido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Esto generalmente se resuelve dándole al servidor web acceso para escribir en el directorio config. ", + "Can't create or write into the data directory %s" : "No es posible crear o escribir en el directorio de datos %s", + "Invalid Federated Cloud ID" : "ID Inválido", + "Can’t increase permissions of %s" : "No es posible incrementar los privilegios de %s", + "Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado", + "Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "No es posible establecer la fecha de expiración más allá de %s días en el futuro", + "Can't read file" : "No se puede leer el archivo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/et_EE.js b/lib/l10n/et_EE.js index bb3e201bef6..e64fe967452 100644 --- a/lib/l10n/et_EE.js +++ b/lib/l10n/et_EE.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Ei saa kirjutada \"config\" kataloogi!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Tavaliselt saab selle lahendada andes veebiserverile seatete kataloogile \"config\" kirjutusõigused", "See %s" : "Vaata %s", "Sample configuration detected" : "Tuvastati näidisseaded", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Tuvastati, et kopeeriti näidisseaded. See võib lõhkuda sinu saidi ja see pole toetatud. Palun loe enne faili config.php muutmist dokumentatsiooni", @@ -58,17 +57,12 @@ OC.L10N.register( "For the best results, please consider using a GNU/Linux server instead." : "Parema tulemuse saavitamiseks palun kaalu serveris GNU/Linux kasutamist.", "Set an admin username." : "Määra admin kasutajanimi.", "Set an admin password." : "Määra admini parool.", - "Can't create or write into the data directory %s" : "Ei suuda luua või kirjutada andmete kataloogi %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Jagamise tagarakend %s peab kasutusele võtma OCP\\Share_Backend liidese", "Sharing backend %s not found" : "Jagamise tagarakendit %s ei leitud", "Sharing backend for %s not found" : "Jagamise tagarakendit %s jaoks ei leitud", "Open »%s«" : "Ava »%s«", "You are not allowed to share %s" : "Sul pole lubatud %s jagada", - "Can’t increase permissions of %s" : "Ei saa %s õigusi suurendada", - "Files can’t be shared with delete permissions" : "Faile ei saa jagada kustutamise õigusega", - "Files can’t be shared with create permissions" : "Faile ei saa jagada loomise õigusega", "Expiration date is in the past" : "Aegumise kuupäev on minevikus", - "Can’t set expiration date more than %s days in the future" : "Ei sa määrata aegumise kuupäeva rohkem kui %s päeva tulevikus", "Click the button below to open it." : "Vajuta allolevat nuppu, et see avada.", "The requested share does not exist anymore" : "Soovitud jagamist enam ei eksisteeri", "Could not find category \"%s\"" : "Ei leia kategooriat \"%s\"", @@ -127,7 +121,6 @@ OC.L10N.register( "User disabled" : "Kasutaja deaktiveeritud", "a safe home for all your data" : "turvaline koht sinu andmetele", "File is currently busy, please try again later" : "Fail on hetkel kasutuses, proovi hiljem uuesti", - "Can't read file" : "Faili lugemine ebaõnnestus", "Application is not enabled" : "Rakendus pole sisse lülitatud", "Authentication error" : "Autentimise viga", "Token expired. Please reload page." : "Kontrollkood aegus. Paelun lae leht uuesti.", @@ -147,8 +140,13 @@ OC.L10N.register( "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Palun muuda kataloogi õigused 0770-ks, et kataloogi sisu poleks teistele kasutajatele nähtav", "Could not obtain lock type %d on \"%s\"." : "Ei suutnud hankida %d tüüpi lukustust \"%s\".", "Storage is temporarily not available" : "Salvestusruum pole ajutiselt kättesaadav", - "Following databases are supported: %s" : "Toetatud on järgnevad andmebaasid: %s", - "Following platforms are supported: %s" : "Toetatud on järgnevad platformid: %s", - "Invalid Federated Cloud ID" : "Vigane liitpilve ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Tavaliselt saab selle lahendada andes veebiserverile seatete kataloogile \"config\" kirjutusõigused", + "Can't create or write into the data directory %s" : "Ei suuda luua või kirjutada andmete kataloogi %s", + "Invalid Federated Cloud ID" : "Vigane liitpilve ID", + "Can’t increase permissions of %s" : "Ei saa %s õigusi suurendada", + "Files can’t be shared with delete permissions" : "Faile ei saa jagada kustutamise õigusega", + "Files can’t be shared with create permissions" : "Faile ei saa jagada loomise õigusega", + "Can’t set expiration date more than %s days in the future" : "Ei sa määrata aegumise kuupäeva rohkem kui %s päeva tulevikus", + "Can't read file" : "Faili lugemine ebaõnnestus" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/et_EE.json b/lib/l10n/et_EE.json index 73e419a4819..c42f851ea08 100644 --- a/lib/l10n/et_EE.json +++ b/lib/l10n/et_EE.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Ei saa kirjutada \"config\" kataloogi!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Tavaliselt saab selle lahendada andes veebiserverile seatete kataloogile \"config\" kirjutusõigused", "See %s" : "Vaata %s", "Sample configuration detected" : "Tuvastati näidisseaded", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Tuvastati, et kopeeriti näidisseaded. See võib lõhkuda sinu saidi ja see pole toetatud. Palun loe enne faili config.php muutmist dokumentatsiooni", @@ -56,17 +55,12 @@ "For the best results, please consider using a GNU/Linux server instead." : "Parema tulemuse saavitamiseks palun kaalu serveris GNU/Linux kasutamist.", "Set an admin username." : "Määra admin kasutajanimi.", "Set an admin password." : "Määra admini parool.", - "Can't create or write into the data directory %s" : "Ei suuda luua või kirjutada andmete kataloogi %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Jagamise tagarakend %s peab kasutusele võtma OCP\\Share_Backend liidese", "Sharing backend %s not found" : "Jagamise tagarakendit %s ei leitud", "Sharing backend for %s not found" : "Jagamise tagarakendit %s jaoks ei leitud", "Open »%s«" : "Ava »%s«", "You are not allowed to share %s" : "Sul pole lubatud %s jagada", - "Can’t increase permissions of %s" : "Ei saa %s õigusi suurendada", - "Files can’t be shared with delete permissions" : "Faile ei saa jagada kustutamise õigusega", - "Files can’t be shared with create permissions" : "Faile ei saa jagada loomise õigusega", "Expiration date is in the past" : "Aegumise kuupäev on minevikus", - "Can’t set expiration date more than %s days in the future" : "Ei sa määrata aegumise kuupäeva rohkem kui %s päeva tulevikus", "Click the button below to open it." : "Vajuta allolevat nuppu, et see avada.", "The requested share does not exist anymore" : "Soovitud jagamist enam ei eksisteeri", "Could not find category \"%s\"" : "Ei leia kategooriat \"%s\"", @@ -125,7 +119,6 @@ "User disabled" : "Kasutaja deaktiveeritud", "a safe home for all your data" : "turvaline koht sinu andmetele", "File is currently busy, please try again later" : "Fail on hetkel kasutuses, proovi hiljem uuesti", - "Can't read file" : "Faili lugemine ebaõnnestus", "Application is not enabled" : "Rakendus pole sisse lülitatud", "Authentication error" : "Autentimise viga", "Token expired. Please reload page." : "Kontrollkood aegus. Paelun lae leht uuesti.", @@ -145,8 +138,13 @@ "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Palun muuda kataloogi õigused 0770-ks, et kataloogi sisu poleks teistele kasutajatele nähtav", "Could not obtain lock type %d on \"%s\"." : "Ei suutnud hankida %d tüüpi lukustust \"%s\".", "Storage is temporarily not available" : "Salvestusruum pole ajutiselt kättesaadav", - "Following databases are supported: %s" : "Toetatud on järgnevad andmebaasid: %s", - "Following platforms are supported: %s" : "Toetatud on järgnevad platformid: %s", - "Invalid Federated Cloud ID" : "Vigane liitpilve ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Tavaliselt saab selle lahendada andes veebiserverile seatete kataloogile \"config\" kirjutusõigused", + "Can't create or write into the data directory %s" : "Ei suuda luua või kirjutada andmete kataloogi %s", + "Invalid Federated Cloud ID" : "Vigane liitpilve ID", + "Can’t increase permissions of %s" : "Ei saa %s õigusi suurendada", + "Files can’t be shared with delete permissions" : "Faile ei saa jagada kustutamise õigusega", + "Files can’t be shared with create permissions" : "Faile ei saa jagada loomise õigusega", + "Can’t set expiration date more than %s days in the future" : "Ei sa määrata aegumise kuupäeva rohkem kui %s päeva tulevikus", + "Can't read file" : "Faili lugemine ebaõnnestus" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/eu.js b/lib/l10n/eu.js index a03841dd1f2..1f846c5e74a 100644 --- a/lib/l10n/eu.js +++ b/lib/l10n/eu.js @@ -2,10 +2,18 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Ezin da idatzi \"config\" karpetan!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Hau normalean konpondu daitekesweb zerbitzarira config karpetan idazteko baimenak emanez", + "This can usually be fixed by giving the webserver write access to the config directory." : "Hau normalean web zerbitzarira config karpetan idazteko baimenak emanez konpondu daiteke.", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Edo, config.php fitxategia irakurtzeko soilik mantendu nahi baduzu, ezarri \"config_is_read_only\" aukera 'egia' baliora barruan.", "See %s" : "Ikusi %s", + "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "%1$s aplikazioaren fitxategiak ez dira behar bezala ordezkatu. Ziurtatu zerbitzariarekin bateragarria den bertsioa dela.", "Sample configuration detected" : "Adibide-ezarpena detektatua", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detektatu da adibide-ezarpena kopiatu dela. Honek zure instalazioa apur dezake eta ez da onartzen. Irakurri dokumentazioa config.php fitxategia aldatu aurretik.", + "%s email verification" : "%sposta elektronikoaren egiaztapena", + "Email verification" : "Posta elektronikoaren egiaztapena", + "Click the following button to confirm your email." : "Egin klik hurrengo botoian zure posta elektronikoa berresteko.", + "Click the following link to confirm your email." : "Egin klik esteka honetan zure posta elektronikoa berresteko.", + "Confirm your email" : "Berretsi zure posta elektronikoa", + "Other activities" : "Beste jarduerak", "%1$s and %2$s" : "%1$s eta %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s eta %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s eta %4$s", @@ -13,17 +21,35 @@ OC.L10N.register( "Education Edition" : "Hezkuntza edizioa", "Enterprise bundle" : "Enpresa multzoa", "Groupware bundle" : "Talderanerako multzoa", + "Hub bundle" : "Hub sorta", "Social sharing bundle" : "Partekatze sozial multzoa", "PHP %s or higher is required." : "PHP %s edo berriagoa behar da.", "PHP with a version lower than %s is required." : "PHPren bertsioa %s baino txikiagoa izan behar da.", "%sbit or higher PHP required." : "%sbiteko edo PHP bertsio berriagoa behar da. ", + "The following architectures are supported: %s" : "Hurrengo arkitekturak onartzen dira: %s", "The following databases are supported: %s" : "Hurrengo datu-baseak onartzen dira: %s", "The command line tool %s could not be found" : "Komando lerroko %s tresna ezin da aurkitu", "The library %s is not available." : "%s liburutegia ez dago eskuragarri.", + "Library %1$s with a version higher than %2$s is required - available version %3$s." : "%1$sliburutegia %2$s baino handiagoa den bertsioa behar da - eskuragarri %3$s bertsioa.", + "Library %1$s with a version lower than %2$s is required - available version %3$s." : "%1$s liburutegia %2$sbaino txikiagoa den bertsioa behar da - eskuragarri %3$s bertsioa.", "The following platforms are supported: %s" : "Hurrengo plataformak onartzen dira: %s", "Server version %s or higher is required." : "Zerbitzariaren %s bertsioa edo berriagoa behar da.", "Server version %s or lower is required." : "Zerbitzariaren %s bertsioa edo zaharragoa behar da.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Saioa hasitako erabiltzailea administratzailea, azpiadministratzailea edo baimen berezi bat duena izan behar da ezarpen hau aldatzeko.", + "Logged in user must be an admin or sub admin" : "Saioa hasitako erabiltzailea administratzaile edo azpi-administratzailea izan behar du", "Logged in user must be an admin" : "Saioa hasitako erabiltzailea administratzailea izan behar da", + "Wiping of device %s has started" : "%s gailuaren garbiketa hasi da", + "Wiping of device »%s« has started" : "»%s« gailuaren garbiketa hasi da", + "»%s« started remote wipe" : "»%s« urruneko garbiketa hasi du", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "»%s« gailuak edo aplikazioak urruneko garbiketa prozesua hasi du. Prozesua amaitutakoan beste mezu elektroniko bat jasoko duzu", + "Wiping of device %s has finished" : "%s gailuaren garbiketa amaitu da", + "Wiping of device »%s« has finished" : "»%s« gailuaren garbiketa amaitu da", + "»%s« finished remote wipe" : "»%s« urruneko garbiketa amaitu du", + "Device or application »%s« has finished the remote wipe process." : "»%s« gailuak edo aplikazioak urruneko garbiketa prozesua amaitu du.", + "Remote wipe started" : "Urruneko garbiketa hasi da", + "A remote wipe was started on device %s" : "Urruneko garbiketa hasi da %s gailuan", + "Remote wipe finished" : "Urruneko garbiketa bukatu da", + "The remote wipe on %s has finished" : "Urruneko garbiketa amaitu da %s(e)n", "Authentication" : "Autentifikazioa", "Unknown filetype" : "Fitxategi mota ezezaguna", "Invalid image" : "Baliogabeko irudia", @@ -48,7 +74,10 @@ OC.L10N.register( "in a few seconds" : "segundo gutxitan", "seconds ago" : "duela segundu batzuk", "Empty file" : "Fitxategi hutsa", + "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "IDa duen modulua: %s ez da existitzen. Gaitu zure aplikazioen ezarpenetan edo jarri harremanetan administratzailearekin.", "File already exists" : "Badago izen bereko fitxategi bat", + "Invalid path" : "Bide-izen baliogabea", + "Failed to create file from template" : "Fitxategi berria txantiloitik sortzeak huts egin du", "Templates" : "Txantiloiak", "File name is a reserved word" : "Fitxategi izena hitz erreserbatua da", "File name contains at least one invalid character" : "Fitxategi izenak karaktere baliogabe bat du gutxienez ", @@ -81,7 +110,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Mesedez kendu open_basedir ezarpena zure php.ini-tik edo aldatu 64-biteko PHPra.", "Set an admin username." : "Ezarri administraziorako erabiltzaile izena.", "Set an admin password." : "Ezarri administraziorako pasahitza.", - "Can't create or write into the data directory %s" : "Ezin da %s datu karpeta sortu edo bertan idatzi ", + "Cannot create or write into the data directory %s" : "Ezin da sortu edo idatzi %s datu-direktorioan ", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "%s elkarbanaketa motorra OCP\\Share_Backend interfazea inplementatu behar du ", "Sharing backend %s not found" : "Ez da %s elkarbanaketa motorra aurkitu", "Sharing backend for %s not found" : "Ez da %srako elkarbanaketa motorrik aurkitu", @@ -91,10 +120,13 @@ OC.L10N.register( "Open »%s«" : "Ireki »%s«", "%1$s via %2$s" : "%2$s bidez, %1$s", "You are not allowed to share %s" : "Ez zadue %s elkarbanatzeko baimendua", - "Can’t increase permissions of %s" : "Ezin dira %s(r)en baimenak handitu", - "Files can’t be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu", + "Cannot increase permissions of %s" : "Ezin dira %s -(r)en baimenak handitu", + "Files cannot be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu", + "Files cannot be shared with create permissions" : "Fitxategiak ezin dira sortze baimenarekin partekatu", "Expiration date is in the past" : "Iraungitze-data iraganean dago", - "Can’t set expiration date more than %s days in the future" : "Ezin da iraungitze-data etorkizunean %s egun baino gehiagora jarri", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri","Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri"], + "Sharing is only allowed with group members" : "Partekatzea taldeko kideei baimenduta dago soilik", + "Sharing %s failed, because this item is already shared with user %s" : "%s partekatzeak huts egin du dagoeneko %serabiltzailearekin partekatuta dagoelako", "%1$s shared »%2$s« with you" : "%1$serabiltzaileak »%2$s« partekatu du zurekin", "%1$s shared »%2$s« with you." : "%1$serabiltzaileak »%2$s« partekatu du zurekin", "Click the button below to open it." : "Egin klik beheko botoian hura irekitzeko", @@ -145,6 +177,7 @@ OC.L10N.register( "Oct." : "Urr.", "Nov." : "Aza.", "Dec." : "Abe.", + "The user limit has been reached and the user was not created." : "Erabiltzaile mugara heldu da eta ez da erabiltzailea sortu.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Erabiltzaile-izenean karaktere hauek soilik erabili daitezke: \"a-z\", \"A-Z\", \"0-9\", eta \"_.@-'\"", "A valid username must be provided" : "Baliozko erabiltzaile izena eman behar da", "Username contains whitespace at the beginning or at the end" : "Erabiltzaile-izenak zuriuneren bat du hasieran edo amaieran", @@ -155,16 +188,22 @@ OC.L10N.register( "Could not create user" : "Ezin izan da erabiltzailea sortu", "User disabled" : "Erabiltzaile desgaituta", "Login canceled by app" : "Aplikazioa saioa bertan behera utzi du", + "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "\"%1$s\" aplikazioa ezin da instalatu, menpekotasun hauek betetzen ez direlako:%2$s", "a safe home for all your data" : "zure datu guztientzako toki segurua", "File is currently busy, please try again later" : "Fitxategia lanpetuta dago, saiatu berriro geroago", - "Can't read file" : "Ezin da fitxategia irakurri", + "Cannot read file" : "Ezin da fitxategia irakurri", "Application is not enabled" : "Aplikazioa ez dago gaituta", "Authentication error" : "Autentifikazio errorea", "Token expired. Please reload page." : "Tokena iraungitu da. Mesedez birkargatu orria.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Ez dago datubaseen (sqlite, mysql edo postgresql) driverrik instalatuta.", "Cannot write into \"config\" directory" : "Ezin da idatzi \"config\" karpetan", + "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Hau normalean konpondu daiteke web zerbitzariari konfigurazio direktoriorako sarbidea emanez. Ikus %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Edo, config.php fitxategia irakurtzeko soilik mantendu nahi baduzu, ezarri \"config_is_read_only\" aukera 'egia' baliora barruan. Ikusi %s", "Cannot write into \"apps\" directory" : "Ezin da idatzi \"apps\" karpetan", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Hau normalean web zerbitzariari aplikazioen direktorioko sarbidea emanez edo konfigurazioko fitxategian appstore desgaituz konpondu daiteke.", "Cannot create \"data\" directory" : "Ezin da \"data\" karpeta sortu", + "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Hau normalean konpondu daiteke web zerbitzariari root direktorioko idazketa sarbidea emanez. Ikus %s", + "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Normalean baimenak konpondu daitezke web zerbitzariari root direktorioko sarbidea emanez. Ikus %s.", "Setting locale to %s failed" : "Lokala %sra ezartzeak huts egin du", "Please install one of these locales on your system and restart your webserver." : "Instalatu hauetako lokal bat zure sisteman eta berrabiarazi zure web zerbitzaria.", "PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.", @@ -186,14 +225,27 @@ OC.L10N.register( "Your data directory must be an absolute path" : "Zure datuen karpeta bide-izen absolutua izan behar da", "Check the value of \"datadirectory\" in your configuration" : "Egiaztatu «datadirectory» aldagaiaren balioa zure konfigurazioan", "Your data directory is invalid" : "Zure datuen karpeta baliogabea da", + "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Ziurtatu datu direktorioaren erroan \".ocdata\" izeneko fitxategia dagoela.", + "Action \"%s\" not supported or implemented." : "\"%s\" ekintza ez da onartzen edo ez dago inplementaturik.", + "Authentication failed, wrong token or provider ID given" : "Autentifikazioak huts egin du, token edo hornitzaile ID okerra eman da", + "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Eskaera osatzeko parametroak falta dira. Falta diren parametroak: \"%s\"", + "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "\"%2$s\" hodei federazio-hornitzaileak dagoeneko erabiltzen duen \"%1$s\" IDa", + "Cloud Federation Provider with ID: \"%s\" does not exist." : "IDa duen hodei federazio-hornitzailea: \"%s\" ez da existitzen.", "Could not obtain lock type %d on \"%s\"." : "Ezin da lortu sarraia mota %d \"%s\"-an.", "Storage unauthorized. %s" : "Biltegiratzea ez dago baimenduta. %s", "Storage incomplete configuration. %s" : "Biltegiratzea ez da osorik konfiguratu. %s", "Storage connection error. %s" : "Biltegiratze-konexioaren errorea. %s", "Storage is temporarily not available" : "Biltegia ez dago erabilgarri aldi baterako", "Storage connection timeout. %s" : "Biltegiratze-konexioa denboraz kanpo geratu da. %s", - "Following databases are supported: %s" : "Hurrengo datubaseak onartzen dira: %s", - "Following platforms are supported: %s" : "Hurrengo plataformak onartzen dira: %s", - "Invalid Federated Cloud ID" : "Federatutako Hodei ID ezegokia" + "This can usually be fixed by giving the webserver write access to the config directory" : "Hau normalean konpondu daitekesweb zerbitzarira config karpetan idazteko baimenak emanez", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Edo, config.php fitxategia irakurtzeko soilik mantendu nahi baduzu, ezarri \"config_is_read_only\" aukera 'egia' baliora barruan.", + "Can't create or write into the data directory %s" : "Ezin da %s datu karpeta sortu edo bertan idatzi ", + "Invalid Federated Cloud ID" : "Federatutako Hodei ID ezegokia", + "Can’t increase permissions of %s" : "Ezin dira %s(r)en baimenak handitu", + "Files can’t be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu", + "Files can’t be shared with create permissions" : "Fitxategiak ezin dira sortze baimenarekin partekatu", + "Can’t set expiration date more than %s days in the future" : "Ezin da iraungitze-data etorkizunean %s egun baino gehiagora jarri", + "Can't read file" : "Ezin da fitxategia irakurri", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Hau normalean konpondu daiteke web zerbitzariari aplikazioen direktorioko sarbidea emanez edo konfigurazioko fitxategian appstore desgaituz." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/eu.json b/lib/l10n/eu.json index ca31c12b599..926ed393549 100644 --- a/lib/l10n/eu.json +++ b/lib/l10n/eu.json @@ -1,9 +1,17 @@ { "translations": { "Cannot write into \"config\" directory!" : "Ezin da idatzi \"config\" karpetan!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Hau normalean konpondu daitekesweb zerbitzarira config karpetan idazteko baimenak emanez", + "This can usually be fixed by giving the webserver write access to the config directory." : "Hau normalean web zerbitzarira config karpetan idazteko baimenak emanez konpondu daiteke.", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Edo, config.php fitxategia irakurtzeko soilik mantendu nahi baduzu, ezarri \"config_is_read_only\" aukera 'egia' baliora barruan.", "See %s" : "Ikusi %s", + "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "%1$s aplikazioaren fitxategiak ez dira behar bezala ordezkatu. Ziurtatu zerbitzariarekin bateragarria den bertsioa dela.", "Sample configuration detected" : "Adibide-ezarpena detektatua", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detektatu da adibide-ezarpena kopiatu dela. Honek zure instalazioa apur dezake eta ez da onartzen. Irakurri dokumentazioa config.php fitxategia aldatu aurretik.", + "%s email verification" : "%sposta elektronikoaren egiaztapena", + "Email verification" : "Posta elektronikoaren egiaztapena", + "Click the following button to confirm your email." : "Egin klik hurrengo botoian zure posta elektronikoa berresteko.", + "Click the following link to confirm your email." : "Egin klik esteka honetan zure posta elektronikoa berresteko.", + "Confirm your email" : "Berretsi zure posta elektronikoa", + "Other activities" : "Beste jarduerak", "%1$s and %2$s" : "%1$s eta %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s eta %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s eta %4$s", @@ -11,17 +19,35 @@ "Education Edition" : "Hezkuntza edizioa", "Enterprise bundle" : "Enpresa multzoa", "Groupware bundle" : "Talderanerako multzoa", + "Hub bundle" : "Hub sorta", "Social sharing bundle" : "Partekatze sozial multzoa", "PHP %s or higher is required." : "PHP %s edo berriagoa behar da.", "PHP with a version lower than %s is required." : "PHPren bertsioa %s baino txikiagoa izan behar da.", "%sbit or higher PHP required." : "%sbiteko edo PHP bertsio berriagoa behar da. ", + "The following architectures are supported: %s" : "Hurrengo arkitekturak onartzen dira: %s", "The following databases are supported: %s" : "Hurrengo datu-baseak onartzen dira: %s", "The command line tool %s could not be found" : "Komando lerroko %s tresna ezin da aurkitu", "The library %s is not available." : "%s liburutegia ez dago eskuragarri.", + "Library %1$s with a version higher than %2$s is required - available version %3$s." : "%1$sliburutegia %2$s baino handiagoa den bertsioa behar da - eskuragarri %3$s bertsioa.", + "Library %1$s with a version lower than %2$s is required - available version %3$s." : "%1$s liburutegia %2$sbaino txikiagoa den bertsioa behar da - eskuragarri %3$s bertsioa.", "The following platforms are supported: %s" : "Hurrengo plataformak onartzen dira: %s", "Server version %s or higher is required." : "Zerbitzariaren %s bertsioa edo berriagoa behar da.", "Server version %s or lower is required." : "Zerbitzariaren %s bertsioa edo zaharragoa behar da.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Saioa hasitako erabiltzailea administratzailea, azpiadministratzailea edo baimen berezi bat duena izan behar da ezarpen hau aldatzeko.", + "Logged in user must be an admin or sub admin" : "Saioa hasitako erabiltzailea administratzaile edo azpi-administratzailea izan behar du", "Logged in user must be an admin" : "Saioa hasitako erabiltzailea administratzailea izan behar da", + "Wiping of device %s has started" : "%s gailuaren garbiketa hasi da", + "Wiping of device »%s« has started" : "»%s« gailuaren garbiketa hasi da", + "»%s« started remote wipe" : "»%s« urruneko garbiketa hasi du", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "»%s« gailuak edo aplikazioak urruneko garbiketa prozesua hasi du. Prozesua amaitutakoan beste mezu elektroniko bat jasoko duzu", + "Wiping of device %s has finished" : "%s gailuaren garbiketa amaitu da", + "Wiping of device »%s« has finished" : "»%s« gailuaren garbiketa amaitu da", + "»%s« finished remote wipe" : "»%s« urruneko garbiketa amaitu du", + "Device or application »%s« has finished the remote wipe process." : "»%s« gailuak edo aplikazioak urruneko garbiketa prozesua amaitu du.", + "Remote wipe started" : "Urruneko garbiketa hasi da", + "A remote wipe was started on device %s" : "Urruneko garbiketa hasi da %s gailuan", + "Remote wipe finished" : "Urruneko garbiketa bukatu da", + "The remote wipe on %s has finished" : "Urruneko garbiketa amaitu da %s(e)n", "Authentication" : "Autentifikazioa", "Unknown filetype" : "Fitxategi mota ezezaguna", "Invalid image" : "Baliogabeko irudia", @@ -46,7 +72,10 @@ "in a few seconds" : "segundo gutxitan", "seconds ago" : "duela segundu batzuk", "Empty file" : "Fitxategi hutsa", + "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "IDa duen modulua: %s ez da existitzen. Gaitu zure aplikazioen ezarpenetan edo jarri harremanetan administratzailearekin.", "File already exists" : "Badago izen bereko fitxategi bat", + "Invalid path" : "Bide-izen baliogabea", + "Failed to create file from template" : "Fitxategi berria txantiloitik sortzeak huts egin du", "Templates" : "Txantiloiak", "File name is a reserved word" : "Fitxategi izena hitz erreserbatua da", "File name contains at least one invalid character" : "Fitxategi izenak karaktere baliogabe bat du gutxienez ", @@ -79,7 +108,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Mesedez kendu open_basedir ezarpena zure php.ini-tik edo aldatu 64-biteko PHPra.", "Set an admin username." : "Ezarri administraziorako erabiltzaile izena.", "Set an admin password." : "Ezarri administraziorako pasahitza.", - "Can't create or write into the data directory %s" : "Ezin da %s datu karpeta sortu edo bertan idatzi ", + "Cannot create or write into the data directory %s" : "Ezin da sortu edo idatzi %s datu-direktorioan ", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "%s elkarbanaketa motorra OCP\\Share_Backend interfazea inplementatu behar du ", "Sharing backend %s not found" : "Ez da %s elkarbanaketa motorra aurkitu", "Sharing backend for %s not found" : "Ez da %srako elkarbanaketa motorrik aurkitu", @@ -89,10 +118,13 @@ "Open »%s«" : "Ireki »%s«", "%1$s via %2$s" : "%2$s bidez, %1$s", "You are not allowed to share %s" : "Ez zadue %s elkarbanatzeko baimendua", - "Can’t increase permissions of %s" : "Ezin dira %s(r)en baimenak handitu", - "Files can’t be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu", + "Cannot increase permissions of %s" : "Ezin dira %s -(r)en baimenak handitu", + "Files cannot be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu", + "Files cannot be shared with create permissions" : "Fitxategiak ezin dira sortze baimenarekin partekatu", "Expiration date is in the past" : "Iraungitze-data iraganean dago", - "Can’t set expiration date more than %s days in the future" : "Ezin da iraungitze-data etorkizunean %s egun baino gehiagora jarri", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri","Ezin da iraungitze-data etorkizunean %n egun baino gehiagora jarri"], + "Sharing is only allowed with group members" : "Partekatzea taldeko kideei baimenduta dago soilik", + "Sharing %s failed, because this item is already shared with user %s" : "%s partekatzeak huts egin du dagoeneko %serabiltzailearekin partekatuta dagoelako", "%1$s shared »%2$s« with you" : "%1$serabiltzaileak »%2$s« partekatu du zurekin", "%1$s shared »%2$s« with you." : "%1$serabiltzaileak »%2$s« partekatu du zurekin", "Click the button below to open it." : "Egin klik beheko botoian hura irekitzeko", @@ -143,6 +175,7 @@ "Oct." : "Urr.", "Nov." : "Aza.", "Dec." : "Abe.", + "The user limit has been reached and the user was not created." : "Erabiltzaile mugara heldu da eta ez da erabiltzailea sortu.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Erabiltzaile-izenean karaktere hauek soilik erabili daitezke: \"a-z\", \"A-Z\", \"0-9\", eta \"_.@-'\"", "A valid username must be provided" : "Baliozko erabiltzaile izena eman behar da", "Username contains whitespace at the beginning or at the end" : "Erabiltzaile-izenak zuriuneren bat du hasieran edo amaieran", @@ -153,16 +186,22 @@ "Could not create user" : "Ezin izan da erabiltzailea sortu", "User disabled" : "Erabiltzaile desgaituta", "Login canceled by app" : "Aplikazioa saioa bertan behera utzi du", + "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "\"%1$s\" aplikazioa ezin da instalatu, menpekotasun hauek betetzen ez direlako:%2$s", "a safe home for all your data" : "zure datu guztientzako toki segurua", "File is currently busy, please try again later" : "Fitxategia lanpetuta dago, saiatu berriro geroago", - "Can't read file" : "Ezin da fitxategia irakurri", + "Cannot read file" : "Ezin da fitxategia irakurri", "Application is not enabled" : "Aplikazioa ez dago gaituta", "Authentication error" : "Autentifikazio errorea", "Token expired. Please reload page." : "Tokena iraungitu da. Mesedez birkargatu orria.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Ez dago datubaseen (sqlite, mysql edo postgresql) driverrik instalatuta.", "Cannot write into \"config\" directory" : "Ezin da idatzi \"config\" karpetan", + "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Hau normalean konpondu daiteke web zerbitzariari konfigurazio direktoriorako sarbidea emanez. Ikus %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Edo, config.php fitxategia irakurtzeko soilik mantendu nahi baduzu, ezarri \"config_is_read_only\" aukera 'egia' baliora barruan. Ikusi %s", "Cannot write into \"apps\" directory" : "Ezin da idatzi \"apps\" karpetan", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Hau normalean web zerbitzariari aplikazioen direktorioko sarbidea emanez edo konfigurazioko fitxategian appstore desgaituz konpondu daiteke.", "Cannot create \"data\" directory" : "Ezin da \"data\" karpeta sortu", + "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Hau normalean konpondu daiteke web zerbitzariari root direktorioko idazketa sarbidea emanez. Ikus %s", + "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Normalean baimenak konpondu daitezke web zerbitzariari root direktorioko sarbidea emanez. Ikus %s.", "Setting locale to %s failed" : "Lokala %sra ezartzeak huts egin du", "Please install one of these locales on your system and restart your webserver." : "Instalatu hauetako lokal bat zure sisteman eta berrabiarazi zure web zerbitzaria.", "PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.", @@ -184,14 +223,27 @@ "Your data directory must be an absolute path" : "Zure datuen karpeta bide-izen absolutua izan behar da", "Check the value of \"datadirectory\" in your configuration" : "Egiaztatu «datadirectory» aldagaiaren balioa zure konfigurazioan", "Your data directory is invalid" : "Zure datuen karpeta baliogabea da", + "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Ziurtatu datu direktorioaren erroan \".ocdata\" izeneko fitxategia dagoela.", + "Action \"%s\" not supported or implemented." : "\"%s\" ekintza ez da onartzen edo ez dago inplementaturik.", + "Authentication failed, wrong token or provider ID given" : "Autentifikazioak huts egin du, token edo hornitzaile ID okerra eman da", + "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Eskaera osatzeko parametroak falta dira. Falta diren parametroak: \"%s\"", + "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "\"%2$s\" hodei federazio-hornitzaileak dagoeneko erabiltzen duen \"%1$s\" IDa", + "Cloud Federation Provider with ID: \"%s\" does not exist." : "IDa duen hodei federazio-hornitzailea: \"%s\" ez da existitzen.", "Could not obtain lock type %d on \"%s\"." : "Ezin da lortu sarraia mota %d \"%s\"-an.", "Storage unauthorized. %s" : "Biltegiratzea ez dago baimenduta. %s", "Storage incomplete configuration. %s" : "Biltegiratzea ez da osorik konfiguratu. %s", "Storage connection error. %s" : "Biltegiratze-konexioaren errorea. %s", "Storage is temporarily not available" : "Biltegia ez dago erabilgarri aldi baterako", "Storage connection timeout. %s" : "Biltegiratze-konexioa denboraz kanpo geratu da. %s", - "Following databases are supported: %s" : "Hurrengo datubaseak onartzen dira: %s", - "Following platforms are supported: %s" : "Hurrengo plataformak onartzen dira: %s", - "Invalid Federated Cloud ID" : "Federatutako Hodei ID ezegokia" + "This can usually be fixed by giving the webserver write access to the config directory" : "Hau normalean konpondu daitekesweb zerbitzarira config karpetan idazteko baimenak emanez", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Edo, config.php fitxategia irakurtzeko soilik mantendu nahi baduzu, ezarri \"config_is_read_only\" aukera 'egia' baliora barruan.", + "Can't create or write into the data directory %s" : "Ezin da %s datu karpeta sortu edo bertan idatzi ", + "Invalid Federated Cloud ID" : "Federatutako Hodei ID ezegokia", + "Can’t increase permissions of %s" : "Ezin dira %s(r)en baimenak handitu", + "Files can’t be shared with delete permissions" : "Fitxategiak ezin dira ezabatze baimenarekin partekatu", + "Files can’t be shared with create permissions" : "Fitxategiak ezin dira sortze baimenarekin partekatu", + "Can’t set expiration date more than %s days in the future" : "Ezin da iraungitze-data etorkizunean %s egun baino gehiagora jarri", + "Can't read file" : "Ezin da fitxategia irakurri", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Hau normalean konpondu daiteke web zerbitzariari aplikazioen direktorioko sarbidea emanez edo konfigurazioko fitxategian appstore desgaituz." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/fa.js b/lib/l10n/fa.js index a0dc3b145d3..bbd164eb5df 100644 --- a/lib/l10n/fa.js +++ b/lib/l10n/fa.js @@ -2,10 +2,7 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "نمیتوانید داخل دایرکتوری \"config\" تغییراتی ایجاد کنید", - "This can usually be fixed by giving the webserver write access to the config directory" : "این امر معمولاً با دسترسی به نوشتن وب سرور به فهرست تنظیمات قابل حل است", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید.", "See %s" : "مشاهده %s", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید. دیدن%s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "فایل های برنامه %1$sبه درستی تعویض نشد. اطمینان حاصل کنید که این یک نسخه سازگار با سرور است.", "Sample configuration detected" : "فایل پیکربندی نمونه پیدا شد", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "تشخیص داده شده است که پیکربندی نمونه کپی شده است. این می تواند نصب شما را خراب کند و پشتیبانی نمی شود. لطفاً قبل از انجام تغییرات در config.php ، اسناد را بخوانید", @@ -91,7 +88,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "لطفاً تنظیمات open_baseir را درون php.ini خود حذف کنید یا به PHP 64 بیتی تغییر دهید.", "Set an admin username." : "یک نام کاربری برای مدیر تنظیم نمایید.", "Set an admin password." : "یک رمزعبور برای مدیر تنظیم نمایید.", - "Can't create or write into the data directory %s" : "%sنمی توانید در فهرست داده ایجاد یا نوشتن کنید", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "به اشتراک گذاشتن باطن باید رابط OCP \\ Share_Backend %sرا پیاده سازی کند", "Sharing backend %s not found" : "به اشتراک گذاشتن باطن%s یافت نشد", "Sharing backend for %s not found" : "به اشتراک گذاشتن باطن برای%s یافت نشد", @@ -101,11 +97,7 @@ OC.L10N.register( "Open »%s«" : "باز کن »%s«", "%1$s via %2$s" : "%1$s از طریق %2$s", "You are not allowed to share %s" : "شما مجاز به اشتراک گذاری نیستید%s", - "Can’t increase permissions of %s" : "مجوزها را نمی توان افزایش داد%s", - "Files can’t be shared with delete permissions" : "فایلها را نمی توان با مجوزهای حذف حذف کرد", - "Files can’t be shared with create permissions" : "فایلها را نمی توان با ایجاد مجوزها به اشتراک گذاشت", "Expiration date is in the past" : "تاریخ انقضا در گذشته است", - "Can’t set expiration date more than %s days in the future" : "نمی توان تاریخ انقضا را بیش%s از روزها در آینده تعیین کرد", "%1$s shared »%2$s« with you" : "%1$s به اشتراک گذاشته » %2$s« با شما", "%1$s shared »%2$s« with you." : "%1$s به اشتراک گذاشته » %2$s« با شما", "Click the button below to open it." : "برای باز کردن آن روی دکمه زیر کلیک کنید.", @@ -168,13 +160,13 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "%2$sبرنامه %1$sنصب نمی شود زیرا وابستگی های زیر برآورده نشده است:", "a safe home for all your data" : "خانه ای امن برای تمام داده های شما", "File is currently busy, please try again later" : "فایل در حال حاضر مشغول است، لطفا مجددا تلاش کنید", - "Can't read file" : "امکان خواندن فایل وجود ندارد", "Application is not enabled" : "برنامه فعال نشده است", "Authentication error" : "خطا در اعتبار سنجی", "Token expired. Please reload page." : "Token منقضی شده است. لطفا دوباره صفحه را بارگذاری نمایید.", "No database drivers (sqlite, mysql, or postgresql) installed." : "هیچ درایور پایگاه داده (sqlite ، mysql یا postgresql) نصب نشده است.", "Cannot write into \"config\" directory" : "امکان نوشتن درون شاخهی \"config\" وجود ندارد", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "%sاین امر معمولاً با دسترسی به نوشتن وب سرور به فهرست تنظیمات قابل حل است. دیدن", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید. دیدن%s", "Cannot write into \"apps\" directory" : "نمی توان در فهرست \"برنامه ها\" نوشت", "Cannot create \"data\" directory" : "دایرکتوری \"داده\" ایجاد نمی شود", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "این امر معمولاً با دسترسی به نوشتن وب سرور به فهرست اصلی قابل حل است. دیدن%s", @@ -212,8 +204,14 @@ OC.L10N.register( "Storage connection error. %s" : "خطای اتصال ذخیره سازی%s", "Storage is temporarily not available" : "ذخیره سازی به طور موقت در دسترس نیست", "Storage connection timeout. %s" : "مدت زمان اتصال ذخیره سازی%s", - "Following databases are supported: %s" : "پایگاهداده های ذکر شده مورد نیاز است: %s", - "Following platforms are supported: %s" : "سیستم عامل های زیر پشتیبانی می شوند%s", - "Invalid Federated Cloud ID" : "شناسه فدرال شده با ابر Cloud" + "This can usually be fixed by giving the webserver write access to the config directory" : "این امر معمولاً با دسترسی به نوشتن وب سرور به فهرست تنظیمات قابل حل است", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید.", + "Can't create or write into the data directory %s" : "%sنمی توانید در فهرست داده ایجاد یا نوشتن کنید", + "Invalid Federated Cloud ID" : "شناسه فدرال شده با ابر Cloud", + "Can’t increase permissions of %s" : "مجوزها را نمی توان افزایش داد%s", + "Files can’t be shared with delete permissions" : "فایلها را نمی توان با مجوزهای حذف حذف کرد", + "Files can’t be shared with create permissions" : "فایلها را نمی توان با ایجاد مجوزها به اشتراک گذاشت", + "Can’t set expiration date more than %s days in the future" : "نمی توان تاریخ انقضا را بیش%s از روزها در آینده تعیین کرد", + "Can't read file" : "امکان خواندن فایل وجود ندارد" }, "nplurals=2; plural=(n > 1);"); diff --git a/lib/l10n/fa.json b/lib/l10n/fa.json index 1bf5250e9eb..6285fe70cdf 100644 --- a/lib/l10n/fa.json +++ b/lib/l10n/fa.json @@ -1,9 +1,6 @@ { "translations": { "Cannot write into \"config\" directory!" : "نمیتوانید داخل دایرکتوری \"config\" تغییراتی ایجاد کنید", - "This can usually be fixed by giving the webserver write access to the config directory" : "این امر معمولاً با دسترسی به نوشتن وب سرور به فهرست تنظیمات قابل حل است", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید.", "See %s" : "مشاهده %s", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید. دیدن%s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "فایل های برنامه %1$sبه درستی تعویض نشد. اطمینان حاصل کنید که این یک نسخه سازگار با سرور است.", "Sample configuration detected" : "فایل پیکربندی نمونه پیدا شد", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "تشخیص داده شده است که پیکربندی نمونه کپی شده است. این می تواند نصب شما را خراب کند و پشتیبانی نمی شود. لطفاً قبل از انجام تغییرات در config.php ، اسناد را بخوانید", @@ -89,7 +86,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "لطفاً تنظیمات open_baseir را درون php.ini خود حذف کنید یا به PHP 64 بیتی تغییر دهید.", "Set an admin username." : "یک نام کاربری برای مدیر تنظیم نمایید.", "Set an admin password." : "یک رمزعبور برای مدیر تنظیم نمایید.", - "Can't create or write into the data directory %s" : "%sنمی توانید در فهرست داده ایجاد یا نوشتن کنید", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "به اشتراک گذاشتن باطن باید رابط OCP \\ Share_Backend %sرا پیاده سازی کند", "Sharing backend %s not found" : "به اشتراک گذاشتن باطن%s یافت نشد", "Sharing backend for %s not found" : "به اشتراک گذاشتن باطن برای%s یافت نشد", @@ -99,11 +95,7 @@ "Open »%s«" : "باز کن »%s«", "%1$s via %2$s" : "%1$s از طریق %2$s", "You are not allowed to share %s" : "شما مجاز به اشتراک گذاری نیستید%s", - "Can’t increase permissions of %s" : "مجوزها را نمی توان افزایش داد%s", - "Files can’t be shared with delete permissions" : "فایلها را نمی توان با مجوزهای حذف حذف کرد", - "Files can’t be shared with create permissions" : "فایلها را نمی توان با ایجاد مجوزها به اشتراک گذاشت", "Expiration date is in the past" : "تاریخ انقضا در گذشته است", - "Can’t set expiration date more than %s days in the future" : "نمی توان تاریخ انقضا را بیش%s از روزها در آینده تعیین کرد", "%1$s shared »%2$s« with you" : "%1$s به اشتراک گذاشته » %2$s« با شما", "%1$s shared »%2$s« with you." : "%1$s به اشتراک گذاشته » %2$s« با شما", "Click the button below to open it." : "برای باز کردن آن روی دکمه زیر کلیک کنید.", @@ -166,13 +158,13 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "%2$sبرنامه %1$sنصب نمی شود زیرا وابستگی های زیر برآورده نشده است:", "a safe home for all your data" : "خانه ای امن برای تمام داده های شما", "File is currently busy, please try again later" : "فایل در حال حاضر مشغول است، لطفا مجددا تلاش کنید", - "Can't read file" : "امکان خواندن فایل وجود ندارد", "Application is not enabled" : "برنامه فعال نشده است", "Authentication error" : "خطا در اعتبار سنجی", "Token expired. Please reload page." : "Token منقضی شده است. لطفا دوباره صفحه را بارگذاری نمایید.", "No database drivers (sqlite, mysql, or postgresql) installed." : "هیچ درایور پایگاه داده (sqlite ، mysql یا postgresql) نصب نشده است.", "Cannot write into \"config\" directory" : "امکان نوشتن درون شاخهی \"config\" وجود ندارد", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "%sاین امر معمولاً با دسترسی به نوشتن وب سرور به فهرست تنظیمات قابل حل است. دیدن", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید. دیدن%s", "Cannot write into \"apps\" directory" : "نمی توان در فهرست \"برنامه ها\" نوشت", "Cannot create \"data\" directory" : "دایرکتوری \"داده\" ایجاد نمی شود", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "این امر معمولاً با دسترسی به نوشتن وب سرور به فهرست اصلی قابل حل است. دیدن%s", @@ -210,8 +202,14 @@ "Storage connection error. %s" : "خطای اتصال ذخیره سازی%s", "Storage is temporarily not available" : "ذخیره سازی به طور موقت در دسترس نیست", "Storage connection timeout. %s" : "مدت زمان اتصال ذخیره سازی%s", - "Following databases are supported: %s" : "پایگاهداده های ذکر شده مورد نیاز است: %s", - "Following platforms are supported: %s" : "سیستم عامل های زیر پشتیبانی می شوند%s", - "Invalid Federated Cloud ID" : "شناسه فدرال شده با ابر Cloud" + "This can usually be fixed by giving the webserver write access to the config directory" : "این امر معمولاً با دسترسی به نوشتن وب سرور به فهرست تنظیمات قابل حل است", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "یا اگر ترجیح می دهید پرونده config.php را فقط بخوانید ، گزینه \"config_is_read_only\" را در آن تنظیم کنید.", + "Can't create or write into the data directory %s" : "%sنمی توانید در فهرست داده ایجاد یا نوشتن کنید", + "Invalid Federated Cloud ID" : "شناسه فدرال شده با ابر Cloud", + "Can’t increase permissions of %s" : "مجوزها را نمی توان افزایش داد%s", + "Files can’t be shared with delete permissions" : "فایلها را نمی توان با مجوزهای حذف حذف کرد", + "Files can’t be shared with create permissions" : "فایلها را نمی توان با ایجاد مجوزها به اشتراک گذاشت", + "Can’t set expiration date more than %s days in the future" : "نمی توان تاریخ انقضا را بیش%s از روزها در آینده تعیین کرد", + "Can't read file" : "امکان خواندن فایل وجود ندارد" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/lib/l10n/fi.js b/lib/l10n/fi.js index 61760b80611..1c77b242abf 100644 --- a/lib/l10n/fi.js +++ b/lib/l10n/fi.js @@ -2,10 +2,13 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Hakemistoon \"config\" kirjoittaminen ei onnistu!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Tämän voi yleensä korjata antamalla http-palvelimelle kirjoitusoikeuden asetushakemistoon", "See %s" : "Katso %s", "Sample configuration detected" : "Esimerkkimääritykset havaittu", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "On havaittu, että esimerkkimäärityksen on kopioitu. Se voi rikkoa asennuksesi, eikä sitä tueta. Lue ohjeet ennen kuin muutat config.php tiedostoa.", + "Email verification" : "Sähköpostin vahvistus", + "Click the following button to confirm your email." : "Napsauta seuraavaa painiketta vahvistaaksesi sähköpostiosoitteesi.", + "Click the following link to confirm your email." : "Napsauta seuraavaa linkkiä vahvistaaksesi sähköpostiosoitteesi.", + "Confirm your email" : "Vahvista sähköpostiosoitteesi", "%1$s and %2$s" : "%1$s ja %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s ja %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s ja %4$s", @@ -13,6 +16,7 @@ OC.L10N.register( "PHP %s or higher is required." : "PHP %s tai sitä uudempi vaaditaan.", "PHP with a version lower than %s is required." : "PHP versiota %s alempi tarvitaan.", "%sbit or higher PHP required." : "%s-bit tai korkeampi PHP vaaditaan.", + "The following architectures are supported: %s" : "Seuraavat arkkitehtuurit ovat tuettuja: %s", "The following databases are supported: %s" : "Seuraavat tietokannat ovat tuettuja: %s", "The command line tool %s could not be found" : "Komentorivityökalua %s ei löytynyt", "The library %s is not available." : "Kirjastoa %s ei ole käytettävissä.", @@ -53,6 +57,10 @@ OC.L10N.register( "in a few seconds" : "muutaman sekunnin päästä", "seconds ago" : "sekunteja sitten", "Empty file" : "Tyhjä tiedosto", + "File already exists" : "Tiedosto on jo olemassa", + "Invalid path" : "Virheellinen polku", + "Failed to create file from template" : "Tiedoston luominen mallipohjasta epäonnistui", + "Templates" : "Mallipohjat", "File name is a reserved word" : "Tiedoston nimi on varattu sana", "File name contains at least one invalid character" : "Tiedoston nimi sisältää ainakin yhden virheellisen merkin", "File name is too long" : "Tiedoston nimi on liian pitkä", @@ -84,12 +92,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Poista open_basedir-asetus php.ini-tiedostosta tai vaihda 64-bittiseen PHP:hen.", "Set an admin username." : "Aseta ylläpitäjän käyttäjätunnus.", "Set an admin password." : "Aseta ylläpitäjän salasana.", - "Can't create or write into the data directory %s" : "Ei voi luoda tai kirjoittaa data-hakemistoon %s", "Sharing backend %s not found" : "Jakamisen taustaosaa %s ei löytynyt", "Sharing backend for %s not found" : "Jakamisen taustaosaa kohteelle %s ei löytynyt", "Open »%s«" : "Avaa »%s«", "You are not allowed to share %s" : "Oikeutesi eivät riitä kohteen %s jakamiseen.", "Expiration date is in the past" : "Vanhenemispäivä on menneisyydessä", + "Sharing is only allowed with group members" : "Jakaminen on sallittu vain ryhmäjäsenten kesken", "%1$s shared »%2$s« with you" : "%1$s jakoi kohteen »%2$s« kanssasi", "%1$s shared »%2$s« with you." : "%1$s jakoi kohteen »%2$s« kanssasi.", "Click the button below to open it." : "Napsauta alla olevaa painiketta avataksesi sen.", @@ -152,7 +160,7 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Sovellusta \"%1$s\" ei voi asentaa, koska seuraavat riippuvuudet eivät täyty: %2$s", "a safe home for all your data" : "turvallinen koti kaikille tiedostoillesi", "File is currently busy, please try again later" : "Tiedosto on parhaillaan käytössä, yritä myöhemmin uudelleen", - "Can't read file" : "Tiedostoa ei voi lukea", + "Cannot read file" : "Tiedostoa ei voi lukea", "Application is not enabled" : "Sovellusta ei ole otettu käyttöön", "Authentication error" : "Tunnistautumisvirhe", "Token expired. Please reload page." : "Valtuutus vanheni. Lataa sivu uudelleen.", @@ -185,8 +193,9 @@ OC.L10N.register( "Storage connection error. %s" : "Tallennustilan yhteysvirhe. %s", "Storage is temporarily not available" : "Tallennustila on tilapäisesti pois käytöstä", "Storage connection timeout. %s" : "Tallennustilan yhteyden aikakatkaisu. %s", - "Following databases are supported: %s" : "Seuraavat tietokannat ovat tuettuja: %s", - "Following platforms are supported: %s" : "Seuraavat alustat ovat tuettuja: %s", - "Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste" + "This can usually be fixed by giving the webserver write access to the config directory" : "Tämän voi yleensä korjata antamalla http-palvelimelle kirjoitusoikeuden asetushakemistoon", + "Can't create or write into the data directory %s" : "Ei voi luoda tai kirjoittaa data-hakemistoon %s", + "Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste", + "Can't read file" : "Tiedostoa ei voi lukea" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/fi.json b/lib/l10n/fi.json index afb0b9a6a6b..4311f4933cd 100644 --- a/lib/l10n/fi.json +++ b/lib/l10n/fi.json @@ -1,9 +1,12 @@ { "translations": { "Cannot write into \"config\" directory!" : "Hakemistoon \"config\" kirjoittaminen ei onnistu!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Tämän voi yleensä korjata antamalla http-palvelimelle kirjoitusoikeuden asetushakemistoon", "See %s" : "Katso %s", "Sample configuration detected" : "Esimerkkimääritykset havaittu", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "On havaittu, että esimerkkimäärityksen on kopioitu. Se voi rikkoa asennuksesi, eikä sitä tueta. Lue ohjeet ennen kuin muutat config.php tiedostoa.", + "Email verification" : "Sähköpostin vahvistus", + "Click the following button to confirm your email." : "Napsauta seuraavaa painiketta vahvistaaksesi sähköpostiosoitteesi.", + "Click the following link to confirm your email." : "Napsauta seuraavaa linkkiä vahvistaaksesi sähköpostiosoitteesi.", + "Confirm your email" : "Vahvista sähköpostiosoitteesi", "%1$s and %2$s" : "%1$s ja %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s ja %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s ja %4$s", @@ -11,6 +14,7 @@ "PHP %s or higher is required." : "PHP %s tai sitä uudempi vaaditaan.", "PHP with a version lower than %s is required." : "PHP versiota %s alempi tarvitaan.", "%sbit or higher PHP required." : "%s-bit tai korkeampi PHP vaaditaan.", + "The following architectures are supported: %s" : "Seuraavat arkkitehtuurit ovat tuettuja: %s", "The following databases are supported: %s" : "Seuraavat tietokannat ovat tuettuja: %s", "The command line tool %s could not be found" : "Komentorivityökalua %s ei löytynyt", "The library %s is not available." : "Kirjastoa %s ei ole käytettävissä.", @@ -51,6 +55,10 @@ "in a few seconds" : "muutaman sekunnin päästä", "seconds ago" : "sekunteja sitten", "Empty file" : "Tyhjä tiedosto", + "File already exists" : "Tiedosto on jo olemassa", + "Invalid path" : "Virheellinen polku", + "Failed to create file from template" : "Tiedoston luominen mallipohjasta epäonnistui", + "Templates" : "Mallipohjat", "File name is a reserved word" : "Tiedoston nimi on varattu sana", "File name contains at least one invalid character" : "Tiedoston nimi sisältää ainakin yhden virheellisen merkin", "File name is too long" : "Tiedoston nimi on liian pitkä", @@ -82,12 +90,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Poista open_basedir-asetus php.ini-tiedostosta tai vaihda 64-bittiseen PHP:hen.", "Set an admin username." : "Aseta ylläpitäjän käyttäjätunnus.", "Set an admin password." : "Aseta ylläpitäjän salasana.", - "Can't create or write into the data directory %s" : "Ei voi luoda tai kirjoittaa data-hakemistoon %s", "Sharing backend %s not found" : "Jakamisen taustaosaa %s ei löytynyt", "Sharing backend for %s not found" : "Jakamisen taustaosaa kohteelle %s ei löytynyt", "Open »%s«" : "Avaa »%s«", "You are not allowed to share %s" : "Oikeutesi eivät riitä kohteen %s jakamiseen.", "Expiration date is in the past" : "Vanhenemispäivä on menneisyydessä", + "Sharing is only allowed with group members" : "Jakaminen on sallittu vain ryhmäjäsenten kesken", "%1$s shared »%2$s« with you" : "%1$s jakoi kohteen »%2$s« kanssasi", "%1$s shared »%2$s« with you." : "%1$s jakoi kohteen »%2$s« kanssasi.", "Click the button below to open it." : "Napsauta alla olevaa painiketta avataksesi sen.", @@ -150,7 +158,7 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Sovellusta \"%1$s\" ei voi asentaa, koska seuraavat riippuvuudet eivät täyty: %2$s", "a safe home for all your data" : "turvallinen koti kaikille tiedostoillesi", "File is currently busy, please try again later" : "Tiedosto on parhaillaan käytössä, yritä myöhemmin uudelleen", - "Can't read file" : "Tiedostoa ei voi lukea", + "Cannot read file" : "Tiedostoa ei voi lukea", "Application is not enabled" : "Sovellusta ei ole otettu käyttöön", "Authentication error" : "Tunnistautumisvirhe", "Token expired. Please reload page." : "Valtuutus vanheni. Lataa sivu uudelleen.", @@ -183,8 +191,9 @@ "Storage connection error. %s" : "Tallennustilan yhteysvirhe. %s", "Storage is temporarily not available" : "Tallennustila on tilapäisesti pois käytöstä", "Storage connection timeout. %s" : "Tallennustilan yhteyden aikakatkaisu. %s", - "Following databases are supported: %s" : "Seuraavat tietokannat ovat tuettuja: %s", - "Following platforms are supported: %s" : "Seuraavat alustat ovat tuettuja: %s", - "Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste" + "This can usually be fixed by giving the webserver write access to the config directory" : "Tämän voi yleensä korjata antamalla http-palvelimelle kirjoitusoikeuden asetushakemistoon", + "Can't create or write into the data directory %s" : "Ei voi luoda tai kirjoittaa data-hakemistoon %s", + "Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste", + "Can't read file" : "Tiedostoa ei voi lukea" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js index 7d95acd7a89..7047aeeda08 100644 --- a/lib/l10n/fr.js +++ b/lib/l10n/fr.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Impossible d’écrire dans le répertoire « config » !", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire \"config\"", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true.", - "See %s" : "Voir %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire de configuration.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true. Voir %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true.", + "See %s" : "Voir %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Les fichiers de l'application %1$s n'ont pas été remplacés correctement. Veuillez vérifier que c'est une version compatible avec le serveur.", "Sample configuration detected" : "Configuration d'exemple détectée", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Il a été détecté que la configuration donnée à titre d'exemple a été copiée. Cela peut rendre votre installation inopérante et n'est pas pris en charge. Veuillez lire la documentation avant d'effectuer des modifications dans config.php", + "%s email verification" : "Vérification de l'e-mail %s", + "Email verification" : "Vérification de l'e-mail", + "Click the following button to confirm your email." : "Cliquez sur le bouton ci-dessous pour confirmer votre e-mail.", + "Click the following link to confirm your email." : "Cliquez sur le lien ci-dessous pour confirmer votre e-mail.", + "Confirm your email" : "Confirmer votre e-mail", "Other activities" : "Autres activités", "%1$s and %2$s" : "%1$s et %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s et %3$s", @@ -71,6 +74,10 @@ OC.L10N.register( "seconds ago" : "il y a quelques secondes", "Empty file" : "Fichier vide", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Le module avec l'ID: %s n'existe pas. Merci de l'activer dans les paramètres d'applications ou de contacter votre administrateur.", + "File already exists" : "Le fichier existe déjà", + "Invalid path" : "Chemin incorrect", + "Failed to create file from template" : "Impossible de créer le fichier à partir du modèle", + "Templates" : "Modèles", "File name is a reserved word" : "Ce nom de fichier est un mot réservé", "File name contains at least one invalid character" : "Le nom de fichier contient un (des) caractère(s) non valide(s)", "File name is too long" : "Nom de fichier trop long", @@ -102,7 +109,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Veuillez supprimer la configuration open_basedir de votre php.ini ou utiliser une version PHP 64-bit.", "Set an admin username." : "Spécifiez un nom d'utilisateur pour l'administrateur.", "Set an admin password." : "Spécifiez un mot de passe pour l'administrateur.", - "Can't create or write into the data directory %s" : "Impossible de créer, ou d'écrire dans, le répertoire des données %s", + "Cannot create or write into the data directory %s" : "Impossible de créer ou d'écrire dans le répertoire des données %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Le service de partage %s doit implémenter l'interface OCP\\Share_Backend", "Sharing backend %s not found" : "Service de partage %s non trouvé", "Sharing backend for %s not found" : "Le service de partage pour %s est introuvable", @@ -112,11 +119,13 @@ OC.L10N.register( "Open »%s«" : "Ouvrir « %s »", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Vous n'êtes pas autorisé à partager %s", - "Can’t increase permissions of %s" : "Impossible d'augmenter les permissions de %s", - "Files can’t be shared with delete permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de suppression", - "Files can’t be shared with create permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de création", + "Cannot increase permissions of %s" : "Impossible d'augmenter les permissions de %s", + "Files cannot be shared with delete permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de suppression", + "Files cannot be shared with create permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de création", "Expiration date is in the past" : "La date d'expiration est dans le passé", - "Can’t set expiration date more than %s days in the future" : "Impossible de définir la date d'expiration à plus de %s jours dans le futur", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Impossible de définir la date d'expiration à dans plus de %s jour","Impossible de définir la date d'expiration à dans plus de %s jours"], + "Sharing is only allowed with group members" : "Le partage n'est que possible qu'avec les membres du groupe", + "Sharing %s failed, because this item is already shared with user %s" : "Impossible de partager %s car il est déjà partagé avec l'utilisateur %s", "%1$s shared »%2$s« with you" : "%1$s a partagé « %2$s » avec vous", "%1$s shared »%2$s« with you." : "%1$s a partagé « %2$s » avec vous.", "Click the button below to open it." : "Cliquez sur le bouton ci-dessous pour l'ouvrir", @@ -181,15 +190,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "L'application \"%1$s\" ne peut pas être installée à cause des dépendances suivantes non satisfaites : %2$s", "a safe home for all your data" : "un lieu sûr pour toutes vos données", "File is currently busy, please try again later" : "Le fichier est actuellement utilisé, veuillez réessayer plus tard", - "Can't read file" : "Impossible de lire le fichier", + "Cannot read file" : "Impossible de lire le fichier", "Application is not enabled" : "L'application n'est pas activée", "Authentication error" : "Erreur d'authentification", "Token expired. Please reload page." : "La session a expiré. Veuillez recharger la page.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Aucun pilote de base de données n’est installé (sqlite, mysql ou postgresql).", "Cannot write into \"config\" directory" : "Impossible d’écrire dans le répertoire \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire \"config\". Voir %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true. Voir %s", "Cannot write into \"apps\" directory" : "Impossible d’écrire dans le répertoire \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire des applications ou en désactivant l'appstore dans le fichier de configuration.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire des applications ou en désactivant le magasin d'applications dans le fichier de configuration.", "Cannot create \"data\" directory" : "Impossible de créer le dossier \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire racine. Voir %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Le problème de permissions peut généralement être résolu en donnant au serveur web un accès en écriture au répertoire racine. Voir %s.", @@ -226,8 +236,15 @@ OC.L10N.register( "Storage connection error. %s" : "Erreur de connexion à l'espace stockage. %s", "Storage is temporarily not available" : "Le support de stockage est temporairement indisponible", "Storage connection timeout. %s" : "Le délai d'attente pour la connexion à l'espace de stockage a été dépassé. %s", - "Following databases are supported: %s" : "Les bases de données suivantes sont supportées : %s", - "Following platforms are supported: %s" : "Les plateformes suivantes sont prises en charge : %s", - "Invalid Federated Cloud ID" : "ID Federated Cloud incorrect" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire \"config\"", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true.", + "Can't create or write into the data directory %s" : "Impossible de créer, ou d'écrire dans, le répertoire des données %s", + "Invalid Federated Cloud ID" : "ID Federated Cloud incorrect", + "Can’t increase permissions of %s" : "Impossible d'augmenter les permissions de %s", + "Files can’t be shared with delete permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de suppression", + "Files can’t be shared with create permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de création", + "Can’t set expiration date more than %s days in the future" : "Impossible de définir la date d'expiration à plus de %s jours dans le futur", + "Can't read file" : "Impossible de lire le fichier", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire des applications ou en désactivant l'appstore dans le fichier de configuration." }, "nplurals=2; plural=(n > 1);"); diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json index 85771c88dff..021f098f8bf 100644 --- a/lib/l10n/fr.json +++ b/lib/l10n/fr.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "Impossible d’écrire dans le répertoire « config » !", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire \"config\"", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true.", - "See %s" : "Voir %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire de configuration.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true. Voir %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true.", + "See %s" : "Voir %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Les fichiers de l'application %1$s n'ont pas été remplacés correctement. Veuillez vérifier que c'est une version compatible avec le serveur.", "Sample configuration detected" : "Configuration d'exemple détectée", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Il a été détecté que la configuration donnée à titre d'exemple a été copiée. Cela peut rendre votre installation inopérante et n'est pas pris en charge. Veuillez lire la documentation avant d'effectuer des modifications dans config.php", + "%s email verification" : "Vérification de l'e-mail %s", + "Email verification" : "Vérification de l'e-mail", + "Click the following button to confirm your email." : "Cliquez sur le bouton ci-dessous pour confirmer votre e-mail.", + "Click the following link to confirm your email." : "Cliquez sur le lien ci-dessous pour confirmer votre e-mail.", + "Confirm your email" : "Confirmer votre e-mail", "Other activities" : "Autres activités", "%1$s and %2$s" : "%1$s et %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s et %3$s", @@ -69,6 +72,10 @@ "seconds ago" : "il y a quelques secondes", "Empty file" : "Fichier vide", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Le module avec l'ID: %s n'existe pas. Merci de l'activer dans les paramètres d'applications ou de contacter votre administrateur.", + "File already exists" : "Le fichier existe déjà", + "Invalid path" : "Chemin incorrect", + "Failed to create file from template" : "Impossible de créer le fichier à partir du modèle", + "Templates" : "Modèles", "File name is a reserved word" : "Ce nom de fichier est un mot réservé", "File name contains at least one invalid character" : "Le nom de fichier contient un (des) caractère(s) non valide(s)", "File name is too long" : "Nom de fichier trop long", @@ -100,7 +107,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Veuillez supprimer la configuration open_basedir de votre php.ini ou utiliser une version PHP 64-bit.", "Set an admin username." : "Spécifiez un nom d'utilisateur pour l'administrateur.", "Set an admin password." : "Spécifiez un mot de passe pour l'administrateur.", - "Can't create or write into the data directory %s" : "Impossible de créer, ou d'écrire dans, le répertoire des données %s", + "Cannot create or write into the data directory %s" : "Impossible de créer ou d'écrire dans le répertoire des données %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Le service de partage %s doit implémenter l'interface OCP\\Share_Backend", "Sharing backend %s not found" : "Service de partage %s non trouvé", "Sharing backend for %s not found" : "Le service de partage pour %s est introuvable", @@ -110,11 +117,13 @@ "Open »%s«" : "Ouvrir « %s »", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Vous n'êtes pas autorisé à partager %s", - "Can’t increase permissions of %s" : "Impossible d'augmenter les permissions de %s", - "Files can’t be shared with delete permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de suppression", - "Files can’t be shared with create permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de création", + "Cannot increase permissions of %s" : "Impossible d'augmenter les permissions de %s", + "Files cannot be shared with delete permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de suppression", + "Files cannot be shared with create permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de création", "Expiration date is in the past" : "La date d'expiration est dans le passé", - "Can’t set expiration date more than %s days in the future" : "Impossible de définir la date d'expiration à plus de %s jours dans le futur", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Impossible de définir la date d'expiration à dans plus de %s jour","Impossible de définir la date d'expiration à dans plus de %s jours"], + "Sharing is only allowed with group members" : "Le partage n'est que possible qu'avec les membres du groupe", + "Sharing %s failed, because this item is already shared with user %s" : "Impossible de partager %s car il est déjà partagé avec l'utilisateur %s", "%1$s shared »%2$s« with you" : "%1$s a partagé « %2$s » avec vous", "%1$s shared »%2$s« with you." : "%1$s a partagé « %2$s » avec vous.", "Click the button below to open it." : "Cliquez sur le bouton ci-dessous pour l'ouvrir", @@ -179,15 +188,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "L'application \"%1$s\" ne peut pas être installée à cause des dépendances suivantes non satisfaites : %2$s", "a safe home for all your data" : "un lieu sûr pour toutes vos données", "File is currently busy, please try again later" : "Le fichier est actuellement utilisé, veuillez réessayer plus tard", - "Can't read file" : "Impossible de lire le fichier", + "Cannot read file" : "Impossible de lire le fichier", "Application is not enabled" : "L'application n'est pas activée", "Authentication error" : "Erreur d'authentification", "Token expired. Please reload page." : "La session a expiré. Veuillez recharger la page.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Aucun pilote de base de données n’est installé (sqlite, mysql ou postgresql).", "Cannot write into \"config\" directory" : "Impossible d’écrire dans le répertoire \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire \"config\". Voir %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true. Voir %s", "Cannot write into \"apps\" directory" : "Impossible d’écrire dans le répertoire \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire des applications ou en désactivant l'appstore dans le fichier de configuration.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire des applications ou en désactivant le magasin d'applications dans le fichier de configuration.", "Cannot create \"data\" directory" : "Impossible de créer le dossier \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire racine. Voir %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Le problème de permissions peut généralement être résolu en donnant au serveur web un accès en écriture au répertoire racine. Voir %s.", @@ -224,8 +234,15 @@ "Storage connection error. %s" : "Erreur de connexion à l'espace stockage. %s", "Storage is temporarily not available" : "Le support de stockage est temporairement indisponible", "Storage connection timeout. %s" : "Le délai d'attente pour la connexion à l'espace de stockage a été dépassé. %s", - "Following databases are supported: %s" : "Les bases de données suivantes sont supportées : %s", - "Following platforms are supported: %s" : "Les plateformes suivantes sont prises en charge : %s", - "Invalid Federated Cloud ID" : "ID Federated Cloud incorrect" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire \"config\"", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, si vous préférez conserver le fichier config.php en lecture seule, définissez l'option \"config_is_read_only\" sur true.", + "Can't create or write into the data directory %s" : "Impossible de créer, ou d'écrire dans, le répertoire des données %s", + "Invalid Federated Cloud ID" : "ID Federated Cloud incorrect", + "Can’t increase permissions of %s" : "Impossible d'augmenter les permissions de %s", + "Files can’t be shared with delete permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de suppression", + "Files can’t be shared with create permissions" : "Les fichiers ne peuvent pas être partagés avec les autorisations de création", + "Can’t set expiration date more than %s days in the future" : "Impossible de définir la date d'expiration à plus de %s jours dans le futur", + "Can't read file" : "Impossible de lire le fichier", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ce problème est généralement résolu en donnant au serveur web un accès en écriture au répertoire des applications ou en désactivant l'appstore dans le fichier de configuration." },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/lib/l10n/gl.js b/lib/l10n/gl.js index 6fad756f0f5..94d8d436a37 100644 --- a/lib/l10n/gl.js +++ b/lib/l10n/gl.js @@ -2,11 +2,8 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Non é posíbel escribir no directorio «config»!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config»", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel.", - "See %s" : "Vexa %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config».", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel. Vexa %s", + "See %s" : "Vexa %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Os ficheiros da aplicación %1$s non foron substituídos correctamente. Asegúrese que é unha versión compatíbel co servidor.", "Sample configuration detected" : "Detectouse a configuración de exemplo", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectouse que foi copiada a configuración de exemplo. Isto pode rachar a súa instalación e non é compatíbel. Lea a documentación antes de facer cambios en config.php", @@ -72,6 +69,7 @@ OC.L10N.register( "Empty file" : "Ficheiro baleiro", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Non existe o módulo co ID: %s. Actíveo nos axustes das aplicacións ou contacte co administrador.", "File already exists" : "O ficheiro xa existe", + "Invalid path" : "Ruta incorrecta.", "Failed to create file from template" : "Produciuse un fallo ao crear un ficheiro a partir do modelo", "Templates" : "Modelos", "File name is a reserved word" : "O nome de ficheiro é unha palabra reservada", @@ -105,7 +103,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Retire o axuste de open_basedir no php.ini ou cambie a PHP de 64 bits.", "Set an admin username." : "Estabeleza un nome de usuario administrador", "Set an admin password." : "Estabeleza un contrasinal de administrador", - "Can't create or write into the data directory %s" : "Non é posíbel crear ou escribir o directorio «data» %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "A infraestrutura de compartición %s ten que implementar a interface OCP\\Share_Backend", "Sharing backend %s not found" : "Non se atopou a infraestrutura de compartición %s", "Sharing backend for %s not found" : "Non se atopou a infraestrutura de compartición para %s", @@ -115,11 +112,7 @@ OC.L10N.register( "Open »%s«" : "Abrir «%s»", "%1$s via %2$s" : "%1$s mediante %2$s", "You are not allowed to share %s" : "Non ten permiso para compartir %s", - "Can’t increase permissions of %s" : "Non é posíbel aumentar os permisos de %s", - "Files can’t be shared with delete permissions" : "Non é posíbel compartir ficheiros con permisos de eliminación", - "Files can’t be shared with create permissions" : "Non é posíbel compartir ficheiros con permisos de creación", "Expiration date is in the past" : "Xa pasou a data de caducidade", - "Can’t set expiration date more than %s days in the future" : "Non é posíbel estabelecer a data de caducidade máis alo de %s días no futuro", "Sharing is only allowed with group members" : "Só se permite compartir cos membros do grupo", "Sharing %s failed, because this item is already shared with user %s" : "Fallou a compartición de %s por mor de que este elemento xa foi compartido co usuario %s", "%1$s shared »%2$s« with you" : "%1$s compartiu «%2$s» con vostede", @@ -186,15 +179,14 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Non é posíbel instalar a aplicación «%1$s» por mor de non cumprirse as dependencias: %2$s", "a safe home for all your data" : "un lugar seguro para todos os seus datos", "File is currently busy, please try again later" : "O ficheiro está ocupado neste momento, ténteo máis adiante.", - "Can't read file" : "Non é posíbel ler o ficheiro", "Application is not enabled" : "A aplicación non está activada", "Authentication error" : "Produciuse un erro de autenticación", "Token expired. Please reload page." : "Testemuño caducado. Recargue a páxina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Non hai controladores de base de datos (sqlite, mysql, ou postgresql) instalados.", "Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config». Vexa %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel. Vexa %s", "Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio de aplicacións ou desactivando a appstore no ficheiro de configuración.", "Cannot create \"data\" directory" : "Non é posíbel crear o directorio «data»", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio raíz. Vexa %s.", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Polo xeral, pódense corrixir os permisos dándolle ao servidor web acceso de escritura ao directorio raíz. Vexa %s.", @@ -231,8 +223,15 @@ OC.L10N.register( "Storage connection error. %s" : "Produciuse un erro na conexión ao almacenamento. %s", "Storage is temporarily not available" : "O almacenamento non está dispoñíbel temporalmente", "Storage connection timeout. %s" : "Esgotouse o tempo de conexión co almacenamento. %s", - "Following databases are supported: %s" : "Admítense as seguintes bases de datos: %s", - "Following platforms are supported: %s" : "Admítense as seguintes plataformas: %s", - "Invalid Federated Cloud ID" : "ID de nube federada incorrecto" + "This can usually be fixed by giving the webserver write access to the config directory" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config»", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel.", + "Can't create or write into the data directory %s" : "Non é posíbel crear ou escribir o directorio «data» %s", + "Invalid Federated Cloud ID" : "ID de nube federada incorrecto", + "Can’t increase permissions of %s" : "Non é posíbel aumentar os permisos de %s", + "Files can’t be shared with delete permissions" : "Non é posíbel compartir ficheiros con permisos de eliminación", + "Files can’t be shared with create permissions" : "Non é posíbel compartir ficheiros con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "Non é posíbel estabelecer a data de caducidade máis alo de %s días no futuro", + "Can't read file" : "Non é posíbel ler o ficheiro", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio de aplicacións ou desactivando a appstore no ficheiro de configuración." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json index 56181c627c1..130f49a0a3c 100644 --- a/lib/l10n/gl.json +++ b/lib/l10n/gl.json @@ -1,10 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "Non é posíbel escribir no directorio «config»!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config»", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel.", - "See %s" : "Vexa %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config».", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel. Vexa %s", + "See %s" : "Vexa %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Os ficheiros da aplicación %1$s non foron substituídos correctamente. Asegúrese que é unha versión compatíbel co servidor.", "Sample configuration detected" : "Detectouse a configuración de exemplo", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detectouse que foi copiada a configuración de exemplo. Isto pode rachar a súa instalación e non é compatíbel. Lea a documentación antes de facer cambios en config.php", @@ -70,6 +67,7 @@ "Empty file" : "Ficheiro baleiro", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Non existe o módulo co ID: %s. Actíveo nos axustes das aplicacións ou contacte co administrador.", "File already exists" : "O ficheiro xa existe", + "Invalid path" : "Ruta incorrecta.", "Failed to create file from template" : "Produciuse un fallo ao crear un ficheiro a partir do modelo", "Templates" : "Modelos", "File name is a reserved word" : "O nome de ficheiro é unha palabra reservada", @@ -103,7 +101,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Retire o axuste de open_basedir no php.ini ou cambie a PHP de 64 bits.", "Set an admin username." : "Estabeleza un nome de usuario administrador", "Set an admin password." : "Estabeleza un contrasinal de administrador", - "Can't create or write into the data directory %s" : "Non é posíbel crear ou escribir o directorio «data» %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "A infraestrutura de compartición %s ten que implementar a interface OCP\\Share_Backend", "Sharing backend %s not found" : "Non se atopou a infraestrutura de compartición %s", "Sharing backend for %s not found" : "Non se atopou a infraestrutura de compartición para %s", @@ -113,11 +110,7 @@ "Open »%s«" : "Abrir «%s»", "%1$s via %2$s" : "%1$s mediante %2$s", "You are not allowed to share %s" : "Non ten permiso para compartir %s", - "Can’t increase permissions of %s" : "Non é posíbel aumentar os permisos de %s", - "Files can’t be shared with delete permissions" : "Non é posíbel compartir ficheiros con permisos de eliminación", - "Files can’t be shared with create permissions" : "Non é posíbel compartir ficheiros con permisos de creación", "Expiration date is in the past" : "Xa pasou a data de caducidade", - "Can’t set expiration date more than %s days in the future" : "Non é posíbel estabelecer a data de caducidade máis alo de %s días no futuro", "Sharing is only allowed with group members" : "Só se permite compartir cos membros do grupo", "Sharing %s failed, because this item is already shared with user %s" : "Fallou a compartición de %s por mor de que este elemento xa foi compartido co usuario %s", "%1$s shared »%2$s« with you" : "%1$s compartiu «%2$s» con vostede", @@ -184,15 +177,14 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Non é posíbel instalar a aplicación «%1$s» por mor de non cumprirse as dependencias: %2$s", "a safe home for all your data" : "un lugar seguro para todos os seus datos", "File is currently busy, please try again later" : "O ficheiro está ocupado neste momento, ténteo máis adiante.", - "Can't read file" : "Non é posíbel ler o ficheiro", "Application is not enabled" : "A aplicación non está activada", "Authentication error" : "Produciuse un erro de autenticación", "Token expired. Please reload page." : "Testemuño caducado. Recargue a páxina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Non hai controladores de base de datos (sqlite, mysql, ou postgresql) instalados.", "Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config». Vexa %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel. Vexa %s", "Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio de aplicacións ou desactivando a appstore no ficheiro de configuración.", "Cannot create \"data\" directory" : "Non é posíbel crear o directorio «data»", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio raíz. Vexa %s.", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Polo xeral, pódense corrixir os permisos dándolle ao servidor web acceso de escritura ao directorio raíz. Vexa %s.", @@ -229,8 +221,15 @@ "Storage connection error. %s" : "Produciuse un erro na conexión ao almacenamento. %s", "Storage is temporarily not available" : "O almacenamento non está dispoñíbel temporalmente", "Storage connection timeout. %s" : "Esgotouse o tempo de conexión co almacenamento. %s", - "Following databases are supported: %s" : "Admítense as seguintes bases de datos: %s", - "Following platforms are supported: %s" : "Admítense as seguintes plataformas: %s", - "Invalid Federated Cloud ID" : "ID de nube federada incorrecto" + "This can usually be fixed by giving the webserver write access to the config directory" : "Polo xeral, isto pode ser fixado para permitirlle ao servidor web acceso de escritura ao directorio «config»", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se prefire conservar o ficheiro «config.php» como de só lectura, marque a opción «config_is_read_only» como «true» nel.", + "Can't create or write into the data directory %s" : "Non é posíbel crear ou escribir o directorio «data» %s", + "Invalid Federated Cloud ID" : "ID de nube federada incorrecto", + "Can’t increase permissions of %s" : "Non é posíbel aumentar os permisos de %s", + "Files can’t be shared with delete permissions" : "Non é posíbel compartir ficheiros con permisos de eliminación", + "Files can’t be shared with create permissions" : "Non é posíbel compartir ficheiros con permisos de creación", + "Can’t set expiration date more than %s days in the future" : "Non é posíbel estabelecer a data de caducidade máis alo de %s días no futuro", + "Can't read file" : "Non é posíbel ler o ficheiro", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio de aplicacións ou desactivando a appstore no ficheiro de configuración." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/he.js b/lib/l10n/he.js index ae3c2a6eaea..9ac80dc4bc9 100644 --- a/lib/l10n/he.js +++ b/lib/l10n/he.js @@ -2,11 +2,8 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "לא ניתן לכתוב לתיקיית „config”!", - "This can usually be fixed by giving the webserver write access to the config directory" : "בדרך כלל ניתן לפתור את הבעיה על ידי כך שנותנים לתכנית השרת הרשאות כתיבה לתיקיית config", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true.", - "See %s" : "יש לעיין ב־%s", "This can usually be fixed by giving the webserver write access to the config directory." : "בדרך כלל ניתן לתקן זאת על ידי מתן גישת כתיבה לשרת לתיקיית ההגדרות (config).", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true. נא לעיין ב־%s", + "See %s" : "יש לעיין ב־%s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "הקבצים של היישומון %1$s לא מוקמו במקום הנכון. נא לוודא שזו גרסה שהשרת תומך בה.", "Sample configuration detected" : "התגלתה דוגמת תצורה", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "התגלה שדוגמת התצורה הועתקה. דבר זה עלול לשבור את ההתקנה ולא נתמך.יש לקרוא את מסמכי התיעוד לפני שמבצעים שינויים ב- config.php", @@ -82,7 +79,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "יש להסיר את הגדרת open_basedir מתוך קובץ php.ini או להחליף לסביבת 64-bit PHP.", "Set an admin username." : "קביעת שם משתמש מנהל", "Set an admin password." : "קביעת סיסמת מנהל", - "Can't create or write into the data directory %s" : "לא ניתן ליצור או לכתוב לתוך תיקיית הנתונים %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "צד אחורי לשיתוף %s חייב ליישם את ממשק OCP\\Share_Backend", "Sharing backend %s not found" : "צד אחורי לשיתוף %s לא נמצא", "Sharing backend for %s not found" : "צד אחורי לשיתוף של %s לא נמצא", @@ -90,11 +86,7 @@ OC.L10N.register( "Open »%s«" : "פתיחת „%s”", "%1$s via %2$s" : "%1$s דרך %2$s", "You are not allowed to share %s" : "אינך רשאי/ת לשתף %s", - "Can’t increase permissions of %s" : "לא ניתן לחזק את ההרשאות של %s", - "Files can’t be shared with delete permissions" : "לא ניתן לשתף קבצים עם הרשאת מחיקה", - "Files can’t be shared with create permissions" : "לא ניתן לשתף קבצים עם הרשאות יצירה", "Expiration date is in the past" : "תאריך תפוגה הנו בעבר", - "Can’t set expiration date more than %s days in the future" : "לא ניתן להגדיר את תאריך התפוגה מעל %s ימים בעתיד", "%1$s shared »%2$s« with you" : "%2$s שותף אתך על ידי %1$s", "%1$s shared »%2$s« with you." : "„%2$s” שותף אתך על ידי %1$s.", "Click the button below to open it." : "יש ללחוץ על הכפתור להלן כדי לפתוח אותו.", @@ -158,13 +150,13 @@ OC.L10N.register( "Login canceled by app" : "התחברות בוטלה על ידי יישום", "a safe home for all your data" : "בית בטוח עבור כל המידע שלך", "File is currently busy, please try again later" : "הקובץ בשימוש כרגע, יש לנסות שוב מאוחר יותר", - "Can't read file" : "לא ניתן לקרוא קובץ", "Application is not enabled" : "יישומים אינם מופעלים", "Authentication error" : "שגיאת הזדהות", "Token expired. Please reload page." : "פג תוקף. נא לטעון שוב את הדף.", "No database drivers (sqlite, mysql, or postgresql) installed." : "לא מותקנים דרייברים למסד הנתונים (sqlite, mysql, או postgresql).", "Cannot write into \"config\" directory" : "לא ניתן לכתוב לתיקיית \"config\"!", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "בדרך כלל ניתן לתקן זאת על ידי הענקת גישה לשרת לכתוב לתיקיית ההגדרות. נא לעיין ב־%s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true. נא לעיין ב־%s", "Cannot write into \"apps\" directory" : "לא ניתן לכתוב לתיקיית \"apps\"", "Cannot create \"data\" directory" : "לא ניתן ליצור תיקיית „data”", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "בדרך כלל ניתן לתקן זאת על ידי הענקת גישה לשרת לכתוב לתיקיית הבסיס. נא לעיין ב־%s", @@ -200,8 +192,14 @@ OC.L10N.register( "Storage connection error. %s" : "שגיאת חיבור אחסון. %s", "Storage is temporarily not available" : "האחסון אינו זמין כרגע", "Storage connection timeout. %s" : "פסק זמן חיבור אחסון. %s", - "Following databases are supported: %s" : "מסדי הנתונים הבאים נתמכים: %s", - "Following platforms are supported: %s" : "הפלטפורמות הבאות נתמכות: %s", - "Invalid Federated Cloud ID" : "זיהוי ענן מאוגד לא חוקי" + "This can usually be fixed by giving the webserver write access to the config directory" : "בדרך כלל ניתן לפתור את הבעיה על ידי כך שנותנים לתכנית השרת הרשאות כתיבה לתיקיית config", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true.", + "Can't create or write into the data directory %s" : "לא ניתן ליצור או לכתוב לתוך תיקיית הנתונים %s", + "Invalid Federated Cloud ID" : "זיהוי ענן מאוגד לא חוקי", + "Can’t increase permissions of %s" : "לא ניתן לחזק את ההרשאות של %s", + "Files can’t be shared with delete permissions" : "לא ניתן לשתף קבצים עם הרשאת מחיקה", + "Files can’t be shared with create permissions" : "לא ניתן לשתף קבצים עם הרשאות יצירה", + "Can’t set expiration date more than %s days in the future" : "לא ניתן להגדיר את תאריך התפוגה מעל %s ימים בעתיד", + "Can't read file" : "לא ניתן לקרוא קובץ" }, "nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;"); diff --git a/lib/l10n/he.json b/lib/l10n/he.json index bd7c4821727..9eb2544f704 100644 --- a/lib/l10n/he.json +++ b/lib/l10n/he.json @@ -1,10 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "לא ניתן לכתוב לתיקיית „config”!", - "This can usually be fixed by giving the webserver write access to the config directory" : "בדרך כלל ניתן לפתור את הבעיה על ידי כך שנותנים לתכנית השרת הרשאות כתיבה לתיקיית config", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true.", - "See %s" : "יש לעיין ב־%s", "This can usually be fixed by giving the webserver write access to the config directory." : "בדרך כלל ניתן לתקן זאת על ידי מתן גישת כתיבה לשרת לתיקיית ההגדרות (config).", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true. נא לעיין ב־%s", + "See %s" : "יש לעיין ב־%s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "הקבצים של היישומון %1$s לא מוקמו במקום הנכון. נא לוודא שזו גרסה שהשרת תומך בה.", "Sample configuration detected" : "התגלתה דוגמת תצורה", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "התגלה שדוגמת התצורה הועתקה. דבר זה עלול לשבור את ההתקנה ולא נתמך.יש לקרוא את מסמכי התיעוד לפני שמבצעים שינויים ב- config.php", @@ -80,7 +77,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "יש להסיר את הגדרת open_basedir מתוך קובץ php.ini או להחליף לסביבת 64-bit PHP.", "Set an admin username." : "קביעת שם משתמש מנהל", "Set an admin password." : "קביעת סיסמת מנהל", - "Can't create or write into the data directory %s" : "לא ניתן ליצור או לכתוב לתוך תיקיית הנתונים %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "צד אחורי לשיתוף %s חייב ליישם את ממשק OCP\\Share_Backend", "Sharing backend %s not found" : "צד אחורי לשיתוף %s לא נמצא", "Sharing backend for %s not found" : "צד אחורי לשיתוף של %s לא נמצא", @@ -88,11 +84,7 @@ "Open »%s«" : "פתיחת „%s”", "%1$s via %2$s" : "%1$s דרך %2$s", "You are not allowed to share %s" : "אינך רשאי/ת לשתף %s", - "Can’t increase permissions of %s" : "לא ניתן לחזק את ההרשאות של %s", - "Files can’t be shared with delete permissions" : "לא ניתן לשתף קבצים עם הרשאת מחיקה", - "Files can’t be shared with create permissions" : "לא ניתן לשתף קבצים עם הרשאות יצירה", "Expiration date is in the past" : "תאריך תפוגה הנו בעבר", - "Can’t set expiration date more than %s days in the future" : "לא ניתן להגדיר את תאריך התפוגה מעל %s ימים בעתיד", "%1$s shared »%2$s« with you" : "%2$s שותף אתך על ידי %1$s", "%1$s shared »%2$s« with you." : "„%2$s” שותף אתך על ידי %1$s.", "Click the button below to open it." : "יש ללחוץ על הכפתור להלן כדי לפתוח אותו.", @@ -156,13 +148,13 @@ "Login canceled by app" : "התחברות בוטלה על ידי יישום", "a safe home for all your data" : "בית בטוח עבור כל המידע שלך", "File is currently busy, please try again later" : "הקובץ בשימוש כרגע, יש לנסות שוב מאוחר יותר", - "Can't read file" : "לא ניתן לקרוא קובץ", "Application is not enabled" : "יישומים אינם מופעלים", "Authentication error" : "שגיאת הזדהות", "Token expired. Please reload page." : "פג תוקף. נא לטעון שוב את הדף.", "No database drivers (sqlite, mysql, or postgresql) installed." : "לא מותקנים דרייברים למסד הנתונים (sqlite, mysql, או postgresql).", "Cannot write into \"config\" directory" : "לא ניתן לכתוב לתיקיית \"config\"!", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "בדרך כלל ניתן לתקן זאת על ידי הענקת גישה לשרת לכתוב לתיקיית ההגדרות. נא לעיין ב־%s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true. נא לעיין ב־%s", "Cannot write into \"apps\" directory" : "לא ניתן לכתוב לתיקיית \"apps\"", "Cannot create \"data\" directory" : "לא ניתן ליצור תיקיית „data”", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "בדרך כלל ניתן לתקן זאת על ידי הענקת גישה לשרת לכתוב לתיקיית הבסיס. נא לעיין ב־%s", @@ -198,8 +190,14 @@ "Storage connection error. %s" : "שגיאת חיבור אחסון. %s", "Storage is temporarily not available" : "האחסון אינו זמין כרגע", "Storage connection timeout. %s" : "פסק זמן חיבור אחסון. %s", - "Following databases are supported: %s" : "מסדי הנתונים הבאים נתמכים: %s", - "Following platforms are supported: %s" : "הפלטפורמות הבאות נתמכות: %s", - "Invalid Federated Cloud ID" : "זיהוי ענן מאוגד לא חוקי" + "This can usually be fixed by giving the webserver write access to the config directory" : "בדרך כלל ניתן לפתור את הבעיה על ידי כך שנותנים לתכנית השרת הרשאות כתיבה לתיקיית config", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "או, אם עדיף לך לשמור על config.php לקריאה בלבד, ניתן להגדיר את האפשרות „config_is_read_only” לערך true.", + "Can't create or write into the data directory %s" : "לא ניתן ליצור או לכתוב לתוך תיקיית הנתונים %s", + "Invalid Federated Cloud ID" : "זיהוי ענן מאוגד לא חוקי", + "Can’t increase permissions of %s" : "לא ניתן לחזק את ההרשאות של %s", + "Files can’t be shared with delete permissions" : "לא ניתן לשתף קבצים עם הרשאת מחיקה", + "Files can’t be shared with create permissions" : "לא ניתן לשתף קבצים עם הרשאות יצירה", + "Can’t set expiration date more than %s days in the future" : "לא ניתן להגדיר את תאריך התפוגה מעל %s ימים בעתיד", + "Can't read file" : "לא ניתן לקרוא קובץ" },"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;" }
\ No newline at end of file diff --git a/lib/l10n/hr.js b/lib/l10n/hr.js index d1975e3557f..b3f6b4eb5dd 100644 --- a/lib/l10n/hr.js +++ b/lib/l10n/hr.js @@ -2,11 +2,9 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Pisanje u direktorij „config” nije moguće!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ovo se obično može ispraviti tako da se web poslužitelju dopusti pristup za pisanje u direktoriju config", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”.", - "See %s" : "Pogledajte %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ovo se obično može ispraviti tako da se web-poslužitelju dopusti pristup za pisanje u direktoriju config.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”. Pogledajte %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Međutim, ako želite da datoteka config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”.", + "See %s" : "Pogledajte %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Datoteke aplikacije %1$s nisu ispravno zamijenjene. Provjerite je li inačica kompatibilna s poslužiteljem.", "Sample configuration detected" : "Pronađena ogledna konfiguracija", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Otkriveno je kopiranje ogledne konfiguracije. To može dovesti do poteškoća u radu vaše instalacije i nije podržano. Pročitajte dokumentaciju prije nego što izvršite promjene u config.php", @@ -71,6 +69,10 @@ OC.L10N.register( "seconds ago" : "prije nekoliko sekundi", "Empty file" : "Prazna datoteka", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul s ID-om: %s ne postoji. Omogućite ga u postavkama svojih aplikacija ili se obratite administratoru.", + "File already exists" : "Datoteka već postoji", + "Invalid path" : "Nevažeći put", + "Failed to create file from template" : "Stvaranje datoteke iz predloška nije uspjelo", + "Templates" : "Predlošci", "File name is a reserved word" : "Naziv datoteke je rezervirana riječ", "File name contains at least one invalid character" : "Naziv datoteke sadrži barem jedan nevažeći znak", "File name is too long" : "Naziv datoteke je predugačak", @@ -78,7 +80,7 @@ OC.L10N.register( "Empty filename is not allowed" : "Datoteke bez naziva nisu dopuštene", "App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikaciju „%s” nije moguće instalirati jer se ne može pročitati datoteka s podacima o aplikaciji.", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikaciju „%s” nije moguće instalirati jer nije kompatibilna s ovom inačicom poslužitelja.", - "__language_name__" : "__language_name__", + "__language_name__" : "Hrvatski", "This is an automatically sent email, please do not reply." : "Ovo je automatski poslana poruka e-pošte, nemojte odgovarati.", "Help" : "Pomoć", "Apps" : "Aplikacije", @@ -102,7 +104,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Uklonite postavku open_basedir iz datoteke php.ini ili se prebacite na 64-bitni PHP.", "Set an admin username." : "Postavite korisničko ime administratora.", "Set an admin password." : "Postavite zaporku administratora.", - "Can't create or write into the data directory %s" : "Nije moguće stvoriti ili pisati u direktorij s podacima %s", + "Cannot create or write into the data directory %s" : "Nije moguće stvoriti ili pisati u direktorij s podacima %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Pozadina za dijeljenje %s mora implementirati sučelje OCP\\Share_Backend", "Sharing backend %s not found" : "Pozadina za dijeljenje %s nije pronađena", "Sharing backend for %s not found" : "Pozadina za dijeljenje za %s nije pronađena", @@ -112,11 +114,13 @@ OC.L10N.register( "Open »%s«" : "Otvori »%s«", "%1$s via %2$s" : "%1$s putem %2$s", "You are not allowed to share %s" : "Nije vam dopušteno dijeliti %s", - "Can’t increase permissions of %s" : "Nije moguće povećati dopuštenja za %s", - "Files can’t be shared with delete permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za brisanje", - "Files can’t be shared with create permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za stvaranje", + "Cannot increase permissions of %s" : "Nije moguće povećati dopuštenja za %s", + "Files cannot be shared with delete permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za brisanje", + "Files cannot be shared with create permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za stvaranje", "Expiration date is in the past" : "Datum isteka je u prošlosti", - "Can’t set expiration date more than %s days in the future" : "Ne može se postaviti datum isteka više od %s dana u budućnosti", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Ne može se postaviti datum isteka više od %n dan u budućnosti","Ne može se postaviti datum isteka više od %n dana u budućnosti","Ne može se postaviti datum isteka više od %n dana u budućnosti"], + "Sharing is only allowed with group members" : "Dijeljenje je dopušteno samo članovima grupe", + "Sharing %s failed, because this item is already shared with user %s" : "Dijeljenje %s nije uspjelo jer je ova stavka već podijeljena s korisnikom %s", "%1$s shared »%2$s« with you" : "%1$s dijeli »%2$s« s vama", "%1$s shared »%2$s« with you." : "%1$s dijeli »%2$s« s vama.", "Click the button below to open it." : "Kliknite gumb u nastavku za otvaranje.", @@ -181,15 +185,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Aplikaciju „%1$s” nije moguće instalirati jer nisu ispunjene sljedeće ovisnosti: %2$s", "a safe home for all your data" : "siguran dom za sve vaše podatke", "File is currently busy, please try again later" : "Datoteka je trenutno zauzeta, pokušajte ponovo kasnije", - "Can't read file" : "Datoteka se ne može pročitati", + "Cannot read file" : "Datoteku nije moguće pročitati", "Application is not enabled" : "Aplikacija nije omogućena", "Authentication error" : "Pogrešna autentifikacija", "Token expired. Please reload page." : "Token je istekao. Ponovno učitajte stranicu.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nisu instalirani upravljački programi baze podataka (sqlite, mysql ili postgresql).", "Cannot write into \"config\" directory" : "Pisanje u direktorij „config” nije moguće", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ovo se obično može popraviti tako da se web poslužitelju dopusti pristup za pisanje u konfiguracijski direktorij. Pogledajte %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”. Pogledajte %s", "Cannot write into \"apps\" directory" : "Nije moguće pisati u direktorij „apps”", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ovo se obično može popraviti tako da se web-poslužitelju dopusti pristup za pisanje u aplikacijski direktorij ili onemogućivanjem trgovine aplikacijama (App Store) u konfiguracijskoj datoteci.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Ovo se obično može popraviti tako da se web-poslužitelju dopusti pristup za pisanje u aplikacijski direktorij ili onemogućivanjem trgovine aplikacijama App Store u konfiguracijskoj datoteci.", "Cannot create \"data\" directory" : "Nije moguće stvoriti direktorij „data”", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ovo se obično može popraviti tako da se web poslužitelju dopusti pristup za pisanje u korijenski direktorij. Pogledajte %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Dopuštenja se obično mogu popraviti tako da se web poslužitelju dopusti pristup za pisanje u korijenski direktorij. Pogledajte %s.", @@ -226,8 +231,15 @@ OC.L10N.register( "Storage connection error. %s" : "Pogreška veze pohrane. %s", "Storage is temporarily not available" : "Pohrana privremeno nije dostupna", "Storage connection timeout. %s" : "Istek veze pohrane. %s", - "Following databases are supported: %s" : "Podržane su sljedeće baze podataka: %s", - "Following platforms are supported: %s" : "Podržane su sljedeće platforme: %s", - "Invalid Federated Cloud ID" : "Nevažeći ID udruženog oblaka" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ovo se obično može ispraviti tako da se web poslužitelju dopusti pristup za pisanje u direktoriju config", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”.", + "Can't create or write into the data directory %s" : "Nije moguće stvoriti ili pisati u direktorij s podacima %s", + "Invalid Federated Cloud ID" : "Nevažeći ID udruženog oblaka", + "Can’t increase permissions of %s" : "Nije moguće povećati dopuštenja za %s", + "Files can’t be shared with delete permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za brisanje", + "Files can’t be shared with create permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za stvaranje", + "Can’t set expiration date more than %s days in the future" : "Ne može se postaviti datum isteka više od %s dana u budućnosti", + "Can't read file" : "Datoteka se ne može pročitati", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ovo se obično može popraviti tako da se web-poslužitelju dopusti pristup za pisanje u aplikacijski direktorij ili onemogućivanjem trgovine aplikacijama (App Store) u konfiguracijskoj datoteci." }, "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/lib/l10n/hr.json b/lib/l10n/hr.json index 12fbe20d19a..1275c79cbf1 100644 --- a/lib/l10n/hr.json +++ b/lib/l10n/hr.json @@ -1,10 +1,8 @@ { "translations": { "Cannot write into \"config\" directory!" : "Pisanje u direktorij „config” nije moguće!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ovo se obično može ispraviti tako da se web poslužitelju dopusti pristup za pisanje u direktoriju config", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”.", - "See %s" : "Pogledajte %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ovo se obično može ispraviti tako da se web-poslužitelju dopusti pristup za pisanje u direktoriju config.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”. Pogledajte %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Međutim, ako želite da datoteka config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”.", + "See %s" : "Pogledajte %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Datoteke aplikacije %1$s nisu ispravno zamijenjene. Provjerite je li inačica kompatibilna s poslužiteljem.", "Sample configuration detected" : "Pronađena ogledna konfiguracija", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Otkriveno je kopiranje ogledne konfiguracije. To može dovesti do poteškoća u radu vaše instalacije i nije podržano. Pročitajte dokumentaciju prije nego što izvršite promjene u config.php", @@ -69,6 +67,10 @@ "seconds ago" : "prije nekoliko sekundi", "Empty file" : "Prazna datoteka", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul s ID-om: %s ne postoji. Omogućite ga u postavkama svojih aplikacija ili se obratite administratoru.", + "File already exists" : "Datoteka već postoji", + "Invalid path" : "Nevažeći put", + "Failed to create file from template" : "Stvaranje datoteke iz predloška nije uspjelo", + "Templates" : "Predlošci", "File name is a reserved word" : "Naziv datoteke je rezervirana riječ", "File name contains at least one invalid character" : "Naziv datoteke sadrži barem jedan nevažeći znak", "File name is too long" : "Naziv datoteke je predugačak", @@ -76,7 +78,7 @@ "Empty filename is not allowed" : "Datoteke bez naziva nisu dopuštene", "App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikaciju „%s” nije moguće instalirati jer se ne može pročitati datoteka s podacima o aplikaciji.", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikaciju „%s” nije moguće instalirati jer nije kompatibilna s ovom inačicom poslužitelja.", - "__language_name__" : "__language_name__", + "__language_name__" : "Hrvatski", "This is an automatically sent email, please do not reply." : "Ovo je automatski poslana poruka e-pošte, nemojte odgovarati.", "Help" : "Pomoć", "Apps" : "Aplikacije", @@ -100,7 +102,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Uklonite postavku open_basedir iz datoteke php.ini ili se prebacite na 64-bitni PHP.", "Set an admin username." : "Postavite korisničko ime administratora.", "Set an admin password." : "Postavite zaporku administratora.", - "Can't create or write into the data directory %s" : "Nije moguće stvoriti ili pisati u direktorij s podacima %s", + "Cannot create or write into the data directory %s" : "Nije moguće stvoriti ili pisati u direktorij s podacima %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Pozadina za dijeljenje %s mora implementirati sučelje OCP\\Share_Backend", "Sharing backend %s not found" : "Pozadina za dijeljenje %s nije pronađena", "Sharing backend for %s not found" : "Pozadina za dijeljenje za %s nije pronađena", @@ -110,11 +112,13 @@ "Open »%s«" : "Otvori »%s«", "%1$s via %2$s" : "%1$s putem %2$s", "You are not allowed to share %s" : "Nije vam dopušteno dijeliti %s", - "Can’t increase permissions of %s" : "Nije moguće povećati dopuštenja za %s", - "Files can’t be shared with delete permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za brisanje", - "Files can’t be shared with create permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za stvaranje", + "Cannot increase permissions of %s" : "Nije moguće povećati dopuštenja za %s", + "Files cannot be shared with delete permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za brisanje", + "Files cannot be shared with create permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za stvaranje", "Expiration date is in the past" : "Datum isteka je u prošlosti", - "Can’t set expiration date more than %s days in the future" : "Ne može se postaviti datum isteka više od %s dana u budućnosti", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Ne može se postaviti datum isteka više od %n dan u budućnosti","Ne može se postaviti datum isteka više od %n dana u budućnosti","Ne može se postaviti datum isteka više od %n dana u budućnosti"], + "Sharing is only allowed with group members" : "Dijeljenje je dopušteno samo članovima grupe", + "Sharing %s failed, because this item is already shared with user %s" : "Dijeljenje %s nije uspjelo jer je ova stavka već podijeljena s korisnikom %s", "%1$s shared »%2$s« with you" : "%1$s dijeli »%2$s« s vama", "%1$s shared »%2$s« with you." : "%1$s dijeli »%2$s« s vama.", "Click the button below to open it." : "Kliknite gumb u nastavku za otvaranje.", @@ -179,15 +183,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Aplikaciju „%1$s” nije moguće instalirati jer nisu ispunjene sljedeće ovisnosti: %2$s", "a safe home for all your data" : "siguran dom za sve vaše podatke", "File is currently busy, please try again later" : "Datoteka je trenutno zauzeta, pokušajte ponovo kasnije", - "Can't read file" : "Datoteka se ne može pročitati", + "Cannot read file" : "Datoteku nije moguće pročitati", "Application is not enabled" : "Aplikacija nije omogućena", "Authentication error" : "Pogrešna autentifikacija", "Token expired. Please reload page." : "Token je istekao. Ponovno učitajte stranicu.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nisu instalirani upravljački programi baze podataka (sqlite, mysql ili postgresql).", "Cannot write into \"config\" directory" : "Pisanje u direktorij „config” nije moguće", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ovo se obično može popraviti tako da se web poslužitelju dopusti pristup za pisanje u konfiguracijski direktorij. Pogledajte %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”. Pogledajte %s", "Cannot write into \"apps\" directory" : "Nije moguće pisati u direktorij „apps”", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ovo se obično može popraviti tako da se web-poslužitelju dopusti pristup za pisanje u aplikacijski direktorij ili onemogućivanjem trgovine aplikacijama (App Store) u konfiguracijskoj datoteci.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Ovo se obično može popraviti tako da se web-poslužitelju dopusti pristup za pisanje u aplikacijski direktorij ili onemogućivanjem trgovine aplikacijama App Store u konfiguracijskoj datoteci.", "Cannot create \"data\" directory" : "Nije moguće stvoriti direktorij „data”", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ovo se obično može popraviti tako da se web poslužitelju dopusti pristup za pisanje u korijenski direktorij. Pogledajte %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Dopuštenja se obično mogu popraviti tako da se web poslužitelju dopusti pristup za pisanje u korijenski direktorij. Pogledajte %s.", @@ -224,8 +229,15 @@ "Storage connection error. %s" : "Pogreška veze pohrane. %s", "Storage is temporarily not available" : "Pohrana privremeno nije dostupna", "Storage connection timeout. %s" : "Istek veze pohrane. %s", - "Following databases are supported: %s" : "Podržane su sljedeće baze podataka: %s", - "Following platforms are supported: %s" : "Podržane su sljedeće platforme: %s", - "Invalid Federated Cloud ID" : "Nevažeći ID udruženog oblaka" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ovo se obično može ispraviti tako da se web poslužitelju dopusti pristup za pisanje u direktoriju config", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ako želite da datoteku config.php ostane samo za čitanje, postavite opciju „config_is_read_only” na „true”.", + "Can't create or write into the data directory %s" : "Nije moguće stvoriti ili pisati u direktorij s podacima %s", + "Invalid Federated Cloud ID" : "Nevažeći ID udruženog oblaka", + "Can’t increase permissions of %s" : "Nije moguće povećati dopuštenja za %s", + "Files can’t be shared with delete permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za brisanje", + "Files can’t be shared with create permissions" : "Datoteke se ne mogu dijeliti s dopuštenjima za stvaranje", + "Can’t set expiration date more than %s days in the future" : "Ne može se postaviti datum isteka više od %s dana u budućnosti", + "Can't read file" : "Datoteka se ne može pročitati", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ovo se obično može popraviti tako da se web-poslužitelju dopusti pristup za pisanje u aplikacijski direktorij ili onemogućivanjem trgovine aplikacijama (App Store) u konfiguracijskoj datoteci." },"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/lib/l10n/hu.js b/lib/l10n/hu.js index 2722794d18b..0d6e40f3c0d 100644 --- a/lib/l10n/hu.js +++ b/lib/l10n/hu.js @@ -2,12 +2,12 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nem írható a \"config\" könyvtár!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ez rendszerint úgy oldható meg, hogy írási jogot adunk a webszervernek a config könyvtárra.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót.", + "This can usually be fixed by giving the webserver write access to the config directory." : "Ez általában úgy javítható, hogy a webszervernek írási hozzáférést biztosít a konfigurációs könyvtárhoz.", "See %s" : "Lásd %s", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót. Továbbiak itt:%s", + "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "A %1$s alkalmazás fájljait helyetelenül cserélték le. Ellenőrizze, hogy kompatibilis-e a szerverrel .", "Sample configuration detected" : "A példabeállítások vannak beállítva", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Úgy tűnik a példakonfigurációt próbálja ténylegesen használni. Ez nem támogatott, és működésképtelenné teheti a telepítést. Kérlek olvasd el a dokumentációt és azt követően változtas a config.php-n!", + "Other activities" : "Egyéb tevékenységek", "%1$s and %2$s" : "%1$s és %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s és %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s és %4$s", @@ -15,17 +15,34 @@ OC.L10N.register( "Education Edition" : "Oktatási verzió", "Enterprise bundle" : "Vállalati csomag", "Groupware bundle" : "Csoportmunka csomag", + "Hub bundle" : "Központi csomag", "Social sharing bundle" : "Közösségi megosztás csomag", "PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.", "PHP with a version lower than %s is required." : "Ennél régebbi PHP szükséges: %s.", "%sbit or higher PHP required." : "%sbites vagy újabb PHP szükséges.", + "The following architectures are supported: %s" : "A következő architektúrák támogatottak: %s", + "The following databases are supported: %s" : "A következő adatbázisok támogatottak: %s", "The command line tool %s could not be found" : "A parancssori eszköz nem található: %s", "The library %s is not available." : "A könyvtár %s nem áll rendelkezésre.", "Library %1$s with a version higher than %2$s is required - available version %3$s." : "%1$s könyvtár %2$s vagy újabb verziója szükséges - elérhető verzió: %3$s.", "Library %1$s with a version lower than %2$s is required - available version %3$s." : "%1$s könyvtár %2$s vagy régebbi verziója szükséges - elérhető verzió: %3$s.", + "The following platforms are supported: %s" : "A következő platformok támogatottak: %s", "Server version %s or higher is required." : "%s vagy újabb szerver verzió szükséges.", "Server version %s or lower is required." : "%s vagy régebbi szerver verzió szükséges.", + "Logged in user must be an admin or sub admin" : "A bejelentkezett felhasználónak rendszergazdának vagy al rendszergazgának kell lennie", "Logged in user must be an admin" : "A bejelentkezett felhasználónak rendszergazdának kell lennie", + "Wiping of device %s has started" : "A(z) %s eszköz törlése megkezdődött", + "Wiping of device »%s« has started" : "A »%s« eszköz törlése megkezdődött", + "»%s« started remote wipe" : "»%s« elindította a távoli törlést", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "A »%s« eszköz vagy alkalmazás elindította a távoli törlési folyamatot. A folyamat befejezése után újabb e-mailt fog kapni", + "Wiping of device %s has finished" : "A(z) %s eszköz törlése befejeződött", + "Wiping of device »%s« has finished" : "A »%s« eszköz törlése befejeződött", + "»%s« finished remote wipe" : "»%s« befejezte a távoli törlést", + "Device or application »%s« has finished the remote wipe process." : "A(z) »%s« eszköz vagy alkalmazás befejezte a távoli törlés folyamatát.", + "Remote wipe started" : "A távoli törlés elindult", + "A remote wipe was started on device %s" : "Távoli törlés indult a(z) %s eszközön", + "Remote wipe finished" : "A távoli törlés befejeződött", + "The remote wipe on %s has finished" : "%s távoli törlése befejeződött", "Authentication" : "Hitelesítés", "Unknown filetype" : "Ismeretlen fájl típus", "Invalid image" : "Hibás kép", @@ -49,7 +66,12 @@ OC.L10N.register( "_%n minute ago_::_%n minutes ago_" : ["%n perce","%n perce"], "in a few seconds" : "pár másodpercen belül", "seconds ago" : "pár másodperce", + "Empty file" : "Üres fájl", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "A(z) %s azonosítójú modul nem létezik. Kérlek engedélyezd az app beállításaidban, vagy lépj kapcsolatba a rendszergazdával.", + "File already exists" : "A fájl már létezik", + "Invalid path" : "Érvénytelen útvonal", + "Failed to create file from template" : "Nem sikerült létrehozni a fájlt a sablonból", + "Templates" : "Sablonok", "File name is a reserved word" : "A fajl neve egy rezervált szó", "File name contains at least one invalid character" : "A fájlnév legalább egy érvénytelen karaktert tartalmaz!", "File name is too long" : "A fájlnév túl hosszú!", @@ -70,6 +92,7 @@ OC.L10N.register( "%s enter the database username." : "%s adja meg az adatbázist elérő felhasználó login nevét.", "%s enter the database name." : "%s adja meg az adatbázis nevét.", "%s you may not use dots in the database name" : "%s az adatbázis neve nem tartalmazhat pontot", + "MySQL username and/or password not valid" : "A MySQL felhasználónév és/vagy jelszó érvénytelen", "You need to enter details of an existing account." : "Egy már létező fiók adatait kell megadnod.", "Oracle connection could not be established" : "Az Oracle kapcsolat nem hozható létre", "Oracle username and/or password not valid" : "Az Oracle felhasználói név és/vagy jelszó érvénytelen", @@ -80,7 +103,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Kérlek távolítsd el az open_basedir beállítást a php.ini-ből, vagy válts 64bit-es PHP-ra.", "Set an admin username." : "Állítson be egy rendszergazdai felhasználónevet!", "Set an admin password." : "Állítson be egy rendszergazdai jelszót!", - "Can't create or write into the data directory %s" : "Nem sikerült létrehozni vagy irni a \"data\" könyvtárba %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Az %s megosztási alrendszernek támogatnia kell az OCP\\Share_Backend interface-t", "Sharing backend %s not found" : "A %s megosztási alrendszer nem található", "Sharing backend for %s not found" : "%s megosztási alrendszere nem található", @@ -90,11 +112,9 @@ OC.L10N.register( "Open »%s«" : "»%s« megnyitása", "%1$s via %2$s" : "%1$s - %2$s", "You are not allowed to share %s" : "Nincs jogosultságod %s megosztására", - "Can’t increase permissions of %s" : "A(z) %s engedélyei nem kibővíthetők", - "Files can’t be shared with delete permissions" : "A fájlok nem megoszthatók törlési joggal", - "Files can’t be shared with create permissions" : "Fájlok nem oszthatók meg létrehozási joggal", "Expiration date is in the past" : "A lejárati dátum már elmúlt", - "Can’t set expiration date more than %s days in the future" : "Nem lehet %s napnál későbbi lejáratot megadni", + "Sharing is only allowed with group members" : "A megosztás csak a csoport tagjaival engedélyezett", + "Sharing %s failed, because this item is already shared with user %s" : "A(z) %s megosztása nem sikerült, mert ez az elem már meg van osztva a(z) %s felhasználóval", "%1$s shared »%2$s« with you" : "%1$s megosztotta veled »%2$s«", "%1$s shared »%2$s« with you." : "%1$s megosztotta veled »%2$s«.", "Click the button below to open it." : "Kattintson a lenti gombra a megnyitáshoz.", @@ -145,10 +165,12 @@ OC.L10N.register( "Oct." : "Okt.", "Nov." : "Nov.", "Dec." : "Dec.", + "The user limit has been reached and the user was not created." : "Elérte a felhasználói korlátot, és a felhasználót nem jött létre.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "A felhasználónévben csak a következő karakterek engedélyezettek: \"a-z\", \"A-Z\", \"0-9\", és \"_.@-'\"", "A valid username must be provided" : "Érvényes felhasználónevet kell megadnia", "Username contains whitespace at the beginning or at the end" : "A felhasználónév szóközt tartalmaz az elején vagy a végén", "Username must not consist of dots only" : "A felhasználónév nem állhat csak pontokból", + "Username is invalid because files already exist for this user" : "A felhasználónév érvénytelen, mert már vannak fájlok ehhez a felhasználóhoz", "A valid password must be provided" : "Érvényes jelszót kell megadnia", "The username is already being used" : "Ez a bejelentkezési név már foglalt", "Could not create user" : "Nem sikerült létrehozni a felhasználót", @@ -157,13 +179,13 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "\"%1$s\" alkalmazást nem lehet telepíteni, mert a következő függőségek nem teljesülnek: %2$s", "a safe home for all your data" : "egy biztonságos hely az adataidnak", "File is currently busy, please try again later" : "A fájl jelenleg elfoglalt, kérjük próbáld újra később!", - "Can't read file" : "Nem olvasható a fájl", "Application is not enabled" : "Az alkalmazás nincs engedélyezve", "Authentication error" : "Azonosítási hiba", "Token expired. Please reload page." : "A token lejárt. Frissítse az oldalt.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nincs telepítve adatbázis-meghajtóprogram (sqlite, mysql vagy postgresql).", "Cannot write into \"config\" directory" : "Nem írható a \"config\" könyvtár", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ez rendszerint úgy oldható meg, hogy írási jogot adunk a webszervernek a config könyvtárra. Lásd: %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót. Továbbiak itt:%s", "Cannot write into \"apps\" directory" : "Nem írható az \"apps\" könyvtár", "Cannot create \"data\" directory" : "\"data\" mappa nem hozható létre", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ez legtöbbször megoldható a gyökér mappára a webszervernek adott írási joggal. Lásd: %s", @@ -201,8 +223,15 @@ OC.L10N.register( "Storage connection error. %s" : "Tároló kapcsolódási hiba. %s", "Storage is temporarily not available" : "A tároló átmenetileg nem érthető el", "Storage connection timeout. %s" : "Tároló kapcsolat időtúllépés. %s", - "Following databases are supported: %s" : "A következő adatbázisok támogatottak: %s", - "Following platforms are supported: %s" : "Ezek a platformok támogatottak: %s", - "Invalid Federated Cloud ID" : "Érvénytelen Egyesített Felhő Azonosító" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ez rendszerint úgy oldható meg, hogy írási jogot adunk a webszervernek a config könyvtárra.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót.", + "Can't create or write into the data directory %s" : "Nem sikerült létrehozni vagy irni a \"data\" könyvtárba %s", + "Invalid Federated Cloud ID" : "Érvénytelen Egyesített Felhő Azonosító", + "Can’t increase permissions of %s" : "A(z) %s engedélyei nem kibővíthetők", + "Files can’t be shared with delete permissions" : "A fájlok nem megoszthatók törlési joggal", + "Files can’t be shared with create permissions" : "Fájlok nem oszthatók meg létrehozási joggal", + "Can’t set expiration date more than %s days in the future" : "Nem lehet %s napnál későbbi lejáratot megadni", + "Can't read file" : "Nem olvasható a fájl", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ezt általában úgy lehet kijavítani, hogy a webszervernek írási hozzáférést ad az alkalmazások könyvtárához, vagy letiltja az alkalmazásboltot a konfigurációs fájlban." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/hu.json b/lib/l10n/hu.json index 572d1190a12..cde3e575222 100644 --- a/lib/l10n/hu.json +++ b/lib/l10n/hu.json @@ -1,11 +1,11 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nem írható a \"config\" könyvtár!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ez rendszerint úgy oldható meg, hogy írási jogot adunk a webszervernek a config könyvtárra.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót.", + "This can usually be fixed by giving the webserver write access to the config directory." : "Ez általában úgy javítható, hogy a webszervernek írási hozzáférést biztosít a konfigurációs könyvtárhoz.", "See %s" : "Lásd %s", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót. Továbbiak itt:%s", + "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "A %1$s alkalmazás fájljait helyetelenül cserélték le. Ellenőrizze, hogy kompatibilis-e a szerverrel .", "Sample configuration detected" : "A példabeállítások vannak beállítva", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Úgy tűnik a példakonfigurációt próbálja ténylegesen használni. Ez nem támogatott, és működésképtelenné teheti a telepítést. Kérlek olvasd el a dokumentációt és azt követően változtas a config.php-n!", + "Other activities" : "Egyéb tevékenységek", "%1$s and %2$s" : "%1$s és %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s és %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s és %4$s", @@ -13,17 +13,34 @@ "Education Edition" : "Oktatási verzió", "Enterprise bundle" : "Vállalati csomag", "Groupware bundle" : "Csoportmunka csomag", + "Hub bundle" : "Központi csomag", "Social sharing bundle" : "Közösségi megosztás csomag", "PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.", "PHP with a version lower than %s is required." : "Ennél régebbi PHP szükséges: %s.", "%sbit or higher PHP required." : "%sbites vagy újabb PHP szükséges.", + "The following architectures are supported: %s" : "A következő architektúrák támogatottak: %s", + "The following databases are supported: %s" : "A következő adatbázisok támogatottak: %s", "The command line tool %s could not be found" : "A parancssori eszköz nem található: %s", "The library %s is not available." : "A könyvtár %s nem áll rendelkezésre.", "Library %1$s with a version higher than %2$s is required - available version %3$s." : "%1$s könyvtár %2$s vagy újabb verziója szükséges - elérhető verzió: %3$s.", "Library %1$s with a version lower than %2$s is required - available version %3$s." : "%1$s könyvtár %2$s vagy régebbi verziója szükséges - elérhető verzió: %3$s.", + "The following platforms are supported: %s" : "A következő platformok támogatottak: %s", "Server version %s or higher is required." : "%s vagy újabb szerver verzió szükséges.", "Server version %s or lower is required." : "%s vagy régebbi szerver verzió szükséges.", + "Logged in user must be an admin or sub admin" : "A bejelentkezett felhasználónak rendszergazdának vagy al rendszergazgának kell lennie", "Logged in user must be an admin" : "A bejelentkezett felhasználónak rendszergazdának kell lennie", + "Wiping of device %s has started" : "A(z) %s eszköz törlése megkezdődött", + "Wiping of device »%s« has started" : "A »%s« eszköz törlése megkezdődött", + "»%s« started remote wipe" : "»%s« elindította a távoli törlést", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "A »%s« eszköz vagy alkalmazás elindította a távoli törlési folyamatot. A folyamat befejezése után újabb e-mailt fog kapni", + "Wiping of device %s has finished" : "A(z) %s eszköz törlése befejeződött", + "Wiping of device »%s« has finished" : "A »%s« eszköz törlése befejeződött", + "»%s« finished remote wipe" : "»%s« befejezte a távoli törlést", + "Device or application »%s« has finished the remote wipe process." : "A(z) »%s« eszköz vagy alkalmazás befejezte a távoli törlés folyamatát.", + "Remote wipe started" : "A távoli törlés elindult", + "A remote wipe was started on device %s" : "Távoli törlés indult a(z) %s eszközön", + "Remote wipe finished" : "A távoli törlés befejeződött", + "The remote wipe on %s has finished" : "%s távoli törlése befejeződött", "Authentication" : "Hitelesítés", "Unknown filetype" : "Ismeretlen fájl típus", "Invalid image" : "Hibás kép", @@ -47,7 +64,12 @@ "_%n minute ago_::_%n minutes ago_" : ["%n perce","%n perce"], "in a few seconds" : "pár másodpercen belül", "seconds ago" : "pár másodperce", + "Empty file" : "Üres fájl", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "A(z) %s azonosítójú modul nem létezik. Kérlek engedélyezd az app beállításaidban, vagy lépj kapcsolatba a rendszergazdával.", + "File already exists" : "A fájl már létezik", + "Invalid path" : "Érvénytelen útvonal", + "Failed to create file from template" : "Nem sikerült létrehozni a fájlt a sablonból", + "Templates" : "Sablonok", "File name is a reserved word" : "A fajl neve egy rezervált szó", "File name contains at least one invalid character" : "A fájlnév legalább egy érvénytelen karaktert tartalmaz!", "File name is too long" : "A fájlnév túl hosszú!", @@ -68,6 +90,7 @@ "%s enter the database username." : "%s adja meg az adatbázist elérő felhasználó login nevét.", "%s enter the database name." : "%s adja meg az adatbázis nevét.", "%s you may not use dots in the database name" : "%s az adatbázis neve nem tartalmazhat pontot", + "MySQL username and/or password not valid" : "A MySQL felhasználónév és/vagy jelszó érvénytelen", "You need to enter details of an existing account." : "Egy már létező fiók adatait kell megadnod.", "Oracle connection could not be established" : "Az Oracle kapcsolat nem hozható létre", "Oracle username and/or password not valid" : "Az Oracle felhasználói név és/vagy jelszó érvénytelen", @@ -78,7 +101,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Kérlek távolítsd el az open_basedir beállítást a php.ini-ből, vagy válts 64bit-es PHP-ra.", "Set an admin username." : "Állítson be egy rendszergazdai felhasználónevet!", "Set an admin password." : "Állítson be egy rendszergazdai jelszót!", - "Can't create or write into the data directory %s" : "Nem sikerült létrehozni vagy irni a \"data\" könyvtárba %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Az %s megosztási alrendszernek támogatnia kell az OCP\\Share_Backend interface-t", "Sharing backend %s not found" : "A %s megosztási alrendszer nem található", "Sharing backend for %s not found" : "%s megosztási alrendszere nem található", @@ -88,11 +110,9 @@ "Open »%s«" : "»%s« megnyitása", "%1$s via %2$s" : "%1$s - %2$s", "You are not allowed to share %s" : "Nincs jogosultságod %s megosztására", - "Can’t increase permissions of %s" : "A(z) %s engedélyei nem kibővíthetők", - "Files can’t be shared with delete permissions" : "A fájlok nem megoszthatók törlési joggal", - "Files can’t be shared with create permissions" : "Fájlok nem oszthatók meg létrehozási joggal", "Expiration date is in the past" : "A lejárati dátum már elmúlt", - "Can’t set expiration date more than %s days in the future" : "Nem lehet %s napnál későbbi lejáratot megadni", + "Sharing is only allowed with group members" : "A megosztás csak a csoport tagjaival engedélyezett", + "Sharing %s failed, because this item is already shared with user %s" : "A(z) %s megosztása nem sikerült, mert ez az elem már meg van osztva a(z) %s felhasználóval", "%1$s shared »%2$s« with you" : "%1$s megosztotta veled »%2$s«", "%1$s shared »%2$s« with you." : "%1$s megosztotta veled »%2$s«.", "Click the button below to open it." : "Kattintson a lenti gombra a megnyitáshoz.", @@ -143,10 +163,12 @@ "Oct." : "Okt.", "Nov." : "Nov.", "Dec." : "Dec.", + "The user limit has been reached and the user was not created." : "Elérte a felhasználói korlátot, és a felhasználót nem jött létre.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "A felhasználónévben csak a következő karakterek engedélyezettek: \"a-z\", \"A-Z\", \"0-9\", és \"_.@-'\"", "A valid username must be provided" : "Érvényes felhasználónevet kell megadnia", "Username contains whitespace at the beginning or at the end" : "A felhasználónév szóközt tartalmaz az elején vagy a végén", "Username must not consist of dots only" : "A felhasználónév nem állhat csak pontokból", + "Username is invalid because files already exist for this user" : "A felhasználónév érvénytelen, mert már vannak fájlok ehhez a felhasználóhoz", "A valid password must be provided" : "Érvényes jelszót kell megadnia", "The username is already being used" : "Ez a bejelentkezési név már foglalt", "Could not create user" : "Nem sikerült létrehozni a felhasználót", @@ -155,13 +177,13 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "\"%1$s\" alkalmazást nem lehet telepíteni, mert a következő függőségek nem teljesülnek: %2$s", "a safe home for all your data" : "egy biztonságos hely az adataidnak", "File is currently busy, please try again later" : "A fájl jelenleg elfoglalt, kérjük próbáld újra később!", - "Can't read file" : "Nem olvasható a fájl", "Application is not enabled" : "Az alkalmazás nincs engedélyezve", "Authentication error" : "Azonosítási hiba", "Token expired. Please reload page." : "A token lejárt. Frissítse az oldalt.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nincs telepítve adatbázis-meghajtóprogram (sqlite, mysql vagy postgresql).", "Cannot write into \"config\" directory" : "Nem írható a \"config\" könyvtár", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ez rendszerint úgy oldható meg, hogy írási jogot adunk a webszervernek a config könyvtárra. Lásd: %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót. Továbbiak itt:%s", "Cannot write into \"apps\" directory" : "Nem írható az \"apps\" könyvtár", "Cannot create \"data\" directory" : "\"data\" mappa nem hozható létre", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ez legtöbbször megoldható a gyökér mappára a webszervernek adott írási joggal. Lásd: %s", @@ -199,8 +221,15 @@ "Storage connection error. %s" : "Tároló kapcsolódási hiba. %s", "Storage is temporarily not available" : "A tároló átmenetileg nem érthető el", "Storage connection timeout. %s" : "Tároló kapcsolat időtúllépés. %s", - "Following databases are supported: %s" : "A következő adatbázisok támogatottak: %s", - "Following platforms are supported: %s" : "Ezek a platformok támogatottak: %s", - "Invalid Federated Cloud ID" : "Érvénytelen Egyesített Felhő Azonosító" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ez rendszerint úgy oldható meg, hogy írási jogot adunk a webszervernek a config könyvtárra.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Avagy, ha jobbnak tűnik tarthatod a config.php fájlt olvashatónak, csak engedélyezd a \"config_is_read_only\" kapcsolót.", + "Can't create or write into the data directory %s" : "Nem sikerült létrehozni vagy irni a \"data\" könyvtárba %s", + "Invalid Federated Cloud ID" : "Érvénytelen Egyesített Felhő Azonosító", + "Can’t increase permissions of %s" : "A(z) %s engedélyei nem kibővíthetők", + "Files can’t be shared with delete permissions" : "A fájlok nem megoszthatók törlési joggal", + "Files can’t be shared with create permissions" : "Fájlok nem oszthatók meg létrehozási joggal", + "Can’t set expiration date more than %s days in the future" : "Nem lehet %s napnál későbbi lejáratot megadni", + "Can't read file" : "Nem olvasható a fájl", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ezt általában úgy lehet kijavítani, hogy a webszervernek írási hozzáférést ad az alkalmazások könyvtárához, vagy letiltja az alkalmazásboltot a konfigurációs fájlban." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/id.js b/lib/l10n/id.js index 6842c43e43d..26296e03874 100644 --- a/lib/l10n/id.js +++ b/lib/l10n/id.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Tidak dapat menulis kedalam direktori \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Hal ini biasanya dapat diperbaiki dengan memberikan akses tulis bagi situs web ke direktori config", "See %s" : "Lihat %s", "Sample configuration detected" : "Konfigurasi sampel ditemukan", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Ditemukan bahwa konfigurasi sampel telah disalin. Hal ini dapat merusak instalasi Anda dan tidak didukung. Silahkan baca dokumentasi sebelum melakukan perubahan pada config.php", @@ -54,7 +53,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Mohon hapus pengaturan open_basedir didalam php.ini atau beralih ke PHP 64-bit.", "Set an admin username." : "Tetapkan nama pengguna admin.", "Set an admin password." : "Tetapkan kata sandi admin.", - "Can't create or write into the data directory %s" : "Tidak dapat membuat atau menulis kedalam direktori data %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Backend berbagi %s harus mengimplementasi antarmuka OCP\\Share_Backend", "Sharing backend %s not found" : "Backend berbagi %s tidak ditemukan", "Sharing backend for %s not found" : "Backend berbagi untuk %s tidak ditemukan", @@ -116,7 +114,6 @@ OC.L10N.register( "Login canceled by app" : "Log masuk dibatalkan oleh aplikasi", "a safe home for all your data" : "rumah yang aman untuk semua datamu", "File is currently busy, please try again later" : "Berkas sedang sibuk, mohon coba lagi nanti", - "Can't read file" : "Tidak dapat membaca berkas", "Application is not enabled" : "aplikasi tidak diaktifkan", "Authentication error" : "Galat saat otentikasi", "Token expired. Please reload page." : "Token sudah kedaluwarsa. Silakan muat ulang halaman.", @@ -147,8 +144,9 @@ OC.L10N.register( "Storage connection error. %s" : "Koneksi penyimpanan bermasalah. %s", "Storage is temporarily not available" : "Penyimpanan sementara tidak tersedia", "Storage connection timeout. %s" : "Koneksi penyimpanan waktu-habis. %s", - "Following databases are supported: %s" : "Berikut adalah basis data yang didukung: %s", - "Following platforms are supported: %s" : "Berikut adalah platform yang didukung: %s", - "Invalid Federated Cloud ID" : "Federated Cloud ID tidak sah" + "This can usually be fixed by giving the webserver write access to the config directory" : "Hal ini biasanya dapat diperbaiki dengan memberikan akses tulis bagi situs web ke direktori config", + "Can't create or write into the data directory %s" : "Tidak dapat membuat atau menulis kedalam direktori data %s", + "Invalid Federated Cloud ID" : "Federated Cloud ID tidak sah", + "Can't read file" : "Tidak dapat membaca berkas" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/id.json b/lib/l10n/id.json index 91549227a20..4ba7b5aff39 100644 --- a/lib/l10n/id.json +++ b/lib/l10n/id.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Tidak dapat menulis kedalam direktori \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Hal ini biasanya dapat diperbaiki dengan memberikan akses tulis bagi situs web ke direktori config", "See %s" : "Lihat %s", "Sample configuration detected" : "Konfigurasi sampel ditemukan", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Ditemukan bahwa konfigurasi sampel telah disalin. Hal ini dapat merusak instalasi Anda dan tidak didukung. Silahkan baca dokumentasi sebelum melakukan perubahan pada config.php", @@ -52,7 +51,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Mohon hapus pengaturan open_basedir didalam php.ini atau beralih ke PHP 64-bit.", "Set an admin username." : "Tetapkan nama pengguna admin.", "Set an admin password." : "Tetapkan kata sandi admin.", - "Can't create or write into the data directory %s" : "Tidak dapat membuat atau menulis kedalam direktori data %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Backend berbagi %s harus mengimplementasi antarmuka OCP\\Share_Backend", "Sharing backend %s not found" : "Backend berbagi %s tidak ditemukan", "Sharing backend for %s not found" : "Backend berbagi untuk %s tidak ditemukan", @@ -114,7 +112,6 @@ "Login canceled by app" : "Log masuk dibatalkan oleh aplikasi", "a safe home for all your data" : "rumah yang aman untuk semua datamu", "File is currently busy, please try again later" : "Berkas sedang sibuk, mohon coba lagi nanti", - "Can't read file" : "Tidak dapat membaca berkas", "Application is not enabled" : "aplikasi tidak diaktifkan", "Authentication error" : "Galat saat otentikasi", "Token expired. Please reload page." : "Token sudah kedaluwarsa. Silakan muat ulang halaman.", @@ -145,8 +142,9 @@ "Storage connection error. %s" : "Koneksi penyimpanan bermasalah. %s", "Storage is temporarily not available" : "Penyimpanan sementara tidak tersedia", "Storage connection timeout. %s" : "Koneksi penyimpanan waktu-habis. %s", - "Following databases are supported: %s" : "Berikut adalah basis data yang didukung: %s", - "Following platforms are supported: %s" : "Berikut adalah platform yang didukung: %s", - "Invalid Federated Cloud ID" : "Federated Cloud ID tidak sah" + "This can usually be fixed by giving the webserver write access to the config directory" : "Hal ini biasanya dapat diperbaiki dengan memberikan akses tulis bagi situs web ke direktori config", + "Can't create or write into the data directory %s" : "Tidak dapat membuat atau menulis kedalam direktori data %s", + "Invalid Federated Cloud ID" : "Federated Cloud ID tidak sah", + "Can't read file" : "Tidak dapat membaca berkas" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/l10n/is.js b/lib/l10n/is.js index cd9c2d31c5b..0b7315efd37 100644 --- a/lib/l10n/is.js +++ b/lib/l10n/is.js @@ -2,10 +2,7 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Get ekki skrifað í \"config\" möppuna!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í stillingamöppuna", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni.", "See %s" : "Skoðaðu %s", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni. Skoðaðu %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Skrám forritsins %$1s var ekki rétt skipt út. Gakktu úr skugga um að þetta sé útgáfa sem sé samhæfð útgáfu vefþjónsins.", "Sample configuration detected" : "Fann sýnisuppsetningu", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Komið hefur í ljós að sýniuppsetningin var afrituð. Þetta getur skemmt uppsetninguna og er ekki stutt. Endilega lestu hjálparskjölin áður en þú gerir breytingar á config.php", @@ -94,7 +91,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Fjarlægðu stillinguna open_basedir úr php.ini eða skiptu yfir í 64-bita PHP.", "Set an admin username." : "Stilltu notandanafn kerfisstjóra.", "Set an admin password." : "Stilltu lykilorð kerfisstjóra.", - "Can't create or write into the data directory %s" : "Gat ekki búið til eða skrifað í gagnamöppuna %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Deilingarbakendinn %s verður að vera settur upp fyrir viðmótið OCP\\Share_Backend", "Sharing backend %s not found" : "Deilingarbakendinn %s fannst ekki", "Sharing backend for %s not found" : "Deilingarbakendi fyrir %s fannst ekki", @@ -104,11 +100,7 @@ OC.L10N.register( "Open »%s«" : "Opna »%s«", "%1$s via %2$s" : "%1$s með %2$s", "You are not allowed to share %s" : "Þú hefur ekki heimild til að deila %s", - "Can’t increase permissions of %s" : "Get ekki aukið aðgangsheimildir %s", - "Files can’t be shared with delete permissions" : "Ekki er hægt að deila skrá með eyða-heimildum", - "Files can’t be shared with create permissions" : "Ekki er hægt að deila skrá með búa-til-heimildum", "Expiration date is in the past" : "Gildistíminn er þegar runninn út", - "Can’t set expiration date more than %s days in the future" : "Ekki er hægt að setja lokadagsetningu meira en %s daga fram í tímann", "%1$s shared »%2$s« with you" : "%1$s deildi »%2$s« með þér", "%1$s shared »%2$s« with you." : "%1$s deildi »%2$s« með þér.", "Click the button below to open it." : "Smelltu á hnappinn hér fyrir neðan til að opna það.", @@ -172,13 +164,13 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Ekki var hægt að setja upp \"%1$s\" forritið þar sem eftirfarandi kerfiskröfur eru ekki uppfylltar: %2$s", "a safe home for all your data" : "öruggur staður fyrir öll gögnin þín", "File is currently busy, please try again later" : "Skráin er upptekin í augnablikinu, reyndu aftur síðar", - "Can't read file" : "Get ekki lesið skrána", "Application is not enabled" : "Forrit ekki virkt", "Authentication error" : "Villa við auðkenningu", "Token expired. Please reload page." : "Kenniteikn er útrunnið. Þú ættir að hlaða síðunni aftur inn.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Engir reklar fyrir gagnagrunn eru uppsettir (sqlite, mysql eða postgresql).", "Cannot write into \"config\" directory" : "Get ekki skrifað í \"config\" möppuna", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í stillingamöppuna. Sjá %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni. Skoðaðu %s", "Cannot write into \"apps\" directory" : "Get ekki skrifað í \"apps\" möppuna", "Cannot create \"data\" directory" : "Get ekki búið til \"data\" möppu", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í rótarmöppuna. Sjá %s", @@ -216,8 +208,14 @@ OC.L10N.register( "Storage connection error. %s" : "Villa í tengingu við gagnageymslu. %s", "Storage is temporarily not available" : "Gagnageymsla ekki tiltæk í augnablikinu", "Storage connection timeout. %s" : "Gagnageymsla féll á tíma. %s", - "Following databases are supported: %s" : "Eftirfarandi gagnagrunnar eru studdir: %s", - "Following platforms are supported: %s" : "Eftirfarandi stýrikerfi eru studd: %s", - "Invalid Federated Cloud ID" : "Ógilt skýjasambandsauðkenni (Federated Cloud ID)" + "This can usually be fixed by giving the webserver write access to the config directory" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í stillingamöppuna", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni.", + "Can't create or write into the data directory %s" : "Gat ekki búið til eða skrifað í gagnamöppuna %s", + "Invalid Federated Cloud ID" : "Ógilt skýjasambandsauðkenni (Federated Cloud ID)", + "Can’t increase permissions of %s" : "Get ekki aukið aðgangsheimildir %s", + "Files can’t be shared with delete permissions" : "Ekki er hægt að deila skrá með eyða-heimildum", + "Files can’t be shared with create permissions" : "Ekki er hægt að deila skrá með búa-til-heimildum", + "Can’t set expiration date more than %s days in the future" : "Ekki er hægt að setja lokadagsetningu meira en %s daga fram í tímann", + "Can't read file" : "Get ekki lesið skrána" }, "nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"); diff --git a/lib/l10n/is.json b/lib/l10n/is.json index 70c03d172a6..3bfd13f1948 100644 --- a/lib/l10n/is.json +++ b/lib/l10n/is.json @@ -1,9 +1,6 @@ { "translations": { "Cannot write into \"config\" directory!" : "Get ekki skrifað í \"config\" möppuna!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í stillingamöppuna", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni.", "See %s" : "Skoðaðu %s", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni. Skoðaðu %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Skrám forritsins %$1s var ekki rétt skipt út. Gakktu úr skugga um að þetta sé útgáfa sem sé samhæfð útgáfu vefþjónsins.", "Sample configuration detected" : "Fann sýnisuppsetningu", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Komið hefur í ljós að sýniuppsetningin var afrituð. Þetta getur skemmt uppsetninguna og er ekki stutt. Endilega lestu hjálparskjölin áður en þú gerir breytingar á config.php", @@ -92,7 +89,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Fjarlægðu stillinguna open_basedir úr php.ini eða skiptu yfir í 64-bita PHP.", "Set an admin username." : "Stilltu notandanafn kerfisstjóra.", "Set an admin password." : "Stilltu lykilorð kerfisstjóra.", - "Can't create or write into the data directory %s" : "Gat ekki búið til eða skrifað í gagnamöppuna %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Deilingarbakendinn %s verður að vera settur upp fyrir viðmótið OCP\\Share_Backend", "Sharing backend %s not found" : "Deilingarbakendinn %s fannst ekki", "Sharing backend for %s not found" : "Deilingarbakendi fyrir %s fannst ekki", @@ -102,11 +98,7 @@ "Open »%s«" : "Opna »%s«", "%1$s via %2$s" : "%1$s með %2$s", "You are not allowed to share %s" : "Þú hefur ekki heimild til að deila %s", - "Can’t increase permissions of %s" : "Get ekki aukið aðgangsheimildir %s", - "Files can’t be shared with delete permissions" : "Ekki er hægt að deila skrá með eyða-heimildum", - "Files can’t be shared with create permissions" : "Ekki er hægt að deila skrá með búa-til-heimildum", "Expiration date is in the past" : "Gildistíminn er þegar runninn út", - "Can’t set expiration date more than %s days in the future" : "Ekki er hægt að setja lokadagsetningu meira en %s daga fram í tímann", "%1$s shared »%2$s« with you" : "%1$s deildi »%2$s« með þér", "%1$s shared »%2$s« with you." : "%1$s deildi »%2$s« með þér.", "Click the button below to open it." : "Smelltu á hnappinn hér fyrir neðan til að opna það.", @@ -170,13 +162,13 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Ekki var hægt að setja upp \"%1$s\" forritið þar sem eftirfarandi kerfiskröfur eru ekki uppfylltar: %2$s", "a safe home for all your data" : "öruggur staður fyrir öll gögnin þín", "File is currently busy, please try again later" : "Skráin er upptekin í augnablikinu, reyndu aftur síðar", - "Can't read file" : "Get ekki lesið skrána", "Application is not enabled" : "Forrit ekki virkt", "Authentication error" : "Villa við auðkenningu", "Token expired. Please reload page." : "Kenniteikn er útrunnið. Þú ættir að hlaða síðunni aftur inn.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Engir reklar fyrir gagnagrunn eru uppsettir (sqlite, mysql eða postgresql).", "Cannot write into \"config\" directory" : "Get ekki skrifað í \"config\" möppuna", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í stillingamöppuna. Sjá %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni. Skoðaðu %s", "Cannot write into \"apps\" directory" : "Get ekki skrifað í \"apps\" möppuna", "Cannot create \"data\" directory" : "Get ekki búið til \"data\" möppu", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í rótarmöppuna. Sjá %s", @@ -214,8 +206,14 @@ "Storage connection error. %s" : "Villa í tengingu við gagnageymslu. %s", "Storage is temporarily not available" : "Gagnageymsla ekki tiltæk í augnablikinu", "Storage connection timeout. %s" : "Gagnageymsla féll á tíma. %s", - "Following databases are supported: %s" : "Eftirfarandi gagnagrunnar eru studdir: %s", - "Following platforms are supported: %s" : "Eftirfarandi stýrikerfi eru studd: %s", - "Invalid Federated Cloud ID" : "Ógilt skýjasambandsauðkenni (Federated Cloud ID)" + "This can usually be fixed by giving the webserver write access to the config directory" : "Þetta er venjulega hægt að laga með því að gefa vefþjóninum skrifréttindi í stillingamöppuna", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eða, ef þú vilt halda config.php skránni aðeins til lestrar, settu valkostinn \"config_is_read_only\" á 'true' í henni.", + "Can't create or write into the data directory %s" : "Gat ekki búið til eða skrifað í gagnamöppuna %s", + "Invalid Federated Cloud ID" : "Ógilt skýjasambandsauðkenni (Federated Cloud ID)", + "Can’t increase permissions of %s" : "Get ekki aukið aðgangsheimildir %s", + "Files can’t be shared with delete permissions" : "Ekki er hægt að deila skrá með eyða-heimildum", + "Files can’t be shared with create permissions" : "Ekki er hægt að deila skrá með búa-til-heimildum", + "Can’t set expiration date more than %s days in the future" : "Ekki er hægt að setja lokadagsetningu meira en %s daga fram í tímann", + "Can't read file" : "Get ekki lesið skrána" },"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);" }
\ No newline at end of file diff --git a/lib/l10n/it.js b/lib/l10n/it.js index c339ae1b773..721b92838aa 100644 --- a/lib/l10n/it.js +++ b/lib/l10n/it.js @@ -2,11 +2,9 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Impossibile scrivere nella cartella \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"config\"", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true.", - "See %s" : "Vedi %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"config\".", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true. Vedi %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ma, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true.", + "See %s" : "Vedi %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "I file dell'applicazione %1$s non sono stati sostituiti correttamente. Assicurati che sia una versione compatibile con il server.", "Sample configuration detected" : "Configurazione di esempio rilevata", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "È stato rilevato che la configurazione di esempio è stata copiata. Ciò può compromettere la tua installazione e non è supportato. Leggi la documentazione prima di modificare il file config.php", @@ -72,6 +70,7 @@ OC.L10N.register( "Empty file" : "File vuoto", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Il modulo con ID: %s non esiste. Abilitalo nelle impostazioni delle applicazioni o contatta il tuo amministratore.", "File already exists" : "Il file esiste già", + "Invalid path" : "Percorso non valido", "Failed to create file from template" : "Impossibile creare un file dal modello", "Templates" : "Modelli", "File name is a reserved word" : "Il nome del file è una parola riservata", @@ -105,7 +104,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Rimuovi l'impostazione di open_basedir nel tuo php.ini o passa alla versione a 64 bit di PHP.", "Set an admin username." : "Imposta un nome utente di amministrazione.", "Set an admin password." : "Imposta una password di amministrazione.", - "Can't create or write into the data directory %s" : "Impossibile creare o scrivere nella cartella dei dati %s", + "Cannot create or write into the data directory %s" : "Impossibile creare o scrivere nella cartella dei dati %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Il motore di condivisione %s deve implementare l'interfaccia OCP\\Share_Backend", "Sharing backend %s not found" : "Motore di condivisione %s non trovato", "Sharing backend for %s not found" : "Motore di condivisione di %s non trovato", @@ -115,12 +114,13 @@ OC.L10N.register( "Open »%s«" : "Apri «%s»", "%1$s via %2$s" : "%1$s tramite %2$s", "You are not allowed to share %s" : "Non ti è consentito condividere %s", - "Can’t increase permissions of %s" : "Impossibile aumentare i permessi di %s", - "Files can’t be shared with delete permissions" : "I file non possono essere condivisi con permessi di eliminazione", - "Files can’t be shared with create permissions" : "I file non possono essere condivisi con permessi di creazione", + "Cannot increase permissions of %s" : "Impossibile aumentare i permessi di %s", + "Files cannot be shared with delete permissions" : "I file non possono essere condivisi con permessi di eliminazione", + "Files cannot be shared with create permissions" : "I file non possono essere condivisi con permessi di creazione", "Expiration date is in the past" : "La data di scadenza è nel passato", - "Can’t set expiration date more than %s days in the future" : "Impossibile impostare la data di scadenza a più di %s giorni nel futuro", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Impossibile impostare la data di scadenza a più di %n giorni nel futuro","Impossibile impostare la data di scadenza a più di %n giorni nel futuro"], "Sharing is only allowed with group members" : "La condivisione è consentita solo con i membri del gruppo", + "Sharing %s failed, because this item is already shared with user %s" : "Condivisione di %s non riuscita, poiché l'oggetto è già condiviso con l'utente %s", "%1$s shared »%2$s« with you" : "%1$s ha condiviso «%2$s» con te", "%1$s shared »%2$s« with you." : "%1$s ha condiviso «%2$s» con te.", "Click the button below to open it." : "Fai clic sul pulsante sotto per aprirlo.", @@ -185,15 +185,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "L'applicazione \"%1$s\" non può essere installata poiché le seguenti dipendenze non sono soddisfatte: %2$s", "a safe home for all your data" : "un posto sicuro per tutti i tuoi dati", "File is currently busy, please try again later" : "Il file è attualmente occupato, riprova più tardi", - "Can't read file" : "Impossibile leggere il file", + "Cannot read file" : "Impossibile leggere il file", "Application is not enabled" : "L'applicazione non è abilitata", "Authentication error" : "Errore di autenticazione", "Token expired. Please reload page." : "Token scaduto. Ricarica la pagina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nessun driver di database (sqlite, mysql o postgresql) installato", "Cannot write into \"config\" directory" : "Impossibile scrivere nella cartella \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella di configurazione. Vedi %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true. Vedi %s", "Cannot write into \"apps\" directory" : "Impossibile scrivere nella cartella \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Questo può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"apps\" o disabilitando il negozio di applicazioni nel file di configurazione.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Questo può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"apps\" o disabilitando il negozio delle applicazioni nel file di configurazione.", "Cannot create \"data\" directory" : "Impossibile creare la cartella \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella radice. Vedi %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "I permessi possono essere normalmente corretti fornendo al server web accesso in scrittura alla cartella radice. Vedi %s.", @@ -230,8 +231,15 @@ OC.L10N.register( "Storage connection error. %s" : "Errore di connessione all'archiviazione. %s", "Storage is temporarily not available" : "L'archiviazione è temporaneamente non disponibile", "Storage connection timeout. %s" : "Timeout di connessione all'archiviazione. %s", - "Following databases are supported: %s" : "I seguenti database sono supportati: %s", - "Following platforms are supported: %s" : "Sono supportate le seguenti piattaforme: %s", - "Invalid Federated Cloud ID" : "ID di cloud federata non valido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"config\"", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true.", + "Can't create or write into the data directory %s" : "Impossibile creare o scrivere nella cartella dei dati %s", + "Invalid Federated Cloud ID" : "ID di cloud federata non valido", + "Can’t increase permissions of %s" : "Impossibile aumentare i permessi di %s", + "Files can’t be shared with delete permissions" : "I file non possono essere condivisi con permessi di eliminazione", + "Files can’t be shared with create permissions" : "I file non possono essere condivisi con permessi di creazione", + "Can’t set expiration date more than %s days in the future" : "Impossibile impostare la data di scadenza a più di %s giorni nel futuro", + "Can't read file" : "Impossibile leggere il file", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Questo può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"apps\" o disabilitando il negozio delle applicazioni nel file di configurazione." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/it.json b/lib/l10n/it.json index 730f78dfe32..540af88135f 100644 --- a/lib/l10n/it.json +++ b/lib/l10n/it.json @@ -1,10 +1,8 @@ { "translations": { "Cannot write into \"config\" directory!" : "Impossibile scrivere nella cartella \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"config\"", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true.", - "See %s" : "Vedi %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"config\".", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true. Vedi %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ma, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true.", + "See %s" : "Vedi %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "I file dell'applicazione %1$s non sono stati sostituiti correttamente. Assicurati che sia una versione compatibile con il server.", "Sample configuration detected" : "Configurazione di esempio rilevata", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "È stato rilevato che la configurazione di esempio è stata copiata. Ciò può compromettere la tua installazione e non è supportato. Leggi la documentazione prima di modificare il file config.php", @@ -70,6 +68,7 @@ "Empty file" : "File vuoto", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Il modulo con ID: %s non esiste. Abilitalo nelle impostazioni delle applicazioni o contatta il tuo amministratore.", "File already exists" : "Il file esiste già", + "Invalid path" : "Percorso non valido", "Failed to create file from template" : "Impossibile creare un file dal modello", "Templates" : "Modelli", "File name is a reserved word" : "Il nome del file è una parola riservata", @@ -103,7 +102,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Rimuovi l'impostazione di open_basedir nel tuo php.ini o passa alla versione a 64 bit di PHP.", "Set an admin username." : "Imposta un nome utente di amministrazione.", "Set an admin password." : "Imposta una password di amministrazione.", - "Can't create or write into the data directory %s" : "Impossibile creare o scrivere nella cartella dei dati %s", + "Cannot create or write into the data directory %s" : "Impossibile creare o scrivere nella cartella dei dati %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Il motore di condivisione %s deve implementare l'interfaccia OCP\\Share_Backend", "Sharing backend %s not found" : "Motore di condivisione %s non trovato", "Sharing backend for %s not found" : "Motore di condivisione di %s non trovato", @@ -113,12 +112,13 @@ "Open »%s«" : "Apri «%s»", "%1$s via %2$s" : "%1$s tramite %2$s", "You are not allowed to share %s" : "Non ti è consentito condividere %s", - "Can’t increase permissions of %s" : "Impossibile aumentare i permessi di %s", - "Files can’t be shared with delete permissions" : "I file non possono essere condivisi con permessi di eliminazione", - "Files can’t be shared with create permissions" : "I file non possono essere condivisi con permessi di creazione", + "Cannot increase permissions of %s" : "Impossibile aumentare i permessi di %s", + "Files cannot be shared with delete permissions" : "I file non possono essere condivisi con permessi di eliminazione", + "Files cannot be shared with create permissions" : "I file non possono essere condivisi con permessi di creazione", "Expiration date is in the past" : "La data di scadenza è nel passato", - "Can’t set expiration date more than %s days in the future" : "Impossibile impostare la data di scadenza a più di %s giorni nel futuro", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Impossibile impostare la data di scadenza a più di %n giorni nel futuro","Impossibile impostare la data di scadenza a più di %n giorni nel futuro"], "Sharing is only allowed with group members" : "La condivisione è consentita solo con i membri del gruppo", + "Sharing %s failed, because this item is already shared with user %s" : "Condivisione di %s non riuscita, poiché l'oggetto è già condiviso con l'utente %s", "%1$s shared »%2$s« with you" : "%1$s ha condiviso «%2$s» con te", "%1$s shared »%2$s« with you." : "%1$s ha condiviso «%2$s» con te.", "Click the button below to open it." : "Fai clic sul pulsante sotto per aprirlo.", @@ -183,15 +183,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "L'applicazione \"%1$s\" non può essere installata poiché le seguenti dipendenze non sono soddisfatte: %2$s", "a safe home for all your data" : "un posto sicuro per tutti i tuoi dati", "File is currently busy, please try again later" : "Il file è attualmente occupato, riprova più tardi", - "Can't read file" : "Impossibile leggere il file", + "Cannot read file" : "Impossibile leggere il file", "Application is not enabled" : "L'applicazione non è abilitata", "Authentication error" : "Errore di autenticazione", "Token expired. Please reload page." : "Token scaduto. Ricarica la pagina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nessun driver di database (sqlite, mysql o postgresql) installato", "Cannot write into \"config\" directory" : "Impossibile scrivere nella cartella \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella di configurazione. Vedi %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true. Vedi %s", "Cannot write into \"apps\" directory" : "Impossibile scrivere nella cartella \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Questo può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"apps\" o disabilitando il negozio di applicazioni nel file di configurazione.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Questo può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"apps\" o disabilitando il negozio delle applicazioni nel file di configurazione.", "Cannot create \"data\" directory" : "Impossibile creare la cartella \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella radice. Vedi %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "I permessi possono essere normalmente corretti fornendo al server web accesso in scrittura alla cartella radice. Vedi %s.", @@ -228,8 +229,15 @@ "Storage connection error. %s" : "Errore di connessione all'archiviazione. %s", "Storage is temporarily not available" : "L'archiviazione è temporaneamente non disponibile", "Storage connection timeout. %s" : "Timeout di connessione all'archiviazione. %s", - "Following databases are supported: %s" : "I seguenti database sono supportati: %s", - "Following platforms are supported: %s" : "Sono supportate le seguenti piattaforme: %s", - "Invalid Federated Cloud ID" : "ID di cloud federata non valido" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ciò può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"config\"", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "O, se preferisci mantenere il file config.php in sola lettura, imposta l'opzione \"config_is_read_only\" a true.", + "Can't create or write into the data directory %s" : "Impossibile creare o scrivere nella cartella dei dati %s", + "Invalid Federated Cloud ID" : "ID di cloud federata non valido", + "Can’t increase permissions of %s" : "Impossibile aumentare i permessi di %s", + "Files can’t be shared with delete permissions" : "I file non possono essere condivisi con permessi di eliminazione", + "Files can’t be shared with create permissions" : "I file non possono essere condivisi con permessi di creazione", + "Can’t set expiration date more than %s days in the future" : "Impossibile impostare la data di scadenza a più di %s giorni nel futuro", + "Can't read file" : "Impossibile leggere il file", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Questo può essere normalmente corretto fornendo al server web accesso in scrittura alla cartella \"apps\" o disabilitando il negozio delle applicazioni nel file di configurazione." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/ja.js b/lib/l10n/ja.js index e1b8412d7a5..40fa5b46587 100644 --- a/lib/l10n/ja.js +++ b/lib/l10n/ja.js @@ -2,11 +2,9 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "\"config\"ディレクトリに書き込めません!", - "This can usually be fixed by giving the webserver write access to the config directory" : "多くの場合、これはWebサーバーにconfigディレクトリへの書き込み権限を与えることで解決できます。", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。", - "See %s" : "%s を閲覧", "This can usually be fixed by giving the webserver write access to the config directory." : "多くの場合、これはWebサーバーにconfigディレクトリへの書き込み権限を与えることで解決できます。", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。 %sを参照してください", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "しかし、config.phpファイルを読み取り専用にしたい場合は、オプションの \"config_is_read_only\"をtrueに設定してください。", + "See %s" : "%s を閲覧", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "アプリ %1$s のファイルが正しく置き換えられませんでした。サーバーと互換性のあるバージョンであることを確認してください。", "Sample configuration detected" : "サンプル設定が見つかりました。", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "サンプル設定がコピーされてそのままです。このままではインストールが失敗し、サポート対象外になります。config.phpを変更する前にドキュメントを確認してください。", @@ -71,6 +69,10 @@ OC.L10N.register( "seconds ago" : "数秒前", "Empty file" : "空白のファイル", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "ID: %sのモジュールは存在しません。アプリ設定で有効にするか、管理者に問い合わせてください。", + "File already exists" : "ファイルが既に存在します", + "Invalid path" : "パスが無効", + "Failed to create file from template" : "テンプレートからファイルを作成できませんでした", + "Templates" : "テンプレート", "File name is a reserved word" : "ファイル名が予約された単語です", "File name contains at least one invalid character" : "ファイル名に1文字以上の無効な文字が含まれています", "File name is too long" : "ファイル名が長すぎます", @@ -102,7 +104,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "php.ini から open_basedir 設定を削除するか、64bit PHPに切り替えてください。", "Set an admin username." : "管理者のユーザー名を設定", "Set an admin password." : "管理者のパスワードを設定", - "Can't create or write into the data directory %s" : "%s データディレクトリに作成、書き込みができません", + "Cannot create or write into the data directory %s" : " データディレクトリ%sに作成、書き込みができません", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "%s のバックエンドの共有には、OCP\\Share_Backend インターフェースを実装しなければなりません。", "Sharing backend %s not found" : "共有バックエンド %s が見つかりません", "Sharing backend for %s not found" : "%s のための共有バックエンドが見つかりません", @@ -112,11 +114,13 @@ OC.L10N.register( "Open »%s«" : "»%s«を開く", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "%s を共有することを許可されていません。", - "Can’t increase permissions of %s" : "%s の権限を追加できません", - "Files can’t be shared with delete permissions" : "削除権限つきでファイルを共有できません。", - "Files can’t be shared with create permissions" : "作成権限つきでファイルを共有できません。", + "Cannot increase permissions of %s" : "%sの権限を追加できません ", + "Files cannot be shared with delete permissions" : "削除権限付きでファイルを共有できません", + "Files cannot be shared with create permissions" : "作成権限付きでファイルを共有できません", "Expiration date is in the past" : "有効期限が切れています", - "Can’t set expiration date more than %s days in the future" : "有効期限を%s日以降に設定できません。", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["%s 日以上先の有効期限は設定できません "], + "Sharing is only allowed with group members" : "共有はグループメンバーにのみ許可されます", + "Sharing %s failed, because this item is already shared with user %s" : "このアイテム%sはすでにユーザー%sと共有されているため、共有に失敗しました", "%1$s shared »%2$s« with you" : "%1$s は »%2$s« をあなたと共有しました", "%1$s shared »%2$s« with you." : "%1$sが あなたと »%2$s« を共有しました。", "Click the button below to open it." : "開くには下のボタンをクリック", @@ -167,6 +171,7 @@ OC.L10N.register( "Oct." : "10月", "Nov." : "11月", "Dec." : "12月", + "The user limit has been reached and the user was not created." : "ユーザー制限に達し、ユーザーは作成されませんでした。", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "ユーザー名で利用できる文字列は、次のものです: \"a-z\", \"A-Z\", \"0-9\", \"_.@-\"", "A valid username must be provided" : "有効なユーザー名を指定する必要があります", "Username contains whitespace at the beginning or at the end" : "ユーザー名の最初か最後に空白が含まれています", @@ -178,17 +183,18 @@ OC.L10N.register( "User disabled" : "ユーザーは無効です", "Login canceled by app" : "アプリによりログインが中止されました", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "次の依存関係を満たしていないため、アプリ \"%1$s\" をインストールできません: %2$s", - "a safe home for all your data" : "あなたのすべてのデータを安全に保管する場所", + "a safe home for all your data" : "あらゆるデータを安全に保管します", "File is currently busy, please try again later" : "現在ファイルはビジーです。後でもう一度試してください。", - "Can't read file" : "ファイルを読み込めません", + "Cannot read file" : "ファイルを読み込めません", "Application is not enabled" : "アプリケーションは無効です", "Authentication error" : "認証エラー", "Token expired. Please reload page." : "トークンが無効になりました。ページを再読込してください。", "No database drivers (sqlite, mysql, or postgresql) installed." : "データベースドライバー (sqlite, mysql, postgresql) がインストールされていません。", "Cannot write into \"config\" directory" : "\"config\" ディレクトリに書き込みができません", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "多くの場合、Webサーバーの configディレクトリ に書き込み権限を与えることで直ります。%s を見てください", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。 %sを参照してください", "Cannot write into \"apps\" directory" : "\"apps\" ディレクトリに書き込みができません", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "多くの場合、これはWebサーバーにappsディレクトリへの書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "これは通常、Webサーバーにappsディレクトリへの書き込み権限を許可するか、構成ファイルでAppStoreを無効にすることで解決できます。", "Cannot create \"data\" directory" : "\"data\" ディレクトリを作成できません", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "多くの場合、Webサーバーのルートディレクトリに書き込み権限を与えることで直ります。%s を見てください。", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Webサーバーのルートディレクトリに書き込み権限パーミッションが必要です。%s を見てください。", @@ -214,19 +220,26 @@ OC.L10N.register( "Check the value of \"datadirectory\" in your configuration" : "設定ファイル内の \"datadirectory\" の値を確認してください。", "Your data directory is invalid" : "データディレクトリが無効です", "Ensure there is a file called \".ocdata\" in the root of the data directory." : "データディレクトリの直下に \".ocdata\" ファイルがあるのを確認してください。", - "Action \"%s\" not supported or implemented." : "アクション「%s」はサポートされていないか、実装されていません。", - "Authentication failed, wrong token or provider ID given" : "認証できませんでした。トークンまたはプロバイダIDが間違っています", + "Action \"%s\" not supported or implemented." : "アクション「%s」は対応していないか、実装されていません。", + "Authentication failed, wrong token or provider ID given" : "認証できませんでした。トークンまたはプロバイダーIDが間違っています", "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "要求を完了するためのパラメータがありません。欠落したパラメータ:「%s」", - "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "ID「%1$s」はクラウドフェデレーションプロバイダ「%2$s」によって既に使用されています", - "Cloud Federation Provider with ID: \"%s\" does not exist." : "ID: \"%s\"のクラウドフェデレーションプロバイダは存在しません。", + "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "ID「%1$s」はクラウドフェデレーションプロバイダー「%2$s」によって既に使用されています", + "Cloud Federation Provider with ID: \"%s\" does not exist." : "ID: \"%s\"のクラウドフェデレーションプロバイダーは存在しません。", "Could not obtain lock type %d on \"%s\"." : "\"%s\" で %d タイプのロックを取得できませんでした。", "Storage unauthorized. %s" : "権限のないストレージです。 %s", "Storage incomplete configuration. %s" : "設定が未完了のストレージです。 %s", "Storage connection error. %s" : "ストレージへの接続エラー。 %s", "Storage is temporarily not available" : "ストレージは一時的に利用できません", "Storage connection timeout. %s" : "ストレージへの接続がタイムアウト。 %s", - "Following databases are supported: %s" : "次のデータベースをサポートしています: %s", - "Following platforms are supported: %s" : "次のプラットフォームをサポートしています: %s", - "Invalid Federated Cloud ID" : "無効なクラウド共有ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "多くの場合、これはWebサーバーにconfigディレクトリへの書き込み権限を与えることで解決できます。", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。", + "Can't create or write into the data directory %s" : "%s データディレクトリに作成、書き込みができません", + "Invalid Federated Cloud ID" : "無効なクラウド共有ID", + "Can’t increase permissions of %s" : "%s の権限を追加できません", + "Files can’t be shared with delete permissions" : "削除権限つきでファイルを共有できません。", + "Files can’t be shared with create permissions" : "作成権限つきでファイルを共有できません。", + "Can’t set expiration date more than %s days in the future" : "有効期限を%s日以降に設定できません。", + "Can't read file" : "ファイルを読み込めません", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "多くの場合、これはWebサーバーにappsディレクトリへの書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/ja.json b/lib/l10n/ja.json index 3a18904d5e1..356e0e33a3f 100644 --- a/lib/l10n/ja.json +++ b/lib/l10n/ja.json @@ -1,10 +1,8 @@ { "translations": { "Cannot write into \"config\" directory!" : "\"config\"ディレクトリに書き込めません!", - "This can usually be fixed by giving the webserver write access to the config directory" : "多くの場合、これはWebサーバーにconfigディレクトリへの書き込み権限を与えることで解決できます。", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。", - "See %s" : "%s を閲覧", "This can usually be fixed by giving the webserver write access to the config directory." : "多くの場合、これはWebサーバーにconfigディレクトリへの書き込み権限を与えることで解決できます。", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。 %sを参照してください", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "しかし、config.phpファイルを読み取り専用にしたい場合は、オプションの \"config_is_read_only\"をtrueに設定してください。", + "See %s" : "%s を閲覧", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "アプリ %1$s のファイルが正しく置き換えられませんでした。サーバーと互換性のあるバージョンであることを確認してください。", "Sample configuration detected" : "サンプル設定が見つかりました。", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "サンプル設定がコピーされてそのままです。このままではインストールが失敗し、サポート対象外になります。config.phpを変更する前にドキュメントを確認してください。", @@ -69,6 +67,10 @@ "seconds ago" : "数秒前", "Empty file" : "空白のファイル", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "ID: %sのモジュールは存在しません。アプリ設定で有効にするか、管理者に問い合わせてください。", + "File already exists" : "ファイルが既に存在します", + "Invalid path" : "パスが無効", + "Failed to create file from template" : "テンプレートからファイルを作成できませんでした", + "Templates" : "テンプレート", "File name is a reserved word" : "ファイル名が予約された単語です", "File name contains at least one invalid character" : "ファイル名に1文字以上の無効な文字が含まれています", "File name is too long" : "ファイル名が長すぎます", @@ -100,7 +102,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "php.ini から open_basedir 設定を削除するか、64bit PHPに切り替えてください。", "Set an admin username." : "管理者のユーザー名を設定", "Set an admin password." : "管理者のパスワードを設定", - "Can't create or write into the data directory %s" : "%s データディレクトリに作成、書き込みができません", + "Cannot create or write into the data directory %s" : " データディレクトリ%sに作成、書き込みができません", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "%s のバックエンドの共有には、OCP\\Share_Backend インターフェースを実装しなければなりません。", "Sharing backend %s not found" : "共有バックエンド %s が見つかりません", "Sharing backend for %s not found" : "%s のための共有バックエンドが見つかりません", @@ -110,11 +112,13 @@ "Open »%s«" : "»%s«を開く", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "%s を共有することを許可されていません。", - "Can’t increase permissions of %s" : "%s の権限を追加できません", - "Files can’t be shared with delete permissions" : "削除権限つきでファイルを共有できません。", - "Files can’t be shared with create permissions" : "作成権限つきでファイルを共有できません。", + "Cannot increase permissions of %s" : "%sの権限を追加できません ", + "Files cannot be shared with delete permissions" : "削除権限付きでファイルを共有できません", + "Files cannot be shared with create permissions" : "作成権限付きでファイルを共有できません", "Expiration date is in the past" : "有効期限が切れています", - "Can’t set expiration date more than %s days in the future" : "有効期限を%s日以降に設定できません。", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["%s 日以上先の有効期限は設定できません "], + "Sharing is only allowed with group members" : "共有はグループメンバーにのみ許可されます", + "Sharing %s failed, because this item is already shared with user %s" : "このアイテム%sはすでにユーザー%sと共有されているため、共有に失敗しました", "%1$s shared »%2$s« with you" : "%1$s は »%2$s« をあなたと共有しました", "%1$s shared »%2$s« with you." : "%1$sが あなたと »%2$s« を共有しました。", "Click the button below to open it." : "開くには下のボタンをクリック", @@ -165,6 +169,7 @@ "Oct." : "10月", "Nov." : "11月", "Dec." : "12月", + "The user limit has been reached and the user was not created." : "ユーザー制限に達し、ユーザーは作成されませんでした。", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "ユーザー名で利用できる文字列は、次のものです: \"a-z\", \"A-Z\", \"0-9\", \"_.@-\"", "A valid username must be provided" : "有効なユーザー名を指定する必要があります", "Username contains whitespace at the beginning or at the end" : "ユーザー名の最初か最後に空白が含まれています", @@ -176,17 +181,18 @@ "User disabled" : "ユーザーは無効です", "Login canceled by app" : "アプリによりログインが中止されました", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "次の依存関係を満たしていないため、アプリ \"%1$s\" をインストールできません: %2$s", - "a safe home for all your data" : "あなたのすべてのデータを安全に保管する場所", + "a safe home for all your data" : "あらゆるデータを安全に保管します", "File is currently busy, please try again later" : "現在ファイルはビジーです。後でもう一度試してください。", - "Can't read file" : "ファイルを読み込めません", + "Cannot read file" : "ファイルを読み込めません", "Application is not enabled" : "アプリケーションは無効です", "Authentication error" : "認証エラー", "Token expired. Please reload page." : "トークンが無効になりました。ページを再読込してください。", "No database drivers (sqlite, mysql, or postgresql) installed." : "データベースドライバー (sqlite, mysql, postgresql) がインストールされていません。", "Cannot write into \"config\" directory" : "\"config\" ディレクトリに書き込みができません", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "多くの場合、Webサーバーの configディレクトリ に書き込み権限を与えることで直ります。%s を見てください", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。 %sを参照してください", "Cannot write into \"apps\" directory" : "\"apps\" ディレクトリに書き込みができません", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "多くの場合、これはWebサーバーにappsディレクトリへの書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "これは通常、Webサーバーにappsディレクトリへの書き込み権限を許可するか、構成ファイルでAppStoreを無効にすることで解決できます。", "Cannot create \"data\" directory" : "\"data\" ディレクトリを作成できません", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "多くの場合、Webサーバーのルートディレクトリに書き込み権限を与えることで直ります。%s を見てください。", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Webサーバーのルートディレクトリに書き込み権限パーミッションが必要です。%s を見てください。", @@ -212,19 +218,26 @@ "Check the value of \"datadirectory\" in your configuration" : "設定ファイル内の \"datadirectory\" の値を確認してください。", "Your data directory is invalid" : "データディレクトリが無効です", "Ensure there is a file called \".ocdata\" in the root of the data directory." : "データディレクトリの直下に \".ocdata\" ファイルがあるのを確認してください。", - "Action \"%s\" not supported or implemented." : "アクション「%s」はサポートされていないか、実装されていません。", - "Authentication failed, wrong token or provider ID given" : "認証できませんでした。トークンまたはプロバイダIDが間違っています", + "Action \"%s\" not supported or implemented." : "アクション「%s」は対応していないか、実装されていません。", + "Authentication failed, wrong token or provider ID given" : "認証できませんでした。トークンまたはプロバイダーIDが間違っています", "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "要求を完了するためのパラメータがありません。欠落したパラメータ:「%s」", - "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "ID「%1$s」はクラウドフェデレーションプロバイダ「%2$s」によって既に使用されています", - "Cloud Federation Provider with ID: \"%s\" does not exist." : "ID: \"%s\"のクラウドフェデレーションプロバイダは存在しません。", + "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "ID「%1$s」はクラウドフェデレーションプロバイダー「%2$s」によって既に使用されています", + "Cloud Federation Provider with ID: \"%s\" does not exist." : "ID: \"%s\"のクラウドフェデレーションプロバイダーは存在しません。", "Could not obtain lock type %d on \"%s\"." : "\"%s\" で %d タイプのロックを取得できませんでした。", "Storage unauthorized. %s" : "権限のないストレージです。 %s", "Storage incomplete configuration. %s" : "設定が未完了のストレージです。 %s", "Storage connection error. %s" : "ストレージへの接続エラー。 %s", "Storage is temporarily not available" : "ストレージは一時的に利用できません", "Storage connection timeout. %s" : "ストレージへの接続がタイムアウト。 %s", - "Following databases are supported: %s" : "次のデータベースをサポートしています: %s", - "Following platforms are supported: %s" : "次のプラットフォームをサポートしています: %s", - "Invalid Federated Cloud ID" : "無効なクラウド共有ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "多くの場合、これはWebサーバーにconfigディレクトリへの書き込み権限を与えることで解決できます。", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "またはconfig.phpファイルを読み取り専用にしたい場合は、オプション \"config_is_read_only\"をtrueに設定してください。", + "Can't create or write into the data directory %s" : "%s データディレクトリに作成、書き込みができません", + "Invalid Federated Cloud ID" : "無効なクラウド共有ID", + "Can’t increase permissions of %s" : "%s の権限を追加できません", + "Files can’t be shared with delete permissions" : "削除権限つきでファイルを共有できません。", + "Files can’t be shared with create permissions" : "作成権限つきでファイルを共有できません。", + "Can’t set expiration date more than %s days in the future" : "有効期限を%s日以降に設定できません。", + "Can't read file" : "ファイルを読み込めません", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "多くの場合、これはWebサーバーにappsディレクトリへの書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/l10n/ka_GE.js b/lib/l10n/ka_GE.js index aa64efacc27..fd72420d1c5 100644 --- a/lib/l10n/ka_GE.js +++ b/lib/l10n/ka_GE.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "\"config\" დირექტორიაში ჩაწერა ვერ ხერხდება!", - "This can usually be fixed by giving the webserver write access to the config directory" : "ეს ჩვეულებრივ გამოსწორებადია ვებსერვერისთვის კონფიგურაციის დირექტორიაზე წერის უფლებების მინიჭებით", "See %s" : "იხილეთ %s", "Sample configuration detected" : "სანიმუშო კონფუგარცია აღმოჩენილია", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "დადგენილია რომ მოხდა სანიმუშო კონფიგურაციის დაკოპირება. ამან შეიძლება გააფუჭოს თქვენი ინსტალაცია და არაა მხარდაჭერილი. გთხოვთ config.php-ში ცვლილებების შეტანამდე გაეცნოთ დოკუმენტაციას.", @@ -76,17 +75,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "გთხოვთ ამოშალოთ open_basedir პარამეტრი php.ini-დან ან გადახვიდეთ 64-ბიტიან PHP-ზე.", "Set an admin username." : "დააყენეთ ადმინისტრატორის სახელი.", "Set an admin password." : "დააყენეთ ადმინისტრატორის პაროლი.", - "Can't create or write into the data directory %s" : "მონაცემების დირექტრიის შექმნა ან მასში ჩაწერა ვერ მოხერხდა %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "გაზიარების ბექენდმა %s-მ მოქმედებაში უნდა მოიყვანოს ინტეფეისი OCP\\Share_Backend", "Sharing backend %s not found" : "გაზიარების ბექენდი %s ვერ იქნა ნაპოვნი", "Sharing backend for %s not found" : "გაზიარების ბექენდი %s-თვის ვერ იქნა ნაპოვნი", "Open »%s«" : "გახნსნა »%s«", "You are not allowed to share %s" : "თქვენ არ გაქვთ უფლება გააზიაროთ %s", - "Can’t increase permissions of %s" : "%s-ის უფლებების გაზრდა ვერ მოხერხდა", - "Files can’t be shared with delete permissions" : "ფაილები გაუქმების უფლებით ვერ გაზიარდება", - "Files can’t be shared with create permissions" : "ფაილები შექმნის უფლებებით ვერ გაზიარდება", "Expiration date is in the past" : "ვადის ამოწურვის თარიღი წარსულშია", - "Can’t set expiration date more than %s days in the future" : "ვადის ამოწურვის თარიღი %s დღეზე მეტი მომავალში ვერ იქნება", "Click the button below to open it." : "გასახსნელად დააჭირეთ ქვემოთ მყოფ ღილაკს.", "The requested share does not exist anymore" : "მოთხოვნილი გაზიარება მეტი აღარ არსებობს", "Could not find category \"%s\"" : "\"%s\" კატეგორიის მოძებნა ვერ მოხერხდა", @@ -146,7 +140,6 @@ OC.L10N.register( "Login canceled by app" : "აპლიკაციამ ლოგინი უარყო", "a safe home for all your data" : "უსაფრთხო სახლი მთელი თქვენი მონაცემებისათვის", "File is currently busy, please try again later" : "ფაილი ამჟამად დაკავებულია, გთხოვთ მოგვიანებით სცადოთ ახლიდან", - "Can't read file" : "ფაილის წაკითხვა ვერ მოხერხდა", "Application is not enabled" : "აპლიკაცია არ არის აქტიური", "Authentication error" : "აუტენტიფიკაციის შეცდომა", "Token expired. Please reload page." : "ტოკენს ვადა გაუვიდა. გთხოვთ განაახლოთ გვერდი.", @@ -185,8 +178,13 @@ OC.L10N.register( "Storage connection error. %s" : "საცავის კავშირის შეცდომა. %s", "Storage is temporarily not available" : "საცავი დროებით ხელმიუწვდომელია", "Storage connection timeout. %s" : "საცავის კავშირის დროის ამოწურვა. %s", - "Following databases are supported: %s" : "მხარდაჭერილია შემდეგი მონაცემთა ბაზები: %s", - "Following platforms are supported: %s" : "მხარდაჭერია შემდეგი პლატფორმები: %s", - "Invalid Federated Cloud ID" : "არასწორი ფედერალური ქლაუდ ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "ეს ჩვეულებრივ გამოსწორებადია ვებსერვერისთვის კონფიგურაციის დირექტორიაზე წერის უფლებების მინიჭებით", + "Can't create or write into the data directory %s" : "მონაცემების დირექტრიის შექმნა ან მასში ჩაწერა ვერ მოხერხდა %s", + "Invalid Federated Cloud ID" : "არასწორი ფედერალური ქლაუდ ID", + "Can’t increase permissions of %s" : "%s-ის უფლებების გაზრდა ვერ მოხერხდა", + "Files can’t be shared with delete permissions" : "ფაილები გაუქმების უფლებით ვერ გაზიარდება", + "Files can’t be shared with create permissions" : "ფაილები შექმნის უფლებებით ვერ გაზიარდება", + "Can’t set expiration date more than %s days in the future" : "ვადის ამოწურვის თარიღი %s დღეზე მეტი მომავალში ვერ იქნება", + "Can't read file" : "ფაილის წაკითხვა ვერ მოხერხდა" }, "nplurals=2; plural=(n!=1);"); diff --git a/lib/l10n/ka_GE.json b/lib/l10n/ka_GE.json index 26287ac758c..ad7203b97c3 100644 --- a/lib/l10n/ka_GE.json +++ b/lib/l10n/ka_GE.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "\"config\" დირექტორიაში ჩაწერა ვერ ხერხდება!", - "This can usually be fixed by giving the webserver write access to the config directory" : "ეს ჩვეულებრივ გამოსწორებადია ვებსერვერისთვის კონფიგურაციის დირექტორიაზე წერის უფლებების მინიჭებით", "See %s" : "იხილეთ %s", "Sample configuration detected" : "სანიმუშო კონფუგარცია აღმოჩენილია", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "დადგენილია რომ მოხდა სანიმუშო კონფიგურაციის დაკოპირება. ამან შეიძლება გააფუჭოს თქვენი ინსტალაცია და არაა მხარდაჭერილი. გთხოვთ config.php-ში ცვლილებების შეტანამდე გაეცნოთ დოკუმენტაციას.", @@ -74,17 +73,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "გთხოვთ ამოშალოთ open_basedir პარამეტრი php.ini-დან ან გადახვიდეთ 64-ბიტიან PHP-ზე.", "Set an admin username." : "დააყენეთ ადმინისტრატორის სახელი.", "Set an admin password." : "დააყენეთ ადმინისტრატორის პაროლი.", - "Can't create or write into the data directory %s" : "მონაცემების დირექტრიის შექმნა ან მასში ჩაწერა ვერ მოხერხდა %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "გაზიარების ბექენდმა %s-მ მოქმედებაში უნდა მოიყვანოს ინტეფეისი OCP\\Share_Backend", "Sharing backend %s not found" : "გაზიარების ბექენდი %s ვერ იქნა ნაპოვნი", "Sharing backend for %s not found" : "გაზიარების ბექენდი %s-თვის ვერ იქნა ნაპოვნი", "Open »%s«" : "გახნსნა »%s«", "You are not allowed to share %s" : "თქვენ არ გაქვთ უფლება გააზიაროთ %s", - "Can’t increase permissions of %s" : "%s-ის უფლებების გაზრდა ვერ მოხერხდა", - "Files can’t be shared with delete permissions" : "ფაილები გაუქმების უფლებით ვერ გაზიარდება", - "Files can’t be shared with create permissions" : "ფაილები შექმნის უფლებებით ვერ გაზიარდება", "Expiration date is in the past" : "ვადის ამოწურვის თარიღი წარსულშია", - "Can’t set expiration date more than %s days in the future" : "ვადის ამოწურვის თარიღი %s დღეზე მეტი მომავალში ვერ იქნება", "Click the button below to open it." : "გასახსნელად დააჭირეთ ქვემოთ მყოფ ღილაკს.", "The requested share does not exist anymore" : "მოთხოვნილი გაზიარება მეტი აღარ არსებობს", "Could not find category \"%s\"" : "\"%s\" კატეგორიის მოძებნა ვერ მოხერხდა", @@ -144,7 +138,6 @@ "Login canceled by app" : "აპლიკაციამ ლოგინი უარყო", "a safe home for all your data" : "უსაფრთხო სახლი მთელი თქვენი მონაცემებისათვის", "File is currently busy, please try again later" : "ფაილი ამჟამად დაკავებულია, გთხოვთ მოგვიანებით სცადოთ ახლიდან", - "Can't read file" : "ფაილის წაკითხვა ვერ მოხერხდა", "Application is not enabled" : "აპლიკაცია არ არის აქტიური", "Authentication error" : "აუტენტიფიკაციის შეცდომა", "Token expired. Please reload page." : "ტოკენს ვადა გაუვიდა. გთხოვთ განაახლოთ გვერდი.", @@ -183,8 +176,13 @@ "Storage connection error. %s" : "საცავის კავშირის შეცდომა. %s", "Storage is temporarily not available" : "საცავი დროებით ხელმიუწვდომელია", "Storage connection timeout. %s" : "საცავის კავშირის დროის ამოწურვა. %s", - "Following databases are supported: %s" : "მხარდაჭერილია შემდეგი მონაცემთა ბაზები: %s", - "Following platforms are supported: %s" : "მხარდაჭერია შემდეგი პლატფორმები: %s", - "Invalid Federated Cloud ID" : "არასწორი ფედერალური ქლაუდ ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "ეს ჩვეულებრივ გამოსწორებადია ვებსერვერისთვის კონფიგურაციის დირექტორიაზე წერის უფლებების მინიჭებით", + "Can't create or write into the data directory %s" : "მონაცემების დირექტრიის შექმნა ან მასში ჩაწერა ვერ მოხერხდა %s", + "Invalid Federated Cloud ID" : "არასწორი ფედერალური ქლაუდ ID", + "Can’t increase permissions of %s" : "%s-ის უფლებების გაზრდა ვერ მოხერხდა", + "Files can’t be shared with delete permissions" : "ფაილები გაუქმების უფლებით ვერ გაზიარდება", + "Files can’t be shared with create permissions" : "ფაილები შექმნის უფლებებით ვერ გაზიარდება", + "Can’t set expiration date more than %s days in the future" : "ვადის ამოწურვის თარიღი %s დღეზე მეტი მომავალში ვერ იქნება", + "Can't read file" : "ფაილის წაკითხვა ვერ მოხერხდა" },"pluralForm" :"nplurals=2; plural=(n!=1);" }
\ No newline at end of file diff --git a/lib/l10n/ko.js b/lib/l10n/ko.js index 54330a850ea..072643b3b1b 100644 --- a/lib/l10n/ko.js +++ b/lib/l10n/ko.js @@ -2,10 +2,7 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "\"config\" 디렉터리에 기록할 수 없습니다!", - "This can usually be fixed by giving the webserver write access to the config directory" : "config 디렉터리에 웹 서버 쓰기 권한을 부여해서 해결할 수 있습니다", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오.", "See %s" : "%s 보기", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오. %s를 참조하십시오.", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "앱 %1$s의 파일이 올바르게 교체되지 않았습니다. 서버와 호환되는 버전인지 확인하십시오.", "Sample configuration detected" : "예제 설정 감지됨", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "예제 설정이 복사된 것 같습니다. 올바르게 작동하지 않을 수도 있기 때문에 지원되지 않습니다. config.php를 변경하기 전 문서를 읽어 보십시오", @@ -85,18 +82,13 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "php.ini의 open_basedir 설정을 삭제하거나 64비트 PHP로 전환하십시오.", "Set an admin username." : "관리자의 사용자 이름을 설정합니다.", "Set an admin password." : "관리자의 암호를 설정합니다.", - "Can't create or write into the data directory %s" : "데이터 디렉터리 %s을(를) 만들거나 기록할 수 없음", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "공유 백엔드 %s에서 OCP\\Share_Backend 인터페이스를 구현해야 함", "Sharing backend %s not found" : "공유 백엔드 %s을(를) 찾을 수 없음", "Sharing backend for %s not found" : "%s의 공유 백엔드를 찾을 수 없음", "Open »%s«" : "%s 열기", "%1$s via %2$s" : "%1$s(%2$s 경유)", "You are not allowed to share %s" : "%s을(를) 공유할 수 있는 권한이 없습니다", - "Can’t increase permissions of %s" : "%s의 권한을 늘릴 수 없습니다", - "Files can’t be shared with delete permissions" : "파일을 삭제 권한으로 공유할 수 없습니다", - "Files can’t be shared with create permissions" : "파일을 생성 권한으로 공유할 수 없습니다", "Expiration date is in the past" : "만료 날짜가 과거입니다", - "Can’t set expiration date more than %s days in the future" : "만료 날짜를 %s일 이상 이후로 설정할 수 없습니다", "Click the button below to open it." : "아래 단추를 눌러서 열 수 있습니다.", "The requested share does not exist anymore" : "요청한 공유가 더 이상 존재하지 않습니다", "Could not find category \"%s\"" : "분류 \"%s\"을(를) 찾을 수 없습니다", @@ -157,13 +149,13 @@ OC.L10N.register( "Login canceled by app" : "앱에서 로그인 취소함", "a safe home for all your data" : "내 모든 데이터의 안전한 저장소", "File is currently busy, please try again later" : "파일이 현재 사용 중, 나중에 다시 시도하십시오", - "Can't read file" : "파일을 읽을 수 없음", "Application is not enabled" : "앱이 활성화되지 않았습니다", "Authentication error" : "인증 오류", "Token expired. Please reload page." : "토큰이 만료되었습니다. 페이지를 새로 고치십시오.", "No database drivers (sqlite, mysql, or postgresql) installed." : "데이터베이스 드라이버(sqlite, mysql, postgresql)가 설치되지 않았습니다.", "Cannot write into \"config\" directory" : "\"config\" 디렉터리에 기록할 수 없습니다", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "config 디렉터리에 웹 서버의 쓰기 권한을 부여해서 해결할 수 있습니다. %s 문서를 참조하십시오", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오. %s를 참조하십시오.", "Cannot write into \"apps\" directory" : "\"apps\" 디렉터리에 기록할 수 없습니다", "Cannot create \"data\" directory" : "\"data\" 디렉터리를 만들 수 없음", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "루트 디렉터리에 웹 서버의 쓰기 권한을 부여해서 해결할 수 있습니다. %s 문서를 참조하십시오", @@ -197,8 +189,14 @@ OC.L10N.register( "Storage connection error. %s" : "저장소 연결 오류입니다. %s", "Storage is temporarily not available" : "저장소를 임시로 사용할 수 없음", "Storage connection timeout. %s" : "저장소 연결 시간이 초과되었습니다. %s", - "Following databases are supported: %s" : "다음 데이터베이스를 지원합니다: %s", - "Following platforms are supported: %s" : "다음 플랫폼을 지원합니다: %s", - "Invalid Federated Cloud ID" : "잘못된 연합 클라우드 ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "config 디렉터리에 웹 서버 쓰기 권한을 부여해서 해결할 수 있습니다", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오.", + "Can't create or write into the data directory %s" : "데이터 디렉터리 %s을(를) 만들거나 기록할 수 없음", + "Invalid Federated Cloud ID" : "잘못된 연합 클라우드 ID", + "Can’t increase permissions of %s" : "%s의 권한을 늘릴 수 없습니다", + "Files can’t be shared with delete permissions" : "파일을 삭제 권한으로 공유할 수 없습니다", + "Files can’t be shared with create permissions" : "파일을 생성 권한으로 공유할 수 없습니다", + "Can’t set expiration date more than %s days in the future" : "만료 날짜를 %s일 이상 이후로 설정할 수 없습니다", + "Can't read file" : "파일을 읽을 수 없음" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/ko.json b/lib/l10n/ko.json index 6cf9e49d1a6..c395d2cfd0b 100644 --- a/lib/l10n/ko.json +++ b/lib/l10n/ko.json @@ -1,9 +1,6 @@ { "translations": { "Cannot write into \"config\" directory!" : "\"config\" 디렉터리에 기록할 수 없습니다!", - "This can usually be fixed by giving the webserver write access to the config directory" : "config 디렉터리에 웹 서버 쓰기 권한을 부여해서 해결할 수 있습니다", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오.", "See %s" : "%s 보기", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오. %s를 참조하십시오.", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "앱 %1$s의 파일이 올바르게 교체되지 않았습니다. 서버와 호환되는 버전인지 확인하십시오.", "Sample configuration detected" : "예제 설정 감지됨", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "예제 설정이 복사된 것 같습니다. 올바르게 작동하지 않을 수도 있기 때문에 지원되지 않습니다. config.php를 변경하기 전 문서를 읽어 보십시오", @@ -83,18 +80,13 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "php.ini의 open_basedir 설정을 삭제하거나 64비트 PHP로 전환하십시오.", "Set an admin username." : "관리자의 사용자 이름을 설정합니다.", "Set an admin password." : "관리자의 암호를 설정합니다.", - "Can't create or write into the data directory %s" : "데이터 디렉터리 %s을(를) 만들거나 기록할 수 없음", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "공유 백엔드 %s에서 OCP\\Share_Backend 인터페이스를 구현해야 함", "Sharing backend %s not found" : "공유 백엔드 %s을(를) 찾을 수 없음", "Sharing backend for %s not found" : "%s의 공유 백엔드를 찾을 수 없음", "Open »%s«" : "%s 열기", "%1$s via %2$s" : "%1$s(%2$s 경유)", "You are not allowed to share %s" : "%s을(를) 공유할 수 있는 권한이 없습니다", - "Can’t increase permissions of %s" : "%s의 권한을 늘릴 수 없습니다", - "Files can’t be shared with delete permissions" : "파일을 삭제 권한으로 공유할 수 없습니다", - "Files can’t be shared with create permissions" : "파일을 생성 권한으로 공유할 수 없습니다", "Expiration date is in the past" : "만료 날짜가 과거입니다", - "Can’t set expiration date more than %s days in the future" : "만료 날짜를 %s일 이상 이후로 설정할 수 없습니다", "Click the button below to open it." : "아래 단추를 눌러서 열 수 있습니다.", "The requested share does not exist anymore" : "요청한 공유가 더 이상 존재하지 않습니다", "Could not find category \"%s\"" : "분류 \"%s\"을(를) 찾을 수 없습니다", @@ -155,13 +147,13 @@ "Login canceled by app" : "앱에서 로그인 취소함", "a safe home for all your data" : "내 모든 데이터의 안전한 저장소", "File is currently busy, please try again later" : "파일이 현재 사용 중, 나중에 다시 시도하십시오", - "Can't read file" : "파일을 읽을 수 없음", "Application is not enabled" : "앱이 활성화되지 않았습니다", "Authentication error" : "인증 오류", "Token expired. Please reload page." : "토큰이 만료되었습니다. 페이지를 새로 고치십시오.", "No database drivers (sqlite, mysql, or postgresql) installed." : "데이터베이스 드라이버(sqlite, mysql, postgresql)가 설치되지 않았습니다.", "Cannot write into \"config\" directory" : "\"config\" 디렉터리에 기록할 수 없습니다", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "config 디렉터리에 웹 서버의 쓰기 권한을 부여해서 해결할 수 있습니다. %s 문서를 참조하십시오", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오. %s를 참조하십시오.", "Cannot write into \"apps\" directory" : "\"apps\" 디렉터리에 기록할 수 없습니다", "Cannot create \"data\" directory" : "\"data\" 디렉터리를 만들 수 없음", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "루트 디렉터리에 웹 서버의 쓰기 권한을 부여해서 해결할 수 있습니다. %s 문서를 참조하십시오", @@ -195,8 +187,14 @@ "Storage connection error. %s" : "저장소 연결 오류입니다. %s", "Storage is temporarily not available" : "저장소를 임시로 사용할 수 없음", "Storage connection timeout. %s" : "저장소 연결 시간이 초과되었습니다. %s", - "Following databases are supported: %s" : "다음 데이터베이스를 지원합니다: %s", - "Following platforms are supported: %s" : "다음 플랫폼을 지원합니다: %s", - "Invalid Federated Cloud ID" : "잘못된 연합 클라우드 ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "config 디렉터리에 웹 서버 쓰기 권한을 부여해서 해결할 수 있습니다", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "config.php 파일을 읽기 전용으로 하시려는 경우, 설정의 \"config_is_read_only\"를 true로 하십시오.", + "Can't create or write into the data directory %s" : "데이터 디렉터리 %s을(를) 만들거나 기록할 수 없음", + "Invalid Federated Cloud ID" : "잘못된 연합 클라우드 ID", + "Can’t increase permissions of %s" : "%s의 권한을 늘릴 수 없습니다", + "Files can’t be shared with delete permissions" : "파일을 삭제 권한으로 공유할 수 없습니다", + "Files can’t be shared with create permissions" : "파일을 생성 권한으로 공유할 수 없습니다", + "Can’t set expiration date more than %s days in the future" : "만료 날짜를 %s일 이상 이후로 설정할 수 없습니다", + "Can't read file" : "파일을 읽을 수 없음" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/l10n/lb.js b/lib/l10n/lb.js index e4a2744b747..466009d3c5d 100644 --- a/lib/l10n/lb.js +++ b/lib/l10n/lb.js @@ -63,7 +63,6 @@ OC.L10N.register( "Nov." : "Nov.", "Dec." : "Dez.", "Authentication error" : "Authentifikatioun's Fehler", - "Storage is temporarily not available" : "Späicherplaatz temporär net erreeschbar", - "Following databases are supported: %s" : "Dës Datebanke ginn ënnerstëtzt: %s" + "Storage is temporarily not available" : "Späicherplaatz temporär net erreeschbar" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/lb.json b/lib/l10n/lb.json index a08a3c919e9..815fe8cf8ac 100644 --- a/lib/l10n/lb.json +++ b/lib/l10n/lb.json @@ -61,7 +61,6 @@ "Nov." : "Nov.", "Dec." : "Dez.", "Authentication error" : "Authentifikatioun's Fehler", - "Storage is temporarily not available" : "Späicherplaatz temporär net erreeschbar", - "Following databases are supported: %s" : "Dës Datebanke ginn ënnerstëtzt: %s" + "Storage is temporarily not available" : "Späicherplaatz temporär net erreeschbar" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/lo.js b/lib/l10n/lo.js index 7daf612563b..121a85208ec 100644 --- a/lib/l10n/lo.js +++ b/lib/l10n/lo.js @@ -4,6 +4,7 @@ OC.L10N.register( "Unknown filetype" : "ບໍ່ຮູ້ປະເພດຂອງຟາຍ", "Invalid image" : "ບໍ່ມີຮູບພາບ", "seconds ago" : "ວິນາທີຜ່ານມາ", + "__language_name__" : "ຂີ້ຕົວະ", "Help" : "ການຊ່ວຍເຫຼືອ", "Apps" : "ແອັບພລິເຄຊັນ", "Settings" : "ການຕັ້ງຄ່າ", diff --git a/lib/l10n/lo.json b/lib/l10n/lo.json index e0fa8386162..94dd92f7a5a 100644 --- a/lib/l10n/lo.json +++ b/lib/l10n/lo.json @@ -2,6 +2,7 @@ "Unknown filetype" : "ບໍ່ຮູ້ປະເພດຂອງຟາຍ", "Invalid image" : "ບໍ່ມີຮູບພາບ", "seconds ago" : "ວິນາທີຜ່ານມາ", + "__language_name__" : "ຂີ້ຕົວະ", "Help" : "ການຊ່ວຍເຫຼືອ", "Apps" : "ແອັບພລິເຄຊັນ", "Settings" : "ການຕັ້ງຄ່າ", diff --git a/lib/l10n/lt_LT.js b/lib/l10n/lt_LT.js index a3bfbcc6989..c0388436fd3 100644 --- a/lib/l10n/lt_LT.js +++ b/lib/l10n/lt_LT.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nepavyksta rašyti į „config“ katalogą!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Tai, dažniausiai, gali būti ištaisyta suteikiant saityno serveriui rašymo prieigą prie konfigūracijos katalogo", "See %s" : "Žiūrėkite %s", "Sample configuration detected" : "Aptiktas konfigūracijos pavyzdys", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Pastebėta, kad nukopijuota pavyzdinė konfigūracija. Tai gali pažeisti jūsų diegimą ir yra nepalaikoma. Prieš atliekant pakeitimus config.php faile, prašome perskaityti dokumentaciją.", @@ -82,18 +81,13 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Pašalinkite savo php.ini faile open_basedir nustatymą arba persijunkite į 64-bitų PHP.", "Set an admin username." : "Nustatyti administratoriaus naudotojo vardą.", "Set an admin password." : "Nustatyti administratoriaus slaptažodį.", - "Can't create or write into the data directory %s" : "Negalima nuskaityti arba rašyti į duomenų katalogą. %s", "%1$s shared »%2$s« with you and wants to add:" : "%1$s pasidalino „%2$s“ su jumis ir parašė pastabą:", "%1$s shared »%2$s« with you and wants to add" : "%1$s pasidalino „%2$s“ su jumis ir parašė pastabą", "»%s« added a note to a file shared with you" : "„%s“ parašė pastabą su jumis pasidalintam failui", "Open »%s«" : "Atverti \"%s\"", "%1$s via %2$s" : "%1$s per %2$s", "You are not allowed to share %s" : "Jums neleidžiama bendrinti %s", - "Can’t increase permissions of %s" : "Negalima pridėti papildomų %s leidimų", - "Files can’t be shared with delete permissions" : "Failai negali būti bendrinami su trynimo leidimu.", - "Files can’t be shared with create permissions" : "Failai negali būti bendrinami su sukūrimo leidimu.", "Expiration date is in the past" : "Bendrinimo pabaigos data yra praėjęs laikas", - "Can’t set expiration date more than %s days in the future" : "Negalima nustatyti galiojimo laiko ilgesnio nei %s dienos.", "%1$s shared »%2$s« with you" : "%1$s pasidalino „%2$s“ su jumis", "%1$s shared »%2$s« with you." : "%1$s pasidalino „%2$s“ su jumis.", "Click the button below to open it." : "Norėdami atverti failą, spustelėkite mygtuką žemiau.", @@ -156,7 +150,6 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Programėlė \"%1$s\" negali būti įdiegta, nes nėra patenkinamos šios priklausomybės: %2$s", "a safe home for all your data" : "saugūs namai visiems jūsų duomenims", "File is currently busy, please try again later" : "Failas šiuo metu yra užimtas, prašome vėliau pabandyti dar kartą", - "Can't read file" : "Nepavyksta perskaityti failo", "Application is not enabled" : "Programa neįjungta", "Authentication error" : "Tapatybės nustatymo klaida", "Token expired. Please reload page." : "Pasibaigė prieigos rakto galiojimas. Prašome įkelti puslapį iš naujo.", @@ -195,8 +188,13 @@ OC.L10N.register( "Storage connection error. %s" : "Saugyklos sujungimo ryšio klaida. %s", "Storage is temporarily not available" : "Saugykla yra laikinai neprieinama", "Storage connection timeout. %s" : "Sujungimo su saugykla laikas baigėsi. %s", - "Following databases are supported: %s" : "Yra palaikomos šios duomenų bazės: %s", - "Following platforms are supported: %s" : "Yra palaikomos šios platformos: %s", - "Invalid Federated Cloud ID" : "Neteisingas federacinės debesijos ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Tai, dažniausiai, gali būti ištaisyta suteikiant saityno serveriui rašymo prieigą prie konfigūracijos katalogo", + "Can't create or write into the data directory %s" : "Negalima nuskaityti arba rašyti į duomenų katalogą. %s", + "Invalid Federated Cloud ID" : "Neteisingas federacinės debesijos ID", + "Can’t increase permissions of %s" : "Negalima pridėti papildomų %s leidimų", + "Files can’t be shared with delete permissions" : "Failai negali būti bendrinami su trynimo leidimu.", + "Files can’t be shared with create permissions" : "Failai negali būti bendrinami su sukūrimo leidimu.", + "Can’t set expiration date more than %s days in the future" : "Negalima nustatyti galiojimo laiko ilgesnio nei %s dienos.", + "Can't read file" : "Nepavyksta perskaityti failo" }, "nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);"); diff --git a/lib/l10n/lt_LT.json b/lib/l10n/lt_LT.json index 5e31d3789a8..8de66cb21f6 100644 --- a/lib/l10n/lt_LT.json +++ b/lib/l10n/lt_LT.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nepavyksta rašyti į „config“ katalogą!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Tai, dažniausiai, gali būti ištaisyta suteikiant saityno serveriui rašymo prieigą prie konfigūracijos katalogo", "See %s" : "Žiūrėkite %s", "Sample configuration detected" : "Aptiktas konfigūracijos pavyzdys", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Pastebėta, kad nukopijuota pavyzdinė konfigūracija. Tai gali pažeisti jūsų diegimą ir yra nepalaikoma. Prieš atliekant pakeitimus config.php faile, prašome perskaityti dokumentaciją.", @@ -80,18 +79,13 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Pašalinkite savo php.ini faile open_basedir nustatymą arba persijunkite į 64-bitų PHP.", "Set an admin username." : "Nustatyti administratoriaus naudotojo vardą.", "Set an admin password." : "Nustatyti administratoriaus slaptažodį.", - "Can't create or write into the data directory %s" : "Negalima nuskaityti arba rašyti į duomenų katalogą. %s", "%1$s shared »%2$s« with you and wants to add:" : "%1$s pasidalino „%2$s“ su jumis ir parašė pastabą:", "%1$s shared »%2$s« with you and wants to add" : "%1$s pasidalino „%2$s“ su jumis ir parašė pastabą", "»%s« added a note to a file shared with you" : "„%s“ parašė pastabą su jumis pasidalintam failui", "Open »%s«" : "Atverti \"%s\"", "%1$s via %2$s" : "%1$s per %2$s", "You are not allowed to share %s" : "Jums neleidžiama bendrinti %s", - "Can’t increase permissions of %s" : "Negalima pridėti papildomų %s leidimų", - "Files can’t be shared with delete permissions" : "Failai negali būti bendrinami su trynimo leidimu.", - "Files can’t be shared with create permissions" : "Failai negali būti bendrinami su sukūrimo leidimu.", "Expiration date is in the past" : "Bendrinimo pabaigos data yra praėjęs laikas", - "Can’t set expiration date more than %s days in the future" : "Negalima nustatyti galiojimo laiko ilgesnio nei %s dienos.", "%1$s shared »%2$s« with you" : "%1$s pasidalino „%2$s“ su jumis", "%1$s shared »%2$s« with you." : "%1$s pasidalino „%2$s“ su jumis.", "Click the button below to open it." : "Norėdami atverti failą, spustelėkite mygtuką žemiau.", @@ -154,7 +148,6 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Programėlė \"%1$s\" negali būti įdiegta, nes nėra patenkinamos šios priklausomybės: %2$s", "a safe home for all your data" : "saugūs namai visiems jūsų duomenims", "File is currently busy, please try again later" : "Failas šiuo metu yra užimtas, prašome vėliau pabandyti dar kartą", - "Can't read file" : "Nepavyksta perskaityti failo", "Application is not enabled" : "Programa neįjungta", "Authentication error" : "Tapatybės nustatymo klaida", "Token expired. Please reload page." : "Pasibaigė prieigos rakto galiojimas. Prašome įkelti puslapį iš naujo.", @@ -193,8 +186,13 @@ "Storage connection error. %s" : "Saugyklos sujungimo ryšio klaida. %s", "Storage is temporarily not available" : "Saugykla yra laikinai neprieinama", "Storage connection timeout. %s" : "Sujungimo su saugykla laikas baigėsi. %s", - "Following databases are supported: %s" : "Yra palaikomos šios duomenų bazės: %s", - "Following platforms are supported: %s" : "Yra palaikomos šios platformos: %s", - "Invalid Federated Cloud ID" : "Neteisingas federacinės debesijos ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Tai, dažniausiai, gali būti ištaisyta suteikiant saityno serveriui rašymo prieigą prie konfigūracijos katalogo", + "Can't create or write into the data directory %s" : "Negalima nuskaityti arba rašyti į duomenų katalogą. %s", + "Invalid Federated Cloud ID" : "Neteisingas federacinės debesijos ID", + "Can’t increase permissions of %s" : "Negalima pridėti papildomų %s leidimų", + "Files can’t be shared with delete permissions" : "Failai negali būti bendrinami su trynimo leidimu.", + "Files can’t be shared with create permissions" : "Failai negali būti bendrinami su sukūrimo leidimu.", + "Can’t set expiration date more than %s days in the future" : "Negalima nustatyti galiojimo laiko ilgesnio nei %s dienos.", + "Can't read file" : "Nepavyksta perskaityti failo" },"pluralForm" :"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);" }
\ No newline at end of file diff --git a/lib/l10n/lv.js b/lib/l10n/lv.js index 930199c0953..9e1e1101bcb 100644 --- a/lib/l10n/lv.js +++ b/lib/l10n/lv.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nevar rakstīt \"config\" mapē!", - "This can usually be fixed by giving the webserver write access to the config directory" : "To parasti var labot, dodot tīmekļa servera rakstīšanas piekļuvi config direktorijai", "See %s" : "Skatīt %s", "Sample configuration detected" : "Atrasta konfigurācijas paraugs", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Konstatēts, ka paraug konfigurācija ir nokopēta. Tas var izjaukt jūsu instalāciju un nav atbalstīts. Lūdzu, izlasiet dokumentāciju, pirms veicat izmaiņas config.php", @@ -103,7 +102,6 @@ OC.L10N.register( "Login canceled by app" : "Pieteikšanos atcelā lietotne", "a safe home for all your data" : "droša vieta visiem jūsu datiem", "File is currently busy, please try again later" : "Datne pašlaik ir aizņemta. Lūdzu, vēlāk mēģiniet vēlreiz", - "Can't read file" : "Nevar nolasīt datni", "Application is not enabled" : "Lietotne nav iespējota", "Authentication error" : "Autentifikācijas kļūda", "Token expired. Please reload page." : "Pilnvarai ir beidzies termiņš. Lūdzu, pārlādējiet lapu.", @@ -119,8 +117,8 @@ OC.L10N.register( "Storage connection error. %s" : "Datu savienojuma kļūda. %s", "Storage is temporarily not available" : "Glabātuve īslaicīgi nav pieejama", "Storage connection timeout. %s" : "Datu savienojuma taimauts. %s", - "Following databases are supported: %s" : "Tiek atbalstītas šādas datu bāzes: %s", - "Following platforms are supported: %s" : "Tiek atbalstītas šādas platformas: %s", - "Invalid Federated Cloud ID" : "Nederīgs Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "To parasti var labot, dodot tīmekļa servera rakstīšanas piekļuvi config direktorijai", + "Invalid Federated Cloud ID" : "Nederīgs Federated Cloud ID", + "Can't read file" : "Nevar nolasīt datni" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); diff --git a/lib/l10n/lv.json b/lib/l10n/lv.json index 0996012f0be..4ea65c1fc99 100644 --- a/lib/l10n/lv.json +++ b/lib/l10n/lv.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nevar rakstīt \"config\" mapē!", - "This can usually be fixed by giving the webserver write access to the config directory" : "To parasti var labot, dodot tīmekļa servera rakstīšanas piekļuvi config direktorijai", "See %s" : "Skatīt %s", "Sample configuration detected" : "Atrasta konfigurācijas paraugs", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Konstatēts, ka paraug konfigurācija ir nokopēta. Tas var izjaukt jūsu instalāciju un nav atbalstīts. Lūdzu, izlasiet dokumentāciju, pirms veicat izmaiņas config.php", @@ -101,7 +100,6 @@ "Login canceled by app" : "Pieteikšanos atcelā lietotne", "a safe home for all your data" : "droša vieta visiem jūsu datiem", "File is currently busy, please try again later" : "Datne pašlaik ir aizņemta. Lūdzu, vēlāk mēģiniet vēlreiz", - "Can't read file" : "Nevar nolasīt datni", "Application is not enabled" : "Lietotne nav iespējota", "Authentication error" : "Autentifikācijas kļūda", "Token expired. Please reload page." : "Pilnvarai ir beidzies termiņš. Lūdzu, pārlādējiet lapu.", @@ -117,8 +115,8 @@ "Storage connection error. %s" : "Datu savienojuma kļūda. %s", "Storage is temporarily not available" : "Glabātuve īslaicīgi nav pieejama", "Storage connection timeout. %s" : "Datu savienojuma taimauts. %s", - "Following databases are supported: %s" : "Tiek atbalstītas šādas datu bāzes: %s", - "Following platforms are supported: %s" : "Tiek atbalstītas šādas platformas: %s", - "Invalid Federated Cloud ID" : "Nederīgs Federated Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "To parasti var labot, dodot tīmekļa servera rakstīšanas piekļuvi config direktorijai", + "Invalid Federated Cloud ID" : "Nederīgs Federated Cloud ID", + "Can't read file" : "Nevar nolasīt datni" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" }
\ No newline at end of file diff --git a/lib/l10n/mk.js b/lib/l10n/mk.js index 9aedfa6330d..8905e7eb654 100644 --- a/lib/l10n/mk.js +++ b/lib/l10n/mk.js @@ -2,11 +2,9 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Не може да зе запишува во \"config\" директориумот!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во config папката", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него.", - "See %s" : "Види %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ова најчесто се поправа со давање на дозвола веб серверот за запишување во config папката.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него. Видете %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Но, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него.", + "See %s" : "Види %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Датотеките од аоликацијата %1$s не се преклопени коректно. Проверете дали верзијата е компатибилна со серверот.", "Sample configuration detected" : "Детектирана е едноставна конфигурација", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Детектирано е дека едноставната конфигурација е копирана. Ова може да и наштети на вашата инсталација и не е поддржано. Прочитајте ја документацијата пред да правите промени во config.php", @@ -72,6 +70,7 @@ OC.L10N.register( "Empty file" : "Празна датотека", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Модул со ИД: %s не постои. Овозможете го во параметрите на апликациите или контактирајте администратор.", "File already exists" : "Датотека веќе постои", + "Invalid path" : "Невалидна патека", "Failed to create file from template" : "Неуспешно креирање на датотека од шаблон", "Templates" : "Шаблони", "File name is a reserved word" : "Името на датотеката е резервиран збор", @@ -105,22 +104,23 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Отстранете го параметарот open_basedir од php.ini или преминете на 64-битна PHP средина.", "Set an admin username." : "Постави администраторско корисничко име", "Set an admin password." : "Постави администраторска лозинка.", - "Can't create or write into the data directory %s" : "Неможете да креирате или да запишувате во оваа папка %s", + "Cannot create or write into the data directory %s" : "Неможете да креирате или да запишувате во папката за податоци %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "За позадинското споделување %s мора се имплементира интерфејсот OCP\\Share_Backend", "Sharing backend %s not found" : "Не е пронајдено позадинско споделување %s", "Sharing backend for %s not found" : "Не е пронајдено позадинско споделување за %s.", - "%1$s shared »%2$s« with you and wants to add:" : "%1$s сподели »%2$s« со вас и сака да додаде:", - "%1$s shared »%2$s« with you and wants to add" : "%1$s сподели »%2$s« со вас и сака да додаде", + "%1$s shared »%2$s« with you and wants to add:" : "%1$s ја сподели папката »%2$s« и додаде:", + "%1$s shared »%2$s« with you and wants to add" : "%1$s ја сподели папката »%2$s« и додаде", "»%s« added a note to a file shared with you" : "»%s« додаде белешка до датотеката што ја сподели со вас", "Open »%s«" : "Отвори »%s«", "%1$s via %2$s" : "%1$s преку %2$s", "You are not allowed to share %s" : "Не сте овластени да ја споделите %s", - "Can’t increase permissions of %s" : "Неможат да се зголемат дозволите на %s", - "Files can’t be shared with delete permissions" : "Датотеки неможат да бидат споделени со дозвола за бришење", - "Files can’t be shared with create permissions" : "Датотеки неможат да бидат споделени со дозвола за креирање", + "Cannot increase permissions of %s" : "Неможат да се зголемат дозволите на %s", + "Files cannot be shared with delete permissions" : "Датотеки неможат да бидат споделени со дозвола за бришење", + "Files cannot be shared with create permissions" : "Датотеки неможат да бидат споделени со дозвола за создавање", "Expiration date is in the past" : "Рокот на траење е во минато време", - "Can’t set expiration date more than %s days in the future" : "Неможе да се постави рок на траење повеќе од %s дена", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Неможе да се постави рок на траење повеќе од 1 ден","Неможе да се постави рок на траење повеќе од %s дена"], "Sharing is only allowed with group members" : "Споделувањето е овозможено само со членови на групата", + "Sharing %s failed, because this item is already shared with user %s" : "Споделувањето на %s е неуспешно, бидејќи истото веќе е споделено со корисникот %s", "%1$s shared »%2$s« with you" : "%1$s сподели »%2$s« со вас", "%1$s shared »%2$s« with you." : "%1$s сподели »%2$s« со вас.", "Click the button below to open it." : "Кликнете на копчето подолу за да ја отворите.", @@ -185,15 +185,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Апликацијата \"%1$s\" не може да се инсталира затоа што следниве зависности не се исполнети: %2$s", "a safe home for all your data" : "безбеден дом за сите ваши податоци", "File is currently busy, please try again later" : "Датотеката моментално е зафатена, обидете се повторно", - "Can't read file" : "Неможе да се прочита датотеката", + "Cannot read file" : "Неможе да се прочита датотеката", "Application is not enabled" : "Апликацијата не е овозможена", "Authentication error" : "Грешка во автентикација", "Token expired. Please reload page." : "Жетонот е истечен. Ве молам превчитајте ја страницата.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Нема инсталирано додаток за (sqlite, mysql, или postgresql) база на податоци.", "Cannot write into \"config\" directory" : "Не може да зе запишува во \"config\" директориумот", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во config папката. Видете %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него. Видете %s", "Cannot write into \"apps\" directory" : "Не може да зе запишува во \"apps\" директориумот", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во папката со апликации или оневозможување на продавницата за апликации во кофигурациската датотека.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во папката со апликации или оневозможување на продавницата за апликации во кофигурациската датотека.", "Cannot create \"data\" directory" : "Неможе да се креира директориум \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во главната папка. Видете %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Дозволите најчесто се поправаат со давање дозвола на веб серверот за запишување во главната папка. Видете %s", @@ -230,8 +231,15 @@ OC.L10N.register( "Storage connection error. %s" : "Грешка во конекција до складиштето. %s", "Storage is temporarily not available" : "Складиштето моментално не е достапно", "Storage connection timeout. %s" : "Поврзувањето со складиштето не успеа. %s", - "Following databases are supported: %s" : "Следниве бази со податоци се поддржани: %s", - "Following platforms are supported: %s" : "Следниве платформи се поддржани: %s", - "Invalid Federated Cloud ID" : "Невалиден федерален ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во config папката", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него.", + "Can't create or write into the data directory %s" : "Неможете да креирате или да запишувате во оваа папка %s", + "Invalid Federated Cloud ID" : "Невалиден федерален ID", + "Can’t increase permissions of %s" : "Неможат да се зголемат дозволите на %s", + "Files can’t be shared with delete permissions" : "Датотеки неможат да бидат споделени со дозвола за бришење", + "Files can’t be shared with create permissions" : "Датотеки неможат да бидат споделени со дозвола за креирање", + "Can’t set expiration date more than %s days in the future" : "Неможе да се постави рок на траење повеќе од %s дена", + "Can't read file" : "Неможе да се прочита датотеката", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во папката со апликации или оневозможување на продавницата за апликации во кофигурациската датотека." }, "nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"); diff --git a/lib/l10n/mk.json b/lib/l10n/mk.json index d4108d091e4..215b072e842 100644 --- a/lib/l10n/mk.json +++ b/lib/l10n/mk.json @@ -1,10 +1,8 @@ { "translations": { "Cannot write into \"config\" directory!" : "Не може да зе запишува во \"config\" директориумот!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во config папката", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него.", - "See %s" : "Види %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ова најчесто се поправа со давање на дозвола веб серверот за запишување во config папката.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него. Видете %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Но, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него.", + "See %s" : "Види %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Датотеките од аоликацијата %1$s не се преклопени коректно. Проверете дали верзијата е компатибилна со серверот.", "Sample configuration detected" : "Детектирана е едноставна конфигурација", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Детектирано е дека едноставната конфигурација е копирана. Ова може да и наштети на вашата инсталација и не е поддржано. Прочитајте ја документацијата пред да правите промени во config.php", @@ -70,6 +68,7 @@ "Empty file" : "Празна датотека", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Модул со ИД: %s не постои. Овозможете го во параметрите на апликациите или контактирајте администратор.", "File already exists" : "Датотека веќе постои", + "Invalid path" : "Невалидна патека", "Failed to create file from template" : "Неуспешно креирање на датотека од шаблон", "Templates" : "Шаблони", "File name is a reserved word" : "Името на датотеката е резервиран збор", @@ -103,22 +102,23 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Отстранете го параметарот open_basedir од php.ini или преминете на 64-битна PHP средина.", "Set an admin username." : "Постави администраторско корисничко име", "Set an admin password." : "Постави администраторска лозинка.", - "Can't create or write into the data directory %s" : "Неможете да креирате или да запишувате во оваа папка %s", + "Cannot create or write into the data directory %s" : "Неможете да креирате или да запишувате во папката за податоци %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "За позадинското споделување %s мора се имплементира интерфејсот OCP\\Share_Backend", "Sharing backend %s not found" : "Не е пронајдено позадинско споделување %s", "Sharing backend for %s not found" : "Не е пронајдено позадинско споделување за %s.", - "%1$s shared »%2$s« with you and wants to add:" : "%1$s сподели »%2$s« со вас и сака да додаде:", - "%1$s shared »%2$s« with you and wants to add" : "%1$s сподели »%2$s« со вас и сака да додаде", + "%1$s shared »%2$s« with you and wants to add:" : "%1$s ја сподели папката »%2$s« и додаде:", + "%1$s shared »%2$s« with you and wants to add" : "%1$s ја сподели папката »%2$s« и додаде", "»%s« added a note to a file shared with you" : "»%s« додаде белешка до датотеката што ја сподели со вас", "Open »%s«" : "Отвори »%s«", "%1$s via %2$s" : "%1$s преку %2$s", "You are not allowed to share %s" : "Не сте овластени да ја споделите %s", - "Can’t increase permissions of %s" : "Неможат да се зголемат дозволите на %s", - "Files can’t be shared with delete permissions" : "Датотеки неможат да бидат споделени со дозвола за бришење", - "Files can’t be shared with create permissions" : "Датотеки неможат да бидат споделени со дозвола за креирање", + "Cannot increase permissions of %s" : "Неможат да се зголемат дозволите на %s", + "Files cannot be shared with delete permissions" : "Датотеки неможат да бидат споделени со дозвола за бришење", + "Files cannot be shared with create permissions" : "Датотеки неможат да бидат споделени со дозвола за создавање", "Expiration date is in the past" : "Рокот на траење е во минато време", - "Can’t set expiration date more than %s days in the future" : "Неможе да се постави рок на траење повеќе од %s дена", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Неможе да се постави рок на траење повеќе од 1 ден","Неможе да се постави рок на траење повеќе од %s дена"], "Sharing is only allowed with group members" : "Споделувањето е овозможено само со членови на групата", + "Sharing %s failed, because this item is already shared with user %s" : "Споделувањето на %s е неуспешно, бидејќи истото веќе е споделено со корисникот %s", "%1$s shared »%2$s« with you" : "%1$s сподели »%2$s« со вас", "%1$s shared »%2$s« with you." : "%1$s сподели »%2$s« со вас.", "Click the button below to open it." : "Кликнете на копчето подолу за да ја отворите.", @@ -183,15 +183,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Апликацијата \"%1$s\" не може да се инсталира затоа што следниве зависности не се исполнети: %2$s", "a safe home for all your data" : "безбеден дом за сите ваши податоци", "File is currently busy, please try again later" : "Датотеката моментално е зафатена, обидете се повторно", - "Can't read file" : "Неможе да се прочита датотеката", + "Cannot read file" : "Неможе да се прочита датотеката", "Application is not enabled" : "Апликацијата не е овозможена", "Authentication error" : "Грешка во автентикација", "Token expired. Please reload page." : "Жетонот е истечен. Ве молам превчитајте ја страницата.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Нема инсталирано додаток за (sqlite, mysql, или postgresql) база на податоци.", "Cannot write into \"config\" directory" : "Не може да зе запишува во \"config\" директориумот", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во config папката. Видете %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него. Видете %s", "Cannot write into \"apps\" directory" : "Не може да зе запишува во \"apps\" директориумот", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во папката со апликации или оневозможување на продавницата за апликации во кофигурациската датотека.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во папката со апликации или оневозможување на продавницата за апликации во кофигурациската датотека.", "Cannot create \"data\" directory" : "Неможе да се креира директориум \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во главната папка. Видете %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Дозволите најчесто се поправаат со давање дозвола на веб серверот за запишување во главната папка. Видете %s", @@ -228,8 +229,15 @@ "Storage connection error. %s" : "Грешка во конекција до складиштето. %s", "Storage is temporarily not available" : "Складиштето моментално не е достапно", "Storage connection timeout. %s" : "Поврзувањето со складиштето не успеа. %s", - "Following databases are supported: %s" : "Следниве бази со податоци се поддржани: %s", - "Following platforms are supported: %s" : "Следниве платформи се поддржани: %s", - "Invalid Federated Cloud ID" : "Невалиден федерален ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во config папката", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, доколку претпочитувате config.php да биде само за читање, поставете параметар \"config_is_read_only\" во него.", + "Can't create or write into the data directory %s" : "Неможете да креирате или да запишувате во оваа папка %s", + "Invalid Federated Cloud ID" : "Невалиден федерален ID", + "Can’t increase permissions of %s" : "Неможат да се зголемат дозволите на %s", + "Files can’t be shared with delete permissions" : "Датотеки неможат да бидат споделени со дозвола за бришење", + "Files can’t be shared with create permissions" : "Датотеки неможат да бидат споделени со дозвола за креирање", + "Can’t set expiration date more than %s days in the future" : "Неможе да се постави рок на траење повеќе од %s дена", + "Can't read file" : "Неможе да се прочита датотеката", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ова најчесто се поправа со давање дозвола на веб серверот за запишување во папката со апликации или оневозможување на продавницата за апликации во кофигурациската датотека." },"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;" }
\ No newline at end of file diff --git a/lib/l10n/nb.js b/lib/l10n/nb.js index 41b9e17298c..dcd6bec55bc 100644 --- a/lib/l10n/nb.js +++ b/lib/l10n/nb.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Kan ikke skrive til «config»-mappen!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan vanligvis ordnes ved å gi webserveren skrivetilgang til config-mappen", "See %s" : "Se %s", "Sample configuration detected" : "Eksempeloppsett oppdaget", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det ble oppdaget at eksempeloppsettet er blitt kopiert. Dette kan ødelegge installasjonen din og støttes ikke. Les dokumentasjonen før du gjør endringer i config.php", @@ -76,7 +75,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Fjern innstillingen open_basedir i php.ini eller bytt til 64-bit PHP.", "Set an admin username." : "Sett et admin-brukernavn.", "Set an admin password." : "Sett et admin-passord.", - "Can't create or write into the data directory %s" : "Kan ikke opprette eller skrive i datamappen %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Delings-server %s må implementere grensesnittet OCP\\Share_Backend", "Sharing backend %s not found" : "Delings-server %s ikke funnet", "Sharing backend for %s not found" : "Delings-server for %s ikke funnet", @@ -86,11 +84,7 @@ OC.L10N.register( "Open »%s«" : "Åpne »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Du har ikke lov til å dele %s", - "Can’t increase permissions of %s" : "Kan ikke øke tillatelser for %s", - "Files can’t be shared with delete permissions" : "Filer kan ikke deles med tilgang til sletting", - "Files can’t be shared with create permissions" : "Filer kan ikke deles med tilgang til opprettelse", "Expiration date is in the past" : "Utløpsdato er i fortid", - "Can’t set expiration date more than %s days in the future" : "Kan ikke sette utløpsdato mer enn %s dager i fremtiden", "%1$s shared »%2$s« with you" : "%1$s delte »%2$s« med deg", "%1$s shared »%2$s« with you." : "%1$s delte »%2$s« med deg.", "Click the button below to open it." : "Klikk på knappen nedenfor for å åpne den.", @@ -152,7 +146,6 @@ OC.L10N.register( "Login canceled by app" : "Innlogging avbrutt av app", "a safe home for all your data" : "et sikkert hjem for alle dine data", "File is currently busy, please try again later" : "Filen er opptatt for øyeblikket, prøv igjen senere", - "Can't read file" : "Kan ikke lese fil", "Application is not enabled" : "Appen er ikke aktivert", "Authentication error" : "Autentikasjonsfeil", "Token expired. Please reload page." : "Symbol utløpt. Last inn siden på nytt.", @@ -191,8 +184,13 @@ OC.L10N.register( "Storage connection error. %s" : "Tilkoblingsfeil for lager. %s", "Storage is temporarily not available" : "Lagring er midlertidig utilgjengelig", "Storage connection timeout. %s" : "Tidsavbrudd ved tilkobling av lager: %s", - "Following databases are supported: %s" : "Følgende databaser støttes: %s", - "Following platforms are supported: %s" : "Følgende plattformer støttes: %s", - "Invalid Federated Cloud ID" : "Ugyldig ID for sammenknyttet sky" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan vanligvis ordnes ved å gi webserveren skrivetilgang til config-mappen", + "Can't create or write into the data directory %s" : "Kan ikke opprette eller skrive i datamappen %s", + "Invalid Federated Cloud ID" : "Ugyldig ID for sammenknyttet sky", + "Can’t increase permissions of %s" : "Kan ikke øke tillatelser for %s", + "Files can’t be shared with delete permissions" : "Filer kan ikke deles med tilgang til sletting", + "Files can’t be shared with create permissions" : "Filer kan ikke deles med tilgang til opprettelse", + "Can’t set expiration date more than %s days in the future" : "Kan ikke sette utløpsdato mer enn %s dager i fremtiden", + "Can't read file" : "Kan ikke lese fil" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/nb.json b/lib/l10n/nb.json index 19bee9a0965..4a7b93bc3be 100644 --- a/lib/l10n/nb.json +++ b/lib/l10n/nb.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Kan ikke skrive til «config»-mappen!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan vanligvis ordnes ved å gi webserveren skrivetilgang til config-mappen", "See %s" : "Se %s", "Sample configuration detected" : "Eksempeloppsett oppdaget", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det ble oppdaget at eksempeloppsettet er blitt kopiert. Dette kan ødelegge installasjonen din og støttes ikke. Les dokumentasjonen før du gjør endringer i config.php", @@ -74,7 +73,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Fjern innstillingen open_basedir i php.ini eller bytt til 64-bit PHP.", "Set an admin username." : "Sett et admin-brukernavn.", "Set an admin password." : "Sett et admin-passord.", - "Can't create or write into the data directory %s" : "Kan ikke opprette eller skrive i datamappen %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Delings-server %s må implementere grensesnittet OCP\\Share_Backend", "Sharing backend %s not found" : "Delings-server %s ikke funnet", "Sharing backend for %s not found" : "Delings-server for %s ikke funnet", @@ -84,11 +82,7 @@ "Open »%s«" : "Åpne »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Du har ikke lov til å dele %s", - "Can’t increase permissions of %s" : "Kan ikke øke tillatelser for %s", - "Files can’t be shared with delete permissions" : "Filer kan ikke deles med tilgang til sletting", - "Files can’t be shared with create permissions" : "Filer kan ikke deles med tilgang til opprettelse", "Expiration date is in the past" : "Utløpsdato er i fortid", - "Can’t set expiration date more than %s days in the future" : "Kan ikke sette utløpsdato mer enn %s dager i fremtiden", "%1$s shared »%2$s« with you" : "%1$s delte »%2$s« med deg", "%1$s shared »%2$s« with you." : "%1$s delte »%2$s« med deg.", "Click the button below to open it." : "Klikk på knappen nedenfor for å åpne den.", @@ -150,7 +144,6 @@ "Login canceled by app" : "Innlogging avbrutt av app", "a safe home for all your data" : "et sikkert hjem for alle dine data", "File is currently busy, please try again later" : "Filen er opptatt for øyeblikket, prøv igjen senere", - "Can't read file" : "Kan ikke lese fil", "Application is not enabled" : "Appen er ikke aktivert", "Authentication error" : "Autentikasjonsfeil", "Token expired. Please reload page." : "Symbol utløpt. Last inn siden på nytt.", @@ -189,8 +182,13 @@ "Storage connection error. %s" : "Tilkoblingsfeil for lager. %s", "Storage is temporarily not available" : "Lagring er midlertidig utilgjengelig", "Storage connection timeout. %s" : "Tidsavbrudd ved tilkobling av lager: %s", - "Following databases are supported: %s" : "Følgende databaser støttes: %s", - "Following platforms are supported: %s" : "Følgende plattformer støttes: %s", - "Invalid Federated Cloud ID" : "Ugyldig ID for sammenknyttet sky" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dette kan vanligvis ordnes ved å gi webserveren skrivetilgang til config-mappen", + "Can't create or write into the data directory %s" : "Kan ikke opprette eller skrive i datamappen %s", + "Invalid Federated Cloud ID" : "Ugyldig ID for sammenknyttet sky", + "Can’t increase permissions of %s" : "Kan ikke øke tillatelser for %s", + "Files can’t be shared with delete permissions" : "Filer kan ikke deles med tilgang til sletting", + "Files can’t be shared with create permissions" : "Filer kan ikke deles med tilgang til opprettelse", + "Can’t set expiration date more than %s days in the future" : "Kan ikke sette utløpsdato mer enn %s dager i fremtiden", + "Can't read file" : "Kan ikke lese fil" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js index a90476d2238..d2d33eefeaa 100644 --- a/lib/l10n/nl.js +++ b/lib/l10n/nl.js @@ -2,14 +2,13 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Kan niet schrijven naar de \"config\" directory!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Of, als je liever config.php alleen-lezen wilt houden, stel de optie \"config_is_read_only\" in op true.", - "See %s" : "Zie %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Of, als je liever config.php Alleen-lezen houdt, stel de optie \"config_is_read_only\" in op true. Zie %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Maar, als je liever config.php alleen-lezen wilt houden, stel dan de optie \"config_is_read_only\" in op true.", + "See %s" : "Zie %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "De bestanden van app %1$szijn niet correct vervangen. Zorg ervoor dat de versie compatible is met de server.", "Sample configuration detected" : "Voorbeeld configuratie gevonden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Er is gedetecteerd dat de voorbeeld configuratie is gekopieerd. Dit kan je installatie beschadigen en wordt dan ook niet ondersteund. Lees de documentatie voordat je wijzigingen aan config.php doorvoert", + "Confirm your email" : "Bevestig je e-mailadres", "Other activities" : "Andere activiteiten", "%1$s and %2$s" : "%1$s en %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s en %3$s", @@ -72,6 +71,7 @@ OC.L10N.register( "Empty file" : "Leeg bestand", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Module met ID: %s bestaat niet. Schakel die in binnen de app-instellingen of neem contact op met je beheerder.", "File already exists" : "Bestand bestaat al", + "Invalid path" : "Ongeldig pad", "Failed to create file from template" : "Kon geen bestand van het sjabloon maken", "Templates" : "Sjablonen", "File name is a reserved word" : "Bestandsnaam is een gereserveerd woord", @@ -105,7 +105,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Verwijder de open_basedir instelling in php.ini of schakel over op de 64bit PHP.", "Set an admin username." : "Stel de gebruikersnaam van de beheerder in.", "Set an admin password." : "Stel een beheerders wachtwoord in.", - "Can't create or write into the data directory %s" : "Kan niets creëren of wegschrijven in de datadirectory %s", + "Cannot create or write into the data directory %s" : "Kan niets creëren of wegschrijven in de datadirectory %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "De gedeelde achtergrond %s moet de OCP\\Share_Backend interface implementeren", "Sharing backend %s not found" : "De gedeelde backend %s is niet gevonden", "Sharing backend for %s not found" : "De gedeelde backend voor %s is niet gevonden", @@ -115,11 +115,11 @@ OC.L10N.register( "Open »%s«" : "Open \"%s\"", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Je bent niet bevoegd om %s te delen", - "Can’t increase permissions of %s" : "Kan niet meer rechten geven aan %s", - "Files can’t be shared with delete permissions" : "Bestanden kunnen niet worden gedeeld met verwijder permissies", - "Files can’t be shared with create permissions" : "Bestanden kunnen niet worden gedeeld met 'creëer' permissies", + "Cannot increase permissions of %s" : "Kan de rechten van %s niet verhogen.", + "Files cannot be shared with delete permissions" : "Bestanden kunnen niet worden gedeeld met verwijder permissies", + "Files cannot be shared with create permissions" : "Bestanden kunnen niet worden gedeeld met 'creëer' permissies", "Expiration date is in the past" : "De vervaldatum ligt in het verleden", - "Can’t set expiration date more than %s days in the future" : "Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Kan de vervaldatum niet meer dan %s dag in de toekomst instellen","Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen"], "Sharing is only allowed with group members" : "Delen kan alleen met groepsleden", "Sharing %s failed, because this item is already shared with user %s" : "Delen van %s is mislukt, omdat het object al wordt gedeeld met gebruiker %s", "%1$s shared »%2$s« with you" : "%1$s deelde \"%2$s\" met jou", @@ -186,15 +186,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "App \"%1$s\" kan niet worden geïnstalleerd, omdat de volgende afhankelijkheden niet zijn ingevuld: %2$s", "a safe home for all your data" : "een veilige plek voor al je gegevens", "File is currently busy, please try again later" : "Bestandsverwerking bezig, probeer het later opnieuw", - "Can't read file" : "Kan bestand niet lezen", + "Cannot read file" : "Kan bestand niet lezen", "Application is not enabled" : "De applicatie is niet ingeschakeld", "Authentication error" : "Authenticatiefout", "Token expired. Please reload page." : "Token verlopen. Herlaad de pagina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Geen database drivers (sqlite, mysql of postgres) geïnstalleerd.", "Cannot write into \"config\" directory" : "Kan niet schrijven naar de \"config\" directory", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dit kan opgelost worden door de config map op de webserver schrijf rechten te geven. See %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Of, als je liever config.php Alleen-lezen houdt, stel de optie \"config_is_read_only\" in op true. Zie %s", "Cannot write into \"apps\" directory" : "Kan niet schrijven naar de \"apps\" directory", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de appstore te deactiveren in het configuratie bestand.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de App Store te deactiveren in het configuratie bestand.", "Cannot create \"data\" directory" : "\"data\" map kan niet worden aangemaakt", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dit kan hersteld worden door de root map schrijf rechten te geven op de webserver. Zie %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rechten kunnen worden hersteld door de root map op de webserver schrijf toegang te geven. Zie %s.", @@ -231,8 +232,15 @@ OC.L10N.register( "Storage connection error. %s" : "Opslag verbindingsfout. %s", "Storage is temporarily not available" : "Opslag is tijdelijk niet beschikbaar", "Storage connection timeout. %s" : "Opslag verbinding time-out. %s", - "Following databases are supported: %s" : "De volgende databases worden ondersteund: %s", - "Following platforms are supported: %s" : "De volgende platformen worden ondersteund: %s", - "Invalid Federated Cloud ID" : "Ongeldige gefedereerde Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Of, als je liever config.php alleen-lezen wilt houden, stel de optie \"config_is_read_only\" in op true.", + "Can't create or write into the data directory %s" : "Kan niets creëren of wegschrijven in de datadirectory %s", + "Invalid Federated Cloud ID" : "Ongeldige gefedereerde Cloud ID", + "Can’t increase permissions of %s" : "Kan niet meer rechten geven aan %s", + "Files can’t be shared with delete permissions" : "Bestanden kunnen niet worden gedeeld met verwijder permissies", + "Files can’t be shared with create permissions" : "Bestanden kunnen niet worden gedeeld met 'creëer' permissies", + "Can’t set expiration date more than %s days in the future" : "Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen", + "Can't read file" : "Kan bestand niet lezen", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de appstore te deactiveren in het configuratie bestand." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json index 54e13bfc021..57aec0a3ac8 100644 --- a/lib/l10n/nl.json +++ b/lib/l10n/nl.json @@ -1,13 +1,12 @@ { "translations": { "Cannot write into \"config\" directory!" : "Kan niet schrijven naar de \"config\" directory!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Of, als je liever config.php alleen-lezen wilt houden, stel de optie \"config_is_read_only\" in op true.", - "See %s" : "Zie %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Of, als je liever config.php Alleen-lezen houdt, stel de optie \"config_is_read_only\" in op true. Zie %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Maar, als je liever config.php alleen-lezen wilt houden, stel dan de optie \"config_is_read_only\" in op true.", + "See %s" : "Zie %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "De bestanden van app %1$szijn niet correct vervangen. Zorg ervoor dat de versie compatible is met de server.", "Sample configuration detected" : "Voorbeeld configuratie gevonden", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Er is gedetecteerd dat de voorbeeld configuratie is gekopieerd. Dit kan je installatie beschadigen en wordt dan ook niet ondersteund. Lees de documentatie voordat je wijzigingen aan config.php doorvoert", + "Confirm your email" : "Bevestig je e-mailadres", "Other activities" : "Andere activiteiten", "%1$s and %2$s" : "%1$s en %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s en %3$s", @@ -70,6 +69,7 @@ "Empty file" : "Leeg bestand", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Module met ID: %s bestaat niet. Schakel die in binnen de app-instellingen of neem contact op met je beheerder.", "File already exists" : "Bestand bestaat al", + "Invalid path" : "Ongeldig pad", "Failed to create file from template" : "Kon geen bestand van het sjabloon maken", "Templates" : "Sjablonen", "File name is a reserved word" : "Bestandsnaam is een gereserveerd woord", @@ -103,7 +103,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Verwijder de open_basedir instelling in php.ini of schakel over op de 64bit PHP.", "Set an admin username." : "Stel de gebruikersnaam van de beheerder in.", "Set an admin password." : "Stel een beheerders wachtwoord in.", - "Can't create or write into the data directory %s" : "Kan niets creëren of wegschrijven in de datadirectory %s", + "Cannot create or write into the data directory %s" : "Kan niets creëren of wegschrijven in de datadirectory %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "De gedeelde achtergrond %s moet de OCP\\Share_Backend interface implementeren", "Sharing backend %s not found" : "De gedeelde backend %s is niet gevonden", "Sharing backend for %s not found" : "De gedeelde backend voor %s is niet gevonden", @@ -113,11 +113,11 @@ "Open »%s«" : "Open \"%s\"", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Je bent niet bevoegd om %s te delen", - "Can’t increase permissions of %s" : "Kan niet meer rechten geven aan %s", - "Files can’t be shared with delete permissions" : "Bestanden kunnen niet worden gedeeld met verwijder permissies", - "Files can’t be shared with create permissions" : "Bestanden kunnen niet worden gedeeld met 'creëer' permissies", + "Cannot increase permissions of %s" : "Kan de rechten van %s niet verhogen.", + "Files cannot be shared with delete permissions" : "Bestanden kunnen niet worden gedeeld met verwijder permissies", + "Files cannot be shared with create permissions" : "Bestanden kunnen niet worden gedeeld met 'creëer' permissies", "Expiration date is in the past" : "De vervaldatum ligt in het verleden", - "Can’t set expiration date more than %s days in the future" : "Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Kan de vervaldatum niet meer dan %s dag in de toekomst instellen","Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen"], "Sharing is only allowed with group members" : "Delen kan alleen met groepsleden", "Sharing %s failed, because this item is already shared with user %s" : "Delen van %s is mislukt, omdat het object al wordt gedeeld met gebruiker %s", "%1$s shared »%2$s« with you" : "%1$s deelde \"%2$s\" met jou", @@ -184,15 +184,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "App \"%1$s\" kan niet worden geïnstalleerd, omdat de volgende afhankelijkheden niet zijn ingevuld: %2$s", "a safe home for all your data" : "een veilige plek voor al je gegevens", "File is currently busy, please try again later" : "Bestandsverwerking bezig, probeer het later opnieuw", - "Can't read file" : "Kan bestand niet lezen", + "Cannot read file" : "Kan bestand niet lezen", "Application is not enabled" : "De applicatie is niet ingeschakeld", "Authentication error" : "Authenticatiefout", "Token expired. Please reload page." : "Token verlopen. Herlaad de pagina.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Geen database drivers (sqlite, mysql of postgres) geïnstalleerd.", "Cannot write into \"config\" directory" : "Kan niet schrijven naar de \"config\" directory", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Dit kan opgelost worden door de config map op de webserver schrijf rechten te geven. See %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Of, als je liever config.php Alleen-lezen houdt, stel de optie \"config_is_read_only\" in op true. Zie %s", "Cannot write into \"apps\" directory" : "Kan niet schrijven naar de \"apps\" directory", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de appstore te deactiveren in het configuratie bestand.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de App Store te deactiveren in het configuratie bestand.", "Cannot create \"data\" directory" : "\"data\" map kan niet worden aangemaakt", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Dit kan hersteld worden door de root map schrijf rechten te geven op de webserver. Zie %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rechten kunnen worden hersteld door de root map op de webserver schrijf toegang te geven. Zie %s.", @@ -229,8 +230,15 @@ "Storage connection error. %s" : "Opslag verbindingsfout. %s", "Storage is temporarily not available" : "Opslag is tijdelijk niet beschikbaar", "Storage connection timeout. %s" : "Opslag verbinding time-out. %s", - "Following databases are supported: %s" : "De volgende databases worden ondersteund: %s", - "Following platforms are supported: %s" : "De volgende platformen worden ondersteund: %s", - "Invalid Federated Cloud ID" : "Ongeldige gefedereerde Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Dit kan opgelost worden door de config map op de webserver schrijfrechten te geven", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Of, als je liever config.php alleen-lezen wilt houden, stel de optie \"config_is_read_only\" in op true.", + "Can't create or write into the data directory %s" : "Kan niets creëren of wegschrijven in de datadirectory %s", + "Invalid Federated Cloud ID" : "Ongeldige gefedereerde Cloud ID", + "Can’t increase permissions of %s" : "Kan niet meer rechten geven aan %s", + "Files can’t be shared with delete permissions" : "Bestanden kunnen niet worden gedeeld met verwijder permissies", + "Files can’t be shared with create permissions" : "Bestanden kunnen niet worden gedeeld met 'creëer' permissies", + "Can’t set expiration date more than %s days in the future" : "Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen", + "Can't read file" : "Kan bestand niet lezen", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te geven op de appsdirectory of door de appstore te deactiveren in het configuratie bestand." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/oc.js b/lib/l10n/oc.js index ea6ff86b309..ea933698ce6 100644 --- a/lib/l10n/oc.js +++ b/lib/l10n/oc.js @@ -3,14 +3,20 @@ OC.L10N.register( { "today" : "uèi", "yesterday" : "ièr", + "_in %n day_::_in %n days_" : ["d’aquí %n jorn","d’aquí %n jorns"], "_%n day ago_::_%n days ago_" : ["fa %n jorn","fa %n jorns"], "last month" : "lo mes passat", + "_in %n month_::_in %n months_" : ["d’aquí %n mes","d’aquí %n meses"], "_%n month ago_::_%n months ago_" : ["fa %n mes","fa %n meses"], "last year" : "l’an passat", + "_in %n year_::_in %n years_" : ["d’aquí %n annada","d’aquí %n annadas"], "_%n year ago_::_%n years ago_" : ["fa %n annada","fa %n annadas"], + "_in %n hour_::_in %n hours_" : ["d’aquí %n ora","d’aquí %n oras"], "_%n hour ago_::_%n hours ago_" : ["fa %n ora ","fa %n oras"], + "_in %n minute_::_in %n minutes_" : ["d’aquí %n minuta","d’aquí %n minutas"], "_%n minute ago_::_%n minutes ago_" : ["fa %n minuta","fa %n minutas"], "seconds ago" : "fa qualques segondas", + "__language_name__" : "Occitan", "Help" : "Ajuda", "Settings" : "Paramètres", "Log out" : "Desconnexion", @@ -35,7 +41,7 @@ OC.L10N.register( "October" : "Octòbre", "November" : "Novembre", "December" : "Decembre", - "May." : "Mai", + "May." : "Mai.", "a safe home for all your data" : "un ostal segur per vòstras donadas" }, "nplurals=2; plural=(n > 1);"); diff --git a/lib/l10n/oc.json b/lib/l10n/oc.json index da8350c6468..1bb4a5d95a1 100644 --- a/lib/l10n/oc.json +++ b/lib/l10n/oc.json @@ -1,14 +1,20 @@ { "translations": { "today" : "uèi", "yesterday" : "ièr", + "_in %n day_::_in %n days_" : ["d’aquí %n jorn","d’aquí %n jorns"], "_%n day ago_::_%n days ago_" : ["fa %n jorn","fa %n jorns"], "last month" : "lo mes passat", + "_in %n month_::_in %n months_" : ["d’aquí %n mes","d’aquí %n meses"], "_%n month ago_::_%n months ago_" : ["fa %n mes","fa %n meses"], "last year" : "l’an passat", + "_in %n year_::_in %n years_" : ["d’aquí %n annada","d’aquí %n annadas"], "_%n year ago_::_%n years ago_" : ["fa %n annada","fa %n annadas"], + "_in %n hour_::_in %n hours_" : ["d’aquí %n ora","d’aquí %n oras"], "_%n hour ago_::_%n hours ago_" : ["fa %n ora ","fa %n oras"], + "_in %n minute_::_in %n minutes_" : ["d’aquí %n minuta","d’aquí %n minutas"], "_%n minute ago_::_%n minutes ago_" : ["fa %n minuta","fa %n minutas"], "seconds ago" : "fa qualques segondas", + "__language_name__" : "Occitan", "Help" : "Ajuda", "Settings" : "Paramètres", "Log out" : "Desconnexion", @@ -33,7 +39,7 @@ "October" : "Octòbre", "November" : "Novembre", "December" : "Decembre", - "May." : "Mai", + "May." : "Mai.", "a safe home for all your data" : "un ostal segur per vòstras donadas" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/lib/l10n/pl.js b/lib/l10n/pl.js index 9e8d16b502b..a36f3e93b52 100644 --- a/lib/l10n/pl.js +++ b/lib/l10n/pl.js @@ -2,15 +2,18 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nie można zapisać do katalogu \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true.", - "See %s" : "Zobacz %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true. Zobacz %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ale jeśli wolisz, aby plik config.php był tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true.", + "See %s" : "Zobacz %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Pliki aplikacji %1$s nie zostały poprawnie zastąpione. Upewnij się, że jest to wersja zgodna z serwerem.", "Sample configuration detected" : "Wykryto przykładową konfigurację", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Wykryto, że przykładowa konfiguracja została skopiowana. Może to spowodować przerwanie instalacji, która nie jest wspierana. Przeczytaj dokumentację przed dokonaniem zmian w pliku config.php", - "Other activities" : "Inne czynności", + "%s email verification" : "Weryfikacja adresu e-mail %s", + "Email verification" : "Weryfikacja adresu e-mail", + "Click the following button to confirm your email." : "Kliknij poniższy przycisk, aby potwierdzić swój adres e-mail.", + "Click the following link to confirm your email." : "Kliknij poniższy link, aby potwierdzić swój adres e-mail.", + "Confirm your email" : "Potwierdź swój adres e-mail", + "Other activities" : "Inne aktywności", "%1$s and %2$s" : "%1$s i %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s i %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s i %4$s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "Obsługiwane są następujące platformy: %s", "Server version %s or higher is required." : "Wymagana jest wersja serwera %s lub wyższa.", "Server version %s or lower is required." : "Wymagana jest wersja serwera %s lub niższa.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Zalogowany użytkownik musi być administratorem, subadministratorem lub mieć specjalne uprawnienia dostępu do tego ustawienia", "Logged in user must be an admin or sub admin" : "Zalogowany użytkownik musi być administratorem lub współadministratorem", "Logged in user must be an admin" : "Zalogowany użytkownik musi być administratorem", "Wiping of device %s has started" : "Rozpoczęto czyszczenie urządzenia %s", @@ -50,6 +54,7 @@ OC.L10N.register( "Unknown filetype" : "Nieznany typ pliku", "Invalid image" : "Nieprawidłowy obraz", "Avatar image is not square" : "Obraz awatara nie jest kwadratowy", + "View profile" : "Zobacz profil", "today" : "dzisiaj", "tomorrow" : "jutro", "yesterday" : "wczoraj", @@ -63,15 +68,16 @@ OC.L10N.register( "last year" : "w zeszłym roku", "_in %n year_::_in %n years_" : ["za %n rok","za %n lata","za %n lat","za %n lat"], "_%n year ago_::_%n years ago_" : ["%n rok temu","%n lata temu","%n lat temu","%n lat temu"], - "_in %n hour_::_in %n hours_" : ["za %n godzinę","za %n godziny","za %n godzin","za %n godziny"], - "_%n hour ago_::_%n hours ago_" : ["%n godzinę temu","%n godziny temu","%n godzin temu","%n godzin temu"], - "_in %n minute_::_in %n minutes_" : ["za %n minutę","za %n minuty","za %n minut","za %n minuty"], + "_in %n hour_::_in %n hours_" : ["za %n godzinę","za %n godziny","za %n godzin","za %n godzin"], + "_%n hour ago_::_%n hours ago_" : ["%n godzina temu","%n godziny temu","%n godzin temu","%n godzin temu"], + "_in %n minute_::_in %n minutes_" : ["za %n minutę","za %n minuty","za %n minut","za %n minut"], "_%n minute ago_::_%n minutes ago_" : ["%n minuta temu","%n minuty temu","%n minut temu","%n minut temu"], "in a few seconds" : "za kilka sekund", "seconds ago" : "przed chwilą", "Empty file" : "Pusty plik", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Moduł o ID: %s nie istnieje. Włącz go w ustawieniach aplikacji lub skontaktuj się z administratorem.", "File already exists" : "Plik już istnieje", + "Invalid path" : "Niewłaściwa ścieżka", "Failed to create file from template" : "Nie udało się utworzyć pliku z szablonu", "Templates" : "Szablony", "File name is a reserved word" : "Nazwa pliku jest zarezerwowana", @@ -82,19 +88,34 @@ OC.L10N.register( "App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikacji \"%s\" nie można zainstalować, ponieważ nie można odczytać pliku appinfo.", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikacji \"%s\" nie można zainstalować, ponieważ nie jest kompatybilna z tą wersją serwera.", "__language_name__" : "Polski", - "This is an automatically sent email, please do not reply." : "To jest automatycznie wysłany e-mail, proszę nie odpowiadać na niego.", + "This is an automatically sent email, please do not reply." : "Jest to wiadomość e-mail wysłana automatycznie, prosimy nie odpowiadać na nią.", "Help" : "Pomoc", "Apps" : "Aplikacje", "Settings" : "Ustawienia", "Log out" : "Wyloguj", "Users" : "Użytkownicy", + "Email" : "E-mail", + "Mail %s" : "Poczta %s", + "Phone" : "Telefon", + "Call %s" : "Połącz %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Zobacz %s na Twitterze", + "Website" : "Strona WWW", + "Visit %s" : "Odwiedź %s", + "Address" : "Adres", + "Avatar" : "Awatar", + "About" : "Informacje", + "Full name" : "Pełna nazwa", + "Headline" : "Nagłówek", + "Organisation" : "Organizacja", + "Role" : "Rola społeczna", "Unknown user" : "Nieznany użytkownik", "Additional settings" : "Ustawienia dodatkowe", "%s enter the database username and name." : "Podaj nazwę bazy danych i nazwę użytkownika dla %s.", "%s enter the database username." : "Podaj nazwę użytkownika dla %s.", "%s enter the database name." : "Podaj nazwę bazy danych dla %s.", "%s you may not use dots in the database name" : "Nie możesz używać kropek w nazwie bazy danych %s.", - "MySQL username and/or password not valid" : "Zła nazwa użytkownika i/lub hasło do bazy danych MySQL", + "MySQL username and/or password not valid" : "Błędna nazwa użytkownika i/lub hasło do bazy danych MySQL", "You need to enter details of an existing account." : "Musisz wprowadzić szczegółowe dane dla istniejącego konta.", "Oracle connection could not be established" : "Nie można nawiązać połączenia z bazą danych Oracle", "Oracle username and/or password not valid" : "Zła nazwa użytkownika i/lub hasło do bazy danych Oracle", @@ -105,7 +126,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Usuń ustawienie open_basedir w php.ini lub przełącz na PHP 64-bitowe.", "Set an admin username." : "Ustaw nazwę administratora.", "Set an admin password." : "Ustaw hasło administratora.", - "Can't create or write into the data directory %s" : "Nie można tworzyć ani zapisywać w katalogu %s", + "Cannot create or write into the data directory %s" : "Nie można tworzyć ani zapisywać w katalogu %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Zaplecze do udostępniania %s musi implementować interfejs OCP\\Share_Backend", "Sharing backend %s not found" : "Zaplecze %s do udostępniania nie zostało znalezione", "Sharing backend for %s not found" : "Zaplecze do udostępniania dla %s nie zostało znalezione", @@ -115,11 +136,11 @@ OC.L10N.register( "Open »%s«" : "Otwórz »%s«", "%1$s via %2$s" : "%1$s przez %2$s", "You are not allowed to share %s" : "Nie możesz udostępnić %s", - "Can’t increase permissions of %s" : "Nie można zwiększyć uprawnień %s", - "Files can’t be shared with delete permissions" : "Pliki nie mogą zostać udostępnione z prawem do usuwania", - "Files can’t be shared with create permissions" : "Pliki nie mogą zostać udostępnione z prawem do tworzenia", + "Cannot increase permissions of %s" : "Nie można zwiększyć uprawnień %s", + "Files cannot be shared with delete permissions" : "Pliki nie mogą zostać udostępnione z prawem do usuwania", + "Files cannot be shared with create permissions" : "Pliki nie mogą zostać udostępnione z prawem do tworzenia", "Expiration date is in the past" : "Data ważności już minęła", - "Can’t set expiration date more than %s days in the future" : "Nie można ustawić daty ważności na dłuższą niż %s dni", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Nie można utworzyć daty wygaśnięcia na %n dzień do przodu","Nie można utworzyć daty wygaśnięcia na %n dni do przodu","Nie można utworzyć daty wygaśnięcia na %n dni do przodu","Nie można utworzyć daty wygaśnięcia na %n dni do przodu"], "Sharing is only allowed with group members" : "Udostępnianie jest dozwolone tylko członkom grupy", "Sharing %s failed, because this item is already shared with user %s" : "Udostępnianie %s nie powiodło się, ponieważ element jest już udostępniony użytkownikowi %s", "%1$s shared »%2$s« with you" : "%1$s udostępnił Tobie »%2$s«", @@ -186,19 +207,20 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Nie można zainstalować aplikacji \"%1$s\", ponieważ nie są spełnione następujące zależności: %2$s", "a safe home for all your data" : "bezpieczny dom dla wszystkich danych", "File is currently busy, please try again later" : "Plik jest obecnie niedostępny, spróbuj później", - "Can't read file" : "Nie można odczytać pliku", + "Cannot read file" : "Nie można odczytać pliku", "Application is not enabled" : "Aplikacja nie jest włączona", "Authentication error" : "Błąd uwierzytelniania", "Token expired. Please reload page." : "Token wygasł. Przeładuj stronę.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nie zainstalowano sterowników bazy danych (sqlite, mysql lub postgresql).", "Cannot write into \"config\" directory" : "Nie można zapisać do katalogu \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config. Zobacz %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true. Zobacz %s", "Cannot write into \"apps\" directory" : "Nie można zapisać do katalogu \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Zwykle można to naprawić, przyznając serwerowi dostęp do zapisu do katalogu aplikacji lub wyłączając aplikację w pliku konfiguracyjnym.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Zwykle można to naprawić, przyznając serwerowi dostęp do zapisu do katalogu aplikacji lub wyłączając sklep z aplikacjami w pliku konfiguracyjnym.", "Cannot create \"data\" directory" : "Nie mozna utworzyć katalogu \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu głównego. Zobacz %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Uprawnienia można zazwyczaj naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu głównego. Zobacz %s.", - "Setting locale to %s failed" : "Nie udało się zmienić języka na %s", + "Setting locale to %s failed" : "Ustawienie języka na %s nie powiodło się", "Please install one of these locales on your system and restart your webserver." : "Zainstaluj jedną z lokalizacji w swoim systemie i ponownie uruchom serwer WWW.", "PHP module %s not installed." : "Moduł PHP %s nie jest zainstalowany.", "Please ask your server administrator to install the module." : "Poproś administratora serwera o zainstalowanie modułu.", @@ -231,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "Błąd połączenia z magazynem. %s", "Storage is temporarily not available" : "Magazyn jest tymczasowo niedostępny", "Storage connection timeout. %s" : "Limit czasu połączenia do magazynu. %s", - "Following databases are supported: %s" : "Obsługiwane są następujące bazy danych: %s", - "Following platforms are supported: %s" : "Obsługiwane są następujące platformy: %s", - "Invalid Federated Cloud ID" : "Nieprawidłowy ID Chmury Federacyjnej" + "This can usually be fixed by giving the webserver write access to the config directory" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true.", + "Can't create or write into the data directory %s" : "Nie można tworzyć ani zapisywać w katalogu %s", + "Invalid Federated Cloud ID" : "Nieprawidłowy ID Chmury Federacyjnej", + "Can’t increase permissions of %s" : "Nie można zwiększyć uprawnień %s", + "Files can’t be shared with delete permissions" : "Pliki nie mogą zostać udostępnione z prawem do usuwania", + "Files can’t be shared with create permissions" : "Pliki nie mogą zostać udostępnione z prawem do tworzenia", + "Can’t set expiration date more than %s days in the future" : "Nie można ustawić daty wygaśnięcia na dłuższą niż %s dni", + "Can't read file" : "Nie można odczytać pliku", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Zwykle można to naprawić, przyznając serwerowi dostęp do zapisu do katalogu aplikacji lub wyłączając sklep z aplikacjami w pliku konfiguracyjnym." }, "nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"); diff --git a/lib/l10n/pl.json b/lib/l10n/pl.json index d61b3ec94bb..80e53cf1557 100644 --- a/lib/l10n/pl.json +++ b/lib/l10n/pl.json @@ -1,14 +1,17 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nie można zapisać do katalogu \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true.", - "See %s" : "Zobacz %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true. Zobacz %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ale jeśli wolisz, aby plik config.php był tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true.", + "See %s" : "Zobacz %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Pliki aplikacji %1$s nie zostały poprawnie zastąpione. Upewnij się, że jest to wersja zgodna z serwerem.", "Sample configuration detected" : "Wykryto przykładową konfigurację", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Wykryto, że przykładowa konfiguracja została skopiowana. Może to spowodować przerwanie instalacji, która nie jest wspierana. Przeczytaj dokumentację przed dokonaniem zmian w pliku config.php", - "Other activities" : "Inne czynności", + "%s email verification" : "Weryfikacja adresu e-mail %s", + "Email verification" : "Weryfikacja adresu e-mail", + "Click the following button to confirm your email." : "Kliknij poniższy przycisk, aby potwierdzić swój adres e-mail.", + "Click the following link to confirm your email." : "Kliknij poniższy link, aby potwierdzić swój adres e-mail.", + "Confirm your email" : "Potwierdź swój adres e-mail", + "Other activities" : "Inne aktywności", "%1$s and %2$s" : "%1$s i %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s i %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s i %4$s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "Obsługiwane są następujące platformy: %s", "Server version %s or higher is required." : "Wymagana jest wersja serwera %s lub wyższa.", "Server version %s or lower is required." : "Wymagana jest wersja serwera %s lub niższa.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Zalogowany użytkownik musi być administratorem, subadministratorem lub mieć specjalne uprawnienia dostępu do tego ustawienia", "Logged in user must be an admin or sub admin" : "Zalogowany użytkownik musi być administratorem lub współadministratorem", "Logged in user must be an admin" : "Zalogowany użytkownik musi być administratorem", "Wiping of device %s has started" : "Rozpoczęto czyszczenie urządzenia %s", @@ -48,6 +52,7 @@ "Unknown filetype" : "Nieznany typ pliku", "Invalid image" : "Nieprawidłowy obraz", "Avatar image is not square" : "Obraz awatara nie jest kwadratowy", + "View profile" : "Zobacz profil", "today" : "dzisiaj", "tomorrow" : "jutro", "yesterday" : "wczoraj", @@ -61,15 +66,16 @@ "last year" : "w zeszłym roku", "_in %n year_::_in %n years_" : ["za %n rok","za %n lata","za %n lat","za %n lat"], "_%n year ago_::_%n years ago_" : ["%n rok temu","%n lata temu","%n lat temu","%n lat temu"], - "_in %n hour_::_in %n hours_" : ["za %n godzinę","za %n godziny","za %n godzin","za %n godziny"], - "_%n hour ago_::_%n hours ago_" : ["%n godzinę temu","%n godziny temu","%n godzin temu","%n godzin temu"], - "_in %n minute_::_in %n minutes_" : ["za %n minutę","za %n minuty","za %n minut","za %n minuty"], + "_in %n hour_::_in %n hours_" : ["za %n godzinę","za %n godziny","za %n godzin","za %n godzin"], + "_%n hour ago_::_%n hours ago_" : ["%n godzina temu","%n godziny temu","%n godzin temu","%n godzin temu"], + "_in %n minute_::_in %n minutes_" : ["za %n minutę","za %n minuty","za %n minut","za %n minut"], "_%n minute ago_::_%n minutes ago_" : ["%n minuta temu","%n minuty temu","%n minut temu","%n minut temu"], "in a few seconds" : "za kilka sekund", "seconds ago" : "przed chwilą", "Empty file" : "Pusty plik", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Moduł o ID: %s nie istnieje. Włącz go w ustawieniach aplikacji lub skontaktuj się z administratorem.", "File already exists" : "Plik już istnieje", + "Invalid path" : "Niewłaściwa ścieżka", "Failed to create file from template" : "Nie udało się utworzyć pliku z szablonu", "Templates" : "Szablony", "File name is a reserved word" : "Nazwa pliku jest zarezerwowana", @@ -80,19 +86,34 @@ "App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikacji \"%s\" nie można zainstalować, ponieważ nie można odczytać pliku appinfo.", "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikacji \"%s\" nie można zainstalować, ponieważ nie jest kompatybilna z tą wersją serwera.", "__language_name__" : "Polski", - "This is an automatically sent email, please do not reply." : "To jest automatycznie wysłany e-mail, proszę nie odpowiadać na niego.", + "This is an automatically sent email, please do not reply." : "Jest to wiadomość e-mail wysłana automatycznie, prosimy nie odpowiadać na nią.", "Help" : "Pomoc", "Apps" : "Aplikacje", "Settings" : "Ustawienia", "Log out" : "Wyloguj", "Users" : "Użytkownicy", + "Email" : "E-mail", + "Mail %s" : "Poczta %s", + "Phone" : "Telefon", + "Call %s" : "Połącz %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Zobacz %s na Twitterze", + "Website" : "Strona WWW", + "Visit %s" : "Odwiedź %s", + "Address" : "Adres", + "Avatar" : "Awatar", + "About" : "Informacje", + "Full name" : "Pełna nazwa", + "Headline" : "Nagłówek", + "Organisation" : "Organizacja", + "Role" : "Rola społeczna", "Unknown user" : "Nieznany użytkownik", "Additional settings" : "Ustawienia dodatkowe", "%s enter the database username and name." : "Podaj nazwę bazy danych i nazwę użytkownika dla %s.", "%s enter the database username." : "Podaj nazwę użytkownika dla %s.", "%s enter the database name." : "Podaj nazwę bazy danych dla %s.", "%s you may not use dots in the database name" : "Nie możesz używać kropek w nazwie bazy danych %s.", - "MySQL username and/or password not valid" : "Zła nazwa użytkownika i/lub hasło do bazy danych MySQL", + "MySQL username and/or password not valid" : "Błędna nazwa użytkownika i/lub hasło do bazy danych MySQL", "You need to enter details of an existing account." : "Musisz wprowadzić szczegółowe dane dla istniejącego konta.", "Oracle connection could not be established" : "Nie można nawiązać połączenia z bazą danych Oracle", "Oracle username and/or password not valid" : "Zła nazwa użytkownika i/lub hasło do bazy danych Oracle", @@ -103,7 +124,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Usuń ustawienie open_basedir w php.ini lub przełącz na PHP 64-bitowe.", "Set an admin username." : "Ustaw nazwę administratora.", "Set an admin password." : "Ustaw hasło administratora.", - "Can't create or write into the data directory %s" : "Nie można tworzyć ani zapisywać w katalogu %s", + "Cannot create or write into the data directory %s" : "Nie można tworzyć ani zapisywać w katalogu %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Zaplecze do udostępniania %s musi implementować interfejs OCP\\Share_Backend", "Sharing backend %s not found" : "Zaplecze %s do udostępniania nie zostało znalezione", "Sharing backend for %s not found" : "Zaplecze do udostępniania dla %s nie zostało znalezione", @@ -113,11 +134,11 @@ "Open »%s«" : "Otwórz »%s«", "%1$s via %2$s" : "%1$s przez %2$s", "You are not allowed to share %s" : "Nie możesz udostępnić %s", - "Can’t increase permissions of %s" : "Nie można zwiększyć uprawnień %s", - "Files can’t be shared with delete permissions" : "Pliki nie mogą zostać udostępnione z prawem do usuwania", - "Files can’t be shared with create permissions" : "Pliki nie mogą zostać udostępnione z prawem do tworzenia", + "Cannot increase permissions of %s" : "Nie można zwiększyć uprawnień %s", + "Files cannot be shared with delete permissions" : "Pliki nie mogą zostać udostępnione z prawem do usuwania", + "Files cannot be shared with create permissions" : "Pliki nie mogą zostać udostępnione z prawem do tworzenia", "Expiration date is in the past" : "Data ważności już minęła", - "Can’t set expiration date more than %s days in the future" : "Nie można ustawić daty ważności na dłuższą niż %s dni", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Nie można utworzyć daty wygaśnięcia na %n dzień do przodu","Nie można utworzyć daty wygaśnięcia na %n dni do przodu","Nie można utworzyć daty wygaśnięcia na %n dni do przodu","Nie można utworzyć daty wygaśnięcia na %n dni do przodu"], "Sharing is only allowed with group members" : "Udostępnianie jest dozwolone tylko członkom grupy", "Sharing %s failed, because this item is already shared with user %s" : "Udostępnianie %s nie powiodło się, ponieważ element jest już udostępniony użytkownikowi %s", "%1$s shared »%2$s« with you" : "%1$s udostępnił Tobie »%2$s«", @@ -184,19 +205,20 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Nie można zainstalować aplikacji \"%1$s\", ponieważ nie są spełnione następujące zależności: %2$s", "a safe home for all your data" : "bezpieczny dom dla wszystkich danych", "File is currently busy, please try again later" : "Plik jest obecnie niedostępny, spróbuj później", - "Can't read file" : "Nie można odczytać pliku", + "Cannot read file" : "Nie można odczytać pliku", "Application is not enabled" : "Aplikacja nie jest włączona", "Authentication error" : "Błąd uwierzytelniania", "Token expired. Please reload page." : "Token wygasł. Przeładuj stronę.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nie zainstalowano sterowników bazy danych (sqlite, mysql lub postgresql).", "Cannot write into \"config\" directory" : "Nie można zapisać do katalogu \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config. Zobacz %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true. Zobacz %s", "Cannot write into \"apps\" directory" : "Nie można zapisać do katalogu \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Zwykle można to naprawić, przyznając serwerowi dostęp do zapisu do katalogu aplikacji lub wyłączając aplikację w pliku konfiguracyjnym.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Zwykle można to naprawić, przyznając serwerowi dostęp do zapisu do katalogu aplikacji lub wyłączając sklep z aplikacjami w pliku konfiguracyjnym.", "Cannot create \"data\" directory" : "Nie mozna utworzyć katalogu \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu głównego. Zobacz %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Uprawnienia można zazwyczaj naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu głównego. Zobacz %s.", - "Setting locale to %s failed" : "Nie udało się zmienić języka na %s", + "Setting locale to %s failed" : "Ustawienie języka na %s nie powiodło się", "Please install one of these locales on your system and restart your webserver." : "Zainstaluj jedną z lokalizacji w swoim systemie i ponownie uruchom serwer WWW.", "PHP module %s not installed." : "Moduł PHP %s nie jest zainstalowany.", "Please ask your server administrator to install the module." : "Poproś administratora serwera o zainstalowanie modułu.", @@ -229,8 +251,15 @@ "Storage connection error. %s" : "Błąd połączenia z magazynem. %s", "Storage is temporarily not available" : "Magazyn jest tymczasowo niedostępny", "Storage connection timeout. %s" : "Limit czasu połączenia do magazynu. %s", - "Following databases are supported: %s" : "Obsługiwane są następujące bazy danych: %s", - "Following platforms are supported: %s" : "Obsługiwane są następujące platformy: %s", - "Invalid Federated Cloud ID" : "Nieprawidłowy ID Chmury Federacyjnej" + "This can usually be fixed by giving the webserver write access to the config directory" : "Zwykle można to naprawić, nadając serwerowi WWW dostęp do zapisu do katalogu config.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Jeśli, albo wolisz zachować plik config.php tylko do odczytu, ustaw w nim opcję \"config_is_read_only\" na true.", + "Can't create or write into the data directory %s" : "Nie można tworzyć ani zapisywać w katalogu %s", + "Invalid Federated Cloud ID" : "Nieprawidłowy ID Chmury Federacyjnej", + "Can’t increase permissions of %s" : "Nie można zwiększyć uprawnień %s", + "Files can’t be shared with delete permissions" : "Pliki nie mogą zostać udostępnione z prawem do usuwania", + "Files can’t be shared with create permissions" : "Pliki nie mogą zostać udostępnione z prawem do tworzenia", + "Can’t set expiration date more than %s days in the future" : "Nie można ustawić daty wygaśnięcia na dłuższą niż %s dni", + "Can't read file" : "Nie można odczytać pliku", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Zwykle można to naprawić, przyznając serwerowi dostęp do zapisu do katalogu aplikacji lub wyłączając sklep z aplikacjami w pliku konfiguracyjnym." },"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);" }
\ No newline at end of file diff --git a/lib/l10n/ps.js b/lib/l10n/ps.js index 429e3a30f00..2b5fd0905c7 100644 --- a/lib/l10n/ps.js +++ b/lib/l10n/ps.js @@ -2,14 +2,14 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "شسیب", - "This can usually be fixed by giving the webserver write access to the config directory" : "شسیب", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "شسیب", "Unknown filetype" : "د فایل ډول نامعلوم دی", "Invalid image" : "انځور سم نه دی", "Help" : "مرسته", "Apps" : "اپلېکشنونه", "Settings" : "سمونې", "Users" : "کارنان", - "Storage is temporarily not available" : "ذخیره د لنډې مودې لپاره نشته" + "Storage is temporarily not available" : "ذخیره د لنډې مودې لپاره نشته", + "This can usually be fixed by giving the webserver write access to the config directory" : "شسیب", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "شسیب" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/ps.json b/lib/l10n/ps.json index 45ca4c2c610..10b5ae522eb 100644 --- a/lib/l10n/ps.json +++ b/lib/l10n/ps.json @@ -1,13 +1,13 @@ { "translations": { "Cannot write into \"config\" directory!" : "شسیب", - "This can usually be fixed by giving the webserver write access to the config directory" : "شسیب", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "شسیب", "Unknown filetype" : "د فایل ډول نامعلوم دی", "Invalid image" : "انځور سم نه دی", "Help" : "مرسته", "Apps" : "اپلېکشنونه", "Settings" : "سمونې", "Users" : "کارنان", - "Storage is temporarily not available" : "ذخیره د لنډې مودې لپاره نشته" + "Storage is temporarily not available" : "ذخیره د لنډې مودې لپاره نشته", + "This can usually be fixed by giving the webserver write access to the config directory" : "شسیب", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "شسیب" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js index 290c763a8f6..ee9b8b4d16b 100644 --- a/lib/l10n/pt_BR.js +++ b/lib/l10n/pt_BR.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Não é possível gravar no diretório \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Isso geralmente pode ser corrigido dando o acesso de escritura ao webserver para o diretório de configuração", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true.", - "See %s" : "Ver %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Geralmente, isso pode ser corrigido concedendo ao servidor web acesso de gravação ao diretório de configuração.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true. Veja %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Mas, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true nele. ", + "See %s" : "Ver %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Os arquivos do aplicativo %1$s não foram instalados corretamente. Certifique-se que é uma versão compatível com seu servidor.", "Sample configuration detected" : "Configuração de exemplo detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de exemplo foi copiada. Isso pode terminar sua instalação e não é suportado. Por favor leia a documentação antes de realizar mudanças no config.php", + "%s email verification" : "%s e-mail de verificação", + "Email verification" : "E-mail de verificação", + "Click the following button to confirm your email." : "Clique no botão a seguir para confirmar seu e-mail.", + "Click the following link to confirm your email." : "Clique no link a seguir para confirmar seu e-mail.", + "Confirm your email" : "Confirme seu e-mail", "Other activities" : "Outras atividades", "%1$s and %2$s" : "%1$s e %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s e %3$s", @@ -20,8 +23,8 @@ OC.L10N.register( "Groupware bundle" : "Pacote Groupware", "Hub bundle" : "Pacote de hub", "Social sharing bundle" : "Pacote de compartilhamento social", - "PHP %s or higher is required." : "PHP %s ou superior é requerido.", - "PHP with a version lower than %s is required." : "É requerida uma versão PHP mais antiga que a %s .", + "PHP %s or higher is required." : "PHP %s ou superior é necessário.", + "PHP with a version lower than %s is required." : "É necessária uma versão PHP mais antiga que a %s.", "%sbit or higher PHP required." : "%sbit ou PHP maior é requerido.", "The following architectures are supported: %s" : "As seguintes plataformas são suportadas: %s", "The following databases are supported: %s" : "Os seguintes bancos de dados são suportados: %s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "As seguintes plataformas são suportadas: %s", "Server version %s or higher is required." : "É requerido um servidor da versão %s ou superior.", "Server version %s or lower is required." : "É requerido um servidor da versão %s ou abaixo.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "O usuário conectado deve ser um administrador, um subadministrador ou ter direito especial para acessar esta configuração", "Logged in user must be an admin or sub admin" : "O usuário conectado deve ser um administrador ou subadministrador", "Logged in user must be an admin" : "O usuário conectado deve ser um administrador", "Wiping of device %s has started" : "Limpeza do dispositivo %s iniciou", @@ -71,7 +75,8 @@ OC.L10N.register( "seconds ago" : "segundos atrás", "Empty file" : "Arquivo vazio", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "O módulo com a ID: %s não existe. Por favor, habilite-o nas configurações de seu aplicativo ou contacte o administrador.", - "File already exists" : "Falha ao criar arquivo do modelo ", + "File already exists" : "O arquivo já existe", + "Invalid path" : "Diretório inválido", "Failed to create file from template" : "Falha ao criar arquivo do modelo ", "Templates" : "Modelos ", "File name is a reserved word" : "O nome do arquivo é uma palavra reservada", @@ -105,7 +110,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, remova a configuração de open_basedir de seu php.ini ou mude o PHP para 64bit.", "Set an admin username." : "Defina um nome do usuário administrador.", "Set an admin password." : "Defina uma senha para o administrador.", - "Can't create or write into the data directory %s" : "Não foi possível criar ou gravar no diretório de dados %s", + "Cannot create or write into the data directory %s" : "Não foi possível criar ou escrever no diretório de dados %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "A plataforma de compartilhamento %s deve implementar a interface OCP\\Share_Backend", "Sharing backend %s not found" : "Plataforma de serviço de compartilhamento %s não encontrada", "Sharing backend for %s not found" : "Plataforma de compartilhamento para %s não foi encontrada", @@ -115,11 +120,11 @@ OC.L10N.register( "Open »%s«" : "Abrir »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Você não tem permissão para compartilhar %s", - "Can’t increase permissions of %s" : "Não posso aumentar as permissões de %s", - "Files can’t be shared with delete permissions" : "Os arquivos não podem ser compartilhados com permissões de exclusão", - "Files can’t be shared with create permissions" : "Os arquivos não podem ser compartilhados com permissões de criação", + "Cannot increase permissions of %s" : "Não foi possível aumentar as permissões de %s", + "Files cannot be shared with delete permissions" : "Arquivos não podem ser compartilhados com permissões de exclusão", + "Files cannot be shared with create permissions" : "Arquivos não podem ser compartilhados com permissões de criação", "Expiration date is in the past" : "Data de expiração está no passado", - "Can’t set expiration date more than %s days in the future" : "Não é possível definir a expiração mais do que %s dias no futuro", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Não foi possível definir a data de expiração superior que %n dias no futuro","Não foi possível definir a data de expiração superior que %n dias no futuro"], "Sharing is only allowed with group members" : "O compartilhamento só é permitido com membros do grupo ", "Sharing %s failed, because this item is already shared with user %s" : "Compartilhamento %s falhou, porque este item já está compartilhado com o usuário %s", "%1$s shared »%2$s« with you" : "%1$s compartilhou »%2$s« com você", @@ -186,15 +191,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "O aplicativo \"%1$s\" não pode ser instalado devido à estas dependências: %2$s", "a safe home for all your data" : "Um lar seguro para todos os seus dados", "File is currently busy, please try again later" : "O arquivo está ocupado, tente novamente mais tarde", - "Can't read file" : "Não foi possível ler arquivo", + "Cannot read file" : "Não foi possível ler o arquivo", "Application is not enabled" : "O aplicativo não está habilitado", "Authentication error" : "Erro de autenticação", "Token expired. Please reload page." : "O token expirou. Por favor recarregue a página.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nenhum driver de banco de dados (sqlite, mysql ou postgresql) instalado.", "Cannot write into \"config\" directory" : "Não foi possível gravar no diretório \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Normalmente isso pode ser resolvido dando ao webserver permissão de escritura no diretório config. Veja %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true. Veja %s", "Cannot write into \"apps\" directory" : "Não foi possível gravar no diretório \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Geralmente, isso pode ser corrigido concedendo ao servidor web acesso de gravação ao diretório de aplicativos ou desativando a loja de aplicativos no arquivo de configuração.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Isso geralmente pode ser corrigido fornecendo ao servidor da web acesso de gravação ao diretório de aplicativos ou desativando a App Store no arquivo de configuração.", "Cannot create \"data\" directory" : "Não foi possível criar o diretório \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Normalmente isso pode ser resolvido dando ao webserver permissão de escrita no diretório raiz. Veja %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "As permissões normalmente podem ser corrigidas dando permissão de escrita do diretório raiz para o servidor web. Veja %s.", @@ -206,7 +212,7 @@ OC.L10N.register( "Adjusting this setting in php.ini will make Nextcloud run again" : "Ajustar a configuração no php.ini fará com que o Nextcloud execute novamente", "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload está definido para \"%s\" ao invés do valor esperado \"0\"", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para corrigir esse problema defina <code>mbstring.func_overload</code> para <code>0</code> em seu php.ini", - "libxml2 2.7.0 is at least required. Currently %s is installed." : "A libxml2 2.7.0 é a versão mínima requerida. Atualmente a versão %s está instalada.", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "A libxml2 2.7.0 é a versão mínima necessária. Atualmente a versão %s está instalada.", "To fix this issue update your libxml2 version and restart your web server." : "Para corrigir este problema, atualize a versão da sua libxml2 e reinicie seu servidor web.", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP aparentemente está configurado para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por um cache/acelerador, como Zend OPcache ou eAccelerator.", @@ -231,8 +237,15 @@ OC.L10N.register( "Storage connection error. %s" : "Erro na conexão de armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", "Storage connection timeout. %s" : "Atingido o tempo limite de conexão ao armazenamento. %s", - "Following databases are supported: %s" : "Os seguintes bancos de dados são suportados: %s", - "Following platforms are supported: %s" : "As seguintes plataformas são suportadas: %s", - "Invalid Federated Cloud ID" : "ID inválida de Nuvem Federada" + "This can usually be fixed by giving the webserver write access to the config directory" : "Isso geralmente pode ser corrigido dando o acesso de escritura ao webserver para o diretório de configuração", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true.", + "Can't create or write into the data directory %s" : "Não foi possível criar ou gravar no diretório de dados %s", + "Invalid Federated Cloud ID" : "ID inválida de Nuvem Federada", + "Can’t increase permissions of %s" : "Não posso aumentar as permissões de %s", + "Files can’t be shared with delete permissions" : "Os arquivos não podem ser compartilhados com permissões de exclusão", + "Files can’t be shared with create permissions" : "Os arquivos não podem ser compartilhados com permissões de criação", + "Can’t set expiration date more than %s days in the future" : "Não é possível definir a expiração mais do que %s dias no futuro", + "Can't read file" : "Não foi possível ler arquivo", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Geralmente, isso pode ser corrigido concedendo ao servidor web acesso de gravação ao diretório de aplicativos ou desativando a loja de aplicativos no arquivo de configuração." }, "nplurals=2; plural=(n > 1);"); diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json index d2c12358b19..57c0cbc8ccb 100644 --- a/lib/l10n/pt_BR.json +++ b/lib/l10n/pt_BR.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "Não é possível gravar no diretório \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Isso geralmente pode ser corrigido dando o acesso de escritura ao webserver para o diretório de configuração", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true.", - "See %s" : "Ver %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Geralmente, isso pode ser corrigido concedendo ao servidor web acesso de gravação ao diretório de configuração.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true. Veja %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Mas, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true nele. ", + "See %s" : "Ver %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Os arquivos do aplicativo %1$s não foram instalados corretamente. Certifique-se que é uma versão compatível com seu servidor.", "Sample configuration detected" : "Configuração de exemplo detectada", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de exemplo foi copiada. Isso pode terminar sua instalação e não é suportado. Por favor leia a documentação antes de realizar mudanças no config.php", + "%s email verification" : "%s e-mail de verificação", + "Email verification" : "E-mail de verificação", + "Click the following button to confirm your email." : "Clique no botão a seguir para confirmar seu e-mail.", + "Click the following link to confirm your email." : "Clique no link a seguir para confirmar seu e-mail.", + "Confirm your email" : "Confirme seu e-mail", "Other activities" : "Outras atividades", "%1$s and %2$s" : "%1$s e %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s e %3$s", @@ -18,8 +21,8 @@ "Groupware bundle" : "Pacote Groupware", "Hub bundle" : "Pacote de hub", "Social sharing bundle" : "Pacote de compartilhamento social", - "PHP %s or higher is required." : "PHP %s ou superior é requerido.", - "PHP with a version lower than %s is required." : "É requerida uma versão PHP mais antiga que a %s .", + "PHP %s or higher is required." : "PHP %s ou superior é necessário.", + "PHP with a version lower than %s is required." : "É necessária uma versão PHP mais antiga que a %s.", "%sbit or higher PHP required." : "%sbit ou PHP maior é requerido.", "The following architectures are supported: %s" : "As seguintes plataformas são suportadas: %s", "The following databases are supported: %s" : "Os seguintes bancos de dados são suportados: %s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "As seguintes plataformas são suportadas: %s", "Server version %s or higher is required." : "É requerido um servidor da versão %s ou superior.", "Server version %s or lower is required." : "É requerido um servidor da versão %s ou abaixo.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "O usuário conectado deve ser um administrador, um subadministrador ou ter direito especial para acessar esta configuração", "Logged in user must be an admin or sub admin" : "O usuário conectado deve ser um administrador ou subadministrador", "Logged in user must be an admin" : "O usuário conectado deve ser um administrador", "Wiping of device %s has started" : "Limpeza do dispositivo %s iniciou", @@ -69,7 +73,8 @@ "seconds ago" : "segundos atrás", "Empty file" : "Arquivo vazio", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "O módulo com a ID: %s não existe. Por favor, habilite-o nas configurações de seu aplicativo ou contacte o administrador.", - "File already exists" : "Falha ao criar arquivo do modelo ", + "File already exists" : "O arquivo já existe", + "Invalid path" : "Diretório inválido", "Failed to create file from template" : "Falha ao criar arquivo do modelo ", "Templates" : "Modelos ", "File name is a reserved word" : "O nome do arquivo é uma palavra reservada", @@ -103,7 +108,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, remova a configuração de open_basedir de seu php.ini ou mude o PHP para 64bit.", "Set an admin username." : "Defina um nome do usuário administrador.", "Set an admin password." : "Defina uma senha para o administrador.", - "Can't create or write into the data directory %s" : "Não foi possível criar ou gravar no diretório de dados %s", + "Cannot create or write into the data directory %s" : "Não foi possível criar ou escrever no diretório de dados %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "A plataforma de compartilhamento %s deve implementar a interface OCP\\Share_Backend", "Sharing backend %s not found" : "Plataforma de serviço de compartilhamento %s não encontrada", "Sharing backend for %s not found" : "Plataforma de compartilhamento para %s não foi encontrada", @@ -113,11 +118,11 @@ "Open »%s«" : "Abrir »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Você não tem permissão para compartilhar %s", - "Can’t increase permissions of %s" : "Não posso aumentar as permissões de %s", - "Files can’t be shared with delete permissions" : "Os arquivos não podem ser compartilhados com permissões de exclusão", - "Files can’t be shared with create permissions" : "Os arquivos não podem ser compartilhados com permissões de criação", + "Cannot increase permissions of %s" : "Não foi possível aumentar as permissões de %s", + "Files cannot be shared with delete permissions" : "Arquivos não podem ser compartilhados com permissões de exclusão", + "Files cannot be shared with create permissions" : "Arquivos não podem ser compartilhados com permissões de criação", "Expiration date is in the past" : "Data de expiração está no passado", - "Can’t set expiration date more than %s days in the future" : "Não é possível definir a expiração mais do que %s dias no futuro", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Não foi possível definir a data de expiração superior que %n dias no futuro","Não foi possível definir a data de expiração superior que %n dias no futuro"], "Sharing is only allowed with group members" : "O compartilhamento só é permitido com membros do grupo ", "Sharing %s failed, because this item is already shared with user %s" : "Compartilhamento %s falhou, porque este item já está compartilhado com o usuário %s", "%1$s shared »%2$s« with you" : "%1$s compartilhou »%2$s« com você", @@ -184,15 +189,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "O aplicativo \"%1$s\" não pode ser instalado devido à estas dependências: %2$s", "a safe home for all your data" : "Um lar seguro para todos os seus dados", "File is currently busy, please try again later" : "O arquivo está ocupado, tente novamente mais tarde", - "Can't read file" : "Não foi possível ler arquivo", + "Cannot read file" : "Não foi possível ler o arquivo", "Application is not enabled" : "O aplicativo não está habilitado", "Authentication error" : "Erro de autenticação", "Token expired. Please reload page." : "O token expirou. Por favor recarregue a página.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Nenhum driver de banco de dados (sqlite, mysql ou postgresql) instalado.", "Cannot write into \"config\" directory" : "Não foi possível gravar no diretório \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Normalmente isso pode ser resolvido dando ao webserver permissão de escritura no diretório config. Veja %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true. Veja %s", "Cannot write into \"apps\" directory" : "Não foi possível gravar no diretório \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Geralmente, isso pode ser corrigido concedendo ao servidor web acesso de gravação ao diretório de aplicativos ou desativando a loja de aplicativos no arquivo de configuração.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Isso geralmente pode ser corrigido fornecendo ao servidor da web acesso de gravação ao diretório de aplicativos ou desativando a App Store no arquivo de configuração.", "Cannot create \"data\" directory" : "Não foi possível criar o diretório \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Normalmente isso pode ser resolvido dando ao webserver permissão de escrita no diretório raiz. Veja %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "As permissões normalmente podem ser corrigidas dando permissão de escrita do diretório raiz para o servidor web. Veja %s.", @@ -204,7 +210,7 @@ "Adjusting this setting in php.ini will make Nextcloud run again" : "Ajustar a configuração no php.ini fará com que o Nextcloud execute novamente", "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload está definido para \"%s\" ao invés do valor esperado \"0\"", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para corrigir esse problema defina <code>mbstring.func_overload</code> para <code>0</code> em seu php.ini", - "libxml2 2.7.0 is at least required. Currently %s is installed." : "A libxml2 2.7.0 é a versão mínima requerida. Atualmente a versão %s está instalada.", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "A libxml2 2.7.0 é a versão mínima necessária. Atualmente a versão %s está instalada.", "To fix this issue update your libxml2 version and restart your web server." : "Para corrigir este problema, atualize a versão da sua libxml2 e reinicie seu servidor web.", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP aparentemente está configurado para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por um cache/acelerador, como Zend OPcache ou eAccelerator.", @@ -229,8 +235,15 @@ "Storage connection error. %s" : "Erro na conexão de armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", "Storage connection timeout. %s" : "Atingido o tempo limite de conexão ao armazenamento. %s", - "Following databases are supported: %s" : "Os seguintes bancos de dados são suportados: %s", - "Following platforms are supported: %s" : "As seguintes plataformas são suportadas: %s", - "Invalid Federated Cloud ID" : "ID inválida de Nuvem Federada" + "This can usually be fixed by giving the webserver write access to the config directory" : "Isso geralmente pode ser corrigido dando o acesso de escritura ao webserver para o diretório de configuração", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ou, se você preferir manter o arquivo config.php somente para leitura, defina a opção \"config_is_read_only\" como true.", + "Can't create or write into the data directory %s" : "Não foi possível criar ou gravar no diretório de dados %s", + "Invalid Federated Cloud ID" : "ID inválida de Nuvem Federada", + "Can’t increase permissions of %s" : "Não posso aumentar as permissões de %s", + "Files can’t be shared with delete permissions" : "Os arquivos não podem ser compartilhados com permissões de exclusão", + "Files can’t be shared with create permissions" : "Os arquivos não podem ser compartilhados com permissões de criação", + "Can’t set expiration date more than %s days in the future" : "Não é possível definir a expiração mais do que %s dias no futuro", + "Can't read file" : "Não foi possível ler arquivo", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Geralmente, isso pode ser corrigido concedendo ao servidor web acesso de gravação ao diretório de aplicativos ou desativando a loja de aplicativos no arquivo de configuração." },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/lib/l10n/pt_PT.js b/lib/l10n/pt_PT.js index 3374bb48eaf..772110092a1 100644 --- a/lib/l10n/pt_PT.js +++ b/lib/l10n/pt_PT.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Não é possível gravar no directório \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Isto normalmente pode ser resolvido, dando ao servidor da Web direitos de gravação para a diretoria de configuração", "See %s" : "Ver %s", "Sample configuration detected" : "Detetado exemplo de configuração", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de amostra foi copiada. Isso pode danificar a sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php", @@ -75,7 +74,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, remova a definição open_basedir do seu php.ini ou altere o seu PHP para 64-bits.", "Set an admin username." : "Definir um nome de utilizador de administrador", "Set an admin password." : "Definia uma palavra-passe de administrador.", - "Can't create or write into the data directory %s" : "Não é possível criar ou escrever a directoria data %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Ao partilhar a interface %s deve implementar a interface OCP\\Share_Backend", "Sharing backend %s not found" : "Não foi encontrada a partilha da interface %s", "Sharing backend for %s not found" : "Não foi encontrada a partilha da interface para %s", @@ -85,11 +83,7 @@ OC.L10N.register( "Open »%s«" : "Abrir »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Não está autorizado a partilhar %s", - "Can’t increase permissions of %s" : "Não é possível aumentar as permissões de %s", - "Files can’t be shared with delete permissions" : "Ficheiros não podem ser partilhados com permissões de apagar", - "Files can’t be shared with create permissions" : "Ficheiros não podem ser partilhados com permissões de criação", "Expiration date is in the past" : "A data de expiração está no passado", - "Can’t set expiration date more than %s days in the future" : "Não é possível definir data de expiração a mais de %s dias no futuro", "%1$s shared »%2$s« with you" : "%1$s partilhado »%2$s« contigo", "%1$s shared »%2$s« with you." : "%1$s partilhado »%2$s« contigo.", "Click the button below to open it." : "Clicar no botão abaixo para abrir.", @@ -151,7 +145,6 @@ OC.L10N.register( "Login canceled by app" : "Sessão cancelada pela app", "a safe home for all your data" : "Um lugar seguro para todos os seus dados", "File is currently busy, please try again later" : "O ficheiro está ocupado, por favor, tente mais tarde", - "Can't read file" : "Não é possível ler o ficheiro", "Application is not enabled" : "A aplicação não está activada", "Authentication error" : "Erro na autenticação", "Token expired. Please reload page." : "O token expirou. Por favor recarregue a página.", @@ -190,8 +183,13 @@ OC.L10N.register( "Storage connection error. %s" : "Erro de ligação ao armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", "Storage connection timeout. %s" : "Tempo de ligação ao armazenamento expirou. %s", - "Following databases are supported: %s" : "São suportadas as seguintes bases de dados: %s", - "Following platforms are supported: %s" : "São suportadas as seguintes plataformas: %s", - "Invalid Federated Cloud ID" : "Id. de Nuvem Federada Inválida" + "This can usually be fixed by giving the webserver write access to the config directory" : "Isto normalmente pode ser resolvido, dando ao servidor da Web direitos de gravação para a diretoria de configuração", + "Can't create or write into the data directory %s" : "Não é possível criar ou escrever a directoria data %s", + "Invalid Federated Cloud ID" : "Id. de Nuvem Federada Inválida", + "Can’t increase permissions of %s" : "Não é possível aumentar as permissões de %s", + "Files can’t be shared with delete permissions" : "Ficheiros não podem ser partilhados com permissões de apagar", + "Files can’t be shared with create permissions" : "Ficheiros não podem ser partilhados com permissões de criação", + "Can’t set expiration date more than %s days in the future" : "Não é possível definir data de expiração a mais de %s dias no futuro", + "Can't read file" : "Não é possível ler o ficheiro" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/pt_PT.json b/lib/l10n/pt_PT.json index 259361e7b66..c32f02f2e0b 100644 --- a/lib/l10n/pt_PT.json +++ b/lib/l10n/pt_PT.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Não é possível gravar no directório \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Isto normalmente pode ser resolvido, dando ao servidor da Web direitos de gravação para a diretoria de configuração", "See %s" : "Ver %s", "Sample configuration detected" : "Detetado exemplo de configuração", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de amostra foi copiada. Isso pode danificar a sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php", @@ -73,7 +72,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Por favor, remova a definição open_basedir do seu php.ini ou altere o seu PHP para 64-bits.", "Set an admin username." : "Definir um nome de utilizador de administrador", "Set an admin password." : "Definia uma palavra-passe de administrador.", - "Can't create or write into the data directory %s" : "Não é possível criar ou escrever a directoria data %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Ao partilhar a interface %s deve implementar a interface OCP\\Share_Backend", "Sharing backend %s not found" : "Não foi encontrada a partilha da interface %s", "Sharing backend for %s not found" : "Não foi encontrada a partilha da interface para %s", @@ -83,11 +81,7 @@ "Open »%s«" : "Abrir »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Não está autorizado a partilhar %s", - "Can’t increase permissions of %s" : "Não é possível aumentar as permissões de %s", - "Files can’t be shared with delete permissions" : "Ficheiros não podem ser partilhados com permissões de apagar", - "Files can’t be shared with create permissions" : "Ficheiros não podem ser partilhados com permissões de criação", "Expiration date is in the past" : "A data de expiração está no passado", - "Can’t set expiration date more than %s days in the future" : "Não é possível definir data de expiração a mais de %s dias no futuro", "%1$s shared »%2$s« with you" : "%1$s partilhado »%2$s« contigo", "%1$s shared »%2$s« with you." : "%1$s partilhado »%2$s« contigo.", "Click the button below to open it." : "Clicar no botão abaixo para abrir.", @@ -149,7 +143,6 @@ "Login canceled by app" : "Sessão cancelada pela app", "a safe home for all your data" : "Um lugar seguro para todos os seus dados", "File is currently busy, please try again later" : "O ficheiro está ocupado, por favor, tente mais tarde", - "Can't read file" : "Não é possível ler o ficheiro", "Application is not enabled" : "A aplicação não está activada", "Authentication error" : "Erro na autenticação", "Token expired. Please reload page." : "O token expirou. Por favor recarregue a página.", @@ -188,8 +181,13 @@ "Storage connection error. %s" : "Erro de ligação ao armazenamento. %s", "Storage is temporarily not available" : "Armazenamento temporariamente indisponível", "Storage connection timeout. %s" : "Tempo de ligação ao armazenamento expirou. %s", - "Following databases are supported: %s" : "São suportadas as seguintes bases de dados: %s", - "Following platforms are supported: %s" : "São suportadas as seguintes plataformas: %s", - "Invalid Federated Cloud ID" : "Id. de Nuvem Federada Inválida" + "This can usually be fixed by giving the webserver write access to the config directory" : "Isto normalmente pode ser resolvido, dando ao servidor da Web direitos de gravação para a diretoria de configuração", + "Can't create or write into the data directory %s" : "Não é possível criar ou escrever a directoria data %s", + "Invalid Federated Cloud ID" : "Id. de Nuvem Federada Inválida", + "Can’t increase permissions of %s" : "Não é possível aumentar as permissões de %s", + "Files can’t be shared with delete permissions" : "Ficheiros não podem ser partilhados com permissões de apagar", + "Files can’t be shared with create permissions" : "Ficheiros não podem ser partilhados com permissões de criação", + "Can’t set expiration date more than %s days in the future" : "Não é possível definir data de expiração a mais de %s dias no futuro", + "Can't read file" : "Não é possível ler o ficheiro" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/ro.js b/lib/l10n/ro.js index 1ff46811690..78b15240dbf 100644 --- a/lib/l10n/ro.js +++ b/lib/l10n/ro.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nu se poate scrie în folderul \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Aceasta se poate repara de obicei prin permiterea accesului de scriere la dosarul de configurare al serverului Web", "See %s" : "Vezi %s", "Sample configuration detected" : "A fost detectată o configurație exemplu", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "S-a detectat copierea configurației exemplu. Acest lucru poate duce la oprirea instanței tale și nu este suportat. Te rugăm să citești documentația înainte de a face modificări în fișierul config.php", @@ -56,7 +55,6 @@ OC.L10N.register( "Open »%s«" : "Deschide »%s«", "%1$s via %2$s" : "%1$sprin %2$s", "You are not allowed to share %s" : "Nu există permisiunea de partajare %s", - "Files can’t be shared with delete permissions" : "Fișierele nu pot fi partajate cu permisiuni de ștergere", "Expiration date is in the past" : "Data expirării este în trecut", "%1$s shared »%2$s« with you." : "%1$sa partajat »%2$s« cu tine.", "Click the button below to open it." : "Apasă pe butonul de jos pentru a deschide.", @@ -125,8 +123,8 @@ OC.L10N.register( "PostgreSQL >= 9 required" : "Este necesară versiunea 9 sau mai mare a PostgreSQL", "Please upgrade your database version" : "Actualizați baza de date la o versiune mai nouă", "Storage is temporarily not available" : "Spațiu de stocare este indisponibil temporar", - "Following databases are supported: %s" : "Următoarele baze de date sunt suportate: %s", - "Following platforms are supported: %s" : "Sunt suportate următoarele platforme: %s", - "Invalid Federated Cloud ID" : "ID invalid cloud federalizat" + "This can usually be fixed by giving the webserver write access to the config directory" : "Aceasta se poate repara de obicei prin permiterea accesului de scriere la dosarul de configurare al serverului Web", + "Invalid Federated Cloud ID" : "ID invalid cloud federalizat", + "Files can’t be shared with delete permissions" : "Fișierele nu pot fi partajate cu permisiuni de ștergere" }, "nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"); diff --git a/lib/l10n/ro.json b/lib/l10n/ro.json index a71393e9148..da65c03b1a6 100644 --- a/lib/l10n/ro.json +++ b/lib/l10n/ro.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nu se poate scrie în folderul \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Aceasta se poate repara de obicei prin permiterea accesului de scriere la dosarul de configurare al serverului Web", "See %s" : "Vezi %s", "Sample configuration detected" : "A fost detectată o configurație exemplu", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "S-a detectat copierea configurației exemplu. Acest lucru poate duce la oprirea instanței tale și nu este suportat. Te rugăm să citești documentația înainte de a face modificări în fișierul config.php", @@ -54,7 +53,6 @@ "Open »%s«" : "Deschide »%s«", "%1$s via %2$s" : "%1$sprin %2$s", "You are not allowed to share %s" : "Nu există permisiunea de partajare %s", - "Files can’t be shared with delete permissions" : "Fișierele nu pot fi partajate cu permisiuni de ștergere", "Expiration date is in the past" : "Data expirării este în trecut", "%1$s shared »%2$s« with you." : "%1$sa partajat »%2$s« cu tine.", "Click the button below to open it." : "Apasă pe butonul de jos pentru a deschide.", @@ -123,8 +121,8 @@ "PostgreSQL >= 9 required" : "Este necesară versiunea 9 sau mai mare a PostgreSQL", "Please upgrade your database version" : "Actualizați baza de date la o versiune mai nouă", "Storage is temporarily not available" : "Spațiu de stocare este indisponibil temporar", - "Following databases are supported: %s" : "Următoarele baze de date sunt suportate: %s", - "Following platforms are supported: %s" : "Sunt suportate următoarele platforme: %s", - "Invalid Federated Cloud ID" : "ID invalid cloud federalizat" + "This can usually be fixed by giving the webserver write access to the config directory" : "Aceasta se poate repara de obicei prin permiterea accesului de scriere la dosarul de configurare al serverului Web", + "Invalid Federated Cloud ID" : "ID invalid cloud federalizat", + "Files can’t be shared with delete permissions" : "Fișierele nu pot fi partajate cu permisiuni de ștergere" },"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/lib/l10n/ru.js b/lib/l10n/ru.js index 05bbe3a7ab3..24c107d69fa 100644 --- a/lib/l10n/ru.js +++ b/lib/l10n/ru.js @@ -2,11 +2,9 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Невозможно выполнить запись в каталог «config».", - "This can usually be fixed by giving the webserver write access to the config directory" : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\".", - "See %s" : "Обратитесь к %s.", "This can usually be fixed by giving the webserver write access to the config directory." : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\". Изучите %s.", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру «config_is_read_only» значение «true».", + "See %s" : "Обратитесь к %s.", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Файлы приложения %1$s не были заменены корректно. Удостоверьтесь, что устанавливаемая версия этого приложения совместима с версией сервера.", "Sample configuration detected" : "Обнаружена конфигурация из примера.", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Была обнаружена конфигурация из примера. Такая конфигурация не поддерживается и может повредить вашей системе. Прочтите документацию перед внесением изменений в файл config.php", @@ -72,6 +70,7 @@ OC.L10N.register( "Empty file" : "Пустой файл", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Модуль с ID «%s» не существует. Включите его в настройках приложений или обратитесь к администратору.", "File already exists" : "Файл уже существует", + "Invalid path" : "Некорректный путь", "Failed to create file from template" : "Не удалось создать файл на основе шаблона", "Templates" : "Шаблоны", "File name is a reserved word" : "Имя файла является зарезервированным словом", @@ -105,7 +104,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Пожалуйста, удалите директиву open_basedir из файла php.ini или смените PHP на 64-разрядную сборку.", "Set an admin username." : "Задать имя пользователя для администратора.", "Set an admin password." : "Задать пароль для admin.", - "Can't create or write into the data directory %s" : "Невозможно создать или записать в каталог данных %s", + "Cannot create or write into the data directory %s" : "Не удалось создать или записать в каталог данных «%s»", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Бэкенд общего доступа %s должен реализовывать интерфейс OCP\\Share_Backend", "Sharing backend %s not found" : "Механизм предоставления общего доступа %s не найден", "Sharing backend for %s not found" : "Не найден механизм предоставления общего доступа для %s ", @@ -115,12 +114,13 @@ OC.L10N.register( "Open »%s«" : "Открыть «%s»", "%1$s via %2$s" : "%1$s через %2$s", "You are not allowed to share %s" : "Вам не разрешено делиться %s", - "Can’t increase permissions of %s" : "Невозможно увеличить права доступа для %s", - "Files can’t be shared with delete permissions" : "Файлы не могут иметь общий доступ с правами на удаление", - "Files can’t be shared with create permissions" : "Файлы не могут иметь общий доступ с правами на создание", + "Cannot increase permissions of %s" : "Не удалось повысить права доступа %s", + "Files cannot be shared with delete permissions" : "Права на удаление файлов не позволяют открывать общий доступ к ним", + "Files cannot be shared with create permissions" : "Права на создание файлов не позволяют открывать общий доступ к ним", "Expiration date is in the past" : "Дата окончания срока действия уже прошла", - "Can’t set expiration date more than %s days in the future" : "Невозможно установить дату окончания срока действия более %s дней", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Срок окончания не может быть более %n дня","Срок окончания не может быть более %n дней","Срок окончания не может быть более %n дней","Срок окончания не может быть более %n дней"], "Sharing is only allowed with group members" : "Разрешено публиковать только для участников группы", + "Sharing %s failed, because this item is already shared with user %s" : "Не удалось поделиться %s, так как элемент находится в общем доступе у %s", "%1$s shared »%2$s« with you" : "%1$s предоставил(а) вам доступ к «%2$s»", "%1$s shared »%2$s« with you." : "%1$s предоставил(а) вам доступ к «%2$s».", "Click the button below to open it." : "Нажмите расположенную ниже кнопку для перехода к полученному общему ресурсу.", @@ -185,15 +185,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Приложение «%1$s» не может быть установлено, так как не удовлетворены следующие зависимости: %2$s", "a safe home for all your data" : "надёжный дом для всех ваших данных", "File is currently busy, please try again later" : "Файл в данный момент используется, повторите попытку позже.", - "Can't read file" : "Не удается прочитать файл", + "Cannot read file" : "Не удается прочитать файл", "Application is not enabled" : "Приложение не разрешено", "Authentication error" : "Ошибка аутентификации", "Token expired. Please reload page." : "Токен просрочен. Перезагрузите страницу.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Не установлены драйвера баз данных (sqlite, mysql или postgresql)", "Cannot write into \"config\" directory" : "Запись в каталог «config» невозможна", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации. Изучите %s.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\". Изучите %s.", "Cannot write into \"apps\" directory" : "Запись в каталог «app» невозможна", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Обычно это можно исправить, предоставив веб-серверу права для записи в каталог приложений или отключив магазин приложений в файле конфигурации.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Обычно это можно исправить, предоставлением веб-серверу права для записи в каталог приложений или отключением магазина приложений в файле конфигурации.", "Cannot create \"data\" directory" : "Невозможно создать каталог «data»", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Обычно это можно исправить, предоставив веб-серверу права на запись в корневой каталог. Смотрите %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Разрешения обычно можно исправить, предоставив веб-серверу право на запись в корневой каталог. Смотрите %s.", @@ -230,8 +231,15 @@ OC.L10N.register( "Storage connection error. %s" : "Ошибка подключения к хранилищу. %s", "Storage is temporarily not available" : "Хранилище временно недоступно", "Storage connection timeout. %s" : "Истекло время ожидания подключения к хранилищу. %s", - "Following databases are supported: %s" : "Поддерживаются следующие СУБД: %s", - "Following platforms are supported: %s" : "Поддерживаются следующие платформы: %s", - "Invalid Federated Cloud ID" : "Неверный ID в объединении облачных хранилищ." + "This can usually be fixed by giving the webserver write access to the config directory" : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\".", + "Can't create or write into the data directory %s" : "Невозможно создать или записать в каталог данных %s", + "Invalid Federated Cloud ID" : "Неверный ID в объединении облачных хранилищ.", + "Can’t increase permissions of %s" : "Невозможно увеличить права доступа для %s", + "Files can’t be shared with delete permissions" : "Файлы не могут иметь общий доступ с правами на удаление", + "Files can’t be shared with create permissions" : "Файлы не могут иметь общий доступ с правами на создание", + "Can’t set expiration date more than %s days in the future" : "Невозможно установить дату окончания срока действия более %s дней", + "Can't read file" : "Не удается прочитать файл", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Обычно это можно исправить, предоставив веб-серверу права для записи в каталог приложений или отключив магазин приложений в файле конфигурации." }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/lib/l10n/ru.json b/lib/l10n/ru.json index dfcd6288663..94e29df946f 100644 --- a/lib/l10n/ru.json +++ b/lib/l10n/ru.json @@ -1,10 +1,8 @@ { "translations": { "Cannot write into \"config\" directory!" : "Невозможно выполнить запись в каталог «config».", - "This can usually be fixed by giving the webserver write access to the config directory" : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\".", - "See %s" : "Обратитесь к %s.", "This can usually be fixed by giving the webserver write access to the config directory." : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\". Изучите %s.", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру «config_is_read_only» значение «true».", + "See %s" : "Обратитесь к %s.", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Файлы приложения %1$s не были заменены корректно. Удостоверьтесь, что устанавливаемая версия этого приложения совместима с версией сервера.", "Sample configuration detected" : "Обнаружена конфигурация из примера.", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Была обнаружена конфигурация из примера. Такая конфигурация не поддерживается и может повредить вашей системе. Прочтите документацию перед внесением изменений в файл config.php", @@ -70,6 +68,7 @@ "Empty file" : "Пустой файл", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Модуль с ID «%s» не существует. Включите его в настройках приложений или обратитесь к администратору.", "File already exists" : "Файл уже существует", + "Invalid path" : "Некорректный путь", "Failed to create file from template" : "Не удалось создать файл на основе шаблона", "Templates" : "Шаблоны", "File name is a reserved word" : "Имя файла является зарезервированным словом", @@ -103,7 +102,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Пожалуйста, удалите директиву open_basedir из файла php.ini или смените PHP на 64-разрядную сборку.", "Set an admin username." : "Задать имя пользователя для администратора.", "Set an admin password." : "Задать пароль для admin.", - "Can't create or write into the data directory %s" : "Невозможно создать или записать в каталог данных %s", + "Cannot create or write into the data directory %s" : "Не удалось создать или записать в каталог данных «%s»", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Бэкенд общего доступа %s должен реализовывать интерфейс OCP\\Share_Backend", "Sharing backend %s not found" : "Механизм предоставления общего доступа %s не найден", "Sharing backend for %s not found" : "Не найден механизм предоставления общего доступа для %s ", @@ -113,12 +112,13 @@ "Open »%s«" : "Открыть «%s»", "%1$s via %2$s" : "%1$s через %2$s", "You are not allowed to share %s" : "Вам не разрешено делиться %s", - "Can’t increase permissions of %s" : "Невозможно увеличить права доступа для %s", - "Files can’t be shared with delete permissions" : "Файлы не могут иметь общий доступ с правами на удаление", - "Files can’t be shared with create permissions" : "Файлы не могут иметь общий доступ с правами на создание", + "Cannot increase permissions of %s" : "Не удалось повысить права доступа %s", + "Files cannot be shared with delete permissions" : "Права на удаление файлов не позволяют открывать общий доступ к ним", + "Files cannot be shared with create permissions" : "Права на создание файлов не позволяют открывать общий доступ к ним", "Expiration date is in the past" : "Дата окончания срока действия уже прошла", - "Can’t set expiration date more than %s days in the future" : "Невозможно установить дату окончания срока действия более %s дней", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Срок окончания не может быть более %n дня","Срок окончания не может быть более %n дней","Срок окончания не может быть более %n дней","Срок окончания не может быть более %n дней"], "Sharing is only allowed with group members" : "Разрешено публиковать только для участников группы", + "Sharing %s failed, because this item is already shared with user %s" : "Не удалось поделиться %s, так как элемент находится в общем доступе у %s", "%1$s shared »%2$s« with you" : "%1$s предоставил(а) вам доступ к «%2$s»", "%1$s shared »%2$s« with you." : "%1$s предоставил(а) вам доступ к «%2$s».", "Click the button below to open it." : "Нажмите расположенную ниже кнопку для перехода к полученному общему ресурсу.", @@ -183,15 +183,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Приложение «%1$s» не может быть установлено, так как не удовлетворены следующие зависимости: %2$s", "a safe home for all your data" : "надёжный дом для всех ваших данных", "File is currently busy, please try again later" : "Файл в данный момент используется, повторите попытку позже.", - "Can't read file" : "Не удается прочитать файл", + "Cannot read file" : "Не удается прочитать файл", "Application is not enabled" : "Приложение не разрешено", "Authentication error" : "Ошибка аутентификации", "Token expired. Please reload page." : "Токен просрочен. Перезагрузите страницу.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Не установлены драйвера баз данных (sqlite, mysql или postgresql)", "Cannot write into \"config\" directory" : "Запись в каталог «config» невозможна", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации. Изучите %s.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\". Изучите %s.", "Cannot write into \"apps\" directory" : "Запись в каталог «app» невозможна", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Обычно это можно исправить, предоставив веб-серверу права для записи в каталог приложений или отключив магазин приложений в файле конфигурации.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Обычно это можно исправить, предоставлением веб-серверу права для записи в каталог приложений или отключением магазина приложений в файле конфигурации.", "Cannot create \"data\" directory" : "Невозможно создать каталог «data»", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Обычно это можно исправить, предоставив веб-серверу права на запись в корневой каталог. Смотрите %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Разрешения обычно можно исправить, предоставив веб-серверу право на запись в корневой каталог. Смотрите %s.", @@ -228,8 +229,15 @@ "Storage connection error. %s" : "Ошибка подключения к хранилищу. %s", "Storage is temporarily not available" : "Хранилище временно недоступно", "Storage connection timeout. %s" : "Истекло время ожидания подключения к хранилищу. %s", - "Following databases are supported: %s" : "Поддерживаются следующие СУБД: %s", - "Following platforms are supported: %s" : "Поддерживаются следующие платформы: %s", - "Invalid Federated Cloud ID" : "Неверный ID в объединении облачных хранилищ." + "This can usually be fixed by giving the webserver write access to the config directory" : "Обычно это можно исправить, предоставив веб-серверу права на запись в каталог конфигурации.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Если для файла «config.php» должен быть установлен режим «только чтение», задайте параметру \"config_is_read_only\" значение \"true\".", + "Can't create or write into the data directory %s" : "Невозможно создать или записать в каталог данных %s", + "Invalid Federated Cloud ID" : "Неверный ID в объединении облачных хранилищ.", + "Can’t increase permissions of %s" : "Невозможно увеличить права доступа для %s", + "Files can’t be shared with delete permissions" : "Файлы не могут иметь общий доступ с правами на удаление", + "Files can’t be shared with create permissions" : "Файлы не могут иметь общий доступ с правами на создание", + "Can’t set expiration date more than %s days in the future" : "Невозможно установить дату окончания срока действия более %s дней", + "Can't read file" : "Не удается прочитать файл", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Обычно это можно исправить, предоставив веб-серверу права для записи в каталог приложений или отключив магазин приложений в файле конфигурации." },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" }
\ No newline at end of file diff --git a/lib/l10n/sc.js b/lib/l10n/sc.js index 32a9e7d3995..a3a7496ed84 100644 --- a/lib/l10n/sc.js +++ b/lib/l10n/sc.js @@ -1,10 +1,245 @@ OC.L10N.register( "lib", { + "Cannot write into \"config\" directory!" : "No faghet a iscriere in sa cartella \"config\"!", + "This can usually be fixed by giving the webserver write access to the config directory." : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella config.", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ma si preferes allogare s'archìviu de letura isceti congi.php, imposta su sèberu \"config_is_read_only\"", + "See %s" : "Càstia %s", + "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Is archìvios de s'aplicatzione %1$s no sunt istados cambiados in manera curreta. Assegura•ti chi b'apat una versione cumpatìbile cun su serbidore.", + "Sample configuration detected" : "S'at agatadu una cunfiguratzione de esèmpiu", + "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Est istadu iscobertu ca sa cunfiguratzione de esèmpiu est istada copiada. Custu podet blocare s'installatzione e no est suportadu. Leghe sa documentatzione in config.php antis de fàghere càmbios.", + "Other activities" : "Àteras atividades", + "%1$s and %2$s" : "%1$s e %2$s", + "%1$s, %2$s and %3$s" : "%1$s, %2$s e %3$s", + "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s e %4$s", + "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s e %5$s", + "Education Edition" : "Editzione didàtica", + "Enterprise bundle" : "Pachete Enterprise", + "Groupware bundle" : "Pachete Groupware", + "Hub bundle" : "Pachete Hub", + "Social sharing bundle" : "Pachete cumpartzidura Social ", + "PHP %s or higher is required." : "Est rechèdidu PHP %s o superiore.", + "PHP with a version lower than %s is required." : "Est rechèdidu unu PHP cun una versione minore de %s", + "%sbit or higher PHP required." : "Est rechèdidu PHP de%s bit o superiore.", + "The following architectures are supported: %s" : "Sunt suportadas custas architeturas: %s", + "The following databases are supported: %s" : "Sunt suportadas custas bases de datos: %s", + "The command line tool %s could not be found" : "No at fatu a agatare s'aina de cumandu de lìnia %s", + "The library %s is not available." : "Sa libreria %s no est a disponimentu.", + "Library %1$s with a version higher than %2$s is required - available version %3$s." : "Est rechèdida una libreria %1$s cun una versione superiore a %2$s - versione a disponimentu %3$s. ", + "Library %1$s with a version lower than %2$s is required - available version %3$s." : "Est rechèdida una libreria %1$s cun una versione inferiore a %2$s - versione a disponimentu %3$s. ", + "The following platforms are supported: %s" : "Sunt suportadas custas prataformas: %s", + "Server version %s or higher is required." : "Est rechèdidu sa versione de serbidore %s o superiore.", + "Server version %s or lower is required." : "Est rechèdidu sa versione de serbidore %s o inferiore.", + "Logged in user must be an admin or sub admin" : "S'utente devet essere de s'amministratzione o de sa suta-amministratzione ", + "Logged in user must be an admin" : "S'utente devet essere de s'amministratzione ", + "Wiping of device %s has started" : "S'at cumintzadu sa cantzelladura de su dispositivu %s", + "Wiping of device »%s« has started" : "S'at cumintzadu sa cantzelladura de su dispositivu »%s«", + "»%s« started remote wipe" : "»%s« at cumintzadu sa cantzelladura de tesu", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "Su dispositivu »%s« at cumintzadu su protzessu de cantzelladura de tesu. As a retzire un'àteru messàgiu de posta eletrònica cando su protzessu at a èssere acabbadu.", + "Wiping of device %s has finished" : "Sa cantzelladura de su dispositivu %s est acabbada", + "Wiping of device »%s« has finished" : "Sa cantzelladura de su dispositivu »%s« est acabbada", + "»%s« finished remote wipe" : "»%s« at acabbadu sa cantzelladura de tesu", + "Device or application »%s« has finished the remote wipe process." : "Su dispositivu o s'aplicatzione »%s« at acabbadu su protzessu de cantzelladura de tesu.", + "Remote wipe started" : "Cantzelladura de tesu aviada", + "A remote wipe was started on device %s" : "Una cantzelladura de tesu est cumintzada in su dispositivu %s", + "Remote wipe finished" : "Cantzelladura de tesu acabbada", + "The remote wipe on %s has finished" : "Sa cantzelladura de tesu in %s est acabbada", + "Authentication" : "Autenticatzione", "Unknown filetype" : "Genia de archìviu disconnota", + "Invalid image" : "Imàgine non bàlida", + "Avatar image is not square" : "S'imàgine de s'avatar no est cuadrada", + "today" : "oe", + "tomorrow" : "cras", + "yesterday" : "eris", + "_in %n day_::_in %n days_" : ["tra %n dies","tra %n dies"], + "_%n day ago_::_%n days ago_" : ["%n dies a oe","%n dies a oe"], + "next month" : "su mese chi benit", + "last month" : "su mese passadu", + "_in %n month_::_in %n months_" : ["tra %n meses","%n meses"], + "_%n month ago_::_%n months ago_" : ["%n meses a oe","%n meses a oe"], + "next year" : "s'annu chi benit", + "last year" : "s'annu passadu", + "_in %n year_::_in %n years_" : ["tra %n annos","tra %n annos"], + "_%n year ago_::_%n years ago_" : ["%n annos a oe","%n dies a oe"], + "_in %n hour_::_in %n hours_" : ["tra %n oras","tra %n oras"], + "_%n hour ago_::_%n hours ago_" : ["%n oras a immoe","%n oras a immoe"], + "_in %n minute_::_in %n minutes_" : ["%n meses","tra %n minutos"], + "_%n minute ago_::_%n minutes ago_" : ["%n minutos a immoe","%n minutos a immoe"], + "in a few seconds" : "tra pagos segundos", + "seconds ago" : "segundos a immoe", + "Empty file" : "Archìviu bòidu", + "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Su mòdulu cun ID: %s no esistit. Ativa•ddu in is impostatziones de s'aplicatzione o cuntata s'amministratzione.", + "File already exists" : "S'archìviu b'est giai", + "Invalid path" : "Percursu non bàlidu", + "Failed to create file from template" : "No at fatu a creare s'archìviu dae su modellu", + "Templates" : "Modellos", + "File name is a reserved word" : "Su nùmene de s'archìviu est unu faeddu riservadu", + "File name contains at least one invalid character" : "Su nùmene de s'archìviu cuntenet a su mancu unu caràtere imbàlidu", + "File name is too long" : "Su nùmene de s'archìviu est tropu longu", + "Dot files are not allowed" : "Is archìvios cun unu puntu a su cumintzu no sunt permìtidos", + "Empty filename is not allowed" : "Unu nùmene de archìviu bòidu no est permìtidu", + "App \"%s\" cannot be installed because appinfo file cannot be read." : "No faghet a installare s'aplicatzione \"%s\" ca no faghet a lèghere s'archìviu appinfo.", + "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "No faghet a installare s'aplicatzione \"%s\" ca no est cumpatìbile cun custa versione de su serbidore.", + "__language_name__" : "sardu", "This is an automatically sent email, please do not reply." : "Custu est unu messàgiu de posta imbiadu in automàticu, non rispondas.", + "Help" : "Agiudu", + "Apps" : "Aplicatziones", "Settings" : "Impostatziones", + "Log out" : "Essi·nche", + "Users" : "Utentes", + "Unknown user" : "Utèntzia disconnota", + "Additional settings" : "Impostatziones in agiunta", + "%s enter the database username and name." : "%s inserta•nche su nùmene utente e su nùmene de sa base de datos.", + "%s enter the database username." : "%s inserta•nche su nùmene utente de sa base de datos.", + "%s enter the database name." : "%s inserta•nche su nùmene de sa base de datos.", + "%s you may not use dots in the database name" : "%s no depes impreare puntos in su nùmene de sa base de datos", + "MySQL username and/or password not valid" : "Su nùmene utente e/o sa crae de MySQL no sunt bàlidos", + "You need to enter details of an existing account." : "Nche depes insertare is detàllios de unu contu chi b'est giai.", + "Oracle connection could not be established" : "No at fatu a istabilire sa connessione Oracle", + "Oracle username and/or password not valid" : "Su nùmene utente e/o sa crae de Oracle no sunt bàlidos", + "PostgreSQL username and/or password not valid" : "Su nùmene utente e/o sa crae de Postgre SQL no sunt bàlidos", + "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X no est suportadu e %s no at a funtzionare in manera curreta in custa prataforma. Imprea•ddu a arriscu tuo!", + "For the best results, please consider using a GNU/Linux server instead." : "Pro su mellus resurtadu, cunsidera in càmbiu de impreare unu serbidore GNU/Linux.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Parit ca custa istàntzia %s est traballende in un'ambiente PHP a 32-bit e sa open_basedir est istada cunfigurada in php.ini. Custu at a causare problemas cun archìvios de prus de 4 GB e est iscussigiadu a forte.", + "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Boga•nche s'impostatzione open_basedir in su php.ini tuo o càmbia a su PHP a 64-bit.", + "Set an admin username." : "Imposta unu nùmene utente pro chie amministrat.", + "Set an admin password." : "Imposta una crae pro chie amministrat.", + "Cannot create or write into the data directory %s" : "No faghet a creare o a iscriere a intro de sa cartella de datos %s", + "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Su motore de cumpartzidura %s depet cumpletare s'interfache OCP\\Share_Backend", + "Sharing backend %s not found" : "Motore de cumpartzidura%s no agatadu", + "Sharing backend for %s not found" : "Motore de cumpartzidura pro %s no agatadu", + "%1$s shared »%2$s« with you and wants to add:" : "%1$s at cumpartzidu »%2$s« cun tegus e bolet agiùnghere:", + "%1$s shared »%2$s« with you and wants to add" : "%1$s at cumpartzidu »%2$s« cun tegus e bolet agiùnghere", + "»%s« added a note to a file shared with you" : "»%s« at agiuntu una nota a un'archìviu cumpartzidu cun tegus", "Open »%s«" : "Aberi »%s«", - "%1$s via %2$s" : "%1$s cun %2$s" + "%1$s via %2$s" : "%1$s cun %2$s", + "You are not allowed to share %s" : "No tenes su permissu de cumpartzire %s", + "Cannot increase permissions of %s" : "No faghet a crèschere is permissos de %s", + "Files cannot be shared with delete permissions" : "No faghet a cumpartzire archìvios cun permissos de cantzelladura", + "Files cannot be shared with create permissions" : "No faghet a cumpartzire archìvios cun permissos de creatzione", + "Expiration date is in the past" : "Sa data de iscadèntzia est giai passada", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["No faghet a impostare sa data de iscadèntzia a prus de %n die in su benidore","No faghet a impostare sa data de iscadèntzia a prus de %n dies in su benidore"], + "Sharing is only allowed with group members" : "Sa cumpartzidura est permìtida isceti cun is partetzipantes de su grupu", + "Sharing %s failed, because this item is already shared with user %s" : "No at fatu a cumpartzire %s, ca custu elementu est giai istadu cumpartzidu cun s'utente %s", + "%1$s shared »%2$s« with you" : "%1$s at cumpartzidu »%2$s cun tegus", + "%1$s shared »%2$s« with you." : "%1$s at cumpartzidu »%2$s cun tegus.", + "Click the button below to open it." : "Incarca su butone a suta pro dd'abèrrere.", + "The requested share does not exist anymore" : "Sa cumpartzidura pedida no b'est prus", + "Could not find category \"%s\"" : "No at fatu a agatare sa categoria \"%s\"", + "Sunday" : "Domìnigu", + "Monday" : "Lunis", + "Tuesday" : "Martis", + "Wednesday" : "Mércuris", + "Thursday" : "Giòbia", + "Friday" : "Chenàbura", + "Saturday" : "Sàbudu", + "Sun." : "Dom.", + "Mon." : "Lun.", + "Tue." : "Mar.", + "Wed." : "Mer.", + "Thu." : "Gio.", + "Fri." : "Che.", + "Sat." : "Sàb.", + "Su" : "Do", + "Mo" : "Lu", + "Tu" : "Ma", + "We" : "Me", + "Th" : "Gi", + "Fr" : "Ch", + "Sa" : "Sa", + "January" : "Ghennàrgiu", + "February" : "Freàrgiu", + "March" : "Martzu", + "April" : "Abrile", + "May" : "Maju", + "June" : "Làmparas", + "July" : "Mese de Trìulas/Argiolas", + "August" : "Austu", + "September" : "Cabudanni", + "October" : "Mese de Ladàmini/ Santu Aine", + "November" : "Sant'Andria", + "December" : "Nadale", + "Jan." : "Ghe.", + "Feb." : "Fre.", + "Mar." : "Mar.", + "Apr." : "Abr.", + "May." : "Maj.", + "Jun." : "Lam.", + "Jul." : "Tri./Arg.", + "Aug." : "Aus.", + "Sep." : "Cab.", + "Oct." : "Lad./SGa.", + "Nov." : "SAnd.", + "Dec." : "Nad.", + "The user limit has been reached and the user was not created." : "Su lìmite de utentes est istadu sighidu e s'utèntzia no est istada creada.", + "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Isceti custos caràteres sunt permìtidos in unu nùmene utente: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"", + "A valid username must be provided" : "Depes frunire unu nùmene utente bàlidu", + "Username contains whitespace at the beginning or at the end" : "Su nùmene utente cuntenet ispàtzios bòidos a su cumintzu o a sa fine", + "Username must not consist of dots only" : "Su nùmene utente no depet tènnere isceti puntos", + "Username is invalid because files already exist for this user" : "Su nùmene utente no est bàlidu, ca is archìvios bi sunt giai pro cust'utèntzia", + "A valid password must be provided" : "Depes frunire una crae bàlida", + "The username is already being used" : "Su nùmene utente est giai impreadu", + "Could not create user" : "No at fatu a creare s'utente", + "User disabled" : "Utèntzia disativada", + "Login canceled by app" : "Atzessu annulladu dae s'aplicatzione", + "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Non faghet a installare s'aplicatzione %1$s ca is dipendèntzias in fatu non sunt satisfatos:%2$s", + "a safe home for all your data" : "unu logu siguru pro totu is datos tuos", + "File is currently busy, please try again later" : "Pro immoe s'archìviu est impreadu, torra a proare a coa", + "Cannot read file" : "Impossìbile a lèghere s'archìviu", + "Application is not enabled" : "S'aplicatzione no est ativada", + "Authentication error" : "Errore de autenticatzione", + "Token expired. Please reload page." : "Token iscadidu. Torra a carrigare sa pàgina.", + "No database drivers (sqlite, mysql, or postgresql) installed." : "Perunu driver de base de datos (sqlite, mysql, or postgresql) installadu.", + "Cannot write into \"config\" directory" : "No faghet a iscriere in sa cartella \"config\"", + "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella config. Càstia %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ma si preferes allogare s'archìviu de letura isceti congi.php, imposta su sèberu \"config_is_read_only\" a \"true\". Càstia %s", + "Cannot write into \"apps\" directory" : "No faghet a iscriere in sa cartella \"apps\"", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella apps o disativende s'a butega de aplicatziones in s'archìviu de cunfiguratzione.", + "Cannot create \"data\" directory" : "No faghet a creare sa cartella \"data\"", + "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella de orìgine. Càstia %s", + "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Is permissos in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella de orìgine. Càstia %s", + "Setting locale to %s failed" : "No at fatu a impostare sa localizatzione a %s", + "Please install one of these locales on your system and restart your webserver." : "Installa una de custas localizatziones in su sistema tuo e torra a aviare su serbidore ìnternet.", + "PHP module %s not installed." : "Su mòdulu PHP %s no est installadu.", + "Please ask your server administrator to install the module." : "Pedi a s'amministratzione de serbidore de installare su mòdulu.", + "PHP setting \"%s\" is not set to \"%s\"." : "S'impostatzione PHP %s no est a \"%s\".", + "Adjusting this setting in php.ini will make Nextcloud run again" : "Assentende cust'impostatzione in php.ini at a torrare a fàghere traballare Nextcloud", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload est impostadu a \"%s\" in càmbiu de su balore abetadu \"0\"", + "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Pro assentare custu problema, imposta <code>mbstring.func_overload</code> a<code>0</code> in su php.ini tuo", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "Est rechèdida a su mancu sa versione libxml2 2.7.0. Pro immoe cussa installada est sa%s.", + "To fix this issue update your libxml2 version and restart your web server." : "Pro assentare custu problema, agiorna sa versione libxml2 e torra a aviare su serbidore ìnternet.", + "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "Parit che PHP siat impostadu pro nde bogare is blocos de documentatzione in lìnia. Custu at a impedire s'atzessu a medas aplicatziones printzipales.", + "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Podet èssere causadu dae una memòria temporànea/atzeleradore cales Zend Opcache o eAccelerator.", + "PHP modules have been installed, but they are still listed as missing?" : "Is mòdulos PHP sunt istados installados, ma sunt ancora elencados comente mancantes?", + "Please ask your server administrator to restart the web server." : "Pedi a s'amministratzione de su serbidore de torrare a aviare su serbidore ìnternet.", + "PostgreSQL >= 9 required" : "PostgreSQL >= 9 rechèdidu", + "Please upgrade your database version" : "Agiorna sa versione de base de datos tua", + "Your data directory is readable by other users" : "Is àteras utèntzias podent lèghere sa cartella de datos tua", + "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Càmbia is permissos a 0770 aici sa cartella no podet èssere in is elencos de àteras utèntzias.", + "Your data directory must be an absolute path" : "Sa cartella de datos tua depet èssere unu percursu assolutu", + "Check the value of \"datadirectory\" in your configuration" : "Càstia su balore de \"datadirectory\" in sa cunfiguratzione tua", + "Your data directory is invalid" : "Sa cartella de datos no est bàlida", + "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Assegura•ti chi in sa cartella de datos de orìgine nche siat un'archìviu cun nùmene \".ocdata\".", + "Action \"%s\" not supported or implemented." : "S'atzione \"%s\" no est suportada o cumpletada.", + "Authentication failed, wrong token or provider ID given" : "No at fatu a fàghere s'autenticatzione, token o ID de su frunidore isballiados", + "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Mancant paràmetros pro pòdere cumpletare sa rechesta. Paràmetros mancantes: \"%s\"", + "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "Su ID \"%1$s\" est giai impreadu dae su frunidore de sa federatzione de nue virtuale \"%2$s\"", + "Cloud Federation Provider with ID: \"%s\" does not exist." : "Su frunidore de sa federatzione de nue virtuale cun ID: \"%s\" no esistit.", + "Could not obtain lock type %d on \"%s\"." : "No at fatu a otènnere su blocu de genia %d in \"%s\".", + "Storage unauthorized. %s" : "Archiviatzione no autorizada. %s", + "Storage incomplete configuration. %s" : "Cunfiguratzione de s'archiviatzione no cumpleta. %s", + "Storage connection error. %s" : "Errore de connessione a s'archiviatzione. %s", + "Storage is temporarily not available" : "S'archiviatzione no est disponìbile pro immoe.", + "Storage connection timeout. %s" : "Tempus de connessione a s'archiviatzione iscadidu. %s", + "This can usually be fixed by giving the webserver write access to the config directory" : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella de cunfiguratzione", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ma si preferes allogare s'archìviu de letura isceti congi.php, imposta su sèberu \"config_is_read_only\" a \"true\"", + "Can't create or write into the data directory %s" : "No faghet a creare o a iscriere a intro de sa cartella de datos %s", + "Invalid Federated Cloud ID" : " ID de sa nue virtuale federada non bàlidu", + "Can’t increase permissions of %s" : "No faghet a crèschere is permissos de %s", + "Files can’t be shared with delete permissions" : "No faghet a cumpartzire archìvios cun permissos de cantzelladura", + "Files can’t be shared with create permissions" : "No faghet a cumpartzire archìvios cun permissos de creatzione", + "Can’t set expiration date more than %s days in the future" : "No faghet a impostare sa data de iscadèntzia a prus de %s dies in su benidore", + "Can't read file" : "No faghet a lèghere s'archìviu", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella apps o disativende s'a butega de aplicatziones in s'archìviu de cunfiguratzione." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/sc.json b/lib/l10n/sc.json index 4646b3887db..499b579d526 100644 --- a/lib/l10n/sc.json +++ b/lib/l10n/sc.json @@ -1,8 +1,243 @@ { "translations": { + "Cannot write into \"config\" directory!" : "No faghet a iscriere in sa cartella \"config\"!", + "This can usually be fixed by giving the webserver write access to the config directory." : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella config.", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ma si preferes allogare s'archìviu de letura isceti congi.php, imposta su sèberu \"config_is_read_only\"", + "See %s" : "Càstia %s", + "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Is archìvios de s'aplicatzione %1$s no sunt istados cambiados in manera curreta. Assegura•ti chi b'apat una versione cumpatìbile cun su serbidore.", + "Sample configuration detected" : "S'at agatadu una cunfiguratzione de esèmpiu", + "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Est istadu iscobertu ca sa cunfiguratzione de esèmpiu est istada copiada. Custu podet blocare s'installatzione e no est suportadu. Leghe sa documentatzione in config.php antis de fàghere càmbios.", + "Other activities" : "Àteras atividades", + "%1$s and %2$s" : "%1$s e %2$s", + "%1$s, %2$s and %3$s" : "%1$s, %2$s e %3$s", + "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s e %4$s", + "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s e %5$s", + "Education Edition" : "Editzione didàtica", + "Enterprise bundle" : "Pachete Enterprise", + "Groupware bundle" : "Pachete Groupware", + "Hub bundle" : "Pachete Hub", + "Social sharing bundle" : "Pachete cumpartzidura Social ", + "PHP %s or higher is required." : "Est rechèdidu PHP %s o superiore.", + "PHP with a version lower than %s is required." : "Est rechèdidu unu PHP cun una versione minore de %s", + "%sbit or higher PHP required." : "Est rechèdidu PHP de%s bit o superiore.", + "The following architectures are supported: %s" : "Sunt suportadas custas architeturas: %s", + "The following databases are supported: %s" : "Sunt suportadas custas bases de datos: %s", + "The command line tool %s could not be found" : "No at fatu a agatare s'aina de cumandu de lìnia %s", + "The library %s is not available." : "Sa libreria %s no est a disponimentu.", + "Library %1$s with a version higher than %2$s is required - available version %3$s." : "Est rechèdida una libreria %1$s cun una versione superiore a %2$s - versione a disponimentu %3$s. ", + "Library %1$s with a version lower than %2$s is required - available version %3$s." : "Est rechèdida una libreria %1$s cun una versione inferiore a %2$s - versione a disponimentu %3$s. ", + "The following platforms are supported: %s" : "Sunt suportadas custas prataformas: %s", + "Server version %s or higher is required." : "Est rechèdidu sa versione de serbidore %s o superiore.", + "Server version %s or lower is required." : "Est rechèdidu sa versione de serbidore %s o inferiore.", + "Logged in user must be an admin or sub admin" : "S'utente devet essere de s'amministratzione o de sa suta-amministratzione ", + "Logged in user must be an admin" : "S'utente devet essere de s'amministratzione ", + "Wiping of device %s has started" : "S'at cumintzadu sa cantzelladura de su dispositivu %s", + "Wiping of device »%s« has started" : "S'at cumintzadu sa cantzelladura de su dispositivu »%s«", + "»%s« started remote wipe" : "»%s« at cumintzadu sa cantzelladura de tesu", + "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "Su dispositivu »%s« at cumintzadu su protzessu de cantzelladura de tesu. As a retzire un'àteru messàgiu de posta eletrònica cando su protzessu at a èssere acabbadu.", + "Wiping of device %s has finished" : "Sa cantzelladura de su dispositivu %s est acabbada", + "Wiping of device »%s« has finished" : "Sa cantzelladura de su dispositivu »%s« est acabbada", + "»%s« finished remote wipe" : "»%s« at acabbadu sa cantzelladura de tesu", + "Device or application »%s« has finished the remote wipe process." : "Su dispositivu o s'aplicatzione »%s« at acabbadu su protzessu de cantzelladura de tesu.", + "Remote wipe started" : "Cantzelladura de tesu aviada", + "A remote wipe was started on device %s" : "Una cantzelladura de tesu est cumintzada in su dispositivu %s", + "Remote wipe finished" : "Cantzelladura de tesu acabbada", + "The remote wipe on %s has finished" : "Sa cantzelladura de tesu in %s est acabbada", + "Authentication" : "Autenticatzione", "Unknown filetype" : "Genia de archìviu disconnota", + "Invalid image" : "Imàgine non bàlida", + "Avatar image is not square" : "S'imàgine de s'avatar no est cuadrada", + "today" : "oe", + "tomorrow" : "cras", + "yesterday" : "eris", + "_in %n day_::_in %n days_" : ["tra %n dies","tra %n dies"], + "_%n day ago_::_%n days ago_" : ["%n dies a oe","%n dies a oe"], + "next month" : "su mese chi benit", + "last month" : "su mese passadu", + "_in %n month_::_in %n months_" : ["tra %n meses","%n meses"], + "_%n month ago_::_%n months ago_" : ["%n meses a oe","%n meses a oe"], + "next year" : "s'annu chi benit", + "last year" : "s'annu passadu", + "_in %n year_::_in %n years_" : ["tra %n annos","tra %n annos"], + "_%n year ago_::_%n years ago_" : ["%n annos a oe","%n dies a oe"], + "_in %n hour_::_in %n hours_" : ["tra %n oras","tra %n oras"], + "_%n hour ago_::_%n hours ago_" : ["%n oras a immoe","%n oras a immoe"], + "_in %n minute_::_in %n minutes_" : ["%n meses","tra %n minutos"], + "_%n minute ago_::_%n minutes ago_" : ["%n minutos a immoe","%n minutos a immoe"], + "in a few seconds" : "tra pagos segundos", + "seconds ago" : "segundos a immoe", + "Empty file" : "Archìviu bòidu", + "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Su mòdulu cun ID: %s no esistit. Ativa•ddu in is impostatziones de s'aplicatzione o cuntata s'amministratzione.", + "File already exists" : "S'archìviu b'est giai", + "Invalid path" : "Percursu non bàlidu", + "Failed to create file from template" : "No at fatu a creare s'archìviu dae su modellu", + "Templates" : "Modellos", + "File name is a reserved word" : "Su nùmene de s'archìviu est unu faeddu riservadu", + "File name contains at least one invalid character" : "Su nùmene de s'archìviu cuntenet a su mancu unu caràtere imbàlidu", + "File name is too long" : "Su nùmene de s'archìviu est tropu longu", + "Dot files are not allowed" : "Is archìvios cun unu puntu a su cumintzu no sunt permìtidos", + "Empty filename is not allowed" : "Unu nùmene de archìviu bòidu no est permìtidu", + "App \"%s\" cannot be installed because appinfo file cannot be read." : "No faghet a installare s'aplicatzione \"%s\" ca no faghet a lèghere s'archìviu appinfo.", + "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "No faghet a installare s'aplicatzione \"%s\" ca no est cumpatìbile cun custa versione de su serbidore.", + "__language_name__" : "sardu", "This is an automatically sent email, please do not reply." : "Custu est unu messàgiu de posta imbiadu in automàticu, non rispondas.", + "Help" : "Agiudu", + "Apps" : "Aplicatziones", "Settings" : "Impostatziones", + "Log out" : "Essi·nche", + "Users" : "Utentes", + "Unknown user" : "Utèntzia disconnota", + "Additional settings" : "Impostatziones in agiunta", + "%s enter the database username and name." : "%s inserta•nche su nùmene utente e su nùmene de sa base de datos.", + "%s enter the database username." : "%s inserta•nche su nùmene utente de sa base de datos.", + "%s enter the database name." : "%s inserta•nche su nùmene de sa base de datos.", + "%s you may not use dots in the database name" : "%s no depes impreare puntos in su nùmene de sa base de datos", + "MySQL username and/or password not valid" : "Su nùmene utente e/o sa crae de MySQL no sunt bàlidos", + "You need to enter details of an existing account." : "Nche depes insertare is detàllios de unu contu chi b'est giai.", + "Oracle connection could not be established" : "No at fatu a istabilire sa connessione Oracle", + "Oracle username and/or password not valid" : "Su nùmene utente e/o sa crae de Oracle no sunt bàlidos", + "PostgreSQL username and/or password not valid" : "Su nùmene utente e/o sa crae de Postgre SQL no sunt bàlidos", + "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X no est suportadu e %s no at a funtzionare in manera curreta in custa prataforma. Imprea•ddu a arriscu tuo!", + "For the best results, please consider using a GNU/Linux server instead." : "Pro su mellus resurtadu, cunsidera in càmbiu de impreare unu serbidore GNU/Linux.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Parit ca custa istàntzia %s est traballende in un'ambiente PHP a 32-bit e sa open_basedir est istada cunfigurada in php.ini. Custu at a causare problemas cun archìvios de prus de 4 GB e est iscussigiadu a forte.", + "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Boga•nche s'impostatzione open_basedir in su php.ini tuo o càmbia a su PHP a 64-bit.", + "Set an admin username." : "Imposta unu nùmene utente pro chie amministrat.", + "Set an admin password." : "Imposta una crae pro chie amministrat.", + "Cannot create or write into the data directory %s" : "No faghet a creare o a iscriere a intro de sa cartella de datos %s", + "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Su motore de cumpartzidura %s depet cumpletare s'interfache OCP\\Share_Backend", + "Sharing backend %s not found" : "Motore de cumpartzidura%s no agatadu", + "Sharing backend for %s not found" : "Motore de cumpartzidura pro %s no agatadu", + "%1$s shared »%2$s« with you and wants to add:" : "%1$s at cumpartzidu »%2$s« cun tegus e bolet agiùnghere:", + "%1$s shared »%2$s« with you and wants to add" : "%1$s at cumpartzidu »%2$s« cun tegus e bolet agiùnghere", + "»%s« added a note to a file shared with you" : "»%s« at agiuntu una nota a un'archìviu cumpartzidu cun tegus", "Open »%s«" : "Aberi »%s«", - "%1$s via %2$s" : "%1$s cun %2$s" + "%1$s via %2$s" : "%1$s cun %2$s", + "You are not allowed to share %s" : "No tenes su permissu de cumpartzire %s", + "Cannot increase permissions of %s" : "No faghet a crèschere is permissos de %s", + "Files cannot be shared with delete permissions" : "No faghet a cumpartzire archìvios cun permissos de cantzelladura", + "Files cannot be shared with create permissions" : "No faghet a cumpartzire archìvios cun permissos de creatzione", + "Expiration date is in the past" : "Sa data de iscadèntzia est giai passada", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["No faghet a impostare sa data de iscadèntzia a prus de %n die in su benidore","No faghet a impostare sa data de iscadèntzia a prus de %n dies in su benidore"], + "Sharing is only allowed with group members" : "Sa cumpartzidura est permìtida isceti cun is partetzipantes de su grupu", + "Sharing %s failed, because this item is already shared with user %s" : "No at fatu a cumpartzire %s, ca custu elementu est giai istadu cumpartzidu cun s'utente %s", + "%1$s shared »%2$s« with you" : "%1$s at cumpartzidu »%2$s cun tegus", + "%1$s shared »%2$s« with you." : "%1$s at cumpartzidu »%2$s cun tegus.", + "Click the button below to open it." : "Incarca su butone a suta pro dd'abèrrere.", + "The requested share does not exist anymore" : "Sa cumpartzidura pedida no b'est prus", + "Could not find category \"%s\"" : "No at fatu a agatare sa categoria \"%s\"", + "Sunday" : "Domìnigu", + "Monday" : "Lunis", + "Tuesday" : "Martis", + "Wednesday" : "Mércuris", + "Thursday" : "Giòbia", + "Friday" : "Chenàbura", + "Saturday" : "Sàbudu", + "Sun." : "Dom.", + "Mon." : "Lun.", + "Tue." : "Mar.", + "Wed." : "Mer.", + "Thu." : "Gio.", + "Fri." : "Che.", + "Sat." : "Sàb.", + "Su" : "Do", + "Mo" : "Lu", + "Tu" : "Ma", + "We" : "Me", + "Th" : "Gi", + "Fr" : "Ch", + "Sa" : "Sa", + "January" : "Ghennàrgiu", + "February" : "Freàrgiu", + "March" : "Martzu", + "April" : "Abrile", + "May" : "Maju", + "June" : "Làmparas", + "July" : "Mese de Trìulas/Argiolas", + "August" : "Austu", + "September" : "Cabudanni", + "October" : "Mese de Ladàmini/ Santu Aine", + "November" : "Sant'Andria", + "December" : "Nadale", + "Jan." : "Ghe.", + "Feb." : "Fre.", + "Mar." : "Mar.", + "Apr." : "Abr.", + "May." : "Maj.", + "Jun." : "Lam.", + "Jul." : "Tri./Arg.", + "Aug." : "Aus.", + "Sep." : "Cab.", + "Oct." : "Lad./SGa.", + "Nov." : "SAnd.", + "Dec." : "Nad.", + "The user limit has been reached and the user was not created." : "Su lìmite de utentes est istadu sighidu e s'utèntzia no est istada creada.", + "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Isceti custos caràteres sunt permìtidos in unu nùmene utente: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"", + "A valid username must be provided" : "Depes frunire unu nùmene utente bàlidu", + "Username contains whitespace at the beginning or at the end" : "Su nùmene utente cuntenet ispàtzios bòidos a su cumintzu o a sa fine", + "Username must not consist of dots only" : "Su nùmene utente no depet tènnere isceti puntos", + "Username is invalid because files already exist for this user" : "Su nùmene utente no est bàlidu, ca is archìvios bi sunt giai pro cust'utèntzia", + "A valid password must be provided" : "Depes frunire una crae bàlida", + "The username is already being used" : "Su nùmene utente est giai impreadu", + "Could not create user" : "No at fatu a creare s'utente", + "User disabled" : "Utèntzia disativada", + "Login canceled by app" : "Atzessu annulladu dae s'aplicatzione", + "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Non faghet a installare s'aplicatzione %1$s ca is dipendèntzias in fatu non sunt satisfatos:%2$s", + "a safe home for all your data" : "unu logu siguru pro totu is datos tuos", + "File is currently busy, please try again later" : "Pro immoe s'archìviu est impreadu, torra a proare a coa", + "Cannot read file" : "Impossìbile a lèghere s'archìviu", + "Application is not enabled" : "S'aplicatzione no est ativada", + "Authentication error" : "Errore de autenticatzione", + "Token expired. Please reload page." : "Token iscadidu. Torra a carrigare sa pàgina.", + "No database drivers (sqlite, mysql, or postgresql) installed." : "Perunu driver de base de datos (sqlite, mysql, or postgresql) installadu.", + "Cannot write into \"config\" directory" : "No faghet a iscriere in sa cartella \"config\"", + "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella config. Càstia %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ma si preferes allogare s'archìviu de letura isceti congi.php, imposta su sèberu \"config_is_read_only\" a \"true\". Càstia %s", + "Cannot write into \"apps\" directory" : "No faghet a iscriere in sa cartella \"apps\"", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella apps o disativende s'a butega de aplicatziones in s'archìviu de cunfiguratzione.", + "Cannot create \"data\" directory" : "No faghet a creare sa cartella \"data\"", + "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella de orìgine. Càstia %s", + "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Is permissos in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella de orìgine. Càstia %s", + "Setting locale to %s failed" : "No at fatu a impostare sa localizatzione a %s", + "Please install one of these locales on your system and restart your webserver." : "Installa una de custas localizatziones in su sistema tuo e torra a aviare su serbidore ìnternet.", + "PHP module %s not installed." : "Su mòdulu PHP %s no est installadu.", + "Please ask your server administrator to install the module." : "Pedi a s'amministratzione de serbidore de installare su mòdulu.", + "PHP setting \"%s\" is not set to \"%s\"." : "S'impostatzione PHP %s no est a \"%s\".", + "Adjusting this setting in php.ini will make Nextcloud run again" : "Assentende cust'impostatzione in php.ini at a torrare a fàghere traballare Nextcloud", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload est impostadu a \"%s\" in càmbiu de su balore abetadu \"0\"", + "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Pro assentare custu problema, imposta <code>mbstring.func_overload</code> a<code>0</code> in su php.ini tuo", + "libxml2 2.7.0 is at least required. Currently %s is installed." : "Est rechèdida a su mancu sa versione libxml2 2.7.0. Pro immoe cussa installada est sa%s.", + "To fix this issue update your libxml2 version and restart your web server." : "Pro assentare custu problema, agiorna sa versione libxml2 e torra a aviare su serbidore ìnternet.", + "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "Parit che PHP siat impostadu pro nde bogare is blocos de documentatzione in lìnia. Custu at a impedire s'atzessu a medas aplicatziones printzipales.", + "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Podet èssere causadu dae una memòria temporànea/atzeleradore cales Zend Opcache o eAccelerator.", + "PHP modules have been installed, but they are still listed as missing?" : "Is mòdulos PHP sunt istados installados, ma sunt ancora elencados comente mancantes?", + "Please ask your server administrator to restart the web server." : "Pedi a s'amministratzione de su serbidore de torrare a aviare su serbidore ìnternet.", + "PostgreSQL >= 9 required" : "PostgreSQL >= 9 rechèdidu", + "Please upgrade your database version" : "Agiorna sa versione de base de datos tua", + "Your data directory is readable by other users" : "Is àteras utèntzias podent lèghere sa cartella de datos tua", + "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Càmbia is permissos a 0770 aici sa cartella no podet èssere in is elencos de àteras utèntzias.", + "Your data directory must be an absolute path" : "Sa cartella de datos tua depet èssere unu percursu assolutu", + "Check the value of \"datadirectory\" in your configuration" : "Càstia su balore de \"datadirectory\" in sa cunfiguratzione tua", + "Your data directory is invalid" : "Sa cartella de datos no est bàlida", + "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Assegura•ti chi in sa cartella de datos de orìgine nche siat un'archìviu cun nùmene \".ocdata\".", + "Action \"%s\" not supported or implemented." : "S'atzione \"%s\" no est suportada o cumpletada.", + "Authentication failed, wrong token or provider ID given" : "No at fatu a fàghere s'autenticatzione, token o ID de su frunidore isballiados", + "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Mancant paràmetros pro pòdere cumpletare sa rechesta. Paràmetros mancantes: \"%s\"", + "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "Su ID \"%1$s\" est giai impreadu dae su frunidore de sa federatzione de nue virtuale \"%2$s\"", + "Cloud Federation Provider with ID: \"%s\" does not exist." : "Su frunidore de sa federatzione de nue virtuale cun ID: \"%s\" no esistit.", + "Could not obtain lock type %d on \"%s\"." : "No at fatu a otènnere su blocu de genia %d in \"%s\".", + "Storage unauthorized. %s" : "Archiviatzione no autorizada. %s", + "Storage incomplete configuration. %s" : "Cunfiguratzione de s'archiviatzione no cumpleta. %s", + "Storage connection error. %s" : "Errore de connessione a s'archiviatzione. %s", + "Storage is temporarily not available" : "S'archiviatzione no est disponìbile pro immoe.", + "Storage connection timeout. %s" : "Tempus de connessione a s'archiviatzione iscadidu. %s", + "This can usually be fixed by giving the webserver write access to the config directory" : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella de cunfiguratzione", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ma si preferes allogare s'archìviu de letura isceti congi.php, imposta su sèberu \"config_is_read_only\" a \"true\"", + "Can't create or write into the data directory %s" : "No faghet a creare o a iscriere a intro de sa cartella de datos %s", + "Invalid Federated Cloud ID" : " ID de sa nue virtuale federada non bàlidu", + "Can’t increase permissions of %s" : "No faghet a crèschere is permissos de %s", + "Files can’t be shared with delete permissions" : "No faghet a cumpartzire archìvios cun permissos de cantzelladura", + "Files can’t be shared with create permissions" : "No faghet a cumpartzire archìvios cun permissos de creatzione", + "Can’t set expiration date more than %s days in the future" : "No faghet a impostare sa data de iscadèntzia a prus de %s dies in su benidore", + "Can't read file" : "No faghet a lèghere s'archìviu", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Custu in generale si podet assentare dende a su serbidore atzessu a s'iscritura in sa cartella apps o disativende s'a butega de aplicatziones in s'archìviu de cunfiguratzione." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/si.js b/lib/l10n/si.js index b872b9de10a..620e940d27d 100644 --- a/lib/l10n/si.js +++ b/lib/l10n/si.js @@ -16,7 +16,7 @@ OC.L10N.register( "Empty file" : "හිස් ගොනුවකි", "File already exists" : "ගොනුව දැනටමත් පවතී", "File name is too long" : "ගොනුවේ නම දිග වැඩිය", - "__language_name__" : "__language_name__", + "__language_name__" : "සිංහල", "This is an automatically sent email, please do not reply." : "මෙය ස්වයංක්රීයව යවන ලද විද්යුත් තැපෑලකි, කරුණාකර පිළිතුරු නොදෙන්න.", "Help" : "උපකාර", "Apps" : "යෙදුම්", diff --git a/lib/l10n/si.json b/lib/l10n/si.json index ccb8a2046b4..c01d71a4f17 100644 --- a/lib/l10n/si.json +++ b/lib/l10n/si.json @@ -14,7 +14,7 @@ "Empty file" : "හිස් ගොනුවකි", "File already exists" : "ගොනුව දැනටමත් පවතී", "File name is too long" : "ගොනුවේ නම දිග වැඩිය", - "__language_name__" : "__language_name__", + "__language_name__" : "සිංහල", "This is an automatically sent email, please do not reply." : "මෙය ස්වයංක්රීයව යවන ලද විද්යුත් තැපෑලකි, කරුණාකර පිළිතුරු නොදෙන්න.", "Help" : "උපකාර", "Apps" : "යෙදුම්", diff --git a/lib/l10n/sk.js b/lib/l10n/sk.js index 0b27790c1f9..5cb1c3f8f0d 100644 --- a/lib/l10n/sk.js +++ b/lib/l10n/sk.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nie je možné zapisovat do priečinka \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do priečinka s konfiguráciou.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true.", - "See %s" : "Pozri %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s nastaveniami.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true. Viď %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true.", + "See %s" : "Pozri %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Súbory aplikácie %1$s neboli správne nahradené. Uistite sa, že to je verzia kompatibilná so serverom.", "Sample configuration detected" : "Detekovaná bola vzorová konfigurácia", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zistilo sa, že konfigurácia bola skopírovaná zo vzorových súborov. Takáto konfigurácia nie je podporovaná a môže poškodiť vašu inštaláciu. Prečítajte si dokumentáciu pred vykonaním zmien v config.php", + "%s email verification" : "%s overenie e-mailu", + "Email verification" : "Overenie e-mailu", + "Click the following button to confirm your email." : "Kliknite na tlačítko pre potvrdenie vašeho e-mailu.", + "Click the following link to confirm your email." : "Kliknite na odkaz pre potvrdenie vašeho e-mailu.", + "Confirm your email" : "Potvrďte svoj e-mail", "Other activities" : "Iné aktivity", "%1$s and %2$s" : "%1$s a %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s a %3$s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "Podporované sú nasledujúce platformy: %s", "Server version %s or higher is required." : "Je vyžadovaná verzia servera %s alebo vyššia.", "Server version %s or lower is required." : "Je vyžadovaná verzia servera %s alebo nižšia.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Prihlásený používateľ musí byť správcom, podadministrátorom alebo musí mať špeciálne právo na prístup k tomuto nastaveniu", "Logged in user must be an admin or sub admin" : "Prihlásený používateľ musí byť správcom alebo správcom pre čiastkovú oblasť.", "Logged in user must be an admin" : "Prihlásený používateľ musí byť správca", "Wiping of device %s has started" : "Začalo sa mazanie zariadenia %s", @@ -50,6 +54,7 @@ OC.L10N.register( "Unknown filetype" : "Neznámy typ súboru", "Invalid image" : "Chybný obrázok", "Avatar image is not square" : "Obrázok avatara nie je štvorcový", + "View profile" : "Zobraziť profil", "today" : "dnes", "tomorrow" : "zajtra", "yesterday" : "včera", @@ -71,6 +76,10 @@ OC.L10N.register( "seconds ago" : "pred sekundami", "Empty file" : "Prázdny súbor", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul s ID: %s neexistuje. Povoľte ho prosím vo vašom nastavení aplikácií alebo kontaktujte správcu.", + "File already exists" : "Súbor už existuje", + "Invalid path" : "Neplatná cesta", + "Failed to create file from template" : "Nemôžem vytvoriť súbor zo šablóny", + "Templates" : "Šablóny", "File name is a reserved word" : "Názov súboru je rezervované slovo.", "File name contains at least one invalid character" : "Názov súboru obsahuje nepovolené znaky.", "File name is too long" : "Meno súboru je veľmi dlhé.", @@ -85,6 +94,21 @@ OC.L10N.register( "Settings" : "Nastavenia", "Log out" : "Odhlásiť sa", "Users" : "Používatelia", + "Email" : "E-mail", + "Mail %s" : "Pošta pre %s", + "Phone" : "Telefón", + "Call %s" : "Zavolať %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Zobraziť %s na Twitteri", + "Website" : "Webstránka", + "Visit %s" : "Navštíviť %s", + "Address" : "Adresa", + "Avatar" : "Avatar", + "About" : "O aplikácii", + "Full name" : "Celé meno", + "Headline" : "Titulok", + "Organisation" : "Organizácia", + "Role" : "Rola", "Unknown user" : "Neznámy používateľ", "Additional settings" : "Ďalšie nastavenia", "%s enter the database username and name." : "%s zadajte používateľské meno a meno databázy", @@ -102,7 +126,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Prosím, odstráňte nastavenie open_basedir vo vašom php.ini alebo prejdite na 64-bit PHP.", "Set an admin username." : "Zadajte používateľské meno administrátora.", "Set an admin password." : "Zadajte heslo administrátora.", - "Can't create or write into the data directory %s" : "Nemožno vytvoriť alebo zapisovať do priečinka dát %s", + "Cannot create or write into the data directory %s" : "Nemožno vytvoriť alebo zapisovať do priečinka dát %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Backend pre sprístupnenie %s musí implementovať rozhranie OCP\\Share_Backend", "Sharing backend %s not found" : "Backend sprístupnenia %s nebol nájdený", "Sharing backend for %s not found" : "Backend sprístupnenia pre %s nebol nájdený", @@ -112,11 +136,13 @@ OC.L10N.register( "Open »%s«" : "Otvoriť »%s«", "%1$s via %2$s" : "%1$s cez %2$s", "You are not allowed to share %s" : "Nemôžete sprístupniť %s", - "Can’t increase permissions of %s" : "Nie je možné navýšiť oprávnenia pre %s", - "Files can’t be shared with delete permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na odstránenie", - "Files can’t be shared with create permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na vytváranie", + "Cannot increase permissions of %s" : "Nie je možné navýšiť oprávnenia pre %s", + "Files cannot be shared with delete permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na odstránenie", + "Files cannot be shared with create permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na vytváranie", "Expiration date is in the past" : "Dátum konca platnosti je v minulosti", - "Can’t set expiration date more than %s days in the future" : "Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Nie je možné nastaviť dátum konca platnosti viac ako %s deň v budúcnosti","Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti","Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti","Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti"], + "Sharing is only allowed with group members" : "Zdieľanie je možné iba s členmi skupiny", + "Sharing %s failed, because this item is already shared with user %s" : "Sprístupnenie %s zlyhalo, táto položka už je používateľovi %s zozdieľaná", "%1$s shared »%2$s« with you" : "%1$s vám sprístupnil »%2$s«", "%1$s shared »%2$s« with you." : "%1$s vám sprístupnil »%2$s«.", "Click the button below to open it." : "Pre otvorenie klienta kliknite na tlačítko nižšie.", @@ -181,15 +207,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Aplikáciu \"%1$s\" nie je možné inštalovať, pretože nie sú splnené nasledovné závislosti: %2$s", "a safe home for all your data" : "bezpečný domov pre všetky vaše dáta", "File is currently busy, please try again later" : "Súbor sa práve používa, skúste prosím neskôr", - "Can't read file" : "Nemožno čítať súbor.", + "Cannot read file" : "Nemožno čítať súbor.", "Application is not enabled" : "Aplikácia nie je zapnutá", "Authentication error" : "Chyba autentifikácie", "Token expired. Please reload page." : "Token vypršal. Obnovte, prosím, stránku.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Ovládače databázy (sqlite, mysql, alebo postgresql) nie sú nainštalované.", "Cannot write into \"config\" directory" : "Nie je možné zapisovať do priečinka \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do adresára s konfiguráciou. Viď %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true. Viď %s", "Cannot write into \"apps\" directory" : "Nie je možné zapisovať do priečinka \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s aplikáciami alebo vypnutím katalógu s aplikáciami v súbore s nastaveniami.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s aplikáciami alebo vypnutím katalógu s aplikáciami v súbore s nastaveniami.", "Cannot create \"data\" directory" : "Nie je možné vytvoriť priečinok \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do koreňového adresára. Viď %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Oprávnenia je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do koreňového priečinka. Viď %s.", @@ -226,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "Chyba pripojenia k úložisku. %s", "Storage is temporarily not available" : "Úložisko je dočasne nedostupné", "Storage connection timeout. %s" : "Vypršanie pripojenia k úložisku. %s", - "Following databases are supported: %s" : "Podporované sú tieto databázy: %s", - "Following platforms are supported: %s" : "Podporované sú nasledovné systémy: %s", - "Invalid Federated Cloud ID" : "Neplatné združené Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do priečinka s konfiguráciou.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true.", + "Can't create or write into the data directory %s" : "Nemožno vytvoriť alebo zapisovať do priečinka dát %s", + "Invalid Federated Cloud ID" : "Neplatné združené Cloud ID", + "Can’t increase permissions of %s" : "Nie je možné navýšiť oprávnenia pre %s", + "Files can’t be shared with delete permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na odstránenie", + "Files can’t be shared with create permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na vytváranie", + "Can’t set expiration date more than %s days in the future" : "Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti", + "Can't read file" : "Nemožno čítať súbor.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s aplikáciami alebo vypnutím katalógu s aplikáciami v súbore s nastaveniami." }, "nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);"); diff --git a/lib/l10n/sk.json b/lib/l10n/sk.json index cde2f972978..52f3e17b320 100644 --- a/lib/l10n/sk.json +++ b/lib/l10n/sk.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nie je možné zapisovat do priečinka \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do priečinka s konfiguráciou.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true.", - "See %s" : "Pozri %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s nastaveniami.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true. Viď %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true.", + "See %s" : "Pozri %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Súbory aplikácie %1$s neboli správne nahradené. Uistite sa, že to je verzia kompatibilná so serverom.", "Sample configuration detected" : "Detekovaná bola vzorová konfigurácia", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Zistilo sa, že konfigurácia bola skopírovaná zo vzorových súborov. Takáto konfigurácia nie je podporovaná a môže poškodiť vašu inštaláciu. Prečítajte si dokumentáciu pred vykonaním zmien v config.php", + "%s email verification" : "%s overenie e-mailu", + "Email verification" : "Overenie e-mailu", + "Click the following button to confirm your email." : "Kliknite na tlačítko pre potvrdenie vašeho e-mailu.", + "Click the following link to confirm your email." : "Kliknite na odkaz pre potvrdenie vašeho e-mailu.", + "Confirm your email" : "Potvrďte svoj e-mail", "Other activities" : "Iné aktivity", "%1$s and %2$s" : "%1$s a %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s a %3$s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "Podporované sú nasledujúce platformy: %s", "Server version %s or higher is required." : "Je vyžadovaná verzia servera %s alebo vyššia.", "Server version %s or lower is required." : "Je vyžadovaná verzia servera %s alebo nižšia.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Prihlásený používateľ musí byť správcom, podadministrátorom alebo musí mať špeciálne právo na prístup k tomuto nastaveniu", "Logged in user must be an admin or sub admin" : "Prihlásený používateľ musí byť správcom alebo správcom pre čiastkovú oblasť.", "Logged in user must be an admin" : "Prihlásený používateľ musí byť správca", "Wiping of device %s has started" : "Začalo sa mazanie zariadenia %s", @@ -48,6 +52,7 @@ "Unknown filetype" : "Neznámy typ súboru", "Invalid image" : "Chybný obrázok", "Avatar image is not square" : "Obrázok avatara nie je štvorcový", + "View profile" : "Zobraziť profil", "today" : "dnes", "tomorrow" : "zajtra", "yesterday" : "včera", @@ -69,6 +74,10 @@ "seconds ago" : "pred sekundami", "Empty file" : "Prázdny súbor", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul s ID: %s neexistuje. Povoľte ho prosím vo vašom nastavení aplikácií alebo kontaktujte správcu.", + "File already exists" : "Súbor už existuje", + "Invalid path" : "Neplatná cesta", + "Failed to create file from template" : "Nemôžem vytvoriť súbor zo šablóny", + "Templates" : "Šablóny", "File name is a reserved word" : "Názov súboru je rezervované slovo.", "File name contains at least one invalid character" : "Názov súboru obsahuje nepovolené znaky.", "File name is too long" : "Meno súboru je veľmi dlhé.", @@ -83,6 +92,21 @@ "Settings" : "Nastavenia", "Log out" : "Odhlásiť sa", "Users" : "Používatelia", + "Email" : "E-mail", + "Mail %s" : "Pošta pre %s", + "Phone" : "Telefón", + "Call %s" : "Zavolať %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Zobraziť %s na Twitteri", + "Website" : "Webstránka", + "Visit %s" : "Navštíviť %s", + "Address" : "Adresa", + "Avatar" : "Avatar", + "About" : "O aplikácii", + "Full name" : "Celé meno", + "Headline" : "Titulok", + "Organisation" : "Organizácia", + "Role" : "Rola", "Unknown user" : "Neznámy používateľ", "Additional settings" : "Ďalšie nastavenia", "%s enter the database username and name." : "%s zadajte používateľské meno a meno databázy", @@ -100,7 +124,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Prosím, odstráňte nastavenie open_basedir vo vašom php.ini alebo prejdite na 64-bit PHP.", "Set an admin username." : "Zadajte používateľské meno administrátora.", "Set an admin password." : "Zadajte heslo administrátora.", - "Can't create or write into the data directory %s" : "Nemožno vytvoriť alebo zapisovať do priečinka dát %s", + "Cannot create or write into the data directory %s" : "Nemožno vytvoriť alebo zapisovať do priečinka dát %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Backend pre sprístupnenie %s musí implementovať rozhranie OCP\\Share_Backend", "Sharing backend %s not found" : "Backend sprístupnenia %s nebol nájdený", "Sharing backend for %s not found" : "Backend sprístupnenia pre %s nebol nájdený", @@ -110,11 +134,13 @@ "Open »%s«" : "Otvoriť »%s«", "%1$s via %2$s" : "%1$s cez %2$s", "You are not allowed to share %s" : "Nemôžete sprístupniť %s", - "Can’t increase permissions of %s" : "Nie je možné navýšiť oprávnenia pre %s", - "Files can’t be shared with delete permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na odstránenie", - "Files can’t be shared with create permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na vytváranie", + "Cannot increase permissions of %s" : "Nie je možné navýšiť oprávnenia pre %s", + "Files cannot be shared with delete permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na odstránenie", + "Files cannot be shared with create permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na vytváranie", "Expiration date is in the past" : "Dátum konca platnosti je v minulosti", - "Can’t set expiration date more than %s days in the future" : "Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Nie je možné nastaviť dátum konca platnosti viac ako %s deň v budúcnosti","Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti","Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti","Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti"], + "Sharing is only allowed with group members" : "Zdieľanie je možné iba s členmi skupiny", + "Sharing %s failed, because this item is already shared with user %s" : "Sprístupnenie %s zlyhalo, táto položka už je používateľovi %s zozdieľaná", "%1$s shared »%2$s« with you" : "%1$s vám sprístupnil »%2$s«", "%1$s shared »%2$s« with you." : "%1$s vám sprístupnil »%2$s«.", "Click the button below to open it." : "Pre otvorenie klienta kliknite na tlačítko nižšie.", @@ -179,15 +205,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Aplikáciu \"%1$s\" nie je možné inštalovať, pretože nie sú splnené nasledovné závislosti: %2$s", "a safe home for all your data" : "bezpečný domov pre všetky vaše dáta", "File is currently busy, please try again later" : "Súbor sa práve používa, skúste prosím neskôr", - "Can't read file" : "Nemožno čítať súbor.", + "Cannot read file" : "Nemožno čítať súbor.", "Application is not enabled" : "Aplikácia nie je zapnutá", "Authentication error" : "Chyba autentifikácie", "Token expired. Please reload page." : "Token vypršal. Obnovte, prosím, stránku.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Ovládače databázy (sqlite, mysql, alebo postgresql) nie sú nainštalované.", "Cannot write into \"config\" directory" : "Nie je možné zapisovať do priečinka \"config\"", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do adresára s konfiguráciou. Viď %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true. Viď %s", "Cannot write into \"apps\" directory" : "Nie je možné zapisovať do priečinka \"apps\"", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s aplikáciami alebo vypnutím katalógu s aplikáciami v súbore s nastaveniami.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s aplikáciami alebo vypnutím katalógu s aplikáciami v súbore s nastaveniami.", "Cannot create \"data\" directory" : "Nie je možné vytvoriť priečinok \"data\"", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do koreňového adresára. Viď %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Oprávnenia je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do koreňového priečinka. Viď %s.", @@ -224,8 +251,15 @@ "Storage connection error. %s" : "Chyba pripojenia k úložisku. %s", "Storage is temporarily not available" : "Úložisko je dočasne nedostupné", "Storage connection timeout. %s" : "Vypršanie pripojenia k úložisku. %s", - "Following databases are supported: %s" : "Podporované sú tieto databázy: %s", - "Following platforms are supported: %s" : "Podporované sú nasledovné systémy: %s", - "Invalid Federated Cloud ID" : "Neplatné združené Cloud ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "To je zvyčajne možné opraviť tým, že udelíte webovému serveru oprávnenie na zápis do priečinka s konfiguráciou.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Alebo, ak preferujete ponechať súbor config.php iba na čítanie, nastavte v ňom parameter \"config_is_read_only\" na true.", + "Can't create or write into the data directory %s" : "Nemožno vytvoriť alebo zapisovať do priečinka dát %s", + "Invalid Federated Cloud ID" : "Neplatné združené Cloud ID", + "Can’t increase permissions of %s" : "Nie je možné navýšiť oprávnenia pre %s", + "Files can’t be shared with delete permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na odstránenie", + "Files can’t be shared with create permissions" : "Súbory nie je možné sprístupňovať s oprávneniami na vytváranie", + "Can’t set expiration date more than %s days in the future" : "Nie je možné nastaviť dátum konca platnosti viac ako %s dní v budúcnosti", + "Can't read file" : "Nemožno čítať súbor.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Toto sa zvyčajne dá opraviť poskytnutím práva webového servera na zápis do priečinka s aplikáciami alebo vypnutím katalógu s aplikáciami v súbore s nastaveniami." },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);" }
\ No newline at end of file diff --git a/lib/l10n/sl.js b/lib/l10n/sl.js index f831c840af6..074161e4d5c 100644 --- a/lib/l10n/sl.js +++ b/lib/l10n/sl.js @@ -2,14 +2,13 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "V mapo »config« ni mogoče zapisovati!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV.", - "See %s" : "Oglejte si %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV. Več o tem si lahko preberete na %s", + "See %s" : "Oglejte si %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Datoteke programa %1$s niso bile zamenjane na pravi način. Prepričajte se, da je na strežniku nameščena podprta različica.", "Sample configuration detected" : "Zaznana je neustrezna vzorčna nastavitev", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "V sistem je bila kopirana datoteka s vzorčnimi nastavitvami. To lahko vpliva na namestitev in zato možnost ni podprta. Pred spremembami datoteke config.php si natančno preberite dokumentacijo.", + "Email verification" : "Overjanje elektronskega naslova", + "Confirm your email" : "Potrditev gesla", "Other activities" : "Druge dejavnosti", "%1$s and %2$s" : "%1$s in %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s in %3$s", @@ -72,6 +71,7 @@ OC.L10N.register( "Empty file" : "Prazna datoteka", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul z ID: %s ne obstaja. Omogočite ga med nastavitvami, ali pa stopite v stik s skrbnikom sistema.", "File already exists" : "Datoteka že obstaja", + "Invalid path" : "Neveljavna pot", "Failed to create file from template" : "Ustvarjanje datoteke iz predloge je spodletelo", "Templates" : "Predloge", "File name is a reserved word" : "Ime datoteke je zadržana beseda", @@ -105,7 +105,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Odstraniti je treba nastavitev open_basedir v datoteki php.ini ali pa preklopiti na 64-bitno okolje PHP.", "Set an admin username." : "Nastavi uporabniško ime skrbnika.", "Set an admin password." : "Nastavi skrbniško geslo.", - "Can't create or write into the data directory %s" : "Ni mogoče zapisati podatkov v podatkovno mapo %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Souporaba ozadnjega programa %s mora vsebovati tudi vmesnik OCP\\Share_Backend", "Sharing backend %s not found" : "Ozadnjega programa %s za souporabo ni mogoče najti", "Sharing backend for %s not found" : "Ozadnjega programa za souporabo za %s ni mogoče najti", @@ -115,12 +114,11 @@ OC.L10N.register( "Open »%s«" : "Odpri »%s«", "%1$s via %2$s" : "%1$s prek %2$s", "You are not allowed to share %s" : "Omogočanje souporabe %s brez ustreznih dovoljenj ni mogoče.", - "Can’t increase permissions of %s" : "Ni mogoče povečati dovoljen %s", - "Files can’t be shared with delete permissions" : "Souporaba datotek z nastavljenim dovoljenjem za brisanje, ni mogoča", - "Files can’t be shared with create permissions" : "Souporaba datotek z nastavljenim dovoljenjem za ustvarjanje, ni mogoča", + "Files cannot be shared with delete permissions" : "Souporaba datotek z nastavljenim dovoljenjem za brisanje ni mogoča", + "Files cannot be shared with create permissions" : "Souporaba datotek z nastavljenim dovoljenjem za ustvarjanje ni mogoča", "Expiration date is in the past" : "Datum preteka je že mimo!", - "Can’t set expiration date more than %s days in the future" : "Datuma pretaka ni mogoče nastaviti za več kot %s dni v prihodnost.", "Sharing is only allowed with group members" : "Souporaba je dovoljena le med člani skupine", + "Sharing %s failed, because this item is already shared with user %s" : "Nastavljanje souporabe %s je spodletelo, ker je predmet že v souporabi z uporabnikom %s.", "%1$s shared »%2$s« with you" : "%1$s vam omogoča souporabo »%2$s«", "%1$s shared »%2$s« with you." : "%1$s vam omogoča souporabo »%2$s«.", "Click the button below to open it." : "Kliknite na gumb za odpiranje.", @@ -185,15 +183,15 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Programa »%1$s« ni mogoče namestiti zaradi nerešenih odvisnosti: %2$s", "a safe home for all your data" : "Varno okolje za vaše podatke!", "File is currently busy, please try again later" : "Datoteka je trenutno v uporabi. Poskusite znova kasneje.", - "Can't read file" : "Datoteke ni mogoče prebrati.", + "Cannot read file" : "Datoteke ni mogoče prebrati.", "Application is not enabled" : "Program ni omogočen", "Authentication error" : "Napaka overjanja", "Token expired. Please reload page." : "Žeton je pretekel. Stran je treba ponovno naložiti.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Ni nameščenih programnikov podatkovnih zbirk (sqlite, mysql oziroma postgresql).", "Cannot write into \"config\" directory" : "Mapa »config« nima nastavljenih ustreznih dovoljenj za pisanje!", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo. Poglejte %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV. Več o tem si lahko preberete na %s", "Cannot write into \"apps\" directory" : "V mapo »apps« ni mogoče zapisovati!", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v mapo programov, ali pa z onemogočanjem zbirke programov v nastavitveni datoteki.", "Cannot create \"data\" directory" : "Ni mogoče ustvariti »podatkovne« mape", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v korensko mapo. Poglejte %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Omejitev je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v korensko mapo. Za več podrobnosti si oglejte %s.", @@ -230,8 +228,15 @@ OC.L10N.register( "Storage connection error. %s" : "Napaka povezave do shrambe. %s", "Storage is temporarily not available" : "Shramba trenutno ni na voljo", "Storage connection timeout. %s" : "Povezava do shrambe je časovno potekla. %s", - "Following databases are supported: %s" : "Podprte so navedene podatkovne zbirke: %s", - "Following platforms are supported: %s" : "Podprta so okolja: %s", - "Invalid Federated Cloud ID" : "Neveljaven ID zveznega oblaka" + "This can usually be fixed by giving the webserver write access to the config directory" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV.", + "Can't create or write into the data directory %s" : "Ni mogoče zapisati podatkov v podatkovno mapo %s", + "Invalid Federated Cloud ID" : "Neveljaven ID zveznega oblaka", + "Can’t increase permissions of %s" : "Ni mogoče povečati dovoljen %s", + "Files can’t be shared with delete permissions" : "Souporaba datotek z nastavljenim dovoljenjem za brisanje, ni mogoča", + "Files can’t be shared with create permissions" : "Souporaba datotek z nastavljenim dovoljenjem za ustvarjanje, ni mogoča", + "Can’t set expiration date more than %s days in the future" : "Datuma pretaka ni mogoče nastaviti za več kot %s dni v prihodnost.", + "Can't read file" : "Datoteke ni mogoče prebrati.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v mapo programov, ali pa z onemogočanjem zbirke programov v nastavitveni datoteki." }, "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"); diff --git a/lib/l10n/sl.json b/lib/l10n/sl.json index 75645c84eb8..4133732b912 100644 --- a/lib/l10n/sl.json +++ b/lib/l10n/sl.json @@ -1,13 +1,12 @@ { "translations": { "Cannot write into \"config\" directory!" : "V mapo »config« ni mogoče zapisovati!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV.", - "See %s" : "Oglejte si %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV. Več o tem si lahko preberete na %s", + "See %s" : "Oglejte si %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Datoteke programa %1$s niso bile zamenjane na pravi način. Prepričajte se, da je na strežniku nameščena podprta različica.", "Sample configuration detected" : "Zaznana je neustrezna vzorčna nastavitev", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "V sistem je bila kopirana datoteka s vzorčnimi nastavitvami. To lahko vpliva na namestitev in zato možnost ni podprta. Pred spremembami datoteke config.php si natančno preberite dokumentacijo.", + "Email verification" : "Overjanje elektronskega naslova", + "Confirm your email" : "Potrditev gesla", "Other activities" : "Druge dejavnosti", "%1$s and %2$s" : "%1$s in %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s in %3$s", @@ -70,6 +69,7 @@ "Empty file" : "Prazna datoteka", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul z ID: %s ne obstaja. Omogočite ga med nastavitvami, ali pa stopite v stik s skrbnikom sistema.", "File already exists" : "Datoteka že obstaja", + "Invalid path" : "Neveljavna pot", "Failed to create file from template" : "Ustvarjanje datoteke iz predloge je spodletelo", "Templates" : "Predloge", "File name is a reserved word" : "Ime datoteke je zadržana beseda", @@ -103,7 +103,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Odstraniti je treba nastavitev open_basedir v datoteki php.ini ali pa preklopiti na 64-bitno okolje PHP.", "Set an admin username." : "Nastavi uporabniško ime skrbnika.", "Set an admin password." : "Nastavi skrbniško geslo.", - "Can't create or write into the data directory %s" : "Ni mogoče zapisati podatkov v podatkovno mapo %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Souporaba ozadnjega programa %s mora vsebovati tudi vmesnik OCP\\Share_Backend", "Sharing backend %s not found" : "Ozadnjega programa %s za souporabo ni mogoče najti", "Sharing backend for %s not found" : "Ozadnjega programa za souporabo za %s ni mogoče najti", @@ -113,12 +112,11 @@ "Open »%s«" : "Odpri »%s«", "%1$s via %2$s" : "%1$s prek %2$s", "You are not allowed to share %s" : "Omogočanje souporabe %s brez ustreznih dovoljenj ni mogoče.", - "Can’t increase permissions of %s" : "Ni mogoče povečati dovoljen %s", - "Files can’t be shared with delete permissions" : "Souporaba datotek z nastavljenim dovoljenjem za brisanje, ni mogoča", - "Files can’t be shared with create permissions" : "Souporaba datotek z nastavljenim dovoljenjem za ustvarjanje, ni mogoča", + "Files cannot be shared with delete permissions" : "Souporaba datotek z nastavljenim dovoljenjem za brisanje ni mogoča", + "Files cannot be shared with create permissions" : "Souporaba datotek z nastavljenim dovoljenjem za ustvarjanje ni mogoča", "Expiration date is in the past" : "Datum preteka je že mimo!", - "Can’t set expiration date more than %s days in the future" : "Datuma pretaka ni mogoče nastaviti za več kot %s dni v prihodnost.", "Sharing is only allowed with group members" : "Souporaba je dovoljena le med člani skupine", + "Sharing %s failed, because this item is already shared with user %s" : "Nastavljanje souporabe %s je spodletelo, ker je predmet že v souporabi z uporabnikom %s.", "%1$s shared »%2$s« with you" : "%1$s vam omogoča souporabo »%2$s«", "%1$s shared »%2$s« with you." : "%1$s vam omogoča souporabo »%2$s«.", "Click the button below to open it." : "Kliknite na gumb za odpiranje.", @@ -183,15 +181,15 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Programa »%1$s« ni mogoče namestiti zaradi nerešenih odvisnosti: %2$s", "a safe home for all your data" : "Varno okolje za vaše podatke!", "File is currently busy, please try again later" : "Datoteka je trenutno v uporabi. Poskusite znova kasneje.", - "Can't read file" : "Datoteke ni mogoče prebrati.", + "Cannot read file" : "Datoteke ni mogoče prebrati.", "Application is not enabled" : "Program ni omogočen", "Authentication error" : "Napaka overjanja", "Token expired. Please reload page." : "Žeton je pretekel. Stran je treba ponovno naložiti.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Ni nameščenih programnikov podatkovnih zbirk (sqlite, mysql oziroma postgresql).", "Cannot write into \"config\" directory" : "Mapa »config« nima nastavljenih ustreznih dovoljenj za pisanje!", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo. Poglejte %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV. Več o tem si lahko preberete na %s", "Cannot write into \"apps\" directory" : "V mapo »apps« ni mogoče zapisovati!", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v mapo programov, ali pa z onemogočanjem zbirke programov v nastavitveni datoteki.", "Cannot create \"data\" directory" : "Ni mogoče ustvariti »podatkovne« mape", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v korensko mapo. Poglejte %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Omejitev je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v korensko mapo. Za več podrobnosti si oglejte %s.", @@ -228,8 +226,15 @@ "Storage connection error. %s" : "Napaka povezave do shrambe. %s", "Storage is temporarily not available" : "Shramba trenutno ni na voljo", "Storage connection timeout. %s" : "Povezava do shrambe je časovno potekla. %s", - "Following databases are supported: %s" : "Podprte so navedene podatkovne zbirke: %s", - "Following platforms are supported: %s" : "Podprta so okolja: %s", - "Invalid Federated Cloud ID" : "Neveljaven ID zveznega oblaka" + "This can usually be fixed by giving the webserver write access to the config directory" : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v nastavitveno mapo.", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Lahko pustite dovoljenje datoteke config.php nastavljeno na le za branje, a je treba v datoteki nastaviti možnost »config_is_read_only« na PRAV.", + "Can't create or write into the data directory %s" : "Ni mogoče zapisati podatkov v podatkovno mapo %s", + "Invalid Federated Cloud ID" : "Neveljaven ID zveznega oblaka", + "Can’t increase permissions of %s" : "Ni mogoče povečati dovoljen %s", + "Files can’t be shared with delete permissions" : "Souporaba datotek z nastavljenim dovoljenjem za brisanje, ni mogoča", + "Files can’t be shared with create permissions" : "Souporaba datotek z nastavljenim dovoljenjem za ustvarjanje, ni mogoča", + "Can’t set expiration date more than %s days in the future" : "Datuma pretaka ni mogoče nastaviti za več kot %s dni v prihodnost.", + "Can't read file" : "Datoteke ni mogoče prebrati.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku za pisanje v mapo programov, ali pa z onemogočanjem zbirke programov v nastavitveni datoteki." },"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" }
\ No newline at end of file diff --git a/lib/l10n/sq.js b/lib/l10n/sq.js index 911a6ee0d67..c7504a117cf 100644 --- a/lib/l10n/sq.js +++ b/lib/l10n/sq.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Nuk shkruhet dot te drejtoria \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Zakonisht kjo mund të ndreqet duke i akorduar shërbyesit web të drejta shkrimi mbi drejtorinë e formësimeve", "See %s" : "Shihni %s", "Sample configuration detected" : "U gjet formësim shembull", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "U pa se është kopjuar shembulli për formësime. Kjo mund të prishë instalimin tuaj dhe nuk mbulohet. Ju lutemi, lexoni dokumentimin, përpara se të kryeni ndryshime te config.php", @@ -66,17 +65,12 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Ju lutemi, hiqeni rregullimin open_basedir nga php.ini juaj ose hidhuni te PHP për 64-bit.", "Set an admin username." : "Caktoni një emër përdoruesi për përgjegjësin.", "Set an admin password." : "Caktoni një fjalëkalim për përgjegjësin.", - "Can't create or write into the data directory %s" : "S’e krijon ose s’shkruan dot te drejtoria e të dhënave %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Mekanizmi i shërbimit për ndarje %s duhet të sendërtojë ndërfaqen OCP\\Share_Backend", "Sharing backend %s not found" : "S’u gjet mekanizmi i shërbimit për ndarje %s", "Sharing backend for %s not found" : "S’u gjet mekanizmi i shërbimit për ndarje për %s", "Open »%s«" : "Hap»1 %s«", "You are not allowed to share %s" : "Nuk ju lejohet ta ndani %s me të tjerët", - "Can’t increase permissions of %s" : "Nuk mund të shtohen lejet e %s", - "Files can’t be shared with delete permissions" : "Skedarët nuk mund të ndahen me leje të fshira", - "Files can’t be shared with create permissions" : "matchSkedarët nuk mund të ndahen me leje të krijuara", "Expiration date is in the past" : "Data e skadimit bie në të kaluarën", - "Can’t set expiration date more than %s days in the future" : "Nuk mund të caktohet data e skadimit më shumë se %s ditë në të ardhmen", "Click the button below to open it." : "Kliko butonin më poshtë për të hapur atë.", "The requested share does not exist anymore" : "Ndarja e kërkuar nuk ekziston më", "Could not find category \"%s\"" : "S’u gjet kategori \"%s\"", @@ -135,7 +129,6 @@ OC.L10N.register( "Login canceled by app" : "Hyrja u anulua nga aplikacioni", "a safe home for all your data" : "Një shtëpi e sigurt për të dhënat e tua", "File is currently busy, please try again later" : "Kartela tani është e zënë, ju lutemi, riprovoni më vonë.", - "Can't read file" : "S'lexohet dot kartela", "Application is not enabled" : "Aplikacioni s’është aktivizuar", "Authentication error" : "Gabim mirëfilltësimi", "Token expired. Please reload page." : "Token-i ka skaduar. Ju lutem ringarkoni faqen.", @@ -174,8 +167,13 @@ OC.L10N.register( "Storage connection error. %s" : "Gabim lidhje te depozita. %s", "Storage is temporarily not available" : "Hapsira ruajtëse nuk është në dispozicion përkohësisht", "Storage connection timeout. %s" : "Mbarim kohe lidhjeje për depozitën. %s", - "Following databases are supported: %s" : "Mbulohen bazat vijuese të të dhënave: %s", - "Following platforms are supported: %s" : "Mbulohen platformat vijuese: %s", - "Invalid Federated Cloud ID" : "ID Federated Cloud e pavlefshme" + "This can usually be fixed by giving the webserver write access to the config directory" : "Zakonisht kjo mund të ndreqet duke i akorduar shërbyesit web të drejta shkrimi mbi drejtorinë e formësimeve", + "Can't create or write into the data directory %s" : "S’e krijon ose s’shkruan dot te drejtoria e të dhënave %s", + "Invalid Federated Cloud ID" : "ID Federated Cloud e pavlefshme", + "Can’t increase permissions of %s" : "Nuk mund të shtohen lejet e %s", + "Files can’t be shared with delete permissions" : "Skedarët nuk mund të ndahen me leje të fshira", + "Files can’t be shared with create permissions" : "matchSkedarët nuk mund të ndahen me leje të krijuara", + "Can’t set expiration date more than %s days in the future" : "Nuk mund të caktohet data e skadimit më shumë se %s ditë në të ardhmen", + "Can't read file" : "S'lexohet dot kartela" }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/sq.json b/lib/l10n/sq.json index 2cc441e2bc2..4b74665697d 100644 --- a/lib/l10n/sq.json +++ b/lib/l10n/sq.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Nuk shkruhet dot te drejtoria \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Zakonisht kjo mund të ndreqet duke i akorduar shërbyesit web të drejta shkrimi mbi drejtorinë e formësimeve", "See %s" : "Shihni %s", "Sample configuration detected" : "U gjet formësim shembull", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "U pa se është kopjuar shembulli për formësime. Kjo mund të prishë instalimin tuaj dhe nuk mbulohet. Ju lutemi, lexoni dokumentimin, përpara se të kryeni ndryshime te config.php", @@ -64,17 +63,12 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Ju lutemi, hiqeni rregullimin open_basedir nga php.ini juaj ose hidhuni te PHP për 64-bit.", "Set an admin username." : "Caktoni një emër përdoruesi për përgjegjësin.", "Set an admin password." : "Caktoni një fjalëkalim për përgjegjësin.", - "Can't create or write into the data directory %s" : "S’e krijon ose s’shkruan dot te drejtoria e të dhënave %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Mekanizmi i shërbimit për ndarje %s duhet të sendërtojë ndërfaqen OCP\\Share_Backend", "Sharing backend %s not found" : "S’u gjet mekanizmi i shërbimit për ndarje %s", "Sharing backend for %s not found" : "S’u gjet mekanizmi i shërbimit për ndarje për %s", "Open »%s«" : "Hap»1 %s«", "You are not allowed to share %s" : "Nuk ju lejohet ta ndani %s me të tjerët", - "Can’t increase permissions of %s" : "Nuk mund të shtohen lejet e %s", - "Files can’t be shared with delete permissions" : "Skedarët nuk mund të ndahen me leje të fshira", - "Files can’t be shared with create permissions" : "matchSkedarët nuk mund të ndahen me leje të krijuara", "Expiration date is in the past" : "Data e skadimit bie në të kaluarën", - "Can’t set expiration date more than %s days in the future" : "Nuk mund të caktohet data e skadimit më shumë se %s ditë në të ardhmen", "Click the button below to open it." : "Kliko butonin më poshtë për të hapur atë.", "The requested share does not exist anymore" : "Ndarja e kërkuar nuk ekziston më", "Could not find category \"%s\"" : "S’u gjet kategori \"%s\"", @@ -133,7 +127,6 @@ "Login canceled by app" : "Hyrja u anulua nga aplikacioni", "a safe home for all your data" : "Një shtëpi e sigurt për të dhënat e tua", "File is currently busy, please try again later" : "Kartela tani është e zënë, ju lutemi, riprovoni më vonë.", - "Can't read file" : "S'lexohet dot kartela", "Application is not enabled" : "Aplikacioni s’është aktivizuar", "Authentication error" : "Gabim mirëfilltësimi", "Token expired. Please reload page." : "Token-i ka skaduar. Ju lutem ringarkoni faqen.", @@ -172,8 +165,13 @@ "Storage connection error. %s" : "Gabim lidhje te depozita. %s", "Storage is temporarily not available" : "Hapsira ruajtëse nuk është në dispozicion përkohësisht", "Storage connection timeout. %s" : "Mbarim kohe lidhjeje për depozitën. %s", - "Following databases are supported: %s" : "Mbulohen bazat vijuese të të dhënave: %s", - "Following platforms are supported: %s" : "Mbulohen platformat vijuese: %s", - "Invalid Federated Cloud ID" : "ID Federated Cloud e pavlefshme" + "This can usually be fixed by giving the webserver write access to the config directory" : "Zakonisht kjo mund të ndreqet duke i akorduar shërbyesit web të drejta shkrimi mbi drejtorinë e formësimeve", + "Can't create or write into the data directory %s" : "S’e krijon ose s’shkruan dot te drejtoria e të dhënave %s", + "Invalid Federated Cloud ID" : "ID Federated Cloud e pavlefshme", + "Can’t increase permissions of %s" : "Nuk mund të shtohen lejet e %s", + "Files can’t be shared with delete permissions" : "Skedarët nuk mund të ndahen me leje të fshira", + "Files can’t be shared with create permissions" : "matchSkedarët nuk mund të ndahen me leje të krijuara", + "Can’t set expiration date more than %s days in the future" : "Nuk mund të caktohet data e skadimit më shumë se %s ditë në të ardhmen", + "Can't read file" : "S'lexohet dot kartela" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/sr.js b/lib/l10n/sr.js index f26613afcee..c6a23af3711 100644 --- a/lib/l10n/sr.js +++ b/lib/l10n/sr.js @@ -2,11 +2,8 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Не могу да уписујем у „config“ директоријум!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ово се обично може средити давањем права веб серверу да пише у директоријум са подешавањима", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом.", - "See %s" : "Погледајте %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ово се обично може средити давањем права веб серверу да пише у директоријум са подешавањима.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом. Погледајте %s", + "See %s" : "Погледајте %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Фајлови апликације „%1$s“ нису правилно замењени. Проверите да ли је верзија компатибилна са сервером.", "Sample configuration detected" : "Откривен је пример подешавања", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Откривено је да је прекопиран пример подешавања. Ово може покварити инсталацију и није подржано. Прочитајте документацију пре вршења промена у фајлу config.php", @@ -102,7 +99,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Уклоните open_basedir поставку из php.ini фајла или пређите на 64-битни PHP.", "Set an admin username." : "Поставите име за администратора.", "Set an admin password." : "Поставите лозинку за администратора.", - "Can't create or write into the data directory %s" : "Не могу креирати или уписивати у директоријум података %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Позадина дељења %s мора користити корисничко окружење OCP\\Share_Backend", "Sharing backend %s not found" : "Позадина за дељење %s није пронађена", "Sharing backend for %s not found" : "Позадина за дељење за %s није пронађена", @@ -112,11 +108,7 @@ OC.L10N.register( "Open »%s«" : "Отвори „%s“", "%1$s via %2$s" : "%1$s преко %2$s", "You are not allowed to share %s" : "Није вам дозвољено да делите %s", - "Can’t increase permissions of %s" : "Не могу да повећам дозволе за %s", - "Files can’t be shared with delete permissions" : "Фајлови не могу бити дељени са дозволама за брисање", - "Files can’t be shared with create permissions" : "Фајлови не могу бити дељени са дозволама за креирање", "Expiration date is in the past" : "Датум истека је у прошлости", - "Can’t set expiration date more than %s days in the future" : "Не могу да поставим датум истека више од %s дана у будућност", "%1$s shared »%2$s« with you" : "%1$s је поделио „%2$s“ са Вама", "%1$s shared »%2$s« with you." : "%1$s је поделио „%2$s“ са Вама.", "Click the button below to open it." : "Кликните дугме испод да га отворите.", @@ -180,15 +172,14 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Апликација „%1$s“ не може бити инсталирана јер следеће зависности нису испуњене: %2$s", "a safe home for all your data" : "сигурно место за све Ваше податке", "File is currently busy, please try again later" : "Фајл је тренутно заузет, покушајте поново касније", - "Can't read file" : "Не могу да читам фајл", "Application is not enabled" : "Апликација није укључена", "Authentication error" : "Грешка при провери идентитета", "Token expired. Please reload page." : "Жетон је истекао. Поново учитајте страницу.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Нема драјвера базе података (скулајт, мајскул или постгрескул).", "Cannot write into \"config\" directory" : "Не могу уписивати у директоријуму „config“", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ово се обично може средити давањем права писања веб серверу за директоријум са подешавањима. Погледајте %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом. Погледајте %s", "Cannot write into \"apps\" directory" : "Не могу уписивати у директоријуму „apps“", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ово се обично може поправити давањем права уписа веб серверу директоријум апликација или искуључивањем продавнице апликација у фајлу config file.", "Cannot create \"data\" directory" : "Не могу да направим \"data\" директоријум", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ово се обично може поправити тако што веб серверу дате право уписа за корени директоријуму. Видети %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Привилегије се обично могу поправити тако што веб серверу дате право уписа за корени директоријуму. Видети %s", @@ -225,8 +216,15 @@ OC.L10N.register( "Storage connection error. %s" : "Грешка приликом повезивања на складиште. %s", "Storage is temporarily not available" : "Складиште привремено није доступно", "Storage connection timeout. %s" : "Истекло је време за повезивање на складиште. %s", - "Following databases are supported: %s" : "Подржане су следеће базе података: %s", - "Following platforms are supported: %s" : "Подржане су следеће платформе: %s", - "Invalid Federated Cloud ID" : "Неисправан ИД Здруженог облака" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ово се обично може средити давањем права веб серверу да пише у директоријум са подешавањима", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом.", + "Can't create or write into the data directory %s" : "Не могу креирати или уписивати у директоријум података %s", + "Invalid Federated Cloud ID" : "Неисправан ИД Здруженог облака", + "Can’t increase permissions of %s" : "Не могу да повећам дозволе за %s", + "Files can’t be shared with delete permissions" : "Фајлови не могу бити дељени са дозволама за брисање", + "Files can’t be shared with create permissions" : "Фајлови не могу бити дељени са дозволама за креирање", + "Can’t set expiration date more than %s days in the future" : "Не могу да поставим датум истека више од %s дана у будућност", + "Can't read file" : "Не могу да читам фајл", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ово се обично може поправити давањем права уписа веб серверу директоријум апликација или искуључивањем продавнице апликација у фајлу config file." }, "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/lib/l10n/sr.json b/lib/l10n/sr.json index fb9634169f3..aa63f1f303b 100644 --- a/lib/l10n/sr.json +++ b/lib/l10n/sr.json @@ -1,10 +1,7 @@ { "translations": { "Cannot write into \"config\" directory!" : "Не могу да уписујем у „config“ директоријум!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Ово се обично може средити давањем права веб серверу да пише у директоријум са подешавањима", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом.", - "See %s" : "Погледајте %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Ово се обично може средити давањем права веб серверу да пише у директоријум са подешавањима.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом. Погледајте %s", + "See %s" : "Погледајте %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Фајлови апликације „%1$s“ нису правилно замењени. Проверите да ли је верзија компатибилна са сервером.", "Sample configuration detected" : "Откривен је пример подешавања", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Откривено је да је прекопиран пример подешавања. Ово може покварити инсталацију и није подржано. Прочитајте документацију пре вршења промена у фајлу config.php", @@ -100,7 +97,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Уклоните open_basedir поставку из php.ini фајла или пређите на 64-битни PHP.", "Set an admin username." : "Поставите име за администратора.", "Set an admin password." : "Поставите лозинку за администратора.", - "Can't create or write into the data directory %s" : "Не могу креирати или уписивати у директоријум података %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Позадина дељења %s мора користити корисничко окружење OCP\\Share_Backend", "Sharing backend %s not found" : "Позадина за дељење %s није пронађена", "Sharing backend for %s not found" : "Позадина за дељење за %s није пронађена", @@ -110,11 +106,7 @@ "Open »%s«" : "Отвори „%s“", "%1$s via %2$s" : "%1$s преко %2$s", "You are not allowed to share %s" : "Није вам дозвољено да делите %s", - "Can’t increase permissions of %s" : "Не могу да повећам дозволе за %s", - "Files can’t be shared with delete permissions" : "Фајлови не могу бити дељени са дозволама за брисање", - "Files can’t be shared with create permissions" : "Фајлови не могу бити дељени са дозволама за креирање", "Expiration date is in the past" : "Датум истека је у прошлости", - "Can’t set expiration date more than %s days in the future" : "Не могу да поставим датум истека више од %s дана у будућност", "%1$s shared »%2$s« with you" : "%1$s је поделио „%2$s“ са Вама", "%1$s shared »%2$s« with you." : "%1$s је поделио „%2$s“ са Вама.", "Click the button below to open it." : "Кликните дугме испод да га отворите.", @@ -178,15 +170,14 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Апликација „%1$s“ не може бити инсталирана јер следеће зависности нису испуњене: %2$s", "a safe home for all your data" : "сигурно место за све Ваше податке", "File is currently busy, please try again later" : "Фајл је тренутно заузет, покушајте поново касније", - "Can't read file" : "Не могу да читам фајл", "Application is not enabled" : "Апликација није укључена", "Authentication error" : "Грешка при провери идентитета", "Token expired. Please reload page." : "Жетон је истекао. Поново учитајте страницу.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Нема драјвера базе података (скулајт, мајскул или постгрескул).", "Cannot write into \"config\" directory" : "Не могу уписивати у директоријуму „config“", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Ово се обично може средити давањем права писања веб серверу за директоријум са подешавањима. Погледајте %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом. Погледајте %s", "Cannot write into \"apps\" directory" : "Не могу уписивати у директоријуму „apps“", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ово се обично може поправити давањем права уписа веб серверу директоријум апликација или искуључивањем продавнице апликација у фајлу config file.", "Cannot create \"data\" directory" : "Не могу да направим \"data\" директоријум", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Ово се обично може поправити тако што веб серверу дате право уписа за корени директоријуму. Видети %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Привилегије се обично могу поправити тако што веб серверу дате право уписа за корени директоријуму. Видети %s", @@ -223,8 +214,15 @@ "Storage connection error. %s" : "Грешка приликом повезивања на складиште. %s", "Storage is temporarily not available" : "Складиште привремено није доступно", "Storage connection timeout. %s" : "Истекло је време за повезивање на складиште. %s", - "Following databases are supported: %s" : "Подржане су следеће базе података: %s", - "Following platforms are supported: %s" : "Подржане су следеће платформе: %s", - "Invalid Federated Cloud ID" : "Неисправан ИД Здруженог облака" + "This can usually be fixed by giving the webserver write access to the config directory" : "Ово се обично може средити давањем права веб серверу да пише у директоријум са подешавањима", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Или, ако пре желите да задржите config.php да је само за читање, поставите опцију \"config_is_read_only\" на true у њему самом.", + "Can't create or write into the data directory %s" : "Не могу креирати или уписивати у директоријум података %s", + "Invalid Federated Cloud ID" : "Неисправан ИД Здруженог облака", + "Can’t increase permissions of %s" : "Не могу да повећам дозволе за %s", + "Files can’t be shared with delete permissions" : "Фајлови не могу бити дељени са дозволама за брисање", + "Files can’t be shared with create permissions" : "Фајлови не могу бити дељени са дозволама за креирање", + "Can’t set expiration date more than %s days in the future" : "Не могу да поставим датум истека више од %s дана у будућност", + "Can't read file" : "Не могу да читам фајл", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Ово се обично може поправити давањем права уписа веб серверу директоријум апликација или искуључивањем продавнице апликација у фајлу config file." },"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/lib/l10n/sv.js b/lib/l10n/sv.js index 6640463780b..890daeb10de 100644 --- a/lib/l10n/sv.js +++ b/lib/l10n/sv.js @@ -2,11 +2,9 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Kan inte skriva till \"config\" katalogen!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge webservern skrivåtkomst till config-katalogen", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den.", - "See %s" : "Se %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivåtkomst till config-katalogen.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den. Se %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Men, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den.", + "See %s" : "Se %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Filerna i appen %1$s ersattes inte korrekt. Kontrollera att det är en version som är kompatibel med servern.", "Sample configuration detected" : "Exempel-konfiguration detekterad", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har upptäckts att provkonfigurationen har kopierats. Detta kan bryta din installation och stöds inte. Vänligen läs dokumentationen innan du utför ändringar på config.php", @@ -18,10 +16,12 @@ OC.L10N.register( "Education Edition" : "Utbildningspaket", "Enterprise bundle" : "Företagspaketet", "Groupware bundle" : "Gruppvarupaket", + "Hub bundle" : "Hub-paket", "Social sharing bundle" : "Kommunikationspaket", "PHP %s or higher is required." : "PHP %s eller högre krävs.", "PHP with a version lower than %s is required." : "PHP med version lägre än %s krävs.", "%sbit or higher PHP required." : "%sbit eller nyare PHP-version krävs.", + "The following architectures are supported: %s" : "Följande arkitekturer stöds: %s", "The following databases are supported: %s" : "Följande databaser stöds: %s", "The command line tool %s could not be found" : "Kommandoradsverktyget %s hittades inte.", "The library %s is not available." : "Biblioteket %s är inte tillgängligt.", @@ -69,6 +69,10 @@ OC.L10N.register( "seconds ago" : "sekunder sedan", "Empty file" : "Tom fil", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul med ID: %s finns inte längre. Vänligen aktivera det i dina appinställningar eller kontakta din administratör.", + "File already exists" : "Filen existerar redan", + "Invalid path" : "Ogiltig sökväg", + "Failed to create file from template" : "Kunde skapa fil från mall", + "Templates" : "Mallar", "File name is a reserved word" : "Filnamnet är ett reserverat ord", "File name contains at least one invalid character" : "Filnamnet innehåller minst ett ogiltigt tecken", "File name is too long" : "Filnamnet är för långt", @@ -100,7 +104,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Vänligen ta bort open_basedir-inställningen i din php.ini eller växla till 64-bitars PHP.", "Set an admin username." : "Ange ett användarnamn för administratören.", "Set an admin password." : "Ange ett administratörslösenord.", - "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", + "Cannot create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Delningsgränssnittet %s måste implementera gränssnittet OCP\\Share_Backend", "Sharing backend %s not found" : "Delningsgränssnittet %s hittades inte", "Sharing backend for %s not found" : "Delningsgränssnittet för %s hittades inte", @@ -110,11 +114,13 @@ OC.L10N.register( "Open »%s«" : "Öppna »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Du har inte rätt att dela %s", - "Can’t increase permissions of %s" : "Kan inte öka rättigheterna för %s", - "Files can’t be shared with delete permissions" : "Filer kan inte delas med borttagningsrättigheter", - "Files can’t be shared with create permissions" : "Filer kan inte delas med rättigheter att skapa", + "Cannot increase permissions of %s" : "Kan inte höja behörigheter av %s", + "Files cannot be shared with delete permissions" : "Filer kan inte delas med rättighet att radera", + "Files cannot be shared with create permissions" : "Filer kan inte delas med rättighet att skapa", "Expiration date is in the past" : "Utgångsdatum är i det förflutna", - "Can’t set expiration date more than %s days in the future" : "Kan inte sätta utgångsdatum mer än %s dagar framåt", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Kan inte sätta ett utgångsdatum längre fram än %n dag","Kan inte sätta ett utgångsdatum längre fram än %n dagar"], + "Sharing is only allowed with group members" : "Delning är endast tillåten med gruppmedlemmar", + "Sharing %s failed, because this item is already shared with user %s" : "Delning av %s misslyckades eftersom detta redan är delat med användaren %s", "%1$s shared »%2$s« with you" : "%1$s delade »%2$s« med dig", "%1$s shared »%2$s« with you." : "%1$s delade »%2$s« med dig.", "Click the button below to open it." : "Klicka på knappen nedan för att öppna det.", @@ -165,6 +171,7 @@ OC.L10N.register( "Oct." : "Okt.", "Nov." : "Nov.", "Dec." : "Dec.", + "The user limit has been reached and the user was not created." : "Maximala användarantalet har uppnåtts och användaren skapades inte.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Endast följande tecken är tillåtna i användarnamnet: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"", "A valid username must be provided" : "Ett giltigt användarnamn måste anges", "Username contains whitespace at the beginning or at the end" : "Användarnamnet består av ett mellanslag i början eller i slutet", @@ -176,17 +183,18 @@ OC.L10N.register( "User disabled" : "Användare inaktiverad", "Login canceled by app" : "Inloggningen avbruten av appen", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Appen \"%1$s\" kan inte installeras eftersom följande beroenden inte är uppfyllda: %2$s", - "a safe home for all your data" : "ett säkert hem för alla dina data", + "a safe home for all your data" : "ett säkert hem för all din data", "File is currently busy, please try again later" : "Filen är för tillfället upptagen, vänligen försök igen senare", - "Can't read file" : "Kan inte läsa filen", + "Cannot read file" : "Kan inte läsa fil", "Application is not enabled" : "Applikationen är inte aktiverad", "Authentication error" : "Fel vid autentisering", "Token expired. Please reload page." : "Token har löpt ut. Vänligen uppdatera sidan.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Inga databasdrivrutiner (sqlite, mysql, eller postgresql) installerade.", "Cannot write into \"config\" directory" : "Kan inte skriva till \"config\" katalogen", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Detta kan vanligtvis åtgärda genom att ge webbservern skrivåtkomst till konfigureringsmappen. Se %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den. Se %s", "Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivrättigheter till applikationskatalogen eller stänga av app-butiken i konfigurationsfilen.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivrättigheter till applikationskatalogen eller stänga av appbutiken i konfigurationsfilen.", "Cannot create \"data\" directory" : "Kan inte skapa \"data\"-mapp", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Detta kan vanligtvis åtgärda genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rättigheter kan vanligtvis fixas genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s.", @@ -211,7 +219,7 @@ OC.L10N.register( "Your data directory must be an absolute path" : "Du måste specificera en korrekt sökväg till datamappen", "Check the value of \"datadirectory\" in your configuration" : "Kontrollera värdet av \"datakatalog\" i din konfiguration", "Your data directory is invalid" : "Din datamapp är ogiltig", - "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Säkerställ att du har filen \".ocdata\" i huvudkatalogen för dina data.", + "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Säkerställ att du har filen \".ocdata\" i huvudkatalogen för din data.", "Action \"%s\" not supported or implemented." : "Åtgärd \"%s\" stöds inte eller är inte implementerad.", "Authentication failed, wrong token or provider ID given" : "Autentisering misslyckades, felaktig token eller leverantörs-ID", "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Parametrar saknas för att slutföra förfrågan. Saknade parametrar: \"%s\"", @@ -223,8 +231,15 @@ OC.L10N.register( "Storage connection error. %s" : "Lagringsutrymme lyckas inte ansluta. %s", "Storage is temporarily not available" : "Lagringsutrymme är för tillfället inte tillgängligt", "Storage connection timeout. %s" : "Lagringsutrymme lyckas inte ansluta \"timeout\". %s", - "Following databases are supported: %s" : "Följande databastyper stöds: %s", - "Following platforms are supported: %s" : "Följande plattformar stöds: %s", - "Invalid Federated Cloud ID" : "Ogiltigt federerat moln-ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge webservern skrivåtkomst till config-katalogen", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den.", + "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", + "Invalid Federated Cloud ID" : "Ogiltigt federerat moln-ID", + "Can’t increase permissions of %s" : "Kan inte öka rättigheterna för %s", + "Files can’t be shared with delete permissions" : "Filer kan inte delas med borttagningsrättigheter", + "Files can’t be shared with create permissions" : "Filer kan inte delas med rättigheter att skapa", + "Can’t set expiration date more than %s days in the future" : "Kan inte sätta utgångsdatum mer än %s dagar framåt", + "Can't read file" : "Kan inte läsa filen", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivrättigheter till applikationskatalogen eller stänga av app-butiken i konfigurationsfilen." }, "nplurals=2; plural=(n != 1);"); diff --git a/lib/l10n/sv.json b/lib/l10n/sv.json index 3677c260b48..d8e505d5bc4 100644 --- a/lib/l10n/sv.json +++ b/lib/l10n/sv.json @@ -1,10 +1,8 @@ { "translations": { "Cannot write into \"config\" directory!" : "Kan inte skriva till \"config\" katalogen!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge webservern skrivåtkomst till config-katalogen", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den.", - "See %s" : "Se %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivåtkomst till config-katalogen.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den. Se %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Men, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den.", + "See %s" : "Se %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "Filerna i appen %1$s ersattes inte korrekt. Kontrollera att det är en version som är kompatibel med servern.", "Sample configuration detected" : "Exempel-konfiguration detekterad", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Det har upptäckts att provkonfigurationen har kopierats. Detta kan bryta din installation och stöds inte. Vänligen läs dokumentationen innan du utför ändringar på config.php", @@ -16,10 +14,12 @@ "Education Edition" : "Utbildningspaket", "Enterprise bundle" : "Företagspaketet", "Groupware bundle" : "Gruppvarupaket", + "Hub bundle" : "Hub-paket", "Social sharing bundle" : "Kommunikationspaket", "PHP %s or higher is required." : "PHP %s eller högre krävs.", "PHP with a version lower than %s is required." : "PHP med version lägre än %s krävs.", "%sbit or higher PHP required." : "%sbit eller nyare PHP-version krävs.", + "The following architectures are supported: %s" : "Följande arkitekturer stöds: %s", "The following databases are supported: %s" : "Följande databaser stöds: %s", "The command line tool %s could not be found" : "Kommandoradsverktyget %s hittades inte.", "The library %s is not available." : "Biblioteket %s är inte tillgängligt.", @@ -67,6 +67,10 @@ "seconds ago" : "sekunder sedan", "Empty file" : "Tom fil", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Modul med ID: %s finns inte längre. Vänligen aktivera det i dina appinställningar eller kontakta din administratör.", + "File already exists" : "Filen existerar redan", + "Invalid path" : "Ogiltig sökväg", + "Failed to create file from template" : "Kunde skapa fil från mall", + "Templates" : "Mallar", "File name is a reserved word" : "Filnamnet är ett reserverat ord", "File name contains at least one invalid character" : "Filnamnet innehåller minst ett ogiltigt tecken", "File name is too long" : "Filnamnet är för långt", @@ -98,7 +102,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Vänligen ta bort open_basedir-inställningen i din php.ini eller växla till 64-bitars PHP.", "Set an admin username." : "Ange ett användarnamn för administratören.", "Set an admin password." : "Ange ett administratörslösenord.", - "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", + "Cannot create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Delningsgränssnittet %s måste implementera gränssnittet OCP\\Share_Backend", "Sharing backend %s not found" : "Delningsgränssnittet %s hittades inte", "Sharing backend for %s not found" : "Delningsgränssnittet för %s hittades inte", @@ -108,11 +112,13 @@ "Open »%s«" : "Öppna »%s«", "%1$s via %2$s" : "%1$s via %2$s", "You are not allowed to share %s" : "Du har inte rätt att dela %s", - "Can’t increase permissions of %s" : "Kan inte öka rättigheterna för %s", - "Files can’t be shared with delete permissions" : "Filer kan inte delas med borttagningsrättigheter", - "Files can’t be shared with create permissions" : "Filer kan inte delas med rättigheter att skapa", + "Cannot increase permissions of %s" : "Kan inte höja behörigheter av %s", + "Files cannot be shared with delete permissions" : "Filer kan inte delas med rättighet att radera", + "Files cannot be shared with create permissions" : "Filer kan inte delas med rättighet att skapa", "Expiration date is in the past" : "Utgångsdatum är i det förflutna", - "Can’t set expiration date more than %s days in the future" : "Kan inte sätta utgångsdatum mer än %s dagar framåt", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Kan inte sätta ett utgångsdatum längre fram än %n dag","Kan inte sätta ett utgångsdatum längre fram än %n dagar"], + "Sharing is only allowed with group members" : "Delning är endast tillåten med gruppmedlemmar", + "Sharing %s failed, because this item is already shared with user %s" : "Delning av %s misslyckades eftersom detta redan är delat med användaren %s", "%1$s shared »%2$s« with you" : "%1$s delade »%2$s« med dig", "%1$s shared »%2$s« with you." : "%1$s delade »%2$s« med dig.", "Click the button below to open it." : "Klicka på knappen nedan för att öppna det.", @@ -163,6 +169,7 @@ "Oct." : "Okt.", "Nov." : "Nov.", "Dec." : "Dec.", + "The user limit has been reached and the user was not created." : "Maximala användarantalet har uppnåtts och användaren skapades inte.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Endast följande tecken är tillåtna i användarnamnet: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"", "A valid username must be provided" : "Ett giltigt användarnamn måste anges", "Username contains whitespace at the beginning or at the end" : "Användarnamnet består av ett mellanslag i början eller i slutet", @@ -174,17 +181,18 @@ "User disabled" : "Användare inaktiverad", "Login canceled by app" : "Inloggningen avbruten av appen", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Appen \"%1$s\" kan inte installeras eftersom följande beroenden inte är uppfyllda: %2$s", - "a safe home for all your data" : "ett säkert hem för alla dina data", + "a safe home for all your data" : "ett säkert hem för all din data", "File is currently busy, please try again later" : "Filen är för tillfället upptagen, vänligen försök igen senare", - "Can't read file" : "Kan inte läsa filen", + "Cannot read file" : "Kan inte läsa fil", "Application is not enabled" : "Applikationen är inte aktiverad", "Authentication error" : "Fel vid autentisering", "Token expired. Please reload page." : "Token har löpt ut. Vänligen uppdatera sidan.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Inga databasdrivrutiner (sqlite, mysql, eller postgresql) installerade.", "Cannot write into \"config\" directory" : "Kan inte skriva till \"config\" katalogen", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Detta kan vanligtvis åtgärda genom att ge webbservern skrivåtkomst till konfigureringsmappen. Se %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den. Se %s", "Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivrättigheter till applikationskatalogen eller stänga av app-butiken i konfigurationsfilen.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivrättigheter till applikationskatalogen eller stänga av appbutiken i konfigurationsfilen.", "Cannot create \"data\" directory" : "Kan inte skapa \"data\"-mapp", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Detta kan vanligtvis åtgärda genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Rättigheter kan vanligtvis fixas genom att ge webbservern skrivåtkomst till rotkatalogen. Se %s.", @@ -209,7 +217,7 @@ "Your data directory must be an absolute path" : "Du måste specificera en korrekt sökväg till datamappen", "Check the value of \"datadirectory\" in your configuration" : "Kontrollera värdet av \"datakatalog\" i din konfiguration", "Your data directory is invalid" : "Din datamapp är ogiltig", - "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Säkerställ att du har filen \".ocdata\" i huvudkatalogen för dina data.", + "Ensure there is a file called \".ocdata\" in the root of the data directory." : "Säkerställ att du har filen \".ocdata\" i huvudkatalogen för din data.", "Action \"%s\" not supported or implemented." : "Åtgärd \"%s\" stöds inte eller är inte implementerad.", "Authentication failed, wrong token or provider ID given" : "Autentisering misslyckades, felaktig token eller leverantörs-ID", "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Parametrar saknas för att slutföra förfrågan. Saknade parametrar: \"%s\"", @@ -221,8 +229,15 @@ "Storage connection error. %s" : "Lagringsutrymme lyckas inte ansluta. %s", "Storage is temporarily not available" : "Lagringsutrymme är för tillfället inte tillgängligt", "Storage connection timeout. %s" : "Lagringsutrymme lyckas inte ansluta \"timeout\". %s", - "Following databases are supported: %s" : "Följande databastyper stöds: %s", - "Following platforms are supported: %s" : "Följande plattformar stöds: %s", - "Invalid Federated Cloud ID" : "Ogiltigt federerat moln-ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "Detta kan vanligtvis åtgärdas genom att ge webservern skrivåtkomst till config-katalogen", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Eller, om du föredrar att behålla config.php skrivskyddad, sätt alternativet \"config_is_read_only\" till true i den.", + "Can't create or write into the data directory %s" : "Kan inte skapa eller skriva till data-katalogen %s", + "Invalid Federated Cloud ID" : "Ogiltigt federerat moln-ID", + "Can’t increase permissions of %s" : "Kan inte öka rättigheterna för %s", + "Files can’t be shared with delete permissions" : "Filer kan inte delas med borttagningsrättigheter", + "Files can’t be shared with create permissions" : "Filer kan inte delas med rättigheter att skapa", + "Can’t set expiration date more than %s days in the future" : "Kan inte sätta utgångsdatum mer än %s dagar framåt", + "Can't read file" : "Kan inte läsa filen", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att ge webbservern skrivrättigheter till applikationskatalogen eller stänga av app-butiken i konfigurationsfilen." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/lib/l10n/th.js b/lib/l10n/th.js index b289cdf0433..8bfc7b26c91 100644 --- a/lib/l10n/th.js +++ b/lib/l10n/th.js @@ -1,36 +1,42 @@ OC.L10N.register( "lib", { - "Cannot write into \"config\" directory!" : "ไม่สามารถเขียนลงในไดเรกทอรี \"การตั้งค่า\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "นี้จะสามารถแก้ไขได้โดยให้สิทธิ์การเขียนของเว็บเซิร์ฟเวอร์ไปยังการตั้งค่าไดเรกทอรี", - "See %s" : "เห็น %s", + "Cannot write into \"config\" directory!" : "ไม่สามารถเขียนลงในไดเรกทอรี \"config\"!", + "See %s" : "ดู %s", "Sample configuration detected" : "ตรวจพบการกำหนดค่าตัวอย่าง", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "ตรวจพบว่าการกำหนดค่าตัวอย่างที่ถูกคัดลอก นี้สามารถทำลายการติดตั้งของคุณและไม่ได้รับการสนับสนุน โปรดอ่านเอกสารก่อนที่จะดำเนินการเปลี่ยนแปลงใน config.php", "PHP %s or higher is required." : "จำเป็นต้องมี PHP รุ่น %s หรือที่สูงกว่า ", - "PHP with a version lower than %s is required." : "รุ่น PHP ของคุณต่ำกว่า %s", - "%sbit or higher PHP required." : "%sบิต หรือ PHP จะต้องเป็นรุ่นสูงกว่าที่กำหนด", + "PHP with a version lower than %s is required." : "จำเป็นต้องมี PHP รุ่นต่ำกว่า %s", + "%sbit or higher PHP required." : "จำเป็นต้องมี PHP %s บิตหรือสูงกว่า", "The command line tool %s could not be found" : "ไม่พบเครื่องมือบรรทัดคำสั่ง %s ", "The library %s is not available." : "ไลบรารี %s ไม่สามารถใช้ได้", "Authentication" : "รับรองความถูกต้อง", "Unknown filetype" : "ไม่รู้จักชนิดของไฟล์", "Invalid image" : "รูปภาพไม่ถูกต้อง", "today" : "วันนี้", + "tomorrow" : "พรุ่งนี้", "yesterday" : "เมื่อวานนี้", + "_in %n day_::_in %n days_" : ["ใน %n วัน"], "_%n day ago_::_%n days ago_" : ["%n วันที่ผ่านมา"], + "next month" : "เดือนถัดไป", "last month" : "เดือนที่แล้ว", + "_in %n month_::_in %n months_" : ["ใน %n เดือน"], "_%n month ago_::_%n months ago_" : ["%n เดือนที่ผ่านมา"], + "next year" : "ปีถัดไป", "last year" : "ปีที่แล้ว", "_%n year ago_::_%n years ago_" : ["%n ปีที่ผ่านมา"], "_%n hour ago_::_%n hours ago_" : ["%n ชั่วโมงที่ผ่านมา"], "_%n minute ago_::_%n minutes ago_" : ["%n นาทีที่ผ่านมา"], + "in a few seconds" : "ในไม่กี่วินาที", "seconds ago" : "วินาที ก่อนหน้านี้", + "Empty file" : "ไฟล์ว่าง", "File name is a reserved word" : "ชื่อแฟ้มเป็นคำสงวน", "File name contains at least one invalid character" : "ชื่อแฟ้มมีหนึ่งตัวอักษรที่ไม่ถูกต้อง", "File name is too long" : "ชื่อแฟ้มยาวเกินไป", "Dot files are not allowed" : "ชื่อไฟล์ห้ามมีจุด", "Empty filename is not allowed" : "ชื่อไฟล์ห้ามว่างเปล่า", "App \"%s\" cannot be installed because appinfo file cannot be read." : "แอพฯ \"%s\" ไม่สามารถติดตั้งได้เพราะไฟล์ appInfo ไม่สามารถอ่านได้", - "__language_name__" : "ภาษาไทย - Thai languages", + "__language_name__" : "ภาษาไทย - Thai", "Help" : "ช่วยเหลือ", "Apps" : "แอปฯ", "Settings" : "ตั้งค่า", @@ -50,7 +56,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "กรุณาลบการตั้งค่า open_basedir ภายใน php.ini ของหรือเปลี่ยนไปใช้ PHP รุ่น 64 บิตแทน", "Set an admin username." : "ตั้งค่าชื่อผู้ดูแลระบบ", "Set an admin password." : "ตั้งค่ารหัสผ่านผู้ดูแลระบบ", - "Can't create or write into the data directory %s" : "ไม่สามารถสร้างหรือเขียนลงในข้อมูลไดเรกทอรี %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "การแชร์แบ็กเอนด์ %s ต้องใช้อินเตอร์เฟซ OCP\\Share_Backend", "Sharing backend %s not found" : "ไม่พบการแชร์แบ็กเอนด์ %s", "Sharing backend for %s not found" : "ไม่พบการแชร์แบ็กเอนด์สำหรับ %s", @@ -103,19 +108,20 @@ OC.L10N.register( "Nov." : "พ.ย.", "Dec." : "ธ.ค.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "ชื่อผู้ใช้จะใช้ได้แค่อักษรดังต่อไปนี้: \"a-z\", \"A-Z\", \"0-9\" และ \"_.@-'\"", - "A valid username must be provided" : "จะต้องระบุชื่อผู้ใช้ที่ถูกต้อง", - "A valid password must be provided" : "รหัสผ่านที่ถูกต้องจะต้องให้", - "The username is already being used" : "มีคนใช้ชื่อผู้ใช้นี้ไปแล้ว", + "A valid username must be provided" : "ต้องระบุชื่อผู้ใช้ที่ถูกต้อง", + "A valid password must be provided" : "ต้องระบุรหัสผ่านที่ถูกต้อง", + "The username is already being used" : "ชื่อผู้ใช้นี้ถูกใช้ไปแล้ว", + "a safe home for all your data" : "บ้านที่ปลอดภัยสำหรับข้อมูลของคุณ", "File is currently busy, please try again later" : "ขณะนี้ไฟล์กำลังใช้งานอยู่ โปรดลองอีกครั้งในภายหลัง", - "Can't read file" : "ไม่สามารถอ่านไฟล์", + "Cannot read file" : "ไม่สามารถอ่านไฟล์", "Application is not enabled" : "แอพพลิเคชั่นดังกล่าวยังไม่ได้เปิดใช้งาน", "Authentication error" : "เกิดข้อผิดพลาดในสิทธิ์การเข้าใช้งาน", - "Token expired. Please reload page." : "รหัสยืนยันความถูกต้องหมดอายุแล้ว กรุณาโหลดหน้าเว็บใหม่อีกครั้ง", + "Token expired. Please reload page." : "รหัสยืนยันความถูกต้องหมดอายุ กรุณาโหลดหน้าเว็บใหม่", "No database drivers (sqlite, mysql, or postgresql) installed." : "ไม่มีไดรเวอร์ฐานข้อมูล (sqlite, mysql, or postgresql) ที่ถูกติดตั้ง", - "Cannot write into \"config\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"การตั้งค่า\"", - "Cannot write into \"apps\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"แอพฯ\"", - "Setting locale to %s failed" : "ตั้งค่าต้นทาง %s ล้มเหลว", - "Please install one of these locales on your system and restart your webserver." : "กรุณาติดตั้งหนึ่งในต้นทางเหล่านี้บนระบบของคุณและเริ่มต้นเว็บเซิร์ฟเวอร์ของคุณ", + "Cannot write into \"config\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"config\"", + "Cannot write into \"apps\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"apps\"", + "Setting locale to %s failed" : "ตั้งค่าตำแหน่งที่ตั้งเป็น %s ล้มเหลว", + "Please install one of these locales on your system and restart your webserver." : "กรุณาติดตั้งหนึ่งในตำแหน่งที่ตั้งเหล่านี้บนระบบของคุณ และเริ่มต้นเว็บเซิร์ฟเวอร์ของคุณใหม่", "PHP module %s not installed." : "โมดูล PHP %s ไม่ได้ถูกติดตั้ง", "Please ask your server administrator to install the module." : "โปรดสอบถามผู้ดูแลระบบเซิร์ฟเวอร์ของคุณเพื่อติดตั้งโมดูล", "PHP setting \"%s\" is not set to \"%s\"." : "การตั้งค่า PHP \"%s\" ไม่ได้ตั้งค่าเป็น \"%s\"", @@ -127,16 +133,18 @@ OC.L10N.register( "PHP modules have been installed, but they are still listed as missing?" : "โมดูล PHP ได้รับการติดตั้ง แต่พวกเขาไม่ได้ระบุไว้หรือมันอาจหายไป?", "Please ask your server administrator to restart the web server." : "โปรดสอบถามผู้ดูแลระบบเซิร์ฟเวอร์ของคุณเพื่อเริ่มการทำงานของเว็บเซิร์ฟเวอร์", "PostgreSQL >= 9 required" : "จำเป็นต้องใช้ PostgreSQL รุ่น >= 9", - "Please upgrade your database version" : "กรุณาอัพเดทฐานข้อมูลของคุณ", + "Please upgrade your database version" : "กรุณาอัปเดตฐานข้อมูลของคุณ", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "กรุณาเปลี่ยนสิทธิ์การเข้าถึงเป็น 0770 เพื่อให้ไดเรกทอรีไม่สามารถแก้ไขโดยผู้ใช้อื่น", "Check the value of \"datadirectory\" in your configuration" : "ตรวจสอบค่าของ \"datadirectory\" ในการกำหนดค่าของคุณ", "Could not obtain lock type %d on \"%s\"." : "ไม่สามารถรับล็อคชนิด %d บน \"%s\"", "Storage unauthorized. %s" : "การจัดเก็บข้อมูลไม่ได้รับอนุญาต %s", - "Storage incomplete configuration. %s" : "การตั้งค่าการจัดเก็บข้อมูลไม่สำเร็จ %s", + "Storage incomplete configuration. %s" : "การตั้งค่าการจัดเก็บข้อมูลไม่ครบ %s", "Storage connection error. %s" : "ข้อผิดพลาดการเชื่อมต่อพื้นที่จัดเก็บข้อมูล %s", + "Storage is temporarily not available" : "พื้นที่จัดเก็บข้อมูลไม่สามารถใช้งานได้ชั่วคราว", "Storage connection timeout. %s" : "หมดเวลาการเชื่อมต่อพื้นที่จัดเก็บข้อมูล %s", - "Following databases are supported: %s" : "ฐานข้อมูลต่อไปนี้ได้รับการสนับสนุน: %s", - "Following platforms are supported: %s" : "แพลตฟอร์มต่อไปนี้ได้รับการสนับสนุน: %s", - "Invalid Federated Cloud ID" : "ไอดีคลาวด์ในเครือไม่ถูกต้อง" + "This can usually be fixed by giving the webserver write access to the config directory" : "นี้จะสามารถแก้ไขได้โดยให้สิทธิ์การเขียนของเว็บเซิร์ฟเวอร์ไปยังการตั้งค่าไดเรกทอรี", + "Can't create or write into the data directory %s" : "ไม่สามารถสร้างหรือเขียนลงในข้อมูลไดเรกทอรี %s", + "Invalid Federated Cloud ID" : "ไอดีคลาวด์ในเครือไม่ถูกต้อง", + "Can't read file" : "ไม่สามารถอ่านไฟล์" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/th.json b/lib/l10n/th.json index a8b03bb076a..f7b28d02285 100644 --- a/lib/l10n/th.json +++ b/lib/l10n/th.json @@ -1,34 +1,40 @@ { "translations": { - "Cannot write into \"config\" directory!" : "ไม่สามารถเขียนลงในไดเรกทอรี \"การตั้งค่า\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "นี้จะสามารถแก้ไขได้โดยให้สิทธิ์การเขียนของเว็บเซิร์ฟเวอร์ไปยังการตั้งค่าไดเรกทอรี", - "See %s" : "เห็น %s", + "Cannot write into \"config\" directory!" : "ไม่สามารถเขียนลงในไดเรกทอรี \"config\"!", + "See %s" : "ดู %s", "Sample configuration detected" : "ตรวจพบการกำหนดค่าตัวอย่าง", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "ตรวจพบว่าการกำหนดค่าตัวอย่างที่ถูกคัดลอก นี้สามารถทำลายการติดตั้งของคุณและไม่ได้รับการสนับสนุน โปรดอ่านเอกสารก่อนที่จะดำเนินการเปลี่ยนแปลงใน config.php", "PHP %s or higher is required." : "จำเป็นต้องมี PHP รุ่น %s หรือที่สูงกว่า ", - "PHP with a version lower than %s is required." : "รุ่น PHP ของคุณต่ำกว่า %s", - "%sbit or higher PHP required." : "%sบิต หรือ PHP จะต้องเป็นรุ่นสูงกว่าที่กำหนด", + "PHP with a version lower than %s is required." : "จำเป็นต้องมี PHP รุ่นต่ำกว่า %s", + "%sbit or higher PHP required." : "จำเป็นต้องมี PHP %s บิตหรือสูงกว่า", "The command line tool %s could not be found" : "ไม่พบเครื่องมือบรรทัดคำสั่ง %s ", "The library %s is not available." : "ไลบรารี %s ไม่สามารถใช้ได้", "Authentication" : "รับรองความถูกต้อง", "Unknown filetype" : "ไม่รู้จักชนิดของไฟล์", "Invalid image" : "รูปภาพไม่ถูกต้อง", "today" : "วันนี้", + "tomorrow" : "พรุ่งนี้", "yesterday" : "เมื่อวานนี้", + "_in %n day_::_in %n days_" : ["ใน %n วัน"], "_%n day ago_::_%n days ago_" : ["%n วันที่ผ่านมา"], + "next month" : "เดือนถัดไป", "last month" : "เดือนที่แล้ว", + "_in %n month_::_in %n months_" : ["ใน %n เดือน"], "_%n month ago_::_%n months ago_" : ["%n เดือนที่ผ่านมา"], + "next year" : "ปีถัดไป", "last year" : "ปีที่แล้ว", "_%n year ago_::_%n years ago_" : ["%n ปีที่ผ่านมา"], "_%n hour ago_::_%n hours ago_" : ["%n ชั่วโมงที่ผ่านมา"], "_%n minute ago_::_%n minutes ago_" : ["%n นาทีที่ผ่านมา"], + "in a few seconds" : "ในไม่กี่วินาที", "seconds ago" : "วินาที ก่อนหน้านี้", + "Empty file" : "ไฟล์ว่าง", "File name is a reserved word" : "ชื่อแฟ้มเป็นคำสงวน", "File name contains at least one invalid character" : "ชื่อแฟ้มมีหนึ่งตัวอักษรที่ไม่ถูกต้อง", "File name is too long" : "ชื่อแฟ้มยาวเกินไป", "Dot files are not allowed" : "ชื่อไฟล์ห้ามมีจุด", "Empty filename is not allowed" : "ชื่อไฟล์ห้ามว่างเปล่า", "App \"%s\" cannot be installed because appinfo file cannot be read." : "แอพฯ \"%s\" ไม่สามารถติดตั้งได้เพราะไฟล์ appInfo ไม่สามารถอ่านได้", - "__language_name__" : "ภาษาไทย - Thai languages", + "__language_name__" : "ภาษาไทย - Thai", "Help" : "ช่วยเหลือ", "Apps" : "แอปฯ", "Settings" : "ตั้งค่า", @@ -48,7 +54,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "กรุณาลบการตั้งค่า open_basedir ภายใน php.ini ของหรือเปลี่ยนไปใช้ PHP รุ่น 64 บิตแทน", "Set an admin username." : "ตั้งค่าชื่อผู้ดูแลระบบ", "Set an admin password." : "ตั้งค่ารหัสผ่านผู้ดูแลระบบ", - "Can't create or write into the data directory %s" : "ไม่สามารถสร้างหรือเขียนลงในข้อมูลไดเรกทอรี %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "การแชร์แบ็กเอนด์ %s ต้องใช้อินเตอร์เฟซ OCP\\Share_Backend", "Sharing backend %s not found" : "ไม่พบการแชร์แบ็กเอนด์ %s", "Sharing backend for %s not found" : "ไม่พบการแชร์แบ็กเอนด์สำหรับ %s", @@ -101,19 +106,20 @@ "Nov." : "พ.ย.", "Dec." : "ธ.ค.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "ชื่อผู้ใช้จะใช้ได้แค่อักษรดังต่อไปนี้: \"a-z\", \"A-Z\", \"0-9\" และ \"_.@-'\"", - "A valid username must be provided" : "จะต้องระบุชื่อผู้ใช้ที่ถูกต้อง", - "A valid password must be provided" : "รหัสผ่านที่ถูกต้องจะต้องให้", - "The username is already being used" : "มีคนใช้ชื่อผู้ใช้นี้ไปแล้ว", + "A valid username must be provided" : "ต้องระบุชื่อผู้ใช้ที่ถูกต้อง", + "A valid password must be provided" : "ต้องระบุรหัสผ่านที่ถูกต้อง", + "The username is already being used" : "ชื่อผู้ใช้นี้ถูกใช้ไปแล้ว", + "a safe home for all your data" : "บ้านที่ปลอดภัยสำหรับข้อมูลของคุณ", "File is currently busy, please try again later" : "ขณะนี้ไฟล์กำลังใช้งานอยู่ โปรดลองอีกครั้งในภายหลัง", - "Can't read file" : "ไม่สามารถอ่านไฟล์", + "Cannot read file" : "ไม่สามารถอ่านไฟล์", "Application is not enabled" : "แอพพลิเคชั่นดังกล่าวยังไม่ได้เปิดใช้งาน", "Authentication error" : "เกิดข้อผิดพลาดในสิทธิ์การเข้าใช้งาน", - "Token expired. Please reload page." : "รหัสยืนยันความถูกต้องหมดอายุแล้ว กรุณาโหลดหน้าเว็บใหม่อีกครั้ง", + "Token expired. Please reload page." : "รหัสยืนยันความถูกต้องหมดอายุ กรุณาโหลดหน้าเว็บใหม่", "No database drivers (sqlite, mysql, or postgresql) installed." : "ไม่มีไดรเวอร์ฐานข้อมูล (sqlite, mysql, or postgresql) ที่ถูกติดตั้ง", - "Cannot write into \"config\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"การตั้งค่า\"", - "Cannot write into \"apps\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"แอพฯ\"", - "Setting locale to %s failed" : "ตั้งค่าต้นทาง %s ล้มเหลว", - "Please install one of these locales on your system and restart your webserver." : "กรุณาติดตั้งหนึ่งในต้นทางเหล่านี้บนระบบของคุณและเริ่มต้นเว็บเซิร์ฟเวอร์ของคุณ", + "Cannot write into \"config\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"config\"", + "Cannot write into \"apps\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"apps\"", + "Setting locale to %s failed" : "ตั้งค่าตำแหน่งที่ตั้งเป็น %s ล้มเหลว", + "Please install one of these locales on your system and restart your webserver." : "กรุณาติดตั้งหนึ่งในตำแหน่งที่ตั้งเหล่านี้บนระบบของคุณ และเริ่มต้นเว็บเซิร์ฟเวอร์ของคุณใหม่", "PHP module %s not installed." : "โมดูล PHP %s ไม่ได้ถูกติดตั้ง", "Please ask your server administrator to install the module." : "โปรดสอบถามผู้ดูแลระบบเซิร์ฟเวอร์ของคุณเพื่อติดตั้งโมดูล", "PHP setting \"%s\" is not set to \"%s\"." : "การตั้งค่า PHP \"%s\" ไม่ได้ตั้งค่าเป็น \"%s\"", @@ -125,16 +131,18 @@ "PHP modules have been installed, but they are still listed as missing?" : "โมดูล PHP ได้รับการติดตั้ง แต่พวกเขาไม่ได้ระบุไว้หรือมันอาจหายไป?", "Please ask your server administrator to restart the web server." : "โปรดสอบถามผู้ดูแลระบบเซิร์ฟเวอร์ของคุณเพื่อเริ่มการทำงานของเว็บเซิร์ฟเวอร์", "PostgreSQL >= 9 required" : "จำเป็นต้องใช้ PostgreSQL รุ่น >= 9", - "Please upgrade your database version" : "กรุณาอัพเดทฐานข้อมูลของคุณ", + "Please upgrade your database version" : "กรุณาอัปเดตฐานข้อมูลของคุณ", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "กรุณาเปลี่ยนสิทธิ์การเข้าถึงเป็น 0770 เพื่อให้ไดเรกทอรีไม่สามารถแก้ไขโดยผู้ใช้อื่น", "Check the value of \"datadirectory\" in your configuration" : "ตรวจสอบค่าของ \"datadirectory\" ในการกำหนดค่าของคุณ", "Could not obtain lock type %d on \"%s\"." : "ไม่สามารถรับล็อคชนิด %d บน \"%s\"", "Storage unauthorized. %s" : "การจัดเก็บข้อมูลไม่ได้รับอนุญาต %s", - "Storage incomplete configuration. %s" : "การตั้งค่าการจัดเก็บข้อมูลไม่สำเร็จ %s", + "Storage incomplete configuration. %s" : "การตั้งค่าการจัดเก็บข้อมูลไม่ครบ %s", "Storage connection error. %s" : "ข้อผิดพลาดการเชื่อมต่อพื้นที่จัดเก็บข้อมูล %s", + "Storage is temporarily not available" : "พื้นที่จัดเก็บข้อมูลไม่สามารถใช้งานได้ชั่วคราว", "Storage connection timeout. %s" : "หมดเวลาการเชื่อมต่อพื้นที่จัดเก็บข้อมูล %s", - "Following databases are supported: %s" : "ฐานข้อมูลต่อไปนี้ได้รับการสนับสนุน: %s", - "Following platforms are supported: %s" : "แพลตฟอร์มต่อไปนี้ได้รับการสนับสนุน: %s", - "Invalid Federated Cloud ID" : "ไอดีคลาวด์ในเครือไม่ถูกต้อง" + "This can usually be fixed by giving the webserver write access to the config directory" : "นี้จะสามารถแก้ไขได้โดยให้สิทธิ์การเขียนของเว็บเซิร์ฟเวอร์ไปยังการตั้งค่าไดเรกทอรี", + "Can't create or write into the data directory %s" : "ไม่สามารถสร้างหรือเขียนลงในข้อมูลไดเรกทอรี %s", + "Invalid Federated Cloud ID" : "ไอดีคลาวด์ในเครือไม่ถูกต้อง", + "Can't read file" : "ไม่สามารถอ่านไฟล์" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js index 0bc65aab382..3ab87b16b56 100644 --- a/lib/l10n/tr.js +++ b/lib/l10n/tr.js @@ -2,20 +2,23 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "\"config\" klasörüne yazılamadı!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", - "See %s" : "Şuraya bakın: %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın. %s bölümüne bakabilirsiniz", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ama config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", + "See %s" : "Şuraya bakın: %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "%1$s uygulamasının dosyaları doğru şekilde değiştirilmedi. Sunucu ile uyumlu dosyaların yüklü olduğundan emin olun.", "Sample configuration detected" : "Örnek yapılandırma algılandı", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Örnek yapılandırmanın kopyalanmış olabileceği tespit edildi. Bu durum kurulumunuzu bozabilir ve desteklenmez. Lütfen config.php dosyasında değişiklik yapmadan önce belgeleri okuyun", + "%s email verification" : "%s e-posta doğrulaması", + "Email verification" : "E-posta doğrulaması", + "Click the following button to confirm your email." : "E-posta adresinizi doğrulamak için aşağıdaki düğmeye tıklayın.", + "Click the following link to confirm your email." : "E-posta adresinizi doğrulamak için aşağıdaki bağlantıya tıklayın", + "Confirm your email" : "E-posta adresinizi doğrulayın", "Other activities" : "Diğer işlemler", "%1$s and %2$s" : "%1$s ve %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s ve %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s ve %4$s", "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s ve %5$s", - "Education Edition" : "Eğitim Sürümü", + "Education Edition" : "Eğitim sürümü", "Enterprise bundle" : "Kurumsal paket", "Groupware bundle" : "Grup çalışması paketi", "Hub bundle" : "Toplayıcı paketi", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "Şu platformlar destekleniyor: %s", "Server version %s or higher is required." : "Sunucu %s ya da daha sonraki bir sürüm olmalıdır.", "Server version %s or lower is required." : "Sunucu %s ya da daha önceki bir sürüm olmalıdır.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Oturum açmış kullanıcı bir yönetici, bir alt yönetici veya bu ayara erişmek için özel izne sahip olmalıdır", "Logged in user must be an admin or sub admin" : "Oturum açmış kullanıcı bir yönetici ya da alt yönetici olmalıdır", "Logged in user must be an admin" : "Oturum açmış kullanıcı bir yönetici olmalıdır", "Wiping of device %s has started" : "%s aygıtının silinmesine başlandı", @@ -46,10 +50,11 @@ OC.L10N.register( "A remote wipe was started on device %s" : "%s aygıtı üzerinde bir uzaktan silme işlemi başlatıldı", "Remote wipe finished" : "Uzaktan silme tamamlandı", "The remote wipe on %s has finished" : "%s üzerindeki uzaktan silme işlemi tamamlandı", - "Authentication" : "Kimlik Doğrulama", - "Unknown filetype" : "Dosya türü bilinmiyor", + "Authentication" : "Kimlik doğrulama", + "Unknown filetype" : "Dosya türü bilinmiyor", "Invalid image" : "Görsel geçersiz", "Avatar image is not square" : "Avatar görseli kare değil", + "View profile" : "Profili görüntüle", "today" : "bugün", "tomorrow" : "yarın", "yesterday" : "dün", @@ -72,55 +77,72 @@ OC.L10N.register( "Empty file" : "Dosya boş", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "%s kodlu modül bulunamadı. Lütfen uygulamalarınız içinden modülü etkinleştirin ya da BT yöneticinizle görüşün.", "File already exists" : "Dosya zaten var", + "Invalid path" : "Yol geçersiz", "Failed to create file from template" : "Kalıptan dosya oluşturulamadı", "Templates" : "Kalıplar", - "File name is a reserved word" : "Bu dosya adı sistem kullanıma ayrılmıştır", - "File name contains at least one invalid character" : "Dosya adında en az bir geçersiz karakter var", + "File name is a reserved word" : "Bu dosya adı sistem kullanıma ayrılmıştır", + "File name contains at least one invalid character" : "Dosya adında en az bir geçersiz karakter var", "File name is too long" : "Dosya adı çok uzun", "Dot files are not allowed" : "Nokta dosyalarına izin verilmiyor", "Empty filename is not allowed" : "Boş dosya adına izin verilmiyor", "App \"%s\" cannot be installed because appinfo file cannot be read." : "appinfo dosyası okunamadığından \"%s\" uygulaması kurulamaz.", - "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "\"%s\" uygulaması sunucu sürümüyle uyumlu olmadığından kurulamaz.", + "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "\"%s\" uygulaması sunucu sürümüyle uyumlu olmadığından kurulamaz.", "__language_name__" : "Türkçe", "This is an automatically sent email, please do not reply." : "Bu ileti otomatik olarak gönderildiğinden lütfen yanıtlamayın.", "Help" : "Yardım", "Apps" : "Uygulamalar", "Settings" : "Ayarlar", - "Log out" : "Oturumu Kapat", + "Log out" : "Oturumu kapat", "Users" : "Kullanıcılar", + "Email" : "E-posta", + "Mail %s" : "E-posta gönder: %s", + "Phone" : "Telefon", + "Call %s" : "Ara: %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Twitter üzerinde bak: %s", + "Website" : "Web sitesi", + "Visit %s" : "Web sitesini aç: %s", + "Address" : "Adres", + "Avatar" : "Avatar", + "About" : "Hakkında", + "Full name" : "Tam ad", + "Headline" : "Başlık", + "Organisation" : "Kuruluş", + "Role" : "Pozisyon", "Unknown user" : "Kullanıcı bilinmiyor", "Additional settings" : "Ek ayarlar", "%s enter the database username and name." : "%s veritabanı adını ve kullanıcı adını yazın.", - "%s enter the database username." : "%s veritabanı kullanıcı adını yazın.", - "%s enter the database name." : "%s veritabanı adını yazın.", + "%s enter the database username." : "%s veritabanı kullanıcı adını yazın.", + "%s enter the database name." : "%s veritabanı adını yazın.", "%s you may not use dots in the database name" : "%s veritabanı adında nokta kullanamayabilirsiniz", "MySQL username and/or password not valid" : "MySQL kullanıcı adı ya da parolası geçersiz", "You need to enter details of an existing account." : "Var olan bir hesabın bilgilerini yazmalısınız.", "Oracle connection could not be established" : "Oracle ile bağlantı kurulamadı", - "Oracle username and/or password not valid" : "Oracle kullanıcı adı ya da parolası geçersiz", - "PostgreSQL username and/or password not valid" : "PostgreSQL kullanıcı adı ya da parolası geçersiz", - "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X desteklenmiyor ve %s bu platformda düzgün çalışmayacak. Kullanmaktan doğacak riskler size aittir!", + "Oracle username and/or password not valid" : "Oracle kullanıcı adı ya da parolası geçersiz", + "PostgreSQL username and/or password not valid" : "PostgreSQL kullanıcı adı ya da parolası geçersiz", + "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X desteklenmiyor ve %s bu platformda düzgün çalışmayacak. Kullanmaktan doğacak riskler size aittir!", "For the best results, please consider using a GNU/Linux server instead." : "En iyi sonucu almak için GNU/Linux sunucusu kullanın.", "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Bu %s kopyası 32 bit PHP ortamında çalıştırılıyor ve open_basedir seçeneği php.ini dosyasından ayarlanmış gibi görünüyor. Bu yapılandırma 4 GB boyutundan büyük dosyalarda sorun çıkarır ve kullanılması önerilmez.", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Lütfen php.ini dosyasındaki open_basedir ayarını kaldırın ya da 64-bit PHP sürümüne geçin.", "Set an admin username." : "Bir yönetici kullanıcı adı yazın.", - "Set an admin password." : "Bir yönetici parolası yazın.", - "Can't create or write into the data directory %s" : "%s veri klasörü oluşturulamadı ya da içine yazılamadı", + "Set an admin password." : "Bir yönetici parolası yazın.", + "Cannot create or write into the data directory %s" : "%s veri klasörü oluşturulamadı ya da içine yazılamadı", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Paylaşım arka ucu %s OCP\\Share_Backend arayüzünü desteklemeli", "Sharing backend %s not found" : "%s paylaşım arka ucu bulunamadı", "Sharing backend for %s not found" : "%s için paylaşım arka ucu bulunamadı", "%1$s shared »%2$s« with you and wants to add:" : "%1$s sizinle »%2$s« ögesini paylaştı ve eklemenizi istiyor:", "%1$s shared »%2$s« with you and wants to add" : "%1$s sizinle »%2$s« ögesini paylaştı ve eklemenizi istiyor", "»%s« added a note to a file shared with you" : "»%s« sizinle paylaştığı bir dosyaya bir not ekledi", - "Open »%s«" : "»%s« Aç", + "Open »%s«" : "»%s« aç", "%1$s via %2$s" : "%1$s, %2$s aracılığıyla", "You are not allowed to share %s" : "%s ögesini paylaşma izniniz yok", - "Can’t increase permissions of %s" : "%s izinleri arttırılamadı", - "Files can’t be shared with delete permissions" : "Silme izni ile dosya paylaşılamaz", - "Files can’t be shared with create permissions" : "Ekleme izni ile dosya paylaşılamaz", + "Cannot increase permissions of %s" : "%s izinleri yükseltilemedi", + "Files cannot be shared with delete permissions" : "Silme izni ile dosya paylaşılamaz", + "Files cannot be shared with create permissions" : "Ekleme izni ile dosya paylaşılamaz", "Expiration date is in the past" : "Son kullanma tarihi geçmişte", - "Can’t set expiration date more than %s days in the future" : "Son kullanma tarihi %sgünden sonrası olarak ayarlanamaz", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Paylaşımların son kullanım süreleri, gelecekte %n günden fazla olamaz","Paylaşımların son kullanım süreleri, gelecekte %n günden fazla olamaz"], "Sharing is only allowed with group members" : "Paylaşım yalnız grup üyeleri ile yapılabilir", + "Sharing %s failed, because this item is already shared with user %s" : "%s paylaşılamadı. Bu öge zaten %s kullanıcısı ile paylaşılmış", "%1$s shared »%2$s« with you" : "%1$s, sizinle »%2$s« ögesini paylaştı", "%1$s shared »%2$s« with you." : "%1$s, sizinle »%2$s« ögesini paylaştı.", "Click the button below to open it." : "Açmak için aşağıdaki düğmeye tıklayın.", @@ -157,8 +179,8 @@ OC.L10N.register( "August" : "Ağustos", "September" : "Eylül", "October" : "Ekim", - "November" : "Kası", - "December" : "Aralı", + "November" : "Kasım", + "December" : "Aralık", "Jan." : "Oca", "Feb." : "Şub", "Mar." : "Mar", @@ -173,38 +195,39 @@ OC.L10N.register( "Dec." : "Ara", "The user limit has been reached and the user was not created." : "Kullanıcı sayısı sınırına ulaşıldığından kullanıcı eklenemedi.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Kullanıcı adında yalnız şu karakterler kullanılabilir: \"a-z\", \"A-Z\", \"0-9\", ve \"_.@-'\"", - "A valid username must be provided" : "Geçerli bir kullanıcı adı yazmalısınız", - "Username contains whitespace at the beginning or at the end" : "Kullanıcı adının başı ya da sonunda boşluk var", + "A valid username must be provided" : "Geçerli bir kullanıcı adı yazmalısınız", + "Username contains whitespace at the beginning or at the end" : "Kullanıcı adının başı ya da sonunda boşluk var", "Username must not consist of dots only" : "Kullanıcı adı yalnız noktalardan oluşamaz", "Username is invalid because files already exist for this user" : "Kullanıcı adı geçersiz, bu kullanıcı için zaten bazı dosyalar var", - "A valid password must be provided" : "Geçerli bir parola yazmalısınız", - "The username is already being used" : "Bu kullanıcı adı zaten var", + "A valid password must be provided" : "Geçerli bir parola yazmalısınız", + "The username is already being used" : "Bu kullanıcı adı zaten var", "Could not create user" : "Kullanıcı oluşturulamadı", "User disabled" : "Kullanıcı devre dışı", "Login canceled by app" : "Oturum açma uygulama tarafından iptal edildi", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "\"%1$s\" uygulaması, şu gereklilikler sağlanmadığı için kurulamıyor: %2$s", "a safe home for all your data" : "verileriniz için güvenli bir barınak", "File is currently busy, please try again later" : "Dosya şu anda meşgul, lütfen daha sonra deneyin", - "Can't read file" : "Dosya okunamadı", - "Application is not enabled" : "Uygulama etkinleştirilmemiş", + "Cannot read file" : "Dosya okunamadı", + "Application is not enabled" : "Uygulama etkinleştirilmemiş", "Authentication error" : "Kimlik doğrulama sorunu", "Token expired. Please reload page." : "Kodun süresi dolmuş. Lütfen sayfayı yenileyin.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Herhangi bir veritabanı sürücüsü (sqlite, mysql ya da postgresql) kurulmamış.", "Cannot write into \"config\" directory" : "\"config\" klasörüne yazılamıyor", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir. %s bölümüne bakın", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın. %s bölümüne bakabilirsiniz", "Cannot write into \"apps\" directory" : "\"apps\" klasörüne yazılamıyor", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından uygulama mağazasını devre dışı bırakılarak çözülebilir.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından Uygulama Mağazası devre dışı bırakılarak çözülebilir.", "Cannot create \"data\" directory" : "\"data\" klasörü oluşturulamadı", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Bu sorun genellikle, web sunucusuna kök klasöre yazma izni verilerek çözülebilir. %s bölümüne bakın", - "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "İzinler genellikle, web sunucusuna kök klasöre yazma izni verilerek düzeltilebilir. %s bölümüne bakın.", - "Setting locale to %s failed" : "Dil %s olarak ayarlanamadı", + "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "İzinler genellikle, web sunucusuna kök klasöre yazma izni verilerek düzeltilebilir. %s bölümüne bakın.", + "Setting locale to %s failed" : "Dil %s olarak ayarlanamadı", "Please install one of these locales on your system and restart your webserver." : "Lütfen bu dillerden birini sisteminize kurun ve web sunucunuzu yeniden başlatın.", "PHP module %s not installed." : "PHP %s modülü kurulmamış.", "Please ask your server administrator to install the module." : "Lütfen modülü kurması için BT yöneticinizle görüşün.", "PHP setting \"%s\" is not set to \"%s\"." : "\"%s\" PHP ayarı \"%s\" olarak ayarlanmamış.", - "Adjusting this setting in php.ini will make Nextcloud run again" : "php.ini dosyasında bu ayar yapıldığında Nextcloud yeniden çalışır", - "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload, beklenen \"0\" değeri yerine \"%s\" olarak ayarlanmış", - "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Bu sorunu çözmek için php.ini dosyasındaki <code>mbstring.func_overload</code> seçeneğini <code>0</code> olarak ayarlayın", + "Adjusting this setting in php.ini will make Nextcloud run again" : "php.ini dosyasında bu ayar yapıldığında Nextcloud yeniden çalışır", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload, beklenen \"0\" değeri yerine \"%s\" olarak ayarlanmış", + "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Bu sorunu çözmek için php.ini dosyasındaki <code>mbstring.func_overload</code> seçeneğini <code>0</code> olarak ayarlayın", "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 sürümü en az 2.7.0 olmalıdır. Şu anda %s kurulu.", "To fix this issue update your libxml2 version and restart your web server." : "Bu sorunu çözmek için libxml2 sürümünüzü güncelleyin ve web sunucusunu yeniden başlatın.", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP girintili doc bloklarını ayıklamak üzere yapılandırılmış gibi görünüyor. Bu durum bazı çekirdek uygulamalarına erişilmesini engelleyecek.", @@ -230,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "Depolama bağlantısı sorunu. %s", "Storage is temporarily not available" : "Depolama geçici olarak kullanılamıyor", "Storage connection timeout. %s" : "Depolama bağlantısı zaman aşımı. %s", - "Following databases are supported: %s" : "Şu veritabanları destekleniyor: %s", - "Following platforms are supported: %s" : "Şu platformlar destekleniyor: %s", - "Invalid Federated Cloud ID" : "Birleşik Bulut Kimliği Geçersiz" + "This can usually be fixed by giving the webserver write access to the config directory" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", + "Can't create or write into the data directory %s" : "%s veri klasörü oluşturulamadı ya da içine yazılamadı", + "Invalid Federated Cloud ID" : "Birleşik bulut kodu geçersiz", + "Can’t increase permissions of %s" : "%s izinleri arttırılamadı", + "Files can’t be shared with delete permissions" : "Silme izni ile dosya paylaşılamaz", + "Files can’t be shared with create permissions" : "Ekleme izni ile dosya paylaşılamaz", + "Can’t set expiration date more than %s days in the future" : "Son kullanma tarihi %sgünden sonrası olarak ayarlanamaz", + "Can't read file" : "Dosya okunamadı", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından uygulama mağazasını devre dışı bırakılarak çözülebilir." }, "nplurals=2; plural=(n > 1);"); diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json index 63f49b9510c..d9a5872404a 100644 --- a/lib/l10n/tr.json +++ b/lib/l10n/tr.json @@ -1,19 +1,22 @@ { "translations": { "Cannot write into \"config\" directory!" : "\"config\" klasörüne yazılamadı!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", - "See %s" : "Şuraya bakın: %s", "This can usually be fixed by giving the webserver write access to the config directory." : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir.", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın. %s bölümüne bakabilirsiniz", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ama config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", + "See %s" : "Şuraya bakın: %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "%1$s uygulamasının dosyaları doğru şekilde değiştirilmedi. Sunucu ile uyumlu dosyaların yüklü olduğundan emin olun.", "Sample configuration detected" : "Örnek yapılandırma algılandı", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Örnek yapılandırmanın kopyalanmış olabileceği tespit edildi. Bu durum kurulumunuzu bozabilir ve desteklenmez. Lütfen config.php dosyasında değişiklik yapmadan önce belgeleri okuyun", + "%s email verification" : "%s e-posta doğrulaması", + "Email verification" : "E-posta doğrulaması", + "Click the following button to confirm your email." : "E-posta adresinizi doğrulamak için aşağıdaki düğmeye tıklayın.", + "Click the following link to confirm your email." : "E-posta adresinizi doğrulamak için aşağıdaki bağlantıya tıklayın", + "Confirm your email" : "E-posta adresinizi doğrulayın", "Other activities" : "Diğer işlemler", "%1$s and %2$s" : "%1$s ve %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s ve %3$s", "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s ve %4$s", "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s ve %5$s", - "Education Edition" : "Eğitim Sürümü", + "Education Edition" : "Eğitim sürümü", "Enterprise bundle" : "Kurumsal paket", "Groupware bundle" : "Grup çalışması paketi", "Hub bundle" : "Toplayıcı paketi", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "Şu platformlar destekleniyor: %s", "Server version %s or higher is required." : "Sunucu %s ya da daha sonraki bir sürüm olmalıdır.", "Server version %s or lower is required." : "Sunucu %s ya da daha önceki bir sürüm olmalıdır.", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "Oturum açmış kullanıcı bir yönetici, bir alt yönetici veya bu ayara erişmek için özel izne sahip olmalıdır", "Logged in user must be an admin or sub admin" : "Oturum açmış kullanıcı bir yönetici ya da alt yönetici olmalıdır", "Logged in user must be an admin" : "Oturum açmış kullanıcı bir yönetici olmalıdır", "Wiping of device %s has started" : "%s aygıtının silinmesine başlandı", @@ -44,10 +48,11 @@ "A remote wipe was started on device %s" : "%s aygıtı üzerinde bir uzaktan silme işlemi başlatıldı", "Remote wipe finished" : "Uzaktan silme tamamlandı", "The remote wipe on %s has finished" : "%s üzerindeki uzaktan silme işlemi tamamlandı", - "Authentication" : "Kimlik Doğrulama", - "Unknown filetype" : "Dosya türü bilinmiyor", + "Authentication" : "Kimlik doğrulama", + "Unknown filetype" : "Dosya türü bilinmiyor", "Invalid image" : "Görsel geçersiz", "Avatar image is not square" : "Avatar görseli kare değil", + "View profile" : "Profili görüntüle", "today" : "bugün", "tomorrow" : "yarın", "yesterday" : "dün", @@ -70,55 +75,72 @@ "Empty file" : "Dosya boş", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "%s kodlu modül bulunamadı. Lütfen uygulamalarınız içinden modülü etkinleştirin ya da BT yöneticinizle görüşün.", "File already exists" : "Dosya zaten var", + "Invalid path" : "Yol geçersiz", "Failed to create file from template" : "Kalıptan dosya oluşturulamadı", "Templates" : "Kalıplar", - "File name is a reserved word" : "Bu dosya adı sistem kullanıma ayrılmıştır", - "File name contains at least one invalid character" : "Dosya adında en az bir geçersiz karakter var", + "File name is a reserved word" : "Bu dosya adı sistem kullanıma ayrılmıştır", + "File name contains at least one invalid character" : "Dosya adında en az bir geçersiz karakter var", "File name is too long" : "Dosya adı çok uzun", "Dot files are not allowed" : "Nokta dosyalarına izin verilmiyor", "Empty filename is not allowed" : "Boş dosya adına izin verilmiyor", "App \"%s\" cannot be installed because appinfo file cannot be read." : "appinfo dosyası okunamadığından \"%s\" uygulaması kurulamaz.", - "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "\"%s\" uygulaması sunucu sürümüyle uyumlu olmadığından kurulamaz.", + "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "\"%s\" uygulaması sunucu sürümüyle uyumlu olmadığından kurulamaz.", "__language_name__" : "Türkçe", "This is an automatically sent email, please do not reply." : "Bu ileti otomatik olarak gönderildiğinden lütfen yanıtlamayın.", "Help" : "Yardım", "Apps" : "Uygulamalar", "Settings" : "Ayarlar", - "Log out" : "Oturumu Kapat", + "Log out" : "Oturumu kapat", "Users" : "Kullanıcılar", + "Email" : "E-posta", + "Mail %s" : "E-posta gönder: %s", + "Phone" : "Telefon", + "Call %s" : "Ara: %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "Twitter üzerinde bak: %s", + "Website" : "Web sitesi", + "Visit %s" : "Web sitesini aç: %s", + "Address" : "Adres", + "Avatar" : "Avatar", + "About" : "Hakkında", + "Full name" : "Tam ad", + "Headline" : "Başlık", + "Organisation" : "Kuruluş", + "Role" : "Pozisyon", "Unknown user" : "Kullanıcı bilinmiyor", "Additional settings" : "Ek ayarlar", "%s enter the database username and name." : "%s veritabanı adını ve kullanıcı adını yazın.", - "%s enter the database username." : "%s veritabanı kullanıcı adını yazın.", - "%s enter the database name." : "%s veritabanı adını yazın.", + "%s enter the database username." : "%s veritabanı kullanıcı adını yazın.", + "%s enter the database name." : "%s veritabanı adını yazın.", "%s you may not use dots in the database name" : "%s veritabanı adında nokta kullanamayabilirsiniz", "MySQL username and/or password not valid" : "MySQL kullanıcı adı ya da parolası geçersiz", "You need to enter details of an existing account." : "Var olan bir hesabın bilgilerini yazmalısınız.", "Oracle connection could not be established" : "Oracle ile bağlantı kurulamadı", - "Oracle username and/or password not valid" : "Oracle kullanıcı adı ya da parolası geçersiz", - "PostgreSQL username and/or password not valid" : "PostgreSQL kullanıcı adı ya da parolası geçersiz", - "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X desteklenmiyor ve %s bu platformda düzgün çalışmayacak. Kullanmaktan doğacak riskler size aittir!", + "Oracle username and/or password not valid" : "Oracle kullanıcı adı ya da parolası geçersiz", + "PostgreSQL username and/or password not valid" : "PostgreSQL kullanıcı adı ya da parolası geçersiz", + "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X desteklenmiyor ve %s bu platformda düzgün çalışmayacak. Kullanmaktan doğacak riskler size aittir!", "For the best results, please consider using a GNU/Linux server instead." : "En iyi sonucu almak için GNU/Linux sunucusu kullanın.", "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Bu %s kopyası 32 bit PHP ortamında çalıştırılıyor ve open_basedir seçeneği php.ini dosyasından ayarlanmış gibi görünüyor. Bu yapılandırma 4 GB boyutundan büyük dosyalarda sorun çıkarır ve kullanılması önerilmez.", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Lütfen php.ini dosyasındaki open_basedir ayarını kaldırın ya da 64-bit PHP sürümüne geçin.", "Set an admin username." : "Bir yönetici kullanıcı adı yazın.", - "Set an admin password." : "Bir yönetici parolası yazın.", - "Can't create or write into the data directory %s" : "%s veri klasörü oluşturulamadı ya da içine yazılamadı", + "Set an admin password." : "Bir yönetici parolası yazın.", + "Cannot create or write into the data directory %s" : "%s veri klasörü oluşturulamadı ya da içine yazılamadı", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Paylaşım arka ucu %s OCP\\Share_Backend arayüzünü desteklemeli", "Sharing backend %s not found" : "%s paylaşım arka ucu bulunamadı", "Sharing backend for %s not found" : "%s için paylaşım arka ucu bulunamadı", "%1$s shared »%2$s« with you and wants to add:" : "%1$s sizinle »%2$s« ögesini paylaştı ve eklemenizi istiyor:", "%1$s shared »%2$s« with you and wants to add" : "%1$s sizinle »%2$s« ögesini paylaştı ve eklemenizi istiyor", "»%s« added a note to a file shared with you" : "»%s« sizinle paylaştığı bir dosyaya bir not ekledi", - "Open »%s«" : "»%s« Aç", + "Open »%s«" : "»%s« aç", "%1$s via %2$s" : "%1$s, %2$s aracılığıyla", "You are not allowed to share %s" : "%s ögesini paylaşma izniniz yok", - "Can’t increase permissions of %s" : "%s izinleri arttırılamadı", - "Files can’t be shared with delete permissions" : "Silme izni ile dosya paylaşılamaz", - "Files can’t be shared with create permissions" : "Ekleme izni ile dosya paylaşılamaz", + "Cannot increase permissions of %s" : "%s izinleri yükseltilemedi", + "Files cannot be shared with delete permissions" : "Silme izni ile dosya paylaşılamaz", + "Files cannot be shared with create permissions" : "Ekleme izni ile dosya paylaşılamaz", "Expiration date is in the past" : "Son kullanma tarihi geçmişte", - "Can’t set expiration date more than %s days in the future" : "Son kullanma tarihi %sgünden sonrası olarak ayarlanamaz", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["Paylaşımların son kullanım süreleri, gelecekte %n günden fazla olamaz","Paylaşımların son kullanım süreleri, gelecekte %n günden fazla olamaz"], "Sharing is only allowed with group members" : "Paylaşım yalnız grup üyeleri ile yapılabilir", + "Sharing %s failed, because this item is already shared with user %s" : "%s paylaşılamadı. Bu öge zaten %s kullanıcısı ile paylaşılmış", "%1$s shared »%2$s« with you" : "%1$s, sizinle »%2$s« ögesini paylaştı", "%1$s shared »%2$s« with you." : "%1$s, sizinle »%2$s« ögesini paylaştı.", "Click the button below to open it." : "Açmak için aşağıdaki düğmeye tıklayın.", @@ -155,8 +177,8 @@ "August" : "Ağustos", "September" : "Eylül", "October" : "Ekim", - "November" : "Kası", - "December" : "Aralı", + "November" : "Kasım", + "December" : "Aralık", "Jan." : "Oca", "Feb." : "Şub", "Mar." : "Mar", @@ -171,38 +193,39 @@ "Dec." : "Ara", "The user limit has been reached and the user was not created." : "Kullanıcı sayısı sınırına ulaşıldığından kullanıcı eklenemedi.", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Kullanıcı adında yalnız şu karakterler kullanılabilir: \"a-z\", \"A-Z\", \"0-9\", ve \"_.@-'\"", - "A valid username must be provided" : "Geçerli bir kullanıcı adı yazmalısınız", - "Username contains whitespace at the beginning or at the end" : "Kullanıcı adının başı ya da sonunda boşluk var", + "A valid username must be provided" : "Geçerli bir kullanıcı adı yazmalısınız", + "Username contains whitespace at the beginning or at the end" : "Kullanıcı adının başı ya da sonunda boşluk var", "Username must not consist of dots only" : "Kullanıcı adı yalnız noktalardan oluşamaz", "Username is invalid because files already exist for this user" : "Kullanıcı adı geçersiz, bu kullanıcı için zaten bazı dosyalar var", - "A valid password must be provided" : "Geçerli bir parola yazmalısınız", - "The username is already being used" : "Bu kullanıcı adı zaten var", + "A valid password must be provided" : "Geçerli bir parola yazmalısınız", + "The username is already being used" : "Bu kullanıcı adı zaten var", "Could not create user" : "Kullanıcı oluşturulamadı", "User disabled" : "Kullanıcı devre dışı", "Login canceled by app" : "Oturum açma uygulama tarafından iptal edildi", "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "\"%1$s\" uygulaması, şu gereklilikler sağlanmadığı için kurulamıyor: %2$s", "a safe home for all your data" : "verileriniz için güvenli bir barınak", "File is currently busy, please try again later" : "Dosya şu anda meşgul, lütfen daha sonra deneyin", - "Can't read file" : "Dosya okunamadı", - "Application is not enabled" : "Uygulama etkinleştirilmemiş", + "Cannot read file" : "Dosya okunamadı", + "Application is not enabled" : "Uygulama etkinleştirilmemiş", "Authentication error" : "Kimlik doğrulama sorunu", "Token expired. Please reload page." : "Kodun süresi dolmuş. Lütfen sayfayı yenileyin.", "No database drivers (sqlite, mysql, or postgresql) installed." : "Herhangi bir veritabanı sürücüsü (sqlite, mysql ya da postgresql) kurulmamış.", "Cannot write into \"config\" directory" : "\"config\" klasörüne yazılamıyor", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir. %s bölümüne bakın", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın. %s bölümüne bakabilirsiniz", "Cannot write into \"apps\" directory" : "\"apps\" klasörüne yazılamıyor", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından uygulama mağazasını devre dışı bırakılarak çözülebilir.", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından Uygulama Mağazası devre dışı bırakılarak çözülebilir.", "Cannot create \"data\" directory" : "\"data\" klasörü oluşturulamadı", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Bu sorun genellikle, web sunucusuna kök klasöre yazma izni verilerek çözülebilir. %s bölümüne bakın", - "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "İzinler genellikle, web sunucusuna kök klasöre yazma izni verilerek düzeltilebilir. %s bölümüne bakın.", - "Setting locale to %s failed" : "Dil %s olarak ayarlanamadı", + "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "İzinler genellikle, web sunucusuna kök klasöre yazma izni verilerek düzeltilebilir. %s bölümüne bakın.", + "Setting locale to %s failed" : "Dil %s olarak ayarlanamadı", "Please install one of these locales on your system and restart your webserver." : "Lütfen bu dillerden birini sisteminize kurun ve web sunucunuzu yeniden başlatın.", "PHP module %s not installed." : "PHP %s modülü kurulmamış.", "Please ask your server administrator to install the module." : "Lütfen modülü kurması için BT yöneticinizle görüşün.", "PHP setting \"%s\" is not set to \"%s\"." : "\"%s\" PHP ayarı \"%s\" olarak ayarlanmamış.", - "Adjusting this setting in php.ini will make Nextcloud run again" : "php.ini dosyasında bu ayar yapıldığında Nextcloud yeniden çalışır", - "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload, beklenen \"0\" değeri yerine \"%s\" olarak ayarlanmış", - "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Bu sorunu çözmek için php.ini dosyasındaki <code>mbstring.func_overload</code> seçeneğini <code>0</code> olarak ayarlayın", + "Adjusting this setting in php.ini will make Nextcloud run again" : "php.ini dosyasında bu ayar yapıldığında Nextcloud yeniden çalışır", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload, beklenen \"0\" değeri yerine \"%s\" olarak ayarlanmış", + "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Bu sorunu çözmek için php.ini dosyasındaki <code>mbstring.func_overload</code> seçeneğini <code>0</code> olarak ayarlayın", "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 sürümü en az 2.7.0 olmalıdır. Şu anda %s kurulu.", "To fix this issue update your libxml2 version and restart your web server." : "Bu sorunu çözmek için libxml2 sürümünüzü güncelleyin ve web sunucusunu yeniden başlatın.", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP girintili doc bloklarını ayıklamak üzere yapılandırılmış gibi görünüyor. Bu durum bazı çekirdek uygulamalarına erişilmesini engelleyecek.", @@ -228,8 +251,15 @@ "Storage connection error. %s" : "Depolama bağlantısı sorunu. %s", "Storage is temporarily not available" : "Depolama geçici olarak kullanılamıyor", "Storage connection timeout. %s" : "Depolama bağlantısı zaman aşımı. %s", - "Following databases are supported: %s" : "Şu veritabanları destekleniyor: %s", - "Following platforms are supported: %s" : "Şu platformlar destekleniyor: %s", - "Invalid Federated Cloud ID" : "Birleşik Bulut Kimliği Geçersiz" + "This can usually be fixed by giving the webserver write access to the config directory" : "Bu sorun genellikle, web sunucusuna config klasörüne yazma izni verilerek çözülebilir", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "Ya da config.php dosyasının salt okunur olarak kalmasını istiyorsanız içindeki \"config_is_read_only\" seçeneğini true olarak ayarlayın.", + "Can't create or write into the data directory %s" : "%s veri klasörü oluşturulamadı ya da içine yazılamadı", + "Invalid Federated Cloud ID" : "Birleşik bulut kodu geçersiz", + "Can’t increase permissions of %s" : "%s izinleri arttırılamadı", + "Files can’t be shared with delete permissions" : "Silme izni ile dosya paylaşılamaz", + "Files can’t be shared with create permissions" : "Ekleme izni ile dosya paylaşılamaz", + "Can’t set expiration date more than %s days in the future" : "Son kullanma tarihi %sgünden sonrası olarak ayarlanamaz", + "Can't read file" : "Dosya okunamadı", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "Bu sorun genellikle, web sunucusuna apps klasörüne yazma izni verilerek ya da yapılandırma dosyasından uygulama mağazasını devre dışı bırakılarak çözülebilir." },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/lib/l10n/uk.js b/lib/l10n/uk.js index b7e8c1b7cb1..81a0e931c24 100644 --- a/lib/l10n/uk.js +++ b/lib/l10n/uk.js @@ -2,7 +2,6 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "Не можу писати у каталог \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Зазвичай це можна виправити, надавши веб-серверу права на запис в теці конфігурації", "See %s" : "Переглянути %s", "Sample configuration detected" : "Виявлено приклад конфігурації", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Було виявлено, що приклад конфігурації було скопійовано. Це може нашкодити вашій системі та не підтримується. Будь ласка, зверніться до документації перед внесенням змін в файл config.php", @@ -59,7 +58,6 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Будь ласка, вилучіть параметр open_basedir у вашому php.ini або перейдіть на 64-бітний PHP.", "Set an admin username." : "Встановіть ім'я адміністратора.", "Set an admin password." : "Встановіть пароль адміністратора.", - "Can't create or write into the data directory %s" : "Неможливо створити або записати каталог даних %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Бекенд спільного доступу %s повинен реалізовувати інтерфейс OCP\\Share_Backend", "Sharing backend %s not found" : "Бекенд спільного доступу %s не знайдено", "Sharing backend for %s not found" : "Бекенд спільного доступу для %s не знайдено", @@ -128,7 +126,6 @@ OC.L10N.register( "Login canceled by app" : "Вхід скасовано застосунком", "a safe home for all your data" : "безпечний дім для ваших даних", "File is currently busy, please try again later" : "Файл на разі зайнятий, будь ласка, спробуйте пізніше", - "Can't read file" : "Не можливо прочитати файл", "Application is not enabled" : "Застосунок не увімкнено", "Authentication error" : "Помилка автентифікації", "Token expired. Please reload page." : "Строк дії токена скінчився. Будь ласка, перезавантажте сторінку.", @@ -160,8 +157,9 @@ OC.L10N.register( "Storage connection error. %s" : "Помилка з'єднання зі сховищем. %s", "Storage is temporarily not available" : "Сховище тимчасово недоступне", "Storage connection timeout. %s" : "Час під'єднання до сховища вичерпався. %s", - "Following databases are supported: %s" : "Підтримуються наступні сервери баз даних: %s", - "Following platforms are supported: %s" : "Підтримуються наступні платформи: %s", - "Invalid Federated Cloud ID" : "Неправильний Об'єднаний Хмарний Ідентіфікатор " + "This can usually be fixed by giving the webserver write access to the config directory" : "Зазвичай це можна виправити, надавши веб-серверу права на запис в теці конфігурації", + "Can't create or write into the data directory %s" : "Неможливо створити або записати каталог даних %s", + "Invalid Federated Cloud ID" : "Неправильний Об'єднаний Хмарний Ідентіфікатор ", + "Can't read file" : "Не можливо прочитати файл" }, "nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"); diff --git a/lib/l10n/uk.json b/lib/l10n/uk.json index 8ef2f51c871..e2db1ab6c30 100644 --- a/lib/l10n/uk.json +++ b/lib/l10n/uk.json @@ -1,6 +1,5 @@ { "translations": { "Cannot write into \"config\" directory!" : "Не можу писати у каталог \"config\"!", - "This can usually be fixed by giving the webserver write access to the config directory" : "Зазвичай це можна виправити, надавши веб-серверу права на запис в теці конфігурації", "See %s" : "Переглянути %s", "Sample configuration detected" : "Виявлено приклад конфігурації", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Було виявлено, що приклад конфігурації було скопійовано. Це може нашкодити вашій системі та не підтримується. Будь ласка, зверніться до документації перед внесенням змін в файл config.php", @@ -57,7 +56,6 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Будь ласка, вилучіть параметр open_basedir у вашому php.ini або перейдіть на 64-бітний PHP.", "Set an admin username." : "Встановіть ім'я адміністратора.", "Set an admin password." : "Встановіть пароль адміністратора.", - "Can't create or write into the data directory %s" : "Неможливо створити або записати каталог даних %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Бекенд спільного доступу %s повинен реалізовувати інтерфейс OCP\\Share_Backend", "Sharing backend %s not found" : "Бекенд спільного доступу %s не знайдено", "Sharing backend for %s not found" : "Бекенд спільного доступу для %s не знайдено", @@ -126,7 +124,6 @@ "Login canceled by app" : "Вхід скасовано застосунком", "a safe home for all your data" : "безпечний дім для ваших даних", "File is currently busy, please try again later" : "Файл на разі зайнятий, будь ласка, спробуйте пізніше", - "Can't read file" : "Не можливо прочитати файл", "Application is not enabled" : "Застосунок не увімкнено", "Authentication error" : "Помилка автентифікації", "Token expired. Please reload page." : "Строк дії токена скінчився. Будь ласка, перезавантажте сторінку.", @@ -158,8 +155,9 @@ "Storage connection error. %s" : "Помилка з'єднання зі сховищем. %s", "Storage is temporarily not available" : "Сховище тимчасово недоступне", "Storage connection timeout. %s" : "Час під'єднання до сховища вичерпався. %s", - "Following databases are supported: %s" : "Підтримуються наступні сервери баз даних: %s", - "Following platforms are supported: %s" : "Підтримуються наступні платформи: %s", - "Invalid Federated Cloud ID" : "Неправильний Об'єднаний Хмарний Ідентіфікатор " + "This can usually be fixed by giving the webserver write access to the config directory" : "Зазвичай це можна виправити, надавши веб-серверу права на запис в теці конфігурації", + "Can't create or write into the data directory %s" : "Неможливо створити або записати каталог даних %s", + "Invalid Federated Cloud ID" : "Неправильний Об'єднаний Хмарний Ідентіфікатор ", + "Can't read file" : "Не можливо прочитати файл" },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);" }
\ No newline at end of file diff --git a/lib/l10n/zh_CN.js b/lib/l10n/zh_CN.js index 68d9011d6a4..702f85d13a5 100644 --- a/lib/l10n/zh_CN.js +++ b/lib/l10n/zh_CN.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!", - "This can usually be fixed by giving the webserver write access to the config directory" : "您可以设置 Web 服务器对 config 目录的写权限修复这个问题", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。", - "See %s" : "查看 %s", "This can usually be fixed by giving the webserver write access to the config directory." : "通常可以通过授予 Web 服务器对 config 目录的写访问权限来解决此问题。", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。查看 %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但是,如果你喜欢将 config.php 文件设置为只读,可以将 \"config is read only\"选项设置为 true。", + "See %s" : "查看 %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "应用%1$s的文件替换不正确。请确认版本与当前服务器兼容。", "Sample configuration detected" : "示例配置检测", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接把 config.php 的样例文件直接复制使用。这可能会破坏您的安装。在对 config.php 进行修改之前请先阅读相关文档。", + "%s email verification" : "%s 电子邮件验证", + "Email verification" : "电子邮件验证", + "Click the following button to confirm your email." : "点击下方按钮确认电子邮件地址", + "Click the following link to confirm your email." : "点击下方链接确认电子邮件地址", + "Confirm your email" : "确认电子邮件地址", "Other activities" : "其他动态", "%1$s and %2$s" : "%1$s 和 %2$s", "%1$s, %2$s and %3$s" : "%1$s,%2$s 和 %3$s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "支持以下平台:%s", "Server version %s or higher is required." : "需要服务器版本 %s 或更高版本。", "Server version %s or lower is required." : "需要服务器版本 %s 或更低版本。", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "登录用户必须是管理员、子管理员或具有访问此设置的特殊权限", "Logged in user must be an admin or sub admin" : "当前登录用户必须为管理员或子管理员", "Logged in user must be an admin" : "当前登录用户必须为管理员", "Wiping of device %s has started" : "设备%s的擦除操作已开始", @@ -50,6 +54,7 @@ OC.L10N.register( "Unknown filetype" : "未知的文件类型", "Invalid image" : "无效的图像", "Avatar image is not square" : "头像图像不是正方形", + "View profile" : "查看个人资料", "today" : "今天", "tomorrow" : "明天", "yesterday" : "昨天", @@ -72,6 +77,7 @@ OC.L10N.register( "Empty file" : "空文件", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "模块:%s不存在。请在 App 设置中开启或联系管理员。", "File already exists" : "文件已存在", + "Invalid path" : "无效的路径", "Failed to create file from template" : "从模板创建文件失败", "Templates" : "模板", "File name is a reserved word" : "文件名包含敏感字符", @@ -88,6 +94,21 @@ OC.L10N.register( "Settings" : "设置", "Log out" : "登出", "Users" : "用户", + "Email" : "电邮地址", + "Mail %s" : "发邮件给 %s", + "Phone" : "电话", + "Call %s" : "呼叫 %s", + "Twitter" : "推特", + "View %s on Twitter" : "在推特上查看 %s", + "Website" : "网站", + "Visit %s" : "访问 %s", + "Address" : "地址", + "Avatar" : "头像", + "About" : "关于", + "Full name" : "全名", + "Headline" : "标题", + "Organisation" : "组织", + "Role" : "角色", "Unknown user" : "未知用户", "Additional settings" : "其他设置", "%s enter the database username and name." : "%s 输入数据库用户名和名称。", @@ -105,7 +126,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "请删除php.ini中的open_basedir设置或切换到64位PHP。", "Set an admin username." : "请设置一个管理员用户名。", "Set an admin password." : "请设置一个管理员密码。", - "Can't create or write into the data directory %s" : "无法创建或写入数据目录 %s", + "Cannot create or write into the data directory %s" : "无法创建或写入数据文件夹 %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "共享后端 %s 必须实现 OCP\\Share_Backend 接口", "Sharing backend %s not found" : "%s 的共享后端未找到", "Sharing backend for %s not found" : "%s 的共享后端未找到", @@ -115,11 +136,11 @@ OC.L10N.register( "Open »%s«" : "打开 »%s«", "%1$s via %2$s" : "%1$s 通过 %2$s", "You are not allowed to share %s" : "您无权共享 %s", - "Can’t increase permissions of %s" : "无法增加%s的权限。", - "Files can’t be shared with delete permissions" : "无法共享有删除权限的文件", - "Files can’t be shared with create permissions" : "无法共享有创建权限的文件", + "Cannot increase permissions of %s" : "无法提升 %s 的权限", + "Files cannot be shared with delete permissions" : "不能带删除权限分享文件", + "Files cannot be shared with create permissions" : "不能带创建权限分享文件", "Expiration date is in the past" : "到期日期已过", - "Can’t set expiration date more than %s days in the future" : "无法将过期日期设置为超过 %s 天。", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["允许设置的最远截止期是从今天算起的 %n-1 天之后"], "Sharing is only allowed with group members" : "只允许与群组成员共享", "Sharing %s failed, because this item is already shared with user %s" : "共享 %s 失败了,因为该项目已和用户 %s 进行了分享。", "%1$s shared »%2$s« with you" : "%1$s 对您共享了 »%2$s«", @@ -186,15 +207,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "应用 \"%1$s\" 无法安装,因为不能满足以下依赖: %2$s", "a safe home for all your data" : "给您所有数据一个安全的家", "File is currently busy, please try again later" : "文件当前正忙,请稍后再试", - "Can't read file" : "无法读取文件", + "Cannot read file" : "无法读取文件", "Application is not enabled" : "应用程序未启用", "Authentication error" : "认证出错", "Token expired. Please reload page." : "Token 过期,请刷新页面。", "No database drivers (sqlite, mysql, or postgresql) installed." : "没有安装数据库驱动(SQLite、MySQL 或 PostgreSQL)。", "Cannot write into \"config\" directory" : "无法写入“config”目录", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "这个通常可以通过赋予写入权限到 config 目录来修复。查看:%s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。查看 %s", "Cannot write into \"apps\" directory" : "无法写入“apps”目录", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "通常可以通过授予 Web 服务器对 apps 目录的写访问权限或在配置文件中禁用 appstore 来解决此问题。", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "这通常可以通过给予 webserver 对应用目录的写入权限或在配置文件中禁用应用商店来解决。", "Cannot create \"data\" directory" : "无法创建“data”目录 ", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "这个通常可以通过赋予根目录写入权限来修复。查看:%s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "权限通常可以通过赋予根目录写入权限来修复。查看:%s。", @@ -231,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "存储连接错误。%s", "Storage is temporarily not available" : "存储暂时不可用", "Storage connection timeout. %s" : "存储连接超时。%s", - "Following databases are supported: %s" : "支持以下数据库:%s", - "Following platforms are supported: %s" : "支持以下平台:%s", - "Invalid Federated Cloud ID" : "无效的联合云ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "您可以设置 Web 服务器对 config 目录的写权限修复这个问题", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。", + "Can't create or write into the data directory %s" : "无法创建或写入数据目录 %s", + "Invalid Federated Cloud ID" : "无效的联合云ID", + "Can’t increase permissions of %s" : "无法增加%s的权限。", + "Files can’t be shared with delete permissions" : "无法共享有删除权限的文件", + "Files can’t be shared with create permissions" : "无法共享有创建权限的文件", + "Can’t set expiration date more than %s days in the future" : "允许设置的最远到期日是从今天算起的 %s-1 天", + "Can't read file" : "无法读取文件", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "通常可以通过授予 Web 服务器对 apps 目录的写访问权限或在配置文件中禁用 appstore 来解决此问题。" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/zh_CN.json b/lib/l10n/zh_CN.json index 5282d453531..8e74812ed76 100644 --- a/lib/l10n/zh_CN.json +++ b/lib/l10n/zh_CN.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!", - "This can usually be fixed by giving the webserver write access to the config directory" : "您可以设置 Web 服务器对 config 目录的写权限修复这个问题", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。", - "See %s" : "查看 %s", "This can usually be fixed by giving the webserver write access to the config directory." : "通常可以通过授予 Web 服务器对 config 目录的写访问权限来解决此问题。", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。查看 %s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但是,如果你喜欢将 config.php 文件设置为只读,可以将 \"config is read only\"选项设置为 true。", + "See %s" : "查看 %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "应用%1$s的文件替换不正确。请确认版本与当前服务器兼容。", "Sample configuration detected" : "示例配置检测", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接把 config.php 的样例文件直接复制使用。这可能会破坏您的安装。在对 config.php 进行修改之前请先阅读相关文档。", + "%s email verification" : "%s 电子邮件验证", + "Email verification" : "电子邮件验证", + "Click the following button to confirm your email." : "点击下方按钮确认电子邮件地址", + "Click the following link to confirm your email." : "点击下方链接确认电子邮件地址", + "Confirm your email" : "确认电子邮件地址", "Other activities" : "其他动态", "%1$s and %2$s" : "%1$s 和 %2$s", "%1$s, %2$s and %3$s" : "%1$s,%2$s 和 %3$s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "支持以下平台:%s", "Server version %s or higher is required." : "需要服务器版本 %s 或更高版本。", "Server version %s or lower is required." : "需要服务器版本 %s 或更低版本。", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "登录用户必须是管理员、子管理员或具有访问此设置的特殊权限", "Logged in user must be an admin or sub admin" : "当前登录用户必须为管理员或子管理员", "Logged in user must be an admin" : "当前登录用户必须为管理员", "Wiping of device %s has started" : "设备%s的擦除操作已开始", @@ -48,6 +52,7 @@ "Unknown filetype" : "未知的文件类型", "Invalid image" : "无效的图像", "Avatar image is not square" : "头像图像不是正方形", + "View profile" : "查看个人资料", "today" : "今天", "tomorrow" : "明天", "yesterday" : "昨天", @@ -70,6 +75,7 @@ "Empty file" : "空文件", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "模块:%s不存在。请在 App 设置中开启或联系管理员。", "File already exists" : "文件已存在", + "Invalid path" : "无效的路径", "Failed to create file from template" : "从模板创建文件失败", "Templates" : "模板", "File name is a reserved word" : "文件名包含敏感字符", @@ -86,6 +92,21 @@ "Settings" : "设置", "Log out" : "登出", "Users" : "用户", + "Email" : "电邮地址", + "Mail %s" : "发邮件给 %s", + "Phone" : "电话", + "Call %s" : "呼叫 %s", + "Twitter" : "推特", + "View %s on Twitter" : "在推特上查看 %s", + "Website" : "网站", + "Visit %s" : "访问 %s", + "Address" : "地址", + "Avatar" : "头像", + "About" : "关于", + "Full name" : "全名", + "Headline" : "标题", + "Organisation" : "组织", + "Role" : "角色", "Unknown user" : "未知用户", "Additional settings" : "其他设置", "%s enter the database username and name." : "%s 输入数据库用户名和名称。", @@ -103,7 +124,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "请删除php.ini中的open_basedir设置或切换到64位PHP。", "Set an admin username." : "请设置一个管理员用户名。", "Set an admin password." : "请设置一个管理员密码。", - "Can't create or write into the data directory %s" : "无法创建或写入数据目录 %s", + "Cannot create or write into the data directory %s" : "无法创建或写入数据文件夹 %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "共享后端 %s 必须实现 OCP\\Share_Backend 接口", "Sharing backend %s not found" : "%s 的共享后端未找到", "Sharing backend for %s not found" : "%s 的共享后端未找到", @@ -113,11 +134,11 @@ "Open »%s«" : "打开 »%s«", "%1$s via %2$s" : "%1$s 通过 %2$s", "You are not allowed to share %s" : "您无权共享 %s", - "Can’t increase permissions of %s" : "无法增加%s的权限。", - "Files can’t be shared with delete permissions" : "无法共享有删除权限的文件", - "Files can’t be shared with create permissions" : "无法共享有创建权限的文件", + "Cannot increase permissions of %s" : "无法提升 %s 的权限", + "Files cannot be shared with delete permissions" : "不能带删除权限分享文件", + "Files cannot be shared with create permissions" : "不能带创建权限分享文件", "Expiration date is in the past" : "到期日期已过", - "Can’t set expiration date more than %s days in the future" : "无法将过期日期设置为超过 %s 天。", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["允许设置的最远截止期是从今天算起的 %n-1 天之后"], "Sharing is only allowed with group members" : "只允许与群组成员共享", "Sharing %s failed, because this item is already shared with user %s" : "共享 %s 失败了,因为该项目已和用户 %s 进行了分享。", "%1$s shared »%2$s« with you" : "%1$s 对您共享了 »%2$s«", @@ -184,15 +205,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "应用 \"%1$s\" 无法安装,因为不能满足以下依赖: %2$s", "a safe home for all your data" : "给您所有数据一个安全的家", "File is currently busy, please try again later" : "文件当前正忙,请稍后再试", - "Can't read file" : "无法读取文件", + "Cannot read file" : "无法读取文件", "Application is not enabled" : "应用程序未启用", "Authentication error" : "认证出错", "Token expired. Please reload page." : "Token 过期,请刷新页面。", "No database drivers (sqlite, mysql, or postgresql) installed." : "没有安装数据库驱动(SQLite、MySQL 或 PostgreSQL)。", "Cannot write into \"config\" directory" : "无法写入“config”目录", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "这个通常可以通过赋予写入权限到 config 目录来修复。查看:%s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。查看 %s", "Cannot write into \"apps\" directory" : "无法写入“apps”目录", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "通常可以通过授予 Web 服务器对 apps 目录的写访问权限或在配置文件中禁用 appstore 来解决此问题。", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "这通常可以通过给予 webserver 对应用目录的写入权限或在配置文件中禁用应用商店来解决。", "Cannot create \"data\" directory" : "无法创建“data”目录 ", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "这个通常可以通过赋予根目录写入权限来修复。查看:%s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "权限通常可以通过赋予根目录写入权限来修复。查看:%s。", @@ -229,8 +251,15 @@ "Storage connection error. %s" : "存储连接错误。%s", "Storage is temporarily not available" : "存储暂时不可用", "Storage connection timeout. %s" : "存储连接超时。%s", - "Following databases are supported: %s" : "支持以下数据库:%s", - "Following platforms are supported: %s" : "支持以下平台:%s", - "Invalid Federated Cloud ID" : "无效的联合云ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "您可以设置 Web 服务器对 config 目录的写权限修复这个问题", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。", + "Can't create or write into the data directory %s" : "无法创建或写入数据目录 %s", + "Invalid Federated Cloud ID" : "无效的联合云ID", + "Can’t increase permissions of %s" : "无法增加%s的权限。", + "Files can’t be shared with delete permissions" : "无法共享有删除权限的文件", + "Files can’t be shared with create permissions" : "无法共享有创建权限的文件", + "Can’t set expiration date more than %s days in the future" : "允许设置的最远到期日是从今天算起的 %s-1 天", + "Can't read file" : "无法读取文件", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "通常可以通过授予 Web 服务器对 apps 目录的写访问权限或在配置文件中禁用 appstore 来解决此问题。" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/l10n/zh_HK.js b/lib/l10n/zh_HK.js index 6c52d4ec486..9d1d2e6b7f7 100644 --- a/lib/l10n/zh_HK.js +++ b/lib/l10n/zh_HK.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "無法寫入 \"config\" 目錄!", - "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", - "See %s" : "見 %s", "This can usually be fixed by giving the webserver write access to the config directory." : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但是,如果您希望將 config.php 檔案保持為唯讀,請將其中的 “config_is_read_only” 選項設置為 true。", + "See %s" : "見 %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "應用程式 %1$s 中的檔案沒有被正確取代,請確認它的版本與伺服器相容。", "Sample configuration detected" : "您目前正在使用範例設定", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接複製了範例設定來使用,這樣的安裝很可能會無法運作,請閱讀說明文件後對 config.php 進行適當的修改", + "%s email verification" : "%s 電郵地址驗證", + "Email verification" : "電郵地址驗證", + "Click the following button to confirm your email." : "單擊以下按鈕以確認您的電郵地址。", + "Click the following link to confirm your email." : "單擊以下連結以確認您的電郵地址。", + "Confirm your email" : "確認您的電郵地址", "Other activities" : "其它活動", "%1$s and %2$s" : "%1$s 和 %2$s", "%1$s, %2$s and %3$s" : "%1$s、%2$s 和 %3$s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "支援下列平台:%s", "Server version %s or higher is required." : "需要伺服器版本 %s 或更高", "Server version %s or lower is required." : "需要伺服器版本 %s 或更低", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "登錄用戶必須是管理員、子管理員或具有存取此設定的特殊權限", "Logged in user must be an admin or sub admin" : "登入的用戶必須要是管理員或是子管理員", "Logged in user must be an admin" : "登入的用戶必須有管理員權限", "Wiping of device %s has started" : "已開始抹除裝置 %s ", @@ -50,6 +54,7 @@ OC.L10N.register( "Unknown filetype" : "不詳的檔案類型", "Invalid image" : "無效的圖片", "Avatar image is not square" : "頭像不是正方形", + "View profile" : "查看個人資料", "today" : "今日", "tomorrow" : "明日", "yesterday" : "昨日", @@ -72,6 +77,7 @@ OC.L10N.register( "Empty file" : "空檔案", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "名為 %s 的模組不存在,請在應用程式設定中啟用,或是聯絡系統管理員", "File already exists" : "檔案已存在", + "Invalid path" : "路徑無效", "Failed to create file from template" : "無法從模板創建檔案", "Templates" : "模板", "File name is a reserved word" : "檔案名稱是保留字", @@ -88,6 +94,21 @@ OC.L10N.register( "Settings" : "設定", "Log out" : "登出", "Users" : "用戶", + "Email" : "電郵地址", + "Mail %s" : "郵件 %s", + "Phone" : "電話號碼", + "Call %s" : "通話 %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "在 Twitter 上查看 %s", + "Website" : "網站", + "Visit %s" : "探訪 %s", + "Address" : "地址", + "Avatar" : "頭像", + "About" : "關於", + "Full name" : "全名", + "Headline" : "標題", + "Organisation" : "機構", + "Role" : "角色", "Unknown user" : "用戶不詳", "Additional settings" : "其他設定", "%s enter the database username and name." : "%s 輸入數據庫名稱及用戶名稱", @@ -105,7 +126,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "請移除 php.ini 中的 open_basedir 設定,或是改用 64 位元的 PHP", "Set an admin username." : "設定管理員帳號", "Set an admin password." : "設定管理員密碼", - "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Cannot create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "分享後端 %s 必須實作 OCP\\Share_Backend 界面", "Sharing backend %s not found" : "找不到分享後端 %s", "Sharing backend for %s not found" : "找不到 %s 的分享後端", @@ -114,12 +135,12 @@ OC.L10N.register( "»%s« added a note to a file shared with you" : "%s 在與您分享的檔案中加入了註解", "Open »%s«" : "開啟 »%s«", "%1$s via %2$s" : "%1$s 由 %2$s", - "You are not allowed to share %s" : "你不被允許分享 %s", - "Can’t increase permissions of %s" : "無法增加 %s 的權限", - "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", - "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "You are not allowed to share %s" : "你無權分享 %s", + "Cannot increase permissions of %s" : "無法增加 %s 的權限", + "Files cannot be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files cannot be shared with create permissions" : "無法分享具有新建權限的檔案", "Expiration date is in the past" : "到期日為過去的日期", - "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["到期日不能設定為 %n 天以後的日期"], "Sharing is only allowed with group members" : "僅允許在群組成員中共享", "Sharing %s failed, because this item is already shared with user %s" : "分享 %s 失敗,此項目已經與用戶 %s 分享", "%1$s shared »%2$s« with you" : "%1$s 與您分享了 %2$s", @@ -173,7 +194,7 @@ OC.L10N.register( "Nov." : "十一月", "Dec." : "十二月", "The user limit has been reached and the user was not created." : "用戶數量已達上限,無法創建新用戶。", - "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "用戶名稱當中只能包含下列字元:\"a-z\", \"A-Z\", \"0-9\", 和 \"_。@-'\"", + "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "用戶名稱當中只能包含下列字元:\"a-z\", \"A-Z\", \"0-9\", 和 \"_.@-'\"", "A valid username must be provided" : "必須提供一個有效的用戶名", "Username contains whitespace at the beginning or at the end" : "用戶名的開頭或結尾有空白", "Username must not consist of dots only" : "用戶名稱不能只包含小數點", @@ -186,28 +207,29 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "應用程式 \"%1$s\" 無法被安裝,缺少下列所需元件: %2$s", "a safe home for all your data" : "您資料的安全屋", "File is currently busy, please try again later" : "檔案目前忙碌中,請稍候再試", - "Can't read file" : "無法讀取檔案", + "Cannot read file" : "無法讀取檔案", "Application is not enabled" : "應用程式未啟用", "Authentication error" : "認證錯誤", "Token expired. Please reload page." : "Token 過期,請重新整理頁面。", - "No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝數據庫驅動程式(sqlite, mysql, 或 postgresql)", + "No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝數據庫驅動程式(sqlite, mysql, 或 postgresql)", "Cannot write into \"config\" directory" : "無法寫入 config 目錄", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題,詳見 %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", "Cannot write into \"apps\" directory" : "無法寫入 apps 目錄", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "這通常可以通過授予網絡伺服器對應用程式目錄的寫存取權限或在配置檔案中禁用 App Store 來解決。", "Cannot create \"data\" directory" : "無法建立 \"data\" 目錄", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "開放網頁伺服器存取根目錄通常就可以修正這個問題,詳見 %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "開放網頁伺服器存取根目錄通常就可以修正權限問題,詳見 %s", "Setting locale to %s failed" : "設定語系為 %s 失敗", "Please install one of these locales on your system and restart your webserver." : "請在系統中安裝這些語系的其中一個,然後重啓網頁伺服器", - "PHP module %s not installed." : "未安裝 PHP 模組 %s", + "PHP module %s not installed." : "未安裝 PHP 模組 %s。", "Please ask your server administrator to install the module." : "請詢問系統管理員來安裝這些模組", "PHP setting \"%s\" is not set to \"%s\"." : "PHP 設定值 \"%s\" 沒有被設定為 \"%s\"", "Adjusting this setting in php.ini will make Nextcloud run again" : "調整 php.ini 中的設定,使 Nextcloud 重新運作", - "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring。func_overload 應該要被設定成 \"0\" 而不是目前的設定 \"%s\" ", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload 應該要被設定成 \"0\" 而不是目前的設定 \"%s\" ", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "為了修正這個問題,請到 php.ini 將 <code>mbstring.func_overload</code> 的值改為 <code>0</code>", "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 版本最低需求為 2.7.0。目前安裝版本為 %s。", - "To fix this issue update your libxml2 version and restart your web server." : "修正方式為更新您的 libxml2 為 2。7。0 以上版本,再重啟網頁伺服器。", + "To fix this issue update your libxml2 version and restart your web server." : "修正方式為更新您的 libxml2 為 2.7.0 以上版本,再重啟網頁伺服器。", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP 已經設定成「剪除 inline doc block」模式,這將會使幾個核心應用程式無法使用", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "這大概是由快取或是加速器像是 Zend OPcache, eAccelerator 造成的", "PHP modules have been installed, but they are still listed as missing?" : "你已經安裝了指定的 PHP 模組,可是還是顯示為找不到嗎?", @@ -231,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "儲存空間連線錯誤。%s", "Storage is temporarily not available" : "儲存空間暫時無法使用", "Storage connection timeout. %s" : "儲存空間連線逾時。%s", - "Following databases are supported: %s" : "支援下列數據庫: %s", - "Following platforms are supported: %s" : "支援下列平台: %s", - "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", + "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID", + "Can’t increase permissions of %s" : "無法增加 %s 的權限", + "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "Can't read file" : "無法讀取檔案", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/zh_HK.json b/lib/l10n/zh_HK.json index cb329e17232..ac543a2eacf 100644 --- a/lib/l10n/zh_HK.json +++ b/lib/l10n/zh_HK.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "無法寫入 \"config\" 目錄!", - "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", - "See %s" : "見 %s", "This can usually be fixed by giving the webserver write access to the config directory." : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但是,如果您希望將 config.php 檔案保持為唯讀,請將其中的 “config_is_read_only” 選項設置為 true。", + "See %s" : "見 %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "應用程式 %1$s 中的檔案沒有被正確取代,請確認它的版本與伺服器相容。", "Sample configuration detected" : "您目前正在使用範例設定", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接複製了範例設定來使用,這樣的安裝很可能會無法運作,請閱讀說明文件後對 config.php 進行適當的修改", + "%s email verification" : "%s 電郵地址驗證", + "Email verification" : "電郵地址驗證", + "Click the following button to confirm your email." : "單擊以下按鈕以確認您的電郵地址。", + "Click the following link to confirm your email." : "單擊以下連結以確認您的電郵地址。", + "Confirm your email" : "確認您的電郵地址", "Other activities" : "其它活動", "%1$s and %2$s" : "%1$s 和 %2$s", "%1$s, %2$s and %3$s" : "%1$s、%2$s 和 %3$s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "支援下列平台:%s", "Server version %s or higher is required." : "需要伺服器版本 %s 或更高", "Server version %s or lower is required." : "需要伺服器版本 %s 或更低", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "登錄用戶必須是管理員、子管理員或具有存取此設定的特殊權限", "Logged in user must be an admin or sub admin" : "登入的用戶必須要是管理員或是子管理員", "Logged in user must be an admin" : "登入的用戶必須有管理員權限", "Wiping of device %s has started" : "已開始抹除裝置 %s ", @@ -48,6 +52,7 @@ "Unknown filetype" : "不詳的檔案類型", "Invalid image" : "無效的圖片", "Avatar image is not square" : "頭像不是正方形", + "View profile" : "查看個人資料", "today" : "今日", "tomorrow" : "明日", "yesterday" : "昨日", @@ -70,6 +75,7 @@ "Empty file" : "空檔案", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "名為 %s 的模組不存在,請在應用程式設定中啟用,或是聯絡系統管理員", "File already exists" : "檔案已存在", + "Invalid path" : "路徑無效", "Failed to create file from template" : "無法從模板創建檔案", "Templates" : "模板", "File name is a reserved word" : "檔案名稱是保留字", @@ -86,6 +92,21 @@ "Settings" : "設定", "Log out" : "登出", "Users" : "用戶", + "Email" : "電郵地址", + "Mail %s" : "郵件 %s", + "Phone" : "電話號碼", + "Call %s" : "通話 %s", + "Twitter" : "Twitter", + "View %s on Twitter" : "在 Twitter 上查看 %s", + "Website" : "網站", + "Visit %s" : "探訪 %s", + "Address" : "地址", + "Avatar" : "頭像", + "About" : "關於", + "Full name" : "全名", + "Headline" : "標題", + "Organisation" : "機構", + "Role" : "角色", "Unknown user" : "用戶不詳", "Additional settings" : "其他設定", "%s enter the database username and name." : "%s 輸入數據庫名稱及用戶名稱", @@ -103,7 +124,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "請移除 php.ini 中的 open_basedir 設定,或是改用 64 位元的 PHP", "Set an admin username." : "設定管理員帳號", "Set an admin password." : "設定管理員密碼", - "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Cannot create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "分享後端 %s 必須實作 OCP\\Share_Backend 界面", "Sharing backend %s not found" : "找不到分享後端 %s", "Sharing backend for %s not found" : "找不到 %s 的分享後端", @@ -112,12 +133,12 @@ "»%s« added a note to a file shared with you" : "%s 在與您分享的檔案中加入了註解", "Open »%s«" : "開啟 »%s«", "%1$s via %2$s" : "%1$s 由 %2$s", - "You are not allowed to share %s" : "你不被允許分享 %s", - "Can’t increase permissions of %s" : "無法增加 %s 的權限", - "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", - "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "You are not allowed to share %s" : "你無權分享 %s", + "Cannot increase permissions of %s" : "無法增加 %s 的權限", + "Files cannot be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files cannot be shared with create permissions" : "無法分享具有新建權限的檔案", "Expiration date is in the past" : "到期日為過去的日期", - "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["到期日不能設定為 %n 天以後的日期"], "Sharing is only allowed with group members" : "僅允許在群組成員中共享", "Sharing %s failed, because this item is already shared with user %s" : "分享 %s 失敗,此項目已經與用戶 %s 分享", "%1$s shared »%2$s« with you" : "%1$s 與您分享了 %2$s", @@ -171,7 +192,7 @@ "Nov." : "十一月", "Dec." : "十二月", "The user limit has been reached and the user was not created." : "用戶數量已達上限,無法創建新用戶。", - "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "用戶名稱當中只能包含下列字元:\"a-z\", \"A-Z\", \"0-9\", 和 \"_。@-'\"", + "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "用戶名稱當中只能包含下列字元:\"a-z\", \"A-Z\", \"0-9\", 和 \"_.@-'\"", "A valid username must be provided" : "必須提供一個有效的用戶名", "Username contains whitespace at the beginning or at the end" : "用戶名的開頭或結尾有空白", "Username must not consist of dots only" : "用戶名稱不能只包含小數點", @@ -184,28 +205,29 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "應用程式 \"%1$s\" 無法被安裝,缺少下列所需元件: %2$s", "a safe home for all your data" : "您資料的安全屋", "File is currently busy, please try again later" : "檔案目前忙碌中,請稍候再試", - "Can't read file" : "無法讀取檔案", + "Cannot read file" : "無法讀取檔案", "Application is not enabled" : "應用程式未啟用", "Authentication error" : "認證錯誤", "Token expired. Please reload page." : "Token 過期,請重新整理頁面。", - "No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝數據庫驅動程式(sqlite, mysql, 或 postgresql)", + "No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝數據庫驅動程式(sqlite, mysql, 或 postgresql)", "Cannot write into \"config\" directory" : "無法寫入 config 目錄", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題,詳見 %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", "Cannot write into \"apps\" directory" : "無法寫入 apps 目錄", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "這通常可以通過授予網絡伺服器對應用程式目錄的寫存取權限或在配置檔案中禁用 App Store 來解決。", "Cannot create \"data\" directory" : "無法建立 \"data\" 目錄", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "開放網頁伺服器存取根目錄通常就可以修正這個問題,詳見 %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "開放網頁伺服器存取根目錄通常就可以修正權限問題,詳見 %s", "Setting locale to %s failed" : "設定語系為 %s 失敗", "Please install one of these locales on your system and restart your webserver." : "請在系統中安裝這些語系的其中一個,然後重啓網頁伺服器", - "PHP module %s not installed." : "未安裝 PHP 模組 %s", + "PHP module %s not installed." : "未安裝 PHP 模組 %s。", "Please ask your server administrator to install the module." : "請詢問系統管理員來安裝這些模組", "PHP setting \"%s\" is not set to \"%s\"." : "PHP 設定值 \"%s\" 沒有被設定為 \"%s\"", "Adjusting this setting in php.ini will make Nextcloud run again" : "調整 php.ini 中的設定,使 Nextcloud 重新運作", - "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring。func_overload 應該要被設定成 \"0\" 而不是目前的設定 \"%s\" ", + "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload 應該要被設定成 \"0\" 而不是目前的設定 \"%s\" ", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "為了修正這個問題,請到 php.ini 將 <code>mbstring.func_overload</code> 的值改為 <code>0</code>", "libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 版本最低需求為 2.7.0。目前安裝版本為 %s。", - "To fix this issue update your libxml2 version and restart your web server." : "修正方式為更新您的 libxml2 為 2。7。0 以上版本,再重啟網頁伺服器。", + "To fix this issue update your libxml2 version and restart your web server." : "修正方式為更新您的 libxml2 為 2.7.0 以上版本,再重啟網頁伺服器。", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP 已經設定成「剪除 inline doc block」模式,這將會使幾個核心應用程式無法使用", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "這大概是由快取或是加速器像是 Zend OPcache, eAccelerator 造成的", "PHP modules have been installed, but they are still listed as missing?" : "你已經安裝了指定的 PHP 模組,可是還是顯示為找不到嗎?", @@ -229,8 +251,15 @@ "Storage connection error. %s" : "儲存空間連線錯誤。%s", "Storage is temporarily not available" : "儲存空間暫時無法使用", "Storage connection timeout. %s" : "儲存空間連線逾時。%s", - "Following databases are supported: %s" : "支援下列數據庫: %s", - "Following platforms are supported: %s" : "支援下列平台: %s", - "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", + "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID", + "Can’t increase permissions of %s" : "無法增加 %s 的權限", + "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "Can't read file" : "無法讀取檔案", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/l10n/zh_TW.js b/lib/l10n/zh_TW.js index 15d56c9bed4..b53624629ce 100644 --- a/lib/l10n/zh_TW.js +++ b/lib/l10n/zh_TW.js @@ -2,14 +2,17 @@ OC.L10N.register( "lib", { "Cannot write into \"config\" directory!" : "無法寫入 \"config\" 目錄!", - "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", - "See %s" : "見 %s", "This can usually be fixed by giving the webserver write access to the config directory." : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", + "See %s" : "見 %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "應用程式 %1$s 中的檔案沒有被正確取代,請確認它的版本與伺服器相容。", "Sample configuration detected" : "您目前正在使用範例設定", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接複製了範例設定來使用,這樣的安裝很可能會無法運作,請閱讀說明文件後對 config.php 進行適當的修改", + "%s email verification" : "%s 電子郵件驗證", + "Email verification" : "電子郵件驗證", + "Click the following button to confirm your email." : "點擊以下按鈕以確認您的電子郵件。", + "Click the following link to confirm your email." : "點擊以下連結以確認您的電子郵件。", + "Confirm your email" : "確認您的電子郵件", "Other activities" : "其它活動", "%1$s and %2$s" : "%1$s 和 %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s 和 %3$s", @@ -32,6 +35,7 @@ OC.L10N.register( "The following platforms are supported: %s" : "支援下列平台:%s", "Server version %s or higher is required." : "需要伺服器版本 %s 或更高", "Server version %s or lower is required." : "需要伺服器版本 %s 或更低", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "登入使用者必須為管理員、子管理員或有可存取此設定的特殊權限的使用者", "Logged in user must be an admin or sub admin" : "登入的使用者必須要是管理員或是子管理員", "Logged in user must be an admin" : "登入的使用者必須有管理員權限", "Wiping of device %s has started" : "已開始抹除裝置 %s ", @@ -50,6 +54,7 @@ OC.L10N.register( "Unknown filetype" : "未知的檔案類型", "Invalid image" : "無效的圖片", "Avatar image is not square" : "頭像不是正方形", + "View profile" : "檢視個人檔案", "today" : "今天", "tomorrow" : "明天", "yesterday" : "昨天", @@ -72,6 +77,7 @@ OC.L10N.register( "Empty file" : "空檔案", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "名為 %s 的模組不存在,請在應用程式設定中啟用,或是聯絡系統管理員", "File already exists" : "檔案已存在", + "Invalid path" : "無效的路徑", "Failed to create file from template" : "無法從範本建立檔案", "Templates" : "範本", "File name is a reserved word" : "檔案名稱是保留字", @@ -88,6 +94,21 @@ OC.L10N.register( "Settings" : "設定", "Log out" : "登出", "Users" : "使用者", + "Email" : "電子郵件", + "Mail %s" : "傳送郵件給 %s", + "Phone" : "手機", + "Call %s" : "與 %s 通話", + "Twitter" : "Twitter", + "View %s on Twitter" : "在 Twitter 上檢視 %s", + "Website" : "網站", + "Visit %s" : "造訪 %s", + "Address" : "地址", + "Avatar" : "大頭照", + "About" : "關於", + "Full name" : "全名", + "Headline" : "標題", + "Organisation" : "組織", + "Role" : "角色", "Unknown user" : "未知的使用者", "Additional settings" : "其他設定", "%s enter the database username and name." : "%s 輸入資料庫名稱及使用者名稱", @@ -105,7 +126,7 @@ OC.L10N.register( "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "請移除 php.ini 中的 open_basedir 設定,或是改用 64 位元的 PHP", "Set an admin username." : "設定管理員帳號", "Set an admin password." : "設定管理員密碼", - "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Cannot create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "分享後端 %s 必須實作 OCP\\Share_Backend 界面", "Sharing backend %s not found" : "找不到分享後端 %s", "Sharing backend for %s not found" : "找不到 %s 的分享後端", @@ -115,11 +136,11 @@ OC.L10N.register( "Open »%s«" : "開啟 »%s«", "%1$s via %2$s" : "%1$s 由 %2$s", "You are not allowed to share %s" : "你不被允許分享 %s", - "Can’t increase permissions of %s" : "無法增加 %s 的權限", - "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", - "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "Cannot increase permissions of %s" : "無法增加 %s 的權限", + "Files cannot be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files cannot be shared with create permissions" : "無法分享具有新建權限的檔案", "Expiration date is in the past" : "到期日為過去的日期", - "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["無法設定到期日超過未來%n天"], "Sharing is only allowed with group members" : "僅允許與群組成員分享", "Sharing %s failed, because this item is already shared with user %s" : "分享 %s 失敗,因為此項目已與使用者 %s 分享", "%1$s shared »%2$s« with you" : "%1$s 與您分享了 %2$s", @@ -186,15 +207,16 @@ OC.L10N.register( "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "應用程式 \"%1$s\" 無法被安裝,缺少下列所需元件: %2$s", "a safe home for all your data" : "您資料的安全屋", "File is currently busy, please try again later" : "檔案目前忙碌中,請稍候再試", - "Can't read file" : "無法讀取檔案", + "Cannot read file" : "無法讀取檔案", "Application is not enabled" : "應用程式未啟用", "Authentication error" : "認證錯誤", "Token expired. Please reload page." : "Token 過期,請重新整理頁面。", "No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝資料庫驅動程式 (sqlite, mysql, 或 postgresql)", "Cannot write into \"config\" directory" : "無法寫入 config 目錄", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題,詳見 %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", "Cannot write into \"apps\" directory" : "無法寫入 apps 目錄", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "允許網頁伺服器寫入應用程式的目錄或是在設定檔中停用應用程式商店通常可以解決這個問題。", "Cannot create \"data\" directory" : "無法建立 \"data\" 目錄", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "開放網頁伺服器存取根目錄通常就可以修正這個問題,詳見 %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "開放網頁伺服器存取根目錄通常就可以修正權限問題,詳見 %s", @@ -231,8 +253,15 @@ OC.L10N.register( "Storage connection error. %s" : "儲存空間連線錯誤。%s", "Storage is temporarily not available" : "儲存空間暫時無法使用", "Storage connection timeout. %s" : "儲存空間連線逾時。%s", - "Following databases are supported: %s" : "支援下列資料庫: %s", - "Following platforms are supported: %s" : "支援下列平台: %s", - "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", + "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID", + "Can’t increase permissions of %s" : "無法增加 %s 的權限", + "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "Can't read file" : "無法讀取檔案", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題" }, "nplurals=1; plural=0;"); diff --git a/lib/l10n/zh_TW.json b/lib/l10n/zh_TW.json index fc78d41d103..5fb0abf287a 100644 --- a/lib/l10n/zh_TW.json +++ b/lib/l10n/zh_TW.json @@ -1,13 +1,16 @@ { "translations": { "Cannot write into \"config\" directory!" : "無法寫入 \"config\" 目錄!", - "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", - "See %s" : "見 %s", "This can usually be fixed by giving the webserver write access to the config directory." : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", - "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", + "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", + "See %s" : "見 %s", "The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server." : "應用程式 %1$s 中的檔案沒有被正確取代,請確認它的版本與伺服器相容。", "Sample configuration detected" : "您目前正在使用範例設定", "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接複製了範例設定來使用,這樣的安裝很可能會無法運作,請閱讀說明文件後對 config.php 進行適當的修改", + "%s email verification" : "%s 電子郵件驗證", + "Email verification" : "電子郵件驗證", + "Click the following button to confirm your email." : "點擊以下按鈕以確認您的電子郵件。", + "Click the following link to confirm your email." : "點擊以下連結以確認您的電子郵件。", + "Confirm your email" : "確認您的電子郵件", "Other activities" : "其它活動", "%1$s and %2$s" : "%1$s 和 %2$s", "%1$s, %2$s and %3$s" : "%1$s, %2$s 和 %3$s", @@ -30,6 +33,7 @@ "The following platforms are supported: %s" : "支援下列平台:%s", "Server version %s or higher is required." : "需要伺服器版本 %s 或更高", "Server version %s or lower is required." : "需要伺服器版本 %s 或更低", + "Logged in user must be an admin, a sub admin or gotten special right to access this setting" : "登入使用者必須為管理員、子管理員或有可存取此設定的特殊權限的使用者", "Logged in user must be an admin or sub admin" : "登入的使用者必須要是管理員或是子管理員", "Logged in user must be an admin" : "登入的使用者必須有管理員權限", "Wiping of device %s has started" : "已開始抹除裝置 %s ", @@ -48,6 +52,7 @@ "Unknown filetype" : "未知的檔案類型", "Invalid image" : "無效的圖片", "Avatar image is not square" : "頭像不是正方形", + "View profile" : "檢視個人檔案", "today" : "今天", "tomorrow" : "明天", "yesterday" : "昨天", @@ -70,6 +75,7 @@ "Empty file" : "空檔案", "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "名為 %s 的模組不存在,請在應用程式設定中啟用,或是聯絡系統管理員", "File already exists" : "檔案已存在", + "Invalid path" : "無效的路徑", "Failed to create file from template" : "無法從範本建立檔案", "Templates" : "範本", "File name is a reserved word" : "檔案名稱是保留字", @@ -86,6 +92,21 @@ "Settings" : "設定", "Log out" : "登出", "Users" : "使用者", + "Email" : "電子郵件", + "Mail %s" : "傳送郵件給 %s", + "Phone" : "手機", + "Call %s" : "與 %s 通話", + "Twitter" : "Twitter", + "View %s on Twitter" : "在 Twitter 上檢視 %s", + "Website" : "網站", + "Visit %s" : "造訪 %s", + "Address" : "地址", + "Avatar" : "大頭照", + "About" : "關於", + "Full name" : "全名", + "Headline" : "標題", + "Organisation" : "組織", + "Role" : "角色", "Unknown user" : "未知的使用者", "Additional settings" : "其他設定", "%s enter the database username and name." : "%s 輸入資料庫名稱及使用者名稱", @@ -103,7 +124,7 @@ "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "請移除 php.ini 中的 open_basedir 設定,或是改用 64 位元的 PHP", "Set an admin username." : "設定管理員帳號", "Set an admin password." : "設定管理員密碼", - "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Cannot create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "分享後端 %s 必須實作 OCP\\Share_Backend 界面", "Sharing backend %s not found" : "找不到分享後端 %s", "Sharing backend for %s not found" : "找不到 %s 的分享後端", @@ -113,11 +134,11 @@ "Open »%s«" : "開啟 »%s«", "%1$s via %2$s" : "%1$s 由 %2$s", "You are not allowed to share %s" : "你不被允許分享 %s", - "Can’t increase permissions of %s" : "無法增加 %s 的權限", - "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", - "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "Cannot increase permissions of %s" : "無法增加 %s 的權限", + "Files cannot be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files cannot be shared with create permissions" : "無法分享具有新建權限的檔案", "Expiration date is in the past" : "到期日為過去的日期", - "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "_Cannot set expiration date more than %n day in the future_::_Cannot set expiration date more than %n days in the future_" : ["無法設定到期日超過未來%n天"], "Sharing is only allowed with group members" : "僅允許與群組成員分享", "Sharing %s failed, because this item is already shared with user %s" : "分享 %s 失敗,因為此項目已與使用者 %s 分享", "%1$s shared »%2$s« with you" : "%1$s 與您分享了 %2$s", @@ -184,15 +205,16 @@ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "應用程式 \"%1$s\" 無法被安裝,缺少下列所需元件: %2$s", "a safe home for all your data" : "您資料的安全屋", "File is currently busy, please try again later" : "檔案目前忙碌中,請稍候再試", - "Can't read file" : "無法讀取檔案", + "Cannot read file" : "無法讀取檔案", "Application is not enabled" : "應用程式未啟用", "Authentication error" : "認證錯誤", "Token expired. Please reload page." : "Token 過期,請重新整理頁面。", "No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝資料庫驅動程式 (sqlite, mysql, 或 postgresql)", "Cannot write into \"config\" directory" : "無法寫入 config 目錄", "This can usually be fixed by giving the webserver write access to the config directory. See %s" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題,詳見 %s", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。見%s", "Cannot write into \"apps\" directory" : "無法寫入 apps 目錄", - "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the App Store in the config file." : "允許網頁伺服器寫入應用程式的目錄或是在設定檔中停用應用程式商店通常可以解決這個問題。", "Cannot create \"data\" directory" : "無法建立 \"data\" 目錄", "This can usually be fixed by giving the webserver write access to the root directory. See %s" : "開放網頁伺服器存取根目錄通常就可以修正這個問題,詳見 %s", "Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "開放網頁伺服器存取根目錄通常就可以修正權限問題,詳見 %s", @@ -229,8 +251,15 @@ "Storage connection error. %s" : "儲存空間連線錯誤。%s", "Storage is temporarily not available" : "儲存空間暫時無法使用", "Storage connection timeout. %s" : "儲存空間連線逾時。%s", - "Following databases are supported: %s" : "支援下列資料庫: %s", - "Following platforms are supported: %s" : "支援下列平台: %s", - "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID" + "This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題", + "Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果您比較希望保留 config.php 的唯讀狀態,請在該設定檔中將 \"config_is_read_only\" 設定為 true。", + "Can't create or write into the data directory %s" : "無法建立或寫入資料目錄 %s", + "Invalid Federated Cloud ID" : "無效的雲端聯邦 ID", + "Can’t increase permissions of %s" : "無法增加 %s 的權限", + "Files can’t be shared with delete permissions" : "無法分享具有刪除權限的檔案", + "Files can’t be shared with create permissions" : "無法分享具有新建權限的檔案", + "Can’t set expiration date more than %s days in the future" : "到期日不能設定為 %s 天以後的日期", + "Can't read file" : "無法讀取檔案", + "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file." : "允許網頁伺服器寫入 \"apps\" 目錄或是在設定檔中停用應用程式商店通常可以解決這個問題" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/lib/private/Accounts/Account.php b/lib/private/Accounts/Account.php index e7aeb6fa1e9..1e4189f2b35 100644 --- a/lib/private/Accounts/Account.php +++ b/lib/private/Accounts/Account.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Julius Härtl <jus@bitgrid.net> * @@ -17,24 +18,27 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Accounts; +use Generator; use OCP\Accounts\IAccount; use OCP\Accounts\IAccountProperty; +use OCP\Accounts\IAccountPropertyCollection; use OCP\Accounts\PropertyDoesNotExistException; use OCP\IUser; +use RuntimeException; class Account implements IAccount { + use TAccountsHelper; - /** @var IAccountProperty[] */ + /** @var IAccountPropertyCollection[]|IAccountProperty[] */ private $properties = []; /** @var IUser */ @@ -44,32 +48,60 @@ class Account implements IAccount { $this->user = $user; } - public function setProperty(string $property, string $value, string $scope, string $verified): IAccount { - $this->properties[$property] = new AccountProperty($property, $value, $scope, $verified); + public function setProperty(string $property, string $value, string $scope, string $verified, string $verificationData = ''): IAccount { + if ($this->isCollection($property)) { + throw new \InvalidArgumentException('setProperty cannot set an IAccountsPropertyCollection'); + } + $this->properties[$property] = new AccountProperty($property, $value, $scope, $verified, $verificationData); return $this; } public function getProperty(string $property): IAccountProperty { - if (!array_key_exists($property, $this->properties)) { + if ($this->isCollection($property)) { + throw new \InvalidArgumentException('getProperty cannot retrieve an IAccountsPropertyCollection'); + } + if (!array_key_exists($property, $this->properties) || !$this->properties[$property] instanceof IAccountProperty) { throw new PropertyDoesNotExistException($property); } return $this->properties[$property]; } public function getProperties(): array { - return $this->properties; + return array_filter($this->properties, function ($obj) { + return $obj instanceof IAccountProperty; + }); + } + + public function getAllProperties(): Generator { + foreach ($this->properties as $propertyObject) { + if ($propertyObject instanceof IAccountProperty) { + yield $propertyObject; + } elseif ($propertyObject instanceof IAccountPropertyCollection) { + foreach ($propertyObject->getProperties() as $property) { + yield $property; + } + } + } } public function getFilteredProperties(string $scope = null, string $verified = null): array { - return \array_filter($this->properties, function (IAccountProperty $obj) use ($scope, $verified) { + $result = $incrementals = []; + /** @var IAccountProperty $obj */ + foreach ($this->getAllProperties() as $obj) { if ($scope !== null && $scope !== $obj->getScope()) { - return false; + continue; } if ($verified !== null && $verified !== $obj->getVerified()) { - return false; + continue; } - return true; - }); + $index = $obj->getName(); + if ($this->isCollection($index)) { + $incrementals[$index] = ($incrementals[$index] ?? -1) + 1; + $index .= '#' . $incrementals[$index]; + } + $result[$index] = $obj; + } + return $result; } public function jsonSerialize() { @@ -79,4 +111,22 @@ class Account implements IAccount { public function getUser(): IUser { return $this->user; } + + public function setPropertyCollection(IAccountPropertyCollection $propertyCollection): IAccount { + $this->properties[$propertyCollection->getName()] = $propertyCollection; + return $this; + } + + public function getPropertyCollection(string $propertyCollectionName): IAccountPropertyCollection { + if (!$this->isCollection($propertyCollectionName)) { + throw new PropertyDoesNotExistException($propertyCollectionName); + } + if (!array_key_exists($propertyCollectionName, $this->properties)) { + $this->properties[$propertyCollectionName] = new AccountPropertyCollection($propertyCollectionName); + } + if (!$this->properties[$propertyCollectionName] instanceof IAccountPropertyCollection) { + throw new RuntimeException('Requested collection is not an IAccountPropertyCollection'); + } + return $this->properties[$propertyCollectionName]; + } } diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index c5a0f21319e..3416db56ba5 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -1,4 +1,5 @@ <?php + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, Björn Schießle @@ -6,11 +7,14 @@ * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> + * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 * @@ -30,6 +34,8 @@ namespace OC\Accounts; +use Exception; +use InvalidArgumentException; use libphonenumber\NumberParseException; use libphonenumber\PhoneNumber; use libphonenumber\PhoneNumberFormat; @@ -37,15 +43,29 @@ use libphonenumber\PhoneNumberUtil; use OCA\Settings\BackgroundJobs\VerifyUserData; use OCP\Accounts\IAccount; use OCP\Accounts\IAccountManager; +use OCP\Accounts\IAccountProperty; +use OCP\Accounts\IAccountPropertyCollection; +use OCP\Accounts\PropertyDoesNotExistException; use OCP\BackgroundJob\IJobList; use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\Defaults; use OCP\IConfig; use OCP\IDBConnection; +use OCP\IL10N; +use OCP\IURLGenerator; use OCP\IUser; +use OCP\L10N\IFactory; +use OCP\Mail\IMailer; +use OCP\Security\ICrypto; +use OCP\Security\VerificationToken\IVerificationToken; +use OCP\Util; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; +use function array_flip; +use function iterator_to_array; use function json_decode; +use function json_encode; use function json_last_error; /** @@ -57,6 +77,7 @@ use function json_last_error; * @package OC\Accounts */ class AccountManager implements IAccountManager { + use TAccountsHelper; /** @var IDBConnection database connection */ private $connection; @@ -78,23 +99,52 @@ class AccountManager implements IAccountManager { /** @var LoggerInterface */ private $logger; - - public function __construct(IDBConnection $connection, - IConfig $config, - EventDispatcherInterface $eventDispatcher, - IJobList $jobList, - LoggerInterface $logger) { + /** @var IVerificationToken */ + private $verificationToken; + /** @var IMailer */ + private $mailer; + /** @var Defaults */ + private $defaults; + /** @var IL10N */ + private $l10n; + /** @var IURLGenerator */ + private $urlGenerator; + /** @var ICrypto */ + private $crypto; + /** @var IFactory */ + private $l10nfactory; + + public function __construct( + IDBConnection $connection, + IConfig $config, + EventDispatcherInterface $eventDispatcher, + IJobList $jobList, + LoggerInterface $logger, + IVerificationToken $verificationToken, + IMailer $mailer, + Defaults $defaults, + IFactory $factory, + IURLGenerator $urlGenerator, + ICrypto $crypto + ) { $this->connection = $connection; $this->config = $config; $this->eventDispatcher = $eventDispatcher; $this->jobList = $jobList; $this->logger = $logger; + $this->verificationToken = $verificationToken; + $this->mailer = $mailer; + $this->defaults = $defaults; + $this->urlGenerator = $urlGenerator; + $this->crypto = $crypto; + // DIing IL10N results in a dependency loop + $this->l10nfactory = $factory; } /** * @param string $input * @return string Provided phone number in E.164 format when it was a valid number - * @throws \InvalidArgumentException When the phone number was invalid or no default region is set and the number doesn't start with a country code + * @throws InvalidArgumentException When the phone number was invalid or no default region is set and the number doesn't start with a country code */ protected function parsePhoneNumber(string $input): string { $defaultRegion = $this->config->getSystemValueString('default_phone_region', ''); @@ -102,7 +152,7 @@ class AccountManager implements IAccountManager { if ($defaultRegion === '') { // When no default region is set, only +49… numbers are valid if (strpos($input, '+') !== 0) { - throw new \InvalidArgumentException(self::PROPERTY_PHONE); + throw new InvalidArgumentException(self::PROPERTY_PHONE); } $defaultRegion = 'EN'; @@ -117,38 +167,107 @@ class AccountManager implements IAccountManager { } catch (NumberParseException $e) { } - throw new \InvalidArgumentException(self::PROPERTY_PHONE); + throw new InvalidArgumentException(self::PROPERTY_PHONE); } /** - * update user record * - * @param IUser $user - * @param array $data - * @param bool $throwOnData Set to true if you can inform the user about invalid data - * @return array The potentially modified data (e.g. phone numbers are converted to E.164 format) - * @throws \InvalidArgumentException Message is the property that was invalid + * @param string $input + * @return string + * @throws InvalidArgumentException When the website did not have http(s) as protocol or the host name was empty */ - public function updateUser(IUser $user, array $data, bool $throwOnData = false): array { - $userData = $this->getUser($user); - $updated = true; + protected function parseWebsite(string $input): string { + $parts = parse_url($input); + if (!isset($parts['scheme']) || ($parts['scheme'] !== 'https' && $parts['scheme'] !== 'http')) { + throw new InvalidArgumentException(self::PROPERTY_WEBSITE); + } - if (isset($data[self::PROPERTY_PHONE]) && $data[self::PROPERTY_PHONE]['value'] !== '') { - try { - $data[self::PROPERTY_PHONE]['value'] = $this->parsePhoneNumber($data[self::PROPERTY_PHONE]['value']); - } catch (\InvalidArgumentException $e) { + if (!isset($parts['host']) || $parts['host'] === '') { + throw new InvalidArgumentException(self::PROPERTY_WEBSITE); + } + + return $input; + } + + /** + * @param IAccountProperty[] $properties + */ + protected function testValueLengths(array $properties, bool $throwOnData = false): void { + foreach ($properties as $property) { + if (strlen($property->getValue()) > 2048) { if ($throwOnData) { - throw $e; + throw new InvalidArgumentException(); + } else { + $property->setValue(''); } - $data[self::PROPERTY_PHONE]['value'] = ''; } } + } + + protected function testPropertyScope(IAccountProperty $property, array $allowedScopes, bool $throwOnData): void { + if ($throwOnData && !in_array($property->getScope(), $allowedScopes, true)) { + throw new InvalidArgumentException('scope'); + } + + if ( + $property->getScope() === self::SCOPE_PRIVATE + && in_array($property->getName(), [self::PROPERTY_DISPLAYNAME, self::PROPERTY_EMAIL]) + ) { + if ($throwOnData) { + // v2-private is not available for these fields + throw new InvalidArgumentException('scope'); + } else { + // default to local + $property->setScope(self::SCOPE_LOCAL); + } + } else { + // migrate scope values to the new format + // invalid scopes are mapped to a default value + $property->setScope(AccountProperty::mapScopeToV2($property->getScope())); + } + } + + protected function sanitizePhoneNumberValue(IAccountProperty $property, bool $throwOnData = false) { + if ($property->getName() !== self::PROPERTY_PHONE) { + if ($throwOnData) { + throw new InvalidArgumentException(sprintf('sanitizePhoneNumberValue can only sanitize phone numbers, %s given', $property->getName())); + } + return; + } + if ($property->getValue() === '') { + return; + } + try { + $property->setValue($this->parsePhoneNumber($property->getValue())); + } catch (InvalidArgumentException $e) { + if ($throwOnData) { + throw $e; + } + $property->setValue(''); + } + } - if (empty($userData)) { - $this->insertNewUser($user, $data); - } elseif ($userData !== $data) { - $data = $this->checkEmailVerification($userData, $data, $user); - $data = $this->updateVerifyStatus($userData, $data); + protected function sanitizeWebsite(IAccountProperty $property, bool $throwOnData = false) { + if ($property->getName() !== self::PROPERTY_WEBSITE) { + if ($throwOnData) { + throw new InvalidArgumentException(sprintf('sanitizeWebsite can only sanitize web domains, %s given', $property->getName())); + } + } + try { + $property->setValue($this->parseWebsite($property->getValue())); + } catch (InvalidArgumentException $e) { + if ($throwOnData) { + throw $e; + } + $property->setValue(''); + } + } + + protected function updateUser(IUser $user, array $data, bool $throwOnData = false): array { + $oldUserData = $this->getUser($user, false); + $updated = true; + + if ($oldUserData !== $data) { $this->updateExistingUser($user, $data); } else { // nothing needs to be done if new and old data set are the same @@ -195,37 +314,32 @@ class AccountManager implements IAccountManager { /** * get stored data from a given user - * - * @param IUser $user - * @return array */ - public function getUser(IUser $user) { + protected function getUser(IUser $user, bool $insertIfNotExists = true): array { $uid = $user->getUID(); $query = $this->connection->getQueryBuilder(); $query->select('data') ->from($this->table) ->where($query->expr()->eq('uid', $query->createParameter('uid'))) ->setParameter('uid', $uid); - $result = $query->execute(); + $result = $query->executeQuery(); $accountData = $result->fetchAll(); $result->closeCursor(); if (empty($accountData)) { $userData = $this->buildDefaultUserRecord($user); - $this->insertNewUser($user, $userData); + if ($insertIfNotExists) { + $this->insertNewUser($user, $userData); + } return $userData; } - $userDataArray = json_decode($accountData[0]['data'], true); - $jsonError = json_last_error(); - if ($userDataArray === null || $userDataArray === [] || $jsonError !== JSON_ERROR_NONE) { - $this->logger->critical("User data of $uid contained invalid JSON (error $jsonError), hence falling back to a default user record"); + $userDataArray = $this->importFromJson($accountData[0]['data'], $uid); + if ($userDataArray === null || $userDataArray === []) { return $this->buildDefaultUserRecord($user); } - $userDataArray = $this->addMissingDefaultValues($userDataArray); - - return $userDataArray; + return $this->addMissingDefaultValues($userDataArray, $this->buildDefaultUserRecord($user)); } public function searchUsers(string $property, array $values): array { @@ -239,112 +353,165 @@ class AccountManager implements IAccountManager { $matches = []; foreach ($chunks as $chunk) { $query->setParameter('values', $chunk, IQueryBuilder::PARAM_STR_ARRAY); - $result = $query->execute(); + $result = $query->executeQuery(); while ($row = $result->fetch()) { - $matches[$row['value']] = $row['uid']; + $matches[$row['uid']] = $row['value']; } $result->closeCursor(); } - return $matches; + $result = array_merge($matches, $this->searchUsersForRelatedCollection($property, $values)); + + return array_flip($result); + } + + protected function searchUsersForRelatedCollection(string $property, array $values): array { + switch ($property) { + case IAccountManager::PROPERTY_EMAIL: + return array_flip($this->searchUsers(IAccountManager::COLLECTION_EMAIL, $values)); + default: + return []; + } } /** * check if we need to ask the server for email verification, if yes we create a cronjob - * - * @param $oldData - * @param $newData - * @param IUser $user - * @return array */ - protected function checkEmailVerification($oldData, $newData, IUser $user) { - if ($oldData[self::PROPERTY_EMAIL]['value'] !== $newData[self::PROPERTY_EMAIL]['value']) { - $this->jobList->add(VerifyUserData::class, + protected function checkEmailVerification(IAccount $updatedAccount, array $oldData): void { + try { + $property = $updatedAccount->getProperty(self::PROPERTY_EMAIL); + } catch (PropertyDoesNotExistException $e) { + return; + } + $oldMail = isset($oldData[self::PROPERTY_EMAIL]) ? $oldData[self::PROPERTY_EMAIL]['value']['value'] : ''; + if ($oldMail !== $property->getValue()) { + $this->jobList->add( + VerifyUserData::class, [ 'verificationCode' => '', - 'data' => $newData[self::PROPERTY_EMAIL]['value'], + 'data' => $property->getValue(), 'type' => self::PROPERTY_EMAIL, - 'uid' => $user->getUID(), + 'uid' => $updatedAccount->getUser()->getUID(), 'try' => 0, 'lastRun' => time() ] ); - $newData[self::PROPERTY_EMAIL]['verified'] = self::VERIFICATION_IN_PROGRESS; - } - return $newData; + $property->setVerified(self::VERIFICATION_IN_PROGRESS); + } } - /** - * make sure that all expected data are set - * - * @param array $userData - * @return array - */ - protected function addMissingDefaultValues(array $userData) { - foreach ($userData as $key => $value) { - if (!isset($userData[$key]['verified'])) { - $userData[$key]['verified'] = self::NOT_VERIFIED; + protected function checkLocalEmailVerification(IAccount $updatedAccount, array $oldData): void { + $mailCollection = $updatedAccount->getPropertyCollection(self::COLLECTION_EMAIL); + foreach ($mailCollection->getProperties() as $property) { + if ($property->getLocallyVerified() !== self::NOT_VERIFIED) { + continue; + } + if ($this->sendEmailVerificationEmail($updatedAccount->getUser(), $property->getValue())) { + $property->setLocallyVerified(self::VERIFICATION_IN_PROGRESS); } } - - return $userData; } - /** - * reset verification status if personal data changed - * - * @param array $oldData - * @param array $newData - * @return array - */ - protected function updateVerifyStatus($oldData, $newData) { + protected function sendEmailVerificationEmail(IUser $user, string $email): bool { + $ref = \substr(hash('sha256', $email), 0, 8); + $key = $this->crypto->encrypt($email); + $token = $this->verificationToken->create($user, 'verifyMail' . $ref, $email); + + $link = $this->urlGenerator->linkToRouteAbsolute( + 'provisioning_api.Verification.verifyMail', + [ + 'userId' => $user->getUID(), + 'token' => $token, + 'key' => $key + ] + ); + + $emailTemplate = $this->mailer->createEMailTemplate('core.EmailVerification', [ + 'link' => $link, + ]); + + if (!$this->l10n) { + $this->l10n = $this->l10nfactory->get('core'); + } - // which account was already verified successfully? - $twitterVerified = isset($oldData[self::PROPERTY_TWITTER]['verified']) && $oldData[self::PROPERTY_TWITTER]['verified'] === self::VERIFIED; - $websiteVerified = isset($oldData[self::PROPERTY_WEBSITE]['verified']) && $oldData[self::PROPERTY_WEBSITE]['verified'] === self::VERIFIED; - $emailVerified = isset($oldData[self::PROPERTY_EMAIL]['verified']) && $oldData[self::PROPERTY_EMAIL]['verified'] === self::VERIFIED; + $emailTemplate->setSubject($this->l10n->t('%s email verification', [$this->defaults->getName()])); + $emailTemplate->addHeader(); + $emailTemplate->addHeading($this->l10n->t('Email verification')); - // keep old verification status if we don't have a new one - if (!isset($newData[self::PROPERTY_TWITTER]['verified'])) { - // keep old verification status if value didn't changed and an old value exists - $keepOldStatus = $newData[self::PROPERTY_TWITTER]['value'] === $oldData[self::PROPERTY_TWITTER]['value'] && isset($oldData[self::PROPERTY_TWITTER]['verified']); - $newData[self::PROPERTY_TWITTER]['verified'] = $keepOldStatus ? $oldData[self::PROPERTY_TWITTER]['verified'] : self::NOT_VERIFIED; - } + $emailTemplate->addBodyText( + htmlspecialchars($this->l10n->t('Click the following button to confirm your email.')), + $this->l10n->t('Click the following link to confirm your email.') + ); - if (!isset($newData[self::PROPERTY_WEBSITE]['verified'])) { - // keep old verification status if value didn't changed and an old value exists - $keepOldStatus = $newData[self::PROPERTY_WEBSITE]['value'] === $oldData[self::PROPERTY_WEBSITE]['value'] && isset($oldData[self::PROPERTY_WEBSITE]['verified']); - $newData[self::PROPERTY_WEBSITE]['verified'] = $keepOldStatus ? $oldData[self::PROPERTY_WEBSITE]['verified'] : self::NOT_VERIFIED; - } + $emailTemplate->addBodyButton( + htmlspecialchars($this->l10n->t('Confirm your email')), + $link, + false + ); + $emailTemplate->addFooter(); - if (!isset($newData[self::PROPERTY_EMAIL]['verified'])) { - // keep old verification status if value didn't changed and an old value exists - $keepOldStatus = $newData[self::PROPERTY_EMAIL]['value'] === $oldData[self::PROPERTY_EMAIL]['value'] && isset($oldData[self::PROPERTY_EMAIL]['verified']); - $newData[self::PROPERTY_EMAIL]['verified'] = $keepOldStatus ? $oldData[self::PROPERTY_EMAIL]['verified'] : self::VERIFICATION_IN_PROGRESS; + try { + $message = $this->mailer->createMessage(); + $message->setTo([$email => $user->getDisplayName()]); + $message->setFrom([Util::getDefaultEmailAddress('verification-noreply') => $this->defaults->getName()]); + $message->useTemplate($emailTemplate); + $this->mailer->send($message); + } catch (Exception $e) { + // Log the exception and continue + $this->logger->info('Failed to send verification mail', [ + 'app' => 'core', + 'exception' => $e + ]); + return false; } + return true; + } - // reset verification status if a value from a previously verified data was changed - if ($twitterVerified && - $oldData[self::PROPERTY_TWITTER]['value'] !== $newData[self::PROPERTY_TWITTER]['value'] - ) { - $newData[self::PROPERTY_TWITTER]['verified'] = self::NOT_VERIFIED; - } + /** + * Make sure that all expected data are set + */ + protected function addMissingDefaultValues(array $userData, array $defaultUserData): array { + foreach ($defaultUserData as $i => $value) { + // If property doesn't exists, initialize it + if (!array_key_exists($i, $userData)) { + $userData[$i] = []; + } - if ($websiteVerified && - $oldData[self::PROPERTY_WEBSITE]['value'] !== $newData[self::PROPERTY_WEBSITE]['value'] - ) { - $newData[self::PROPERTY_WEBSITE]['verified'] = self::NOT_VERIFIED; + // Merge and extend default missing values + $defaultValueIndex = array_search($value['name'], array_column($defaultUserData, 'name')); + $userData[$i] = array_merge($defaultUserData[$defaultValueIndex], $userData[$i]); } - if ($emailVerified && - $oldData[self::PROPERTY_EMAIL]['value'] !== $newData[self::PROPERTY_EMAIL]['value'] - ) { - $newData[self::PROPERTY_EMAIL]['verified'] = self::NOT_VERIFIED; - } + return $userData; + } - return $newData; + protected function updateVerificationStatus(IAccount $updatedAccount, array $oldData): void { + static $propertiesVerifiableByLookupServer = [ + self::PROPERTY_TWITTER, + self::PROPERTY_WEBSITE, + self::PROPERTY_EMAIL, + ]; + + foreach ($propertiesVerifiableByLookupServer as $propertyName) { + try { + $property = $updatedAccount->getProperty($propertyName); + } catch (PropertyDoesNotExistException $e) { + continue; + } + $wasVerified = isset($oldData[$propertyName]) + && isset($oldData[$propertyName]['verified']) + && $oldData[$propertyName]['verified'] === self::VERIFIED; + if ((!isset($oldData[$propertyName]) + || !isset($oldData[$propertyName]['value']) + || $property->getValue() !== $oldData[$propertyName]['value']) + && ($property->getVerified() !== self::NOT_VERIFIED + || $wasVerified) + ) { + $property->setVerified(self::NOT_VERIFIED); + } + } } /** @@ -355,7 +522,7 @@ class AccountManager implements IAccountManager { */ protected function insertNewUser(IUser $user, array $data): void { $uid = $user->getUID(); - $jsonEncodedData = json_encode($data); + $jsonEncodedData = $this->prepareJson($data); $query = $this->connection->getQueryBuilder(); $query->insert($this->table) ->values( @@ -364,12 +531,61 @@ class AccountManager implements IAccountManager { 'data' => $query->createNamedParameter($jsonEncodedData), ] ) - ->execute(); + ->executeStatement(); $this->deleteUserData($user); $this->writeUserData($user, $data); } + protected function prepareJson(array $data): string { + $preparedData = []; + foreach ($data as $dataRow) { + $propertyName = $dataRow['name']; + unset($dataRow['name']); + + if (isset($dataRow['locallyVerified']) && $dataRow['locallyVerified'] === self::NOT_VERIFIED) { + // do not write default value, save DB space + unset($dataRow['locallyVerified']); + } + + if (!$this->isCollection($propertyName)) { + $preparedData[$propertyName] = $dataRow; + continue; + } + if (!isset($preparedData[$propertyName])) { + $preparedData[$propertyName] = []; + } + $preparedData[$propertyName][] = $dataRow; + } + return json_encode($preparedData); + } + + protected function importFromJson(string $json, string $userId): ?array { + $result = []; + $jsonArray = json_decode($json, true); + $jsonError = json_last_error(); + if ($jsonError !== JSON_ERROR_NONE) { + $this->logger->critical( + 'User data of {uid} contained invalid JSON (error {json_error}), hence falling back to a default user record', + [ + 'uid' => $userId, + 'json_error' => $jsonError + ] + ); + return null; + } + foreach ($jsonArray as $propertyName => $row) { + if (!$this->isCollection($propertyName)) { + $result[] = array_merge($row, ['name' => $propertyName]); + continue; + } + foreach ($row as $singleRow) { + $result[] = array_merge($singleRow, ['name' => $propertyName]); + } + } + return $result; + } + /** * update existing user in accounts table * @@ -378,12 +594,12 @@ class AccountManager implements IAccountManager { */ protected function updateExistingUser(IUser $user, array $data): void { $uid = $user->getUID(); - $jsonEncodedData = json_encode($data); + $jsonEncodedData = $this->prepareJson($data); $query = $this->connection->getQueryBuilder(); $query->update($this->table) ->set('data', $query->createNamedParameter($jsonEncodedData)) ->where($query->expr()->eq('uid', $query->createNamedParameter($uid))) - ->execute(); + ->executeStatement(); $this->deleteUserData($user); $this->writeUserData($user, $data); @@ -399,14 +615,18 @@ class AccountManager implements IAccountManager { 'value' => $query->createParameter('value'), ] ); - foreach ($data as $propertyName => $property) { - if ($propertyName === self::PROPERTY_AVATAR) { + $this->writeUserDataProperties($query, $data); + } + + protected function writeUserDataProperties(IQueryBuilder $query, array $data): void { + foreach ($data as $property) { + if ($property['name'] === self::PROPERTY_AVATAR) { continue; } - $query->setParameter('name', $propertyName) - ->setParameter('value', $property['value']); - $query->execute(); + $query->setParameter('name', $property['name']) + ->setParameter('value', $property['value'] ?? ''); + $query->executeStatement(); } } @@ -418,53 +638,112 @@ class AccountManager implements IAccountManager { */ protected function buildDefaultUserRecord(IUser $user) { return [ - self::PROPERTY_DISPLAYNAME => - [ - 'value' => $user->getDisplayName(), - 'scope' => self::VISIBILITY_CONTACTS_ONLY, - 'verified' => self::NOT_VERIFIED, - ], - self::PROPERTY_ADDRESS => - [ - 'value' => '', - 'scope' => self::VISIBILITY_PRIVATE, - 'verified' => self::NOT_VERIFIED, - ], - self::PROPERTY_WEBSITE => - [ - 'value' => '', - 'scope' => self::VISIBILITY_PRIVATE, - 'verified' => self::NOT_VERIFIED, - ], - self::PROPERTY_EMAIL => - [ - 'value' => $user->getEMailAddress(), - 'scope' => self::VISIBILITY_CONTACTS_ONLY, - 'verified' => self::NOT_VERIFIED, - ], - self::PROPERTY_AVATAR => - [ - 'scope' => self::VISIBILITY_CONTACTS_ONLY - ], - self::PROPERTY_PHONE => - [ - 'value' => '', - 'scope' => self::VISIBILITY_PRIVATE, - 'verified' => self::NOT_VERIFIED, - ], - self::PROPERTY_TWITTER => - [ - 'value' => '', - 'scope' => self::VISIBILITY_PRIVATE, - 'verified' => self::NOT_VERIFIED, - ], + [ + 'name' => self::PROPERTY_DISPLAYNAME, + 'value' => $user->getDisplayName(), + 'scope' => self::SCOPE_FEDERATED, + 'verified' => self::NOT_VERIFIED, + ], + + [ + 'name' => self::PROPERTY_ADDRESS, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + 'verified' => self::NOT_VERIFIED, + ], + + [ + 'name' => self::PROPERTY_WEBSITE, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + 'verified' => self::NOT_VERIFIED, + ], + + [ + 'name' => self::PROPERTY_EMAIL, + 'value' => $user->getEMailAddress(), + 'scope' => self::SCOPE_FEDERATED, + 'verified' => self::NOT_VERIFIED, + ], + + [ + 'name' => self::PROPERTY_AVATAR, + 'scope' => self::SCOPE_FEDERATED + ], + + [ + 'name' => self::PROPERTY_PHONE, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + 'verified' => self::NOT_VERIFIED, + ], + + [ + 'name' => self::PROPERTY_TWITTER, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + 'verified' => self::NOT_VERIFIED, + ], + + [ + 'name' => self::PROPERTY_ORGANISATION, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + ], + + [ + 'name' => self::PROPERTY_ROLE, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + ], + + [ + 'name' => self::PROPERTY_HEADLINE, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + ], + + [ + 'name' => self::PROPERTY_BIOGRAPHY, + 'value' => '', + 'scope' => self::SCOPE_LOCAL, + ], + + [ + 'name' => self::PROPERTY_PROFILE_ENABLED, + 'value' => '1', + ], ]; } + private function arrayDataToCollection(IAccount $account, array $data): IAccountPropertyCollection { + $collection = $account->getPropertyCollection($data['name']); + + $p = new AccountProperty( + $data['name'], + $data['value'] ?? '', + $data['scope'] ?? self::SCOPE_LOCAL, + $data['verified'] ?? self::NOT_VERIFIED, + '' + ); + $p->setLocallyVerified($data['locallyVerified'] ?? self::NOT_VERIFIED); + $collection->addProperty($p); + + return $collection; + } + private function parseAccountData(IUser $user, $data): Account { $account = new Account($user); - foreach ($data as $property => $accountData) { - $account->setProperty($property, $accountData['value'] ?? '', $accountData['scope'] ?? self::VISIBILITY_PRIVATE, $accountData['verified'] ?? self::NOT_VERIFIED); + foreach ($data as $accountData) { + if ($this->isCollection($accountData['name'])) { + $account->setPropertyCollection($this->arrayDataToCollection($account, $accountData)); + } else { + $account->setProperty($accountData['name'], $accountData['value'] ?? '', $accountData['scope'] ?? self::SCOPE_LOCAL, $accountData['verified'] ?? self::NOT_VERIFIED); + if (isset($accountData['locallyVerified'])) { + $property = $account->getProperty($accountData['name']); + $property->setLocallyVerified($accountData['locallyVerified']); + } + } } return $account; } @@ -472,4 +751,53 @@ class AccountManager implements IAccountManager { public function getAccount(IUser $user): IAccount { return $this->parseAccountData($user, $this->getUser($user)); } + + public function updateAccount(IAccount $account): void { + $this->testValueLengths(iterator_to_array($account->getAllProperties()), true); + try { + $property = $account->getProperty(self::PROPERTY_PHONE); + $this->sanitizePhoneNumberValue($property); + } catch (PropertyDoesNotExistException $e) { + // valid case, nothing to do + } + + try { + $property = $account->getProperty(self::PROPERTY_WEBSITE); + $this->sanitizeWebsite($property); + } catch (PropertyDoesNotExistException $e) { + // valid case, nothing to do + } + + static $allowedScopes = [ + self::SCOPE_PRIVATE, + self::SCOPE_LOCAL, + self::SCOPE_FEDERATED, + self::SCOPE_PUBLISHED, + self::VISIBILITY_PRIVATE, + self::VISIBILITY_CONTACTS_ONLY, + self::VISIBILITY_PUBLIC, + ]; + foreach ($account->getAllProperties() as $property) { + $this->testPropertyScope($property, $allowedScopes, true); + } + + $oldData = $this->getUser($account->getUser(), false); + $this->updateVerificationStatus($account, $oldData); + $this->checkEmailVerification($account, $oldData); + $this->checkLocalEmailVerification($account, $oldData); + + $data = []; + foreach ($account->getAllProperties() as $property) { + /** @var IAccountProperty $property */ + $data[] = [ + 'name' => $property->getName(), + 'value' => $property->getValue(), + 'scope' => $property->getScope(), + 'verified' => $property->getVerified(), + 'locallyVerified' => $property->getLocallyVerified(), + ]; + } + + $this->updateUser($account->getUser(), $data, true); + } } diff --git a/lib/private/Accounts/AccountProperty.php b/lib/private/Accounts/AccountProperty.php index 97f9b1c356f..0e6356e9e92 100644 --- a/lib/private/Accounts/AccountProperty.php +++ b/lib/private/Accounts/AccountProperty.php @@ -5,7 +5,9 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Julius Härtl <jus@bitgrid.net> + * @author Vincent Petry <vincent@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -16,16 +18,17 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Accounts; +use InvalidArgumentException; +use OCP\Accounts\IAccountManager; use OCP\Accounts\IAccountProperty; class AccountProperty implements IAccountProperty { @@ -38,12 +41,17 @@ class AccountProperty implements IAccountProperty { private $scope; /** @var string */ private $verified; + /** @var string */ + private $verificationData; + /** @var string */ + private $locallyVerified = IAccountManager::NOT_VERIFIED; - public function __construct(string $name, string $value, string $scope, string $verified) { + public function __construct(string $name, string $value, string $scope, string $verified, string $verificationData) { $this->name = $name; $this->value = $value; - $this->scope = $scope; + $this->setScope($scope); $this->verified = $verified; + $this->verificationData = $verificationData; } public function jsonSerialize() { @@ -51,7 +59,8 @@ class AccountProperty implements IAccountProperty { 'name' => $this->getName(), 'value' => $this->getValue(), 'scope' => $this->getScope(), - 'verified' => $this->getVerified() + 'verified' => $this->getVerified(), + 'verificationData' => $this->getVerificationData(), ]; } @@ -77,7 +86,16 @@ class AccountProperty implements IAccountProperty { * @return IAccountProperty */ public function setScope(string $scope): IAccountProperty { - $this->scope = $scope; + $newScope = $this->mapScopeToV2($scope); + if (!in_array($newScope, [ + IAccountManager::SCOPE_LOCAL, + IAccountManager::SCOPE_FEDERATED, + IAccountManager::SCOPE_PRIVATE, + IAccountManager::SCOPE_PUBLISHED + ])) { + throw new InvalidArgumentException('Invalid scope'); + } + $this->scope = $newScope; return $this; } @@ -127,6 +145,23 @@ class AccountProperty implements IAccountProperty { return $this->scope; } + public static function mapScopeToV2(string $scope): string { + if (strpos($scope, 'v2-') === 0) { + return $scope; + } + + switch ($scope) { + case IAccountManager::VISIBILITY_PRIVATE: + return IAccountManager::SCOPE_LOCAL; + case IAccountManager::VISIBILITY_CONTACTS_ONLY: + return IAccountManager::SCOPE_FEDERATED; + case IAccountManager::VISIBILITY_PUBLIC: + return IAccountManager::SCOPE_PUBLISHED; + default: + return $scope; + } + } + /** * Get the verification status of a property * @@ -137,4 +172,29 @@ class AccountProperty implements IAccountProperty { public function getVerified(): string { return $this->verified; } + + public function setVerificationData(string $verificationData): IAccountProperty { + $this->verificationData = $verificationData; + return $this; + } + + public function getVerificationData(): string { + return $this->verificationData; + } + + public function setLocallyVerified(string $verified): IAccountProperty { + if (!in_array($verified, [ + IAccountManager::NOT_VERIFIED, + IAccountManager::VERIFICATION_IN_PROGRESS, + IAccountManager::VERIFIED, + ])) { + throw new InvalidArgumentException('Provided verification value is invalid'); + } + $this->locallyVerified = $verified; + return $this; + } + + public function getLocallyVerified(): string { + return $this->locallyVerified; + } } diff --git a/lib/private/Accounts/AccountPropertyCollection.php b/lib/private/Accounts/AccountPropertyCollection.php new file mode 100644 index 00000000000..3aed76d8746 --- /dev/null +++ b/lib/private/Accounts/AccountPropertyCollection.php @@ -0,0 +1,112 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OC\Accounts; + +use InvalidArgumentException; +use OCP\Accounts\IAccountManager; +use OCP\Accounts\IAccountProperty; +use OCP\Accounts\IAccountPropertyCollection; + +class AccountPropertyCollection implements IAccountPropertyCollection { + + /** @var string */ + protected $collectionName = ''; + + /** @var IAccountProperty[] */ + protected $properties = []; + + public function __construct(string $collectionName) { + $this->collectionName = $collectionName; + } + + public function setProperties(array $properties): IAccountPropertyCollection { + /** @var IAccountProperty $property */ + $this->properties = []; + foreach ($properties as $property) { + $this->addProperty($property); + } + return $this; + } + + public function getProperties(): array { + return $this->properties; + } + + public function addProperty(IAccountProperty $property): IAccountPropertyCollection { + if ($property->getName() !== $this->collectionName) { + throw new InvalidArgumentException('Provided property does not match collection name'); + } + $this->properties[] = $property; + return $this; + } + + public function addPropertyWithDefaults(string $value): IAccountPropertyCollection { + $property = new AccountProperty( + $this->collectionName, + $value, + IAccountManager::SCOPE_LOCAL, + IAccountManager::NOT_VERIFIED, + '' + ); + $this->addProperty($property); + return $this; + } + + public function removeProperty(IAccountProperty $property): IAccountPropertyCollection { + $ref = array_search($property, $this->properties, true); + if ($ref !== false) { + unset($this->properties[$ref]); + } + return $this; + } + + public function getPropertyByValue(string $value): ?IAccountProperty { + foreach ($this->properties as $i => $property) { + if ($property->getValue() === $value) { + return $property; + } + } + return null; + } + + public function removePropertyByValue(string $value): IAccountPropertyCollection { + foreach ($this->properties as $i => $property) { + if ($property->getValue() === $value) { + unset($this->properties[$i]); + } + } + return $this; + } + + public function jsonSerialize() { + return [$this->collectionName => $this->properties]; + } + + public function getName(): string { + return $this->collectionName; + } +} diff --git a/lib/private/Accounts/Hooks.php b/lib/private/Accounts/Hooks.php index d4e9637dfee..93918284180 100644 --- a/lib/private/Accounts/Hooks.php +++ b/lib/private/Accounts/Hooks.php @@ -15,77 +15,65 @@ * * 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 + * 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/>. * */ - namespace OC\Accounts; use OCP\Accounts\IAccountManager; +use OCP\Accounts\PropertyDoesNotExistException; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; use OCP\IUser; +use OCP\User\Events\UserChangedEvent; use Psr\Log\LoggerInterface; -class Hooks { +class Hooks implements IEventListener { - /** @var AccountManager|null */ + /** @var IAccountManager */ private $accountManager; - /** @var LoggerInterface */ private $logger; - public function __construct(LoggerInterface $logger) { + public function __construct(LoggerInterface $logger, IAccountManager $accountManager) { $this->logger = $logger; + $this->accountManager = $accountManager; } /** * update accounts table if email address or display name was changed from outside - * - * @param array $params */ - public function changeUserHook($params) { - $accountManager = $this->getAccountManager(); + public function changeUserHook(IUser $user, string $feature, $newValue): void { + $account = $this->accountManager->getAccount($user); - /** @var IUser $user */ - $user = isset($params['user']) ? $params['user'] : null; - $feature = isset($params['feature']) ? $params['feature'] : null; - $newValue = isset($params['value']) ? $params['value'] : null; - - if (is_null($user) || is_null($feature) || is_null($newValue)) { - $this->logger->warning('Missing expected parameters in change user hook'); + try { + switch ($feature) { + case 'eMailAddress': + $property = $account->getProperty(IAccountManager::PROPERTY_EMAIL); + break; + case 'displayName': + $property = $account->getProperty(IAccountManager::PROPERTY_DISPLAYNAME); + break; + } + } catch (PropertyDoesNotExistException $e) { + $this->logger->debug($e->getMessage(), ['exception' => $e]); return; } - $accountData = $accountManager->getUser($user); - - switch ($feature) { - case 'eMailAddress': - if ($accountData[IAccountManager::PROPERTY_EMAIL]['value'] !== $newValue) { - $accountData[IAccountManager::PROPERTY_EMAIL]['value'] = $newValue; - $accountManager->updateUser($user, $accountData); - } - break; - case 'displayName': - if ($accountData[IAccountManager::PROPERTY_DISPLAYNAME]['value'] !== $newValue) { - $accountData[IAccountManager::PROPERTY_DISPLAYNAME]['value'] = $newValue; - $accountManager->updateUser($user, $accountData); - } - break; + if (isset($property) && $property->getValue() !== (string)$newValue) { + $property->setValue($newValue); + $this->accountManager->updateAccount($account); } } - /** - * return instance of accountManager - * - * @return AccountManager - */ - protected function getAccountManager(): AccountManager { - if ($this->accountManager === null) { - $this->accountManager = \OC::$server->query(AccountManager::class); + public function handle(Event $event): void { + if (!$event instanceof UserChangedEvent) { + return; } - return $this->accountManager; + $this->changeUserHook($event->getUser(), $event->getFeature(), $event->getValue()); } } diff --git a/lib/private/Accounts/TAccountsHelper.php b/lib/private/Accounts/TAccountsHelper.php new file mode 100644 index 00000000000..f3be6523d29 --- /dev/null +++ b/lib/private/Accounts/TAccountsHelper.php @@ -0,0 +1,44 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OC\Accounts; + +use OCP\Accounts\IAccountManager; + +trait TAccountsHelper { + /** + * returns whether the property is a collection + */ + protected function isCollection(string $propertyName): bool { + return in_array( + $propertyName, + [ + IAccountManager::COLLECTION_EMAIL, + ], + true + ); + } +} diff --git a/lib/private/Activity/ActivitySettingsAdapter.php b/lib/private/Activity/ActivitySettingsAdapter.php index 2dd852f0fd4..eba13ad0350 100644 --- a/lib/private/Activity/ActivitySettingsAdapter.php +++ b/lib/private/Activity/ActivitySettingsAdapter.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Activity; use OCP\Activity\ActivitySettings; diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php index 8535561cbbe..fd0c0afd9d8 100644 --- a/lib/private/Activity/Event.php +++ b/lib/private/Activity/Event.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Activity; use OCP\Activity\IEvent; diff --git a/lib/private/Activity/EventMerger.php b/lib/private/Activity/EventMerger.php index 9a59551c2ac..5f0993532cb 100644 --- a/lib/private/Activity/EventMerger.php +++ b/lib/private/Activity/EventMerger.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Activity; use OCP\Activity\IEvent; diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php index 25b666e6a0e..00b2ba434a8 100644 --- a/lib/private/Activity/Manager.php +++ b/lib/private/Activity/Manager.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Activity; use OCP\Activity\ActivitySettings; diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 36f5f2cd40a..40a52b16628 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -30,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\Cache\CappedMemoryCache; diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 7063878429a..b1f3097cc3d 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -35,7 +35,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\App; use OC\AppConfig; @@ -46,9 +45,9 @@ use OCP\ICacheFactory; use OCP\IConfig; use OCP\IGroup; use OCP\IGroupManager; -use OCP\ILogger; use OCP\IUser; use OCP\IUserSession; +use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; class AppManager implements IAppManager { @@ -83,7 +82,7 @@ class AppManager implements IAppManager { /** @var EventDispatcherInterface */ private $dispatcher; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var string[] $appId => $enabled */ @@ -104,21 +103,13 @@ class AppManager implements IAppManager { /** @var array */ private $autoDisabledApps = []; - /** - * @param IUserSession $userSession - * @param IConfig $config - * @param AppConfig $appConfig - * @param IGroupManager $groupManager - * @param ICacheFactory $memCacheFactory - * @param EventDispatcherInterface $dispatcher - */ public function __construct(IUserSession $userSession, IConfig $config, AppConfig $appConfig, IGroupManager $groupManager, ICacheFactory $memCacheFactory, EventDispatcherInterface $dispatcher, - ILogger $logger) { + LoggerInterface $logger) { $this->userSession = $userSession; $this->config = $config; $this->appConfig = $appConfig; @@ -249,7 +240,7 @@ class AppManager implements IAppManager { if (!is_array($groupIds)) { $jsonError = json_last_error(); - $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError, ['app' => 'lib']); + $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError); return false; } @@ -282,7 +273,7 @@ class AppManager implements IAppManager { if (!is_array($groupIds)) { $jsonError = json_last_error(); - $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError, ['app' => 'lib']); + $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError); return false; } @@ -400,7 +391,11 @@ class AppManager implements IAppManager { } if ($automaticDisabled) { - $this->autoDisabledApps[] = $appId; + $previousSetting = $this->appConfig->getValue($appId, 'enabled', 'yes'); + if ($previousSetting !== 'yes' && $previousSetting !== 'no') { + $previousSetting = json_decode($previousSetting, true); + } + $this->autoDisabledApps[$appId] = $previousSetting; } unset($this->installedAppsCache[$appId]); @@ -544,7 +539,7 @@ class AppManager implements IAppManager { foreach ($apps as $appId) { $info = $this->getAppInfo($appId); if ($info === null) { - $incompatibleApps[] = ['id' => $appId]; + $incompatibleApps[] = ['id' => $appId, 'name' => $appId]; } elseif (!\OC_App::isAppCompatible($version, $info)) { $incompatibleApps[] = $info; } diff --git a/lib/private/App/AppStore/Bundles/Bundle.php b/lib/private/App/AppStore/Bundles/Bundle.php index 1143558d2ef..dfc93fdfaa2 100644 --- a/lib/private/App/AppStore/Bundles/Bundle.php +++ b/lib/private/App/AppStore/Bundles/Bundle.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; use OCP\IL10N; diff --git a/lib/private/App/AppStore/Bundles/BundleFetcher.php b/lib/private/App/AppStore/Bundles/BundleFetcher.php index 3ceb049fda8..7ffe1fa17d7 100644 --- a/lib/private/App/AppStore/Bundles/BundleFetcher.php +++ b/lib/private/App/AppStore/Bundles/BundleFetcher.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; use OCP\IL10N; diff --git a/lib/private/App/AppStore/Bundles/CoreBundle.php b/lib/private/App/AppStore/Bundles/CoreBundle.php index 4e28d673883..b1b182fd1ac 100644 --- a/lib/private/App/AppStore/Bundles/CoreBundle.php +++ b/lib/private/App/AppStore/Bundles/CoreBundle.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; class CoreBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/EducationBundle.php b/lib/private/App/AppStore/Bundles/EducationBundle.php index f59e8a115e2..661cc70578f 100644 --- a/lib/private/App/AppStore/Bundles/EducationBundle.php +++ b/lib/private/App/AppStore/Bundles/EducationBundle.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * * @author Lukas Reschke <lukas@statuscode.ch> + * @author Morris Jobke <hey@morrisjobke.de> * * @license GNU AGPL version 3 or any later version * @@ -13,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; class EducationBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/EnterpriseBundle.php b/lib/private/App/AppStore/Bundles/EnterpriseBundle.php index 37213fe5a39..901467048a8 100644 --- a/lib/private/App/AppStore/Bundles/EnterpriseBundle.php +++ b/lib/private/App/AppStore/Bundles/EnterpriseBundle.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; class EnterpriseBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/GroupwareBundle.php b/lib/private/App/AppStore/Bundles/GroupwareBundle.php index 604ed44aa08..f1e130806c4 100644 --- a/lib/private/App/AppStore/Bundles/GroupwareBundle.php +++ b/lib/private/App/AppStore/Bundles/GroupwareBundle.php @@ -4,6 +4,7 @@ * * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Lukas Reschke <lukas@statuscode.ch> + * @author Morris Jobke <hey@morrisjobke.de> * * @license GNU AGPL version 3 or any later version * @@ -14,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; class GroupwareBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/HubBundle.php b/lib/private/App/AppStore/Bundles/HubBundle.php index 301be810c5d..a52de1dfbd4 100644 --- a/lib/private/App/AppStore/Bundles/HubBundle.php +++ b/lib/private/App/AppStore/Bundles/HubBundle.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; class HubBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php index cd063f6fa88..394cce17d63 100644 --- a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php +++ b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * * @author Lukas Reschke <lukas@statuscode.ch> + * @author Morris Jobke <hey@morrisjobke.de> * * @license GNU AGPL version 3 or any later version * @@ -13,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Bundles; class SocialSharingBundle extends Bundle { diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php index 416e55463cf..6c201978e1f 100644 --- a/lib/private/App/AppStore/Fetcher/AppFetcher.php +++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php @@ -2,11 +2,11 @@ /** * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> + * @author Jakub Onderka <ahoj@jakubonderka.cz> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -20,14 +20,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Fetcher; use OC\App\AppStore\Version\VersionParser; @@ -36,41 +35,41 @@ use OC\Files\AppData\Factory; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Http\Client\IClientService; use OCP\IConfig; -use OCP\ILogger; +use OCP\Support\Subscription\IRegistry; +use Psr\Log\LoggerInterface; class AppFetcher extends Fetcher { /** @var CompareVersion */ private $compareVersion; + /** @var IRegistry */ + protected $registry; + /** @var bool */ private $ignoreMaxVersion; - /** - * @param Factory $appDataFactory - * @param IClientService $clientService - * @param ITimeFactory $timeFactory - * @param IConfig $config - * @param CompareVersion $compareVersion - * @param ILogger $logger - */ public function __construct(Factory $appDataFactory, IClientService $clientService, ITimeFactory $timeFactory, IConfig $config, CompareVersion $compareVersion, - ILogger $logger) { + LoggerInterface $logger, + IRegistry $registry) { parent::__construct( $appDataFactory, $clientService, $timeFactory, $config, - $logger + $logger, + $registry ); + $this->compareVersion = $compareVersion; + $this->registry = $registry; + $this->fileName = 'apps.json'; $this->endpointName = 'apps.json'; - $this->compareVersion = $compareVersion; $this->ignoreMaxVersion = true; } @@ -86,7 +85,7 @@ class AppFetcher extends Fetcher { protected function fetch($ETag, $content, $allowUnstable = false) { /** @var mixed[] $response */ $response = parent::fetch($ETag, $content); - + if (empty($response)) { return []; } @@ -134,7 +133,9 @@ class AppFetcher extends Fetcher { $releases[] = $release; } } catch (\InvalidArgumentException $e) { - $this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]); + $this->logger->warning($e->getMessage(), [ + 'exception' => $e, + ]); } } } @@ -150,7 +151,9 @@ class AppFetcher extends Fetcher { foreach ($releases as $release) { $versions[] = $release['version']; } - usort($versions, 'version_compare'); + usort($versions, function ($version1, $version2) { + return version_compare($version1, $version2); + }); $versions = array_reverse($versions); if (isset($versions[0])) { $highestVersion = $versions[0]; @@ -177,4 +180,19 @@ class AppFetcher extends Fetcher { $this->fileName = $fileName; $this->ignoreMaxVersion = $ignoreMaxVersion; } + + + public function get($allowUnstable = false) { + $apps = parent::get($allowUnstable); + $allowList = $this->config->getSystemValue('appsallowlist'); + + // If the admin specified a allow list, filter apps from the appstore + if (is_array($allowList) && $this->registry->delegateHasValidSubscription()) { + return array_filter($apps, function ($app) use ($allowList) { + return in_array($app['id'], $allowList); + }); + } + + return $apps; + } } diff --git a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php index e34fbee8c58..afe051e6281 100644 --- a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php +++ b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php @@ -17,42 +17,38 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Fetcher; use OC\Files\AppData\Factory; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Http\Client\IClientService; use OCP\IConfig; -use OCP\ILogger; +use OCP\Support\Subscription\IRegistry; +use Psr\Log\LoggerInterface; class CategoryFetcher extends Fetcher { - /** - * @param Factory $appDataFactory - * @param IClientService $clientService - * @param ITimeFactory $timeFactory - * @param IConfig $config - * @param ILogger $logger - */ public function __construct(Factory $appDataFactory, IClientService $clientService, ITimeFactory $timeFactory, IConfig $config, - ILogger $logger) { + LoggerInterface $logger, + IRegistry $registry) { parent::__construct( $appDataFactory, $clientService, $timeFactory, $config, - $logger + $logger, + $registry ); + $this->fileName = 'categories.json'; $this->endpointName = 'categories.json'; } diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php index c5d83fcb1df..788f15c183f 100644 --- a/lib/private/App/AppStore/Fetcher/Fetcher.php +++ b/lib/private/App/AppStore/Fetcher/Fetcher.php @@ -5,7 +5,7 @@ * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -21,14 +21,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Fetcher; use GuzzleHttp\Exception\ConnectException; @@ -39,7 +38,8 @@ use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\Http\Client\IClientService; use OCP\IConfig; -use OCP\ILogger; +use OCP\Support\Subscription\IRegistry; +use Psr\Log\LoggerInterface; abstract class Fetcher { public const INVALIDATE_AFTER_SECONDS = 3600; @@ -53,8 +53,11 @@ abstract class Fetcher { protected $timeFactory; /** @var IConfig */ protected $config; - /** @var Ilogger */ + /** @var LoggerInterface */ protected $logger; + /** @var IRegistry */ + protected $registry; + /** @var string */ protected $fileName; /** @var string */ @@ -64,23 +67,18 @@ abstract class Fetcher { /** @var string */ protected $channel; - /** - * @param Factory $appDataFactory - * @param IClientService $clientService - * @param ITimeFactory $timeFactory - * @param IConfig $config - * @param ILogger $logger - */ public function __construct(Factory $appDataFactory, IClientService $clientService, ITimeFactory $timeFactory, IConfig $config, - ILogger $logger) { + LoggerInterface $logger, + IRegistry $registry) { $this->appData = $appDataFactory->get('appstore'); $this->clientService = $clientService; $this->timeFactory = $timeFactory; $this->config = $config; $this->logger = $logger; + $this->registry = $registry; } /** @@ -92,7 +90,7 @@ abstract class Fetcher { * @return array */ protected function fetch($ETag, $content) { - $appstoreenabled = $this->config->getSystemValue('appstoreenabled', true); + $appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true); if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) { return []; } @@ -111,6 +109,12 @@ abstract class Fetcher { ]; } + // If we have a valid subscription key, send it to the appstore + $subscriptionKey = $this->config->getAppValue('support', 'subscription_key'); + if ($this->registry->delegateHasValidSubscription() && $subscriptionKey) { + $options['headers']['X-NC-Subscription-Key'] = $subscriptionKey; + } + $client = $this->clientService->newClient(); try { $response = $client->get($this->getEndpoint(), $options); @@ -144,7 +148,7 @@ abstract class Fetcher { * @return array */ public function get($allowUnstable = false) { - $appstoreenabled = $this->config->getSystemValue('appstoreenabled', true); + $appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true); $internetavailable = $this->config->getSystemValue('has_internet_connection', true); if (!$appstoreenabled || !$internetavailable) { @@ -202,7 +206,10 @@ abstract class Fetcher { $this->logger->warning('Could not connect to appstore: ' . $e->getMessage(), ['app' => 'appstoreFetcher']); return []; } catch (\Exception $e) { - $this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]); + $this->logger->warning($e->getMessage(), [ + 'exception' => $e, + 'app' => 'appstoreFetcher', + ]); return []; } } diff --git a/lib/private/App/AppStore/Version/Version.php b/lib/private/App/AppStore/Version/Version.php index ad43c7320f6..d41ca1770f0 100644 --- a/lib/private/App/AppStore/Version/Version.php +++ b/lib/private/App/AppStore/Version/Version.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Version; class Version { diff --git a/lib/private/App/AppStore/Version/VersionParser.php b/lib/private/App/AppStore/Version/VersionParser.php index b2e2f163ac4..6a369b1cb6e 100644 --- a/lib/private/App/AppStore/Version/VersionParser.php +++ b/lib/private/App/AppStore/Version/VersionParser.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\App\AppStore\Version; /** diff --git a/lib/private/App/CompareVersion.php b/lib/private/App/CompareVersion.php index 9df28a457ff..d155945fff1 100644 --- a/lib/private/App/CompareVersion.php +++ b/lib/private/App/CompareVersion.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\App; use InvalidArgumentException; diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php index 2ca0cdeabf3..373e3c5e04d 100644 --- a/lib/private/App/DependencyAnalyzer.php +++ b/lib/private/App/DependencyAnalyzer.php @@ -12,7 +12,6 @@ * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Stefan Weil <sw@weilnetz.de> * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Valdnet <47037905+Valdnet@users.noreply.github.com> * * @license AGPL-3.0 * @@ -29,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\App; use OCP\IL10N; diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php index c87dd1ae2a4..9d57ef95688 100644 --- a/lib/private/App/InfoParser.php +++ b/lib/private/App/InfoParser.php @@ -9,7 +9,6 @@ * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -28,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\App; use OCP\ICache; @@ -255,7 +253,7 @@ class InfoParser { if (!count($node->children())) { $value = (string)$node; if (!empty($value)) { - $data['@value'] = (string)$node; + $data['@value'] = $value; } } else { $data = array_merge($data, $this->xmlToArray($node)); diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php index f83e7cf8272..12097abbc78 100644 --- a/lib/private/App/Platform.php +++ b/lib/private/App/Platform.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\App; use OCP\IConfig; diff --git a/lib/private/App/PlatformRepository.php b/lib/private/App/PlatformRepository.php index 816470e1202..ed8e550ca77 100644 --- a/lib/private/App/PlatformRepository.php +++ b/lib/private/App/PlatformRepository.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 @@ -21,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\App; /** diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index 6a0dc2fab2b..e2d6d49a845 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -30,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\DB\Connection; diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index 974da87eb6d..6c2f905afa5 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -29,17 +29,16 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework; use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\Http\Dispatcher; use OC\AppFramework\Http\Request; -use OC\HintException; use OCP\AppFramework\Http; use OCP\AppFramework\Http\ICallbackResponse; use OCP\AppFramework\Http\IOutput; use OCP\AppFramework\QueryException; +use OCP\HintException; use OCP\IRequest; /** @@ -106,6 +105,7 @@ class App { /** * Shortcut for calling a controller method and printing the result + * * @param string $controllerName the name of the controller under which it is * stored in the DI container * @param string $methodName the method that you want to call diff --git a/lib/private/AppFramework/Bootstrap/ARegistration.php b/lib/private/AppFramework/Bootstrap/ARegistration.php index 1dde102ca34..bb8fe0c8e92 100644 --- a/lib/private/AppFramework/Bootstrap/ARegistration.php +++ b/lib/private/AppFramework/Bootstrap/ARegistration.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/BootContext.php b/lib/private/AppFramework/Bootstrap/BootContext.php index 0acfaad7ab6..f21d7d00b1e 100644 --- a/lib/private/AppFramework/Bootstrap/BootContext.php +++ b/lib/private/AppFramework/Bootstrap/BootContext.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Bootstrap; use OCP\AppFramework\Bootstrap\IBootContext; diff --git a/lib/private/AppFramework/Bootstrap/Coordinator.php b/lib/private/AppFramework/Bootstrap/Coordinator.php index 06a17e5242b..6e05b7fdc88 100644 --- a/lib/private/AppFramework/Bootstrap/Coordinator.php +++ b/lib/private/AppFramework/Bootstrap/Coordinator.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -19,7 +20,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -29,19 +30,19 @@ declare(strict_types=1); namespace OC\AppFramework\Bootstrap; -use OC\Support\CrashReport\Registry; +use function class_exists; +use function class_implements; +use function in_array; use OC_App; +use OC\Support\CrashReport\Registry; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\QueryException; use OCP\Dashboard\IManager; use OCP\EventDispatcher\IEventDispatcher; -use OCP\ILogger; use OCP\IServerContainer; +use Psr\Log\LoggerInterface; use Throwable; -use function class_exists; -use function class_implements; -use function in_array; class Coordinator { @@ -57,7 +58,7 @@ class Coordinator { /** @var IEventDispatcher */ private $eventDispatcher; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var RegistrationContext|null */ @@ -66,11 +67,13 @@ class Coordinator { /** @var string[] */ private $bootedApps = []; - public function __construct(IServerContainer $container, - Registry $registry, - IManager $dashboardManager, - IEventDispatcher $eventListener, - ILogger $logger) { + public function __construct( + IServerContainer $container, + Registry $registry, + IManager $dashboardManager, + IEventDispatcher $eventListener, + LoggerInterface $logger + ) { $this->serverContainer = $container; $this->registry = $registry; $this->dashboardManager = $dashboardManager; @@ -113,22 +116,24 @@ class Coordinator { */ $appNameSpace = App::buildAppNamespace($appId); $applicationClassName = $appNameSpace . '\\AppInfo\\Application'; - if (class_exists($applicationClassName) && in_array(IBootstrap::class, class_implements($applicationClassName), true)) { - try { - /** @var IBootstrap|App $application */ - $apps[$appId] = $application = $this->serverContainer->query($applicationClassName); - } catch (QueryException $e) { - // Weird, but ok - continue; - } - try { + try { + if (class_exists($applicationClassName) && in_array(IBootstrap::class, class_implements($applicationClassName), true)) { + try { + /** @var IBootstrap|App $application */ + $apps[$appId] = $application = $this->serverContainer->query($applicationClassName); + } catch (QueryException $e) { + // Weird, but ok + continue; + } + $application->register($this->registrationContext->for($appId)); - } catch (Throwable $e) { - $this->logger->logException($e, [ - 'message' => 'Error during app service registration: ' . $e->getMessage(), - 'level' => ILogger::FATAL, - ]); } + } catch (Throwable $e) { + $this->logger->emergency('Error during app service registration: ' . $e->getMessage(), [ + 'exception' => $e, + 'app' => $appId, + ]); + continue; } } @@ -176,13 +181,12 @@ class Coordinator { $application->boot($context); } } catch (QueryException $e) { - $this->logger->logException($e, [ - 'message' => "Could not boot $appId" . $e->getMessage(), + $this->logger->error("Could not boot $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } catch (Throwable $e) { - $this->logger->logException($e, [ - 'message' => "Could not boot $appId" . $e->getMessage(), - 'level' => ILogger::FATAL, + $this->logger->emergency("Could not boot $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } diff --git a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php index 17816466970..be279cbfd52 100644 --- a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php +++ b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/FunctionInjector.php b/lib/private/AppFramework/Bootstrap/FunctionInjector.php index 3c20701618b..13eb5d88969 100644 --- a/lib/private/AppFramework/Bootstrap/FunctionInjector.php +++ b/lib/private/AppFramework/Bootstrap/FunctionInjector.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Bootstrap; use Closure; diff --git a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php index 2e31d708ee7..5a683f41a9f 100644 --- a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php b/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php new file mode 100644 index 00000000000..47c25d39300 --- /dev/null +++ b/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php @@ -0,0 +1,47 @@ +<?php + +declare(strict_types=1); + +/* + * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + */ + +namespace OC\AppFramework\Bootstrap; + +/** + * @psalm-immutable + * @template-extends ServiceRegistration<\OCP\Preview\IProviderV2> + */ +class PreviewProviderRegistration extends ServiceRegistration { + + /** @var string */ + private $mimeTypeRegex; + + public function __construct(string $appId, + string $service, + string $mimeTypeRegex) { + parent::__construct($appId, $service); + $this->mimeTypeRegex = $mimeTypeRegex; + } + + public function getMimeTypeRegex(): string { + return $this->mimeTypeRegex; + } +} diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php index 4850de94ed4..256d3e2346b 100644 --- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php +++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php @@ -8,7 +8,6 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> - * @author Robin Windey <ro.windey@gmail.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -20,7 +19,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -31,23 +30,26 @@ declare(strict_types=1); namespace OC\AppFramework\Bootstrap; use Closure; +use function array_shift; use OC\Support\CrashReport\Registry; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Middleware; use OCP\AppFramework\Services\InitialStateProvider; use OCP\Authentication\IAlternativeLogin; +use OCP\Calendar\ICalendarProvider; use OCP\Capabilities\ICapability; use OCP\Dashboard\IManager; use OCP\Dashboard\IWidget; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Template\ICustomTemplateProvider; use OCP\Http\WellKnown\IHandler; -use OCP\ILogger; +use OCP\Notification\INotifier; +use OCP\Profile\ILinkAction; use OCP\Search\IProvider; use OCP\Support\CrashReport\IReporter; +use Psr\Log\LoggerInterface; use Throwable; -use function array_shift; class RegistrationContext { @@ -60,6 +62,9 @@ class RegistrationContext { /** @var ServiceRegistration<IWidget>[] */ private $dashboardPanels = []; + /** @var ServiceRegistration<ILinkAction>[] */ + private $profileActions = []; + /** @var ServiceFactoryRegistration[] */ private $services = []; @@ -90,10 +95,22 @@ class RegistrationContext { /** @var ServiceRegistration<ICustomTemplateProvider>[] */ private $templateProviders = []; - /** @var ILogger */ + /** @var ServiceRegistration<INotifier>[] */ + private $notifierServices = []; + + /** @var ServiceRegistration<\OCP\Authentication\TwoFactorAuth\IProvider>[] */ + private $twoFactorProviders = []; + + /** @var ServiceRegistration<ICalendarProvider>[] */ + private $calendarProviders = []; + + /** @var LoggerInterface */ private $logger; - public function __construct(ILogger $logger) { + /** @var PreviewProviderRegistration[] */ + private $previewProviders = []; + + public function __construct(LoggerInterface $logger) { $this->logger = $logger; } @@ -206,6 +223,42 @@ class RegistrationContext { $providerClass ); } + + public function registerNotifierService(string $notifierClass): void { + $this->context->registerNotifierService( + $this->appId, + $notifierClass + ); + } + + public function registerTwoFactorProvider(string $twoFactorProviderClass): void { + $this->context->registerTwoFactorProvider( + $this->appId, + $twoFactorProviderClass + ); + } + + public function registerPreviewProvider(string $previewProviderClass, string $mimeTypeRegex): void { + $this->context->registerPreviewProvider( + $this->appId, + $previewProviderClass, + $mimeTypeRegex + ); + } + + public function registerCalendarProvider(string $class): void { + $this->context->registerCalendarProvider( + $this->appId, + $class + ); + } + + public function registerProfileAction(string $actionClass): void { + $this->context->registerProfileAction( + $this->appId, + $actionClass + ); + } }; } @@ -273,20 +326,50 @@ class RegistrationContext { $this->templateProviders[] = new ServiceRegistration($appId, $class); } + public function registerNotifierService(string $appId, string $class): void { + $this->notifierServices[] = new ServiceRegistration($appId, $class); + } + + public function registerTwoFactorProvider(string $appId, string $class): void { + $this->twoFactorProviders[] = new ServiceRegistration($appId, $class); + } + + public function registerPreviewProvider(string $appId, string $class, string $mimeTypeRegex): void { + $this->previewProviders[] = new PreviewProviderRegistration($appId, $class, $mimeTypeRegex); + } + + public function registerCalendarProvider(string $appId, string $class): void { + $this->calendarProviders[] = new ServiceRegistration($appId, $class); + } + + /** + * @psalm-param class-string<ILinkAction> $capability + */ + public function registerProfileAction(string $appId, string $actionClass): void { + $this->profileActions[] = new ServiceRegistration($appId, $actionClass); + } + /** * @param App[] $apps */ public function delegateCapabilityRegistrations(array $apps): void { while (($registration = array_shift($this->capabilities)) !== null) { + $appId = $registration->getAppId(); + if (!isset($apps[$appId])) { + // If we land here something really isn't right. But at least we caught the + // notice that is otherwise emitted for the undefined index + $this->logger->error("App $appId not loaded for the capability registration"); + + continue; + } + try { - $apps[$registration->getAppId()] + $apps[$appId] ->getContainer() ->registerCapability($registration->getService()); } catch (Throwable $e) { - $appId = $registration->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during capability registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during capability registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } @@ -301,9 +384,8 @@ class RegistrationContext { $registry->registerLazy($registration->getService()); } catch (Throwable $e) { $appId = $registration->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during crash reporter registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during crash reporter registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } @@ -318,9 +400,8 @@ class RegistrationContext { $dashboardManager->lazyRegisterWidget($panel->getService()); } catch (Throwable $e) { $appId = $panel->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during dashboard registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during dashboard registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } @@ -336,9 +417,8 @@ class RegistrationContext { ); } catch (Throwable $e) { $appId = $registration->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during event listener registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during event listener registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } @@ -349,11 +429,20 @@ class RegistrationContext { */ public function delegateContainerRegistrations(array $apps): void { while (($registration = array_shift($this->services)) !== null) { + $appId = $registration->getAppId(); + if (!isset($apps[$appId])) { + // If we land here something really isn't right. But at least we caught the + // notice that is otherwise emitted for the undefined index + $this->logger->error("App $appId not loaded for the container service registration"); + + continue; + } + try { /** * Register the service and convert the callable into a \Closure if necessary */ - $apps[$registration->getAppId()] + $apps[$appId] ->getContainer() ->registerService( $registration->getName(), @@ -361,44 +450,56 @@ class RegistrationContext { $registration->isShared() ); } catch (Throwable $e) { - $appId = $registration->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during service registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during service registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } while (($registration = array_shift($this->aliases)) !== null) { + $appId = $registration->getAppId(); + if (!isset($apps[$appId])) { + // If we land here something really isn't right. But at least we caught the + // notice that is otherwise emitted for the undefined index + $this->logger->error("App $appId not loaded for the container alias registration"); + + continue; + } + try { - $apps[$registration->getAppId()] + $apps[$appId] ->getContainer() ->registerAlias( $registration->getAlias(), $registration->getTarget() ); } catch (Throwable $e) { - $appId = $registration->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during service alias registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during service alias registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } while (($registration = array_shift($this->parameters)) !== null) { + $appId = $registration->getAppId(); + if (!isset($apps[$appId])) { + // If we land here something really isn't right. But at least we caught the + // notice that is otherwise emitted for the undefined index + $this->logger->error("App $appId not loaded for the container parameter registration"); + + continue; + } + try { - $apps[$registration->getAppId()] + $apps[$appId] ->getContainer() ->registerParameter( $registration->getName(), $registration->getValue() ); } catch (Throwable $e) { - $appId = $registration->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during service alias registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during service parameter registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } @@ -409,15 +510,22 @@ class RegistrationContext { */ public function delegateMiddlewareRegistrations(array $apps): void { while (($middleware = array_shift($this->middlewares)) !== null) { + $appId = $middleware->getAppId(); + if (!isset($apps[$appId])) { + // If we land here something really isn't right. But at least we caught the + // notice that is otherwise emitted for the undefined index + $this->logger->error("App $appId not loaded for the container middleware registration"); + + continue; + } + try { - $apps[$middleware->getAppId()] + $apps[$appId] ->getContainer() ->registerMiddleWare($middleware->getService()); } catch (Throwable $e) { - $appId = $middleware->getAppId(); - $this->logger->logException($e, [ - 'message' => "Error during capability registration of $appId: " . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error("Error during capability registration of $appId: " . $e->getMessage(), [ + 'exception' => $e, ]); } } @@ -457,4 +565,39 @@ class RegistrationContext { public function getTemplateProviders(): array { return $this->templateProviders; } + + /** + * @return ServiceRegistration<INotifier>[] + */ + public function getNotifierServices(): array { + return $this->notifierServices; + } + + /** + * @return ServiceRegistration<\OCP\Authentication\TwoFactorAuth\IProvider>[] + */ + public function getTwoFactorProviders(): array { + return $this->twoFactorProviders; + } + + /** + * @return PreviewProviderRegistration[] + */ + public function getPreviewProviders(): array { + return $this->previewProviders; + } + + /** + * @return ServiceRegistration<ICalendarProvider>[] + */ + public function getCalendarProviders(): array { + return $this->calendarProviders; + } + + /** + * @return ServiceRegistration<ILinkAction>[] + */ + public function getProfileActions(): array { + return $this->profileActions; + } } diff --git a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php index 04823172ed2..a8b9ddd1295 100644 --- a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php index 4776c5df55c..21e6d37865a 100644 --- a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/ServiceRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceRegistration.php index 83ffe01e6c3..6c89cdf9d71 100644 --- a/lib/private/AppFramework/Bootstrap/ServiceRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ServiceRegistration.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 7395be703d3..293b9e47b25 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -31,7 +31,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\DependencyInjection; use OC; @@ -49,6 +48,7 @@ use OC\AppFramework\Utility\SimpleContainer; use OC\Core\Middleware\TwoFactorMiddleware; use OC\Log\PsrLoggerAdapter; use OC\ServerContainer; +use OC\Settings\AuthorizedGroupMapper; use OCA\WorkflowEngine\Manager; use OCP\AppFramework\Http\IOutput; use OCP\AppFramework\IAppContainer; @@ -241,13 +241,15 @@ class DIContainer extends SimpleContainer implements IAppContainer { $c->get(IControllerMethodReflector::class), $c->get(INavigationManager::class), $c->get(IURLGenerator::class), - $server->query(ILogger::class), + $server->get(LoggerInterface::class), $c->get('AppName'), $server->getUserSession()->isLoggedIn(), $this->getUserId() !== null && $server->getGroupManager()->isAdmin($this->getUserId()), $server->getUserSession()->getUser() !== null && $server->query(ISubAdmin::class)->isSubAdmin($server->getUserSession()->getUser()), $server->getAppManager(), - $server->getL10N('lib') + $server->getL10N('lib'), + $c->get(AuthorizedGroupMapper::class), + $server->get(IUserSession::class) ); $dispatcher->registerMiddleware($securityMiddleware); $dispatcher->registerMiddleware( diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php index 828efe390e7..251c231fe65 100644 --- a/lib/private/AppFramework/Http.php +++ b/lib/private/AppFramework/Http.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework; use OCP\AppFramework\Http as BaseHttp; diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php index 9ec69558e88..6bbab42cb79 100644 --- a/lib/private/AppFramework/Http/Dispatcher.php +++ b/lib/private/AppFramework/Http/Dispatcher.php @@ -30,7 +30,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Http; use OC\AppFramework\Http; @@ -156,7 +155,7 @@ class Dispatcher { $response = $this->middlewareDispatcher->afterException( $controller, $methodName, $exception); } catch (\Throwable $throwable) { - $exception = new \Exception($throwable->getMessage(), $throwable->getCode(), $throwable); + $exception = new \Exception($throwable->getMessage() . ' in file \'' . $throwable->getFile() . '\' line ' . $throwable->getLine(), $throwable->getCode(), $throwable); $response = $this->middlewareDispatcher->afterException( $controller, $methodName, $exception); } diff --git a/lib/private/AppFramework/Http/Output.php b/lib/private/AppFramework/Http/Output.php index d2e8cd338ba..963e01456e0 100644 --- a/lib/private/AppFramework/Http/Output.php +++ b/lib/private/AppFramework/Http/Output.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Http; use OCP\AppFramework\Http\IOutput; diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 031e2d13ad9..a95fd208155 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -41,7 +41,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Http; use OC\Security\CSRF\CsrfToken; @@ -78,19 +77,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { public const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#'; public const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|\[::1\])$/'; - /** - * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_IOS instead - */ - public const USER_AGENT_OWNCLOUD_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/'; - /** - * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_ANDROID instead - */ - public const USER_AGENT_OWNCLOUD_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/'; - /** - * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_DESKTOP instead - */ - public const USER_AGENT_OWNCLOUD_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/'; - protected $inputStream; protected $content; protected $items = []; @@ -589,7 +575,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { } if (empty($this->requestId)) { - $validChars = ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS; + $validChars = ISecureRandom::CHAR_ALPHANUMERIC; $this->requestId = $this->secureRandom->generate(20, $validChars); } diff --git a/lib/private/AppFramework/Logger.php b/lib/private/AppFramework/Logger.php index 16f4dd36e78..7fb30905df3 100644 --- a/lib/private/AppFramework/Logger.php +++ b/lib/private/AppFramework/Logger.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework; use OCP\ILogger; diff --git a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php index 28f322f42b7..ec52dde0ecd 100644 --- a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php +++ b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; diff --git a/lib/private/AppFramework/Middleware/CompressionMiddleware.php b/lib/private/AppFramework/Middleware/CompressionMiddleware.php index f6d3839891e..5128afa8cad 100644 --- a/lib/private/AppFramework/Middleware/CompressionMiddleware.php +++ b/lib/private/AppFramework/Middleware/CompressionMiddleware.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware; use OC\AppFramework\OCS\BaseResponse; diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php index 577931b8222..950ef8a13a3 100644 --- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php +++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php @@ -29,7 +29,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware; use OCP\AppFramework\Controller; diff --git a/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php b/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php index 083761dcf02..4ebdf10f403 100644 --- a/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php +++ b/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware; use OCP\AppFramework\Http; @@ -47,7 +46,7 @@ class NotModifiedMiddleware extends Middleware { } $modifiedSinceHeader = $this->request->getHeader('IF_MODIFIED_SINCE'); - if ($modifiedSinceHeader !== '' && $response->getLastModified() !== null && trim($modifiedSinceHeader) === $response->getLastModified()->format(\DateTime::RFC2822)) { + if ($modifiedSinceHeader !== '' && $response->getLastModified() !== null && trim($modifiedSinceHeader) === $response->getLastModified()->format(\DateTimeInterface::RFC2822)) { $response->setStatus(Http::STATUS_NOT_MODIFIED); return $response; } diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php index f701f17a48e..4c2dbd0f828 100644 --- a/lib/private/AppFramework/Middleware/OCSMiddleware.php +++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php @@ -1,8 +1,9 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -15,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware; use OC\AppFramework\Http; @@ -100,8 +100,7 @@ class OCSMiddleware extends Middleware { * we need to catch the response and convert it to a proper OCS response. */ if ($controller instanceof OCSController && !($response instanceof BaseResponse)) { - if ($response->getStatus() === Http::STATUS_UNAUTHORIZED || - $response->getStatus() === Http::STATUS_FORBIDDEN) { + if ($response->getStatus() === Http::STATUS_UNAUTHORIZED) { $message = ''; if ($response instanceof JSONResponse) { /** @var DataResponse $response */ @@ -110,6 +109,15 @@ class OCSMiddleware extends Middleware { return $this->buildNewResponse($controller, OCSController::RESPOND_UNAUTHORISED, $message); } + if ($response->getStatus() === Http::STATUS_FORBIDDEN) { + $message = ''; + if ($response instanceof JSONResponse) { + /** @var DataResponse $response */ + $message = $response->getData()['message']; + } + + return $this->buildNewResponse($controller, Http::STATUS_FORBIDDEN, $message); + } } return $response; diff --git a/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php b/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php index b362a38bc74..8b568f06dd4 100644 --- a/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php +++ b/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -14,7 +14,7 @@ * * 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 + * 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 diff --git a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php index 4b2dd25a257..d3beb4fd3a8 100644 --- a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php +++ b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -14,7 +14,7 @@ * * 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 + * 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 diff --git a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php index 31a4791845e..26f4b9ef46f 100644 --- a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Utility\ControllerMethodReflector; diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php index 765311858de..1490b69f534 100644 --- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php @@ -4,6 +4,7 @@ * * @author Bernhard Posselt <dev@bernhard-posselt.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author korelstar <korelstar@users.noreply.github.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Stefan Weil <sw@weilnetz.de> @@ -23,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; @@ -83,14 +83,13 @@ class CORSMiddleware extends Middleware { public function beforeController($controller, $methodName) { // ensure that @CORS annotated API routes are not used in conjunction // with session authentication since this enables CSRF attack vectors - if ($this->reflector->hasAnnotation('CORS') && - !$this->reflector->hasAnnotation('PublicPage')) { - $user = $this->request->server['PHP_AUTH_USER']; - $pass = $this->request->server['PHP_AUTH_PW']; + if ($this->reflector->hasAnnotation('CORS') && !$this->reflector->hasAnnotation('PublicPage')) { + $user = array_key_exists('PHP_AUTH_USER', $this->request->server) ? $this->request->server['PHP_AUTH_USER'] : null; + $pass = array_key_exists('PHP_AUTH_PW', $this->request->server) ? $this->request->server['PHP_AUTH_PW'] : null; $this->session->logout(); try { - if (!$this->session->logClientIn($user, $pass, $this->request, $this->throttler)) { + if ($user === null || $pass === null || !$this->session->logClientIn($user, $pass, $this->request, $this->throttler)) { throw new SecurityException('CORS requires basic auth', Http::STATUS_UNAUTHORIZED); } } catch (PasswordLoginForbiddenException $ex) { diff --git a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php index 10768a643a5..1eea52d620c 100644 --- a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\Security\CSP\ContentSecurityPolicyManager; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php index d7bc7edc4f1..2b9c5a2280b 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php index abc7303b6cc..b30ebe58abd 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php index b5336d892c7..bbb8e746127 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php index 7f5a03d82bd..1f1b9d6e501 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php index 5fd35c63e9b..b466e9a4c7a 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php index f7920261e80..a0287c20435 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php index 934cae991b4..3c65d5f5a88 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; class ReloadExecutionException extends SecurityException { diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php index a28e22f5717..3232980b7e5 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; /** diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php index 0d7d8c60a60..eca03896953 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> * * @author Lukas Reschke <lukas@statuscode.ch> * @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php index 63f665f512d..534ff56cced 100644 --- a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\Security\FeaturePolicy\FeaturePolicy; diff --git a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php index b259490a1ba..0ee9fdff881 100644 --- a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\NotConfirmedException; diff --git a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php index 712becb3be5..8bdbacda20b 100644 --- a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * * @license GNU AGPL version 3 or any later version @@ -14,20 +15,19 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Utility\ControllerMethodReflector; use OC\Security\RateLimiting\Exception\RateLimitExceededException; use OC\Security\RateLimiting\Limiter; -use OCP\AppFramework\Http\JSONResponse; +use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Middleware; use OCP\IRequest; @@ -110,21 +110,14 @@ class RateLimitingMiddleware extends Middleware { public function afterException($controller, $methodName, \Exception $exception) { if ($exception instanceof RateLimitExceededException) { if (stripos($this->request->getHeader('Accept'),'html') === false) { - $response = new JSONResponse( - [ - 'message' => $exception->getMessage(), - ], - $exception->getCode() - ); + $response = new DataResponse([], $exception->getCode()); } else { $response = new TemplateResponse( - 'core', - '403', - [ - 'file' => $exception->getMessage() - ], - 'guest' - ); + 'core', + '429', + [], + TemplateResponse::RENDER_AS_GUEST + ); $response->setStatus($exception->getCode()); } diff --git a/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php b/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php index 12b0ef4e27a..5a635e3f284 100644 --- a/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\ReloadExecutionException; diff --git a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php index 48d386e749e..0ab5d061c44 100644 --- a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 76665f8998f..d162bb54108 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -5,7 +5,6 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bernhard Posselt <dev@bernhard-posselt.com> * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> @@ -45,6 +44,7 @@ use OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; use OC\AppFramework\Middleware\Security\Exceptions\StrictCookieMissingException; use OC\AppFramework\Utility\ControllerMethodReflector; +use OC\Settings\AuthorizedGroupMapper; use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use OCP\AppFramework\Controller; @@ -55,11 +55,12 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Middleware; use OCP\AppFramework\OCSController; use OCP\IL10N; -use OCP\ILogger; use OCP\INavigationManager; use OCP\IRequest; use OCP\IURLGenerator; +use OCP\IUserSession; use OCP\Util; +use Psr\Log\LoggerInterface; /** * Used to do all the authentication and checking stuff for a controller method @@ -78,7 +79,7 @@ class SecurityMiddleware extends Middleware { private $appName; /** @var IURLGenerator */ private $urlGenerator; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var bool */ private $isLoggedIn; @@ -90,18 +91,24 @@ class SecurityMiddleware extends Middleware { private $appManager; /** @var IL10N */ private $l10n; + /** @var AuthorizedGroupMapper */ + private $groupAuthorizationMapper; + /** @var IUserSession */ + private $userSession; public function __construct(IRequest $request, ControllerMethodReflector $reflector, INavigationManager $navigationManager, IURLGenerator $urlGenerator, - ILogger $logger, + LoggerInterface $logger, string $appName, bool $isLoggedIn, bool $isAdminUser, bool $isSubAdmin, IAppManager $appManager, - IL10N $l10n + IL10N $l10n, + AuthorizedGroupMapper $mapper, + IUserSession $userSession ) { $this->navigationManager = $navigationManager; $this->request = $request; @@ -114,12 +121,15 @@ class SecurityMiddleware extends Middleware { $this->isSubAdmin = $isSubAdmin; $this->appManager = $appManager; $this->l10n = $l10n; + $this->groupAuthorizationMapper = $mapper; + $this->userSession = $userSession; } /** * This runs all the security checks before a method call. The * security checks are determined by inspecting the controller method * annotations + * * @param Controller $controller the controller * @param string $methodName the name of the method * @throws SecurityException when a security check fails @@ -142,15 +152,39 @@ class SecurityMiddleware extends Middleware { if (!$this->isLoggedIn) { throw new NotLoggedInException(); } + $authorized = false; + if ($this->reflector->hasAnnotation('AuthorizedAdminSetting')) { + $authorized = $this->isAdminUser; + + if (!$authorized && $this->reflector->hasAnnotation('SubAdminRequired')) { + $authorized = $this->isSubAdmin; + } + if (!$authorized) { + $settingClasses = explode(';', $this->reflector->getAnnotationParameter('AuthorizedAdminSetting', 'settings')); + $authorizedClasses = $this->groupAuthorizationMapper->findAllClassesForUser($this->userSession->getUser()); + foreach ($settingClasses as $settingClass) { + $authorized = in_array($settingClass, $authorizedClasses, true); + + if ($authorized) { + break; + } + } + } + if (!$authorized) { + throw new NotAdminException($this->l10n->t('Logged in user must be an admin, a sub admin or gotten special right to access this setting')); + } + } if ($this->reflector->hasAnnotation('SubAdminRequired') && !$this->isSubAdmin - && !$this->isAdminUser) { + && !$this->isAdminUser + && !$authorized) { throw new NotAdminException($this->l10n->t('Logged in user must be an admin or sub admin')); } if (!$this->reflector->hasAnnotation('SubAdminRequired') && !$this->reflector->hasAnnotation('NoAdminRequired') - && !$this->isAdminUser) { + && !$this->isAdminUser + && !$authorized) { throw new NotAdminException($this->l10n->t('Logged in user must be an admin')); } } @@ -202,19 +236,20 @@ class SecurityMiddleware extends Middleware { /** * If an SecurityException is being caught, ajax requests return a JSON error * response and non ajax requests redirect to the index + * * @param Controller $controller the controller that is being called * @param string $methodName the name of the method that will be called on * the controller * @param \Exception $exception the thrown exception - * @throws \Exception the passed in exception if it can't handle it * @return Response a Response object or null in case that the exception could not be handled + * @throws \Exception the passed in exception if it can't handle it */ public function afterException($controller, $methodName, \Exception $exception): Response { if ($exception instanceof SecurityException) { if ($exception instanceof StrictCookieMissingException) { return new RedirectResponse(\OC::$WEBROOT . '/'); } - if (stripos($this->request->getHeader('Accept'),'html') === false) { + if (stripos($this->request->getHeader('Accept'), 'html') === false) { $response = new JSONResponse( ['message' => $exception->getMessage()], $exception->getCode() @@ -233,9 +268,8 @@ class SecurityMiddleware extends Middleware { } } - $this->logger->logException($exception, [ - 'level' => ILogger::DEBUG, - 'app' => 'core', + $this->logger->debug($exception->getMessage(), [ + 'exception' => $exception, ]); return $response; } diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php index 40b77230368..f3fd2c99173 100644 --- a/lib/private/AppFramework/Middleware/SessionMiddleware.php +++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Middleware; use OC\AppFramework\Utility\ControllerMethodReflector; diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php index 55410c8910b..dbff1b846c1 100644 --- a/lib/private/AppFramework/OCS/BaseResponse.php +++ b/lib/private/AppFramework/OCS/BaseResponse.php @@ -5,6 +5,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> + * @author Lukas Reschke <lukas@statuscode.ch> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -16,14 +17,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\OCS; use OCP\AppFramework\Http; @@ -75,6 +75,11 @@ abstract class BaseResponse extends Response { $this->setLastModified($dataResponse->getLastModified()); $this->setCookies($dataResponse->getCookies()); + if ($dataResponse->isThrottled()) { + $throttleMetadata = $dataResponse->getThrottleMetadata(); + $this->throttle($throttleMetadata); + } + if ($format === 'json') { $this->addHeader( 'Content-Type', 'application/json; charset=utf-8' diff --git a/lib/private/AppFramework/OCS/V1Response.php b/lib/private/AppFramework/OCS/V1Response.php index 9ccff9ac98c..f4f19832fa8 100644 --- a/lib/private/AppFramework/OCS/V1Response.php +++ b/lib/private/AppFramework/OCS/V1Response.php @@ -3,6 +3,7 @@ * @copyright 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -14,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\OCS; use OCP\AppFramework\Http; @@ -37,7 +37,7 @@ class V1Response extends BaseResponse { */ public function getStatus() { $status = parent::getStatus(); - if ($status === Http::STATUS_FORBIDDEN || $status === OCSController::RESPOND_UNAUTHORISED) { + if ($status === OCSController::RESPOND_UNAUTHORISED) { return Http::STATUS_UNAUTHORIZED; } diff --git a/lib/private/AppFramework/OCS/V2Response.php b/lib/private/AppFramework/OCS/V2Response.php index 5a253adf676..6c302698bc9 100644 --- a/lib/private/AppFramework/OCS/V2Response.php +++ b/lib/private/AppFramework/OCS/V2Response.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\AppFramework\OCS; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Routing/RouteActionHandler.php b/lib/private/AppFramework/Routing/RouteActionHandler.php index 46677b19d87..4682d2e9e7e 100644 --- a/lib/private/AppFramework/Routing/RouteActionHandler.php +++ b/lib/private/AppFramework/Routing/RouteActionHandler.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Routing; use OC\AppFramework\App; diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php index 5aa4db10e22..0fde866fb7c 100644 --- a/lib/private/AppFramework/Routing/RouteConfig.php +++ b/lib/private/AppFramework/Routing/RouteConfig.php @@ -28,7 +28,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Routing; use OC\AppFramework\DependencyInjection\DIContainer; diff --git a/lib/private/AppFramework/Routing/RouteParser.php b/lib/private/AppFramework/Routing/RouteParser.php index b65938d5b63..d2e41f7498e 100644 --- a/lib/private/AppFramework/Routing/RouteParser.php +++ b/lib/private/AppFramework/Routing/RouteParser.php @@ -22,7 +22,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Routing; use OC\Route\Route; diff --git a/lib/private/AppFramework/ScopedPsrLogger.php b/lib/private/AppFramework/ScopedPsrLogger.php index 5f4872efd97..46832c6d38d 100644 --- a/lib/private/AppFramework/ScopedPsrLogger.php +++ b/lib/private/AppFramework/ScopedPsrLogger.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework; use Psr\Log\LoggerInterface; diff --git a/lib/private/AppFramework/Services/AppConfig.php b/lib/private/AppFramework/Services/AppConfig.php index 37e73fb55b1..355a4123987 100644 --- a/lib/private/AppFramework/Services/AppConfig.php +++ b/lib/private/AppFramework/Services/AppConfig.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Services; use OCP\AppFramework\Services\IAppConfig; diff --git a/lib/private/AppFramework/Services/InitialState.php b/lib/private/AppFramework/Services/InitialState.php index 25c7339f1e7..9a44db606ea 100644 --- a/lib/private/AppFramework/Services/InitialState.php +++ b/lib/private/AppFramework/Services/InitialState.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\AppFramework\Services; use OCP\AppFramework\Services\IInitialState; diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php index dbc84ffcb39..b76b3c33c42 100644 --- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php +++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php @@ -31,7 +31,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Utility; use OCP\AppFramework\Utility\IControllerMethodReflector; diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 84c4c3447a2..c38dbadf0a9 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -7,6 +7,7 @@ * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> + * @author Robin Appelman <robin@icewind.nl> * @author Robin McCorkell <robin@mccorkell.me.uk> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> @@ -26,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Utility; use ArrayAccess; diff --git a/lib/private/AppFramework/Utility/TimeFactory.php b/lib/private/AppFramework/Utility/TimeFactory.php index 30ab9bd3098..d4fe451a995 100644 --- a/lib/private/AppFramework/Utility/TimeFactory.php +++ b/lib/private/AppFramework/Utility/TimeFactory.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\AppFramework\Utility; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php index 20d56e50e76..141db11f419 100644 --- a/lib/private/Archive/Archive.php +++ b/lib/private/Archive/Archive.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Archive; abstract class Archive { diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php index f68813752cc..a024ce84b2f 100644 --- a/lib/private/Archive/TAR.php +++ b/lib/private/Archive/TAR.php @@ -30,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Archive; use Icewind\Streams\CallbackWrapper; diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php index 96894bac6e9..e058d476021 100644 --- a/lib/private/Archive/ZIP.php +++ b/lib/private/Archive/ZIP.php @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Archive; use Icewind\Streams\CallbackWrapper; diff --git a/lib/private/Authentication/Events/ARemoteWipeEvent.php b/lib/private/Authentication/Events/ARemoteWipeEvent.php index 8d28cc5c783..adfe1935013 100644 --- a/lib/private/Authentication/Events/ARemoteWipeEvent.php +++ b/lib/private/Authentication/Events/ARemoteWipeEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Events; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Events/AppPasswordCreatedEvent.php b/lib/private/Authentication/Events/AppPasswordCreatedEvent.php index 6daa504527e..a90abd25026 100644 --- a/lib/private/Authentication/Events/AppPasswordCreatedEvent.php +++ b/lib/private/Authentication/Events/AppPasswordCreatedEvent.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\Authentication\Events; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Events/LoginFailed.php b/lib/private/Authentication/Events/LoginFailed.php index 7b107564e96..138e567139a 100644 --- a/lib/private/Authentication/Events/LoginFailed.php +++ b/lib/private/Authentication/Events/LoginFailed.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Authentication/Events/RemoteWipeFinished.php b/lib/private/Authentication/Events/RemoteWipeFinished.php index d50b7d28077..10e72de096c 100644 --- a/lib/private/Authentication/Events/RemoteWipeFinished.php +++ b/lib/private/Authentication/Events/RemoteWipeFinished.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Events; class RemoteWipeFinished extends ARemoteWipeEvent { diff --git a/lib/private/Authentication/Events/RemoteWipeStarted.php b/lib/private/Authentication/Events/RemoteWipeStarted.php index 89b560511a7..273a319b1fb 100644 --- a/lib/private/Authentication/Events/RemoteWipeStarted.php +++ b/lib/private/Authentication/Events/RemoteWipeStarted.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Events; class RemoteWipeStarted extends ARemoteWipeEvent { diff --git a/lib/private/Authentication/Exceptions/ExpiredTokenException.php b/lib/private/Authentication/Exceptions/ExpiredTokenException.php index 3f50aab8d03..0dc92b45920 100644 --- a/lib/private/Authentication/Exceptions/ExpiredTokenException.php +++ b/lib/private/Authentication/Exceptions/ExpiredTokenException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Exceptions; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Exceptions/InvalidProviderException.php b/lib/private/Authentication/Exceptions/InvalidProviderException.php index 970096540c4..86b44e4d0e2 100644 --- a/lib/private/Authentication/Exceptions/InvalidProviderException.php +++ b/lib/private/Authentication/Exceptions/InvalidProviderException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/InvalidTokenException.php b/lib/private/Authentication/Exceptions/InvalidTokenException.php index 000d6dee3e8..acaabff6b88 100644 --- a/lib/private/Authentication/Exceptions/InvalidTokenException.php +++ b/lib/private/Authentication/Exceptions/InvalidTokenException.php @@ -22,7 +22,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/LoginRequiredException.php b/lib/private/Authentication/Exceptions/LoginRequiredException.php index 9d9ce055788..cc3e8636214 100644 --- a/lib/private/Authentication/Exceptions/LoginRequiredException.php +++ b/lib/private/Authentication/Exceptions/LoginRequiredException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php index 02ddd06020d..28829390f70 100644 --- a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php +++ b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php index 5c59dd35366..c974cc3d6fd 100644 --- a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php +++ b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php index 2850d3de7e1..7710673ce7c 100644 --- a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php +++ b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Exceptions; class TokenPasswordExpiredException extends ExpiredTokenException { diff --git a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php index 6db87b3516c..9733c4547b4 100644 --- a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php +++ b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php index 878bf59e4e9..520372f3087 100644 --- a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php +++ b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/WipeTokenException.php b/lib/private/Authentication/Exceptions/WipeTokenException.php index 2ace0433a6c..1c60ab9da78 100644 --- a/lib/private/Authentication/Exceptions/WipeTokenException.php +++ b/lib/private/Authentication/Exceptions/WipeTokenException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Exceptions; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Listeners/LoginFailedListener.php b/lib/private/Authentication/Listeners/LoginFailedListener.php index 19f0b92c3a6..12d5dd4c17e 100644 --- a/lib/private/Authentication/Listeners/LoginFailedListener.php +++ b/lib/private/Authentication/Listeners/LoginFailedListener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use OC\Authentication\Events\LoginFailed; diff --git a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php index 0bdfa7cb39b..6cc2403653f 100644 --- a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php +++ b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use BadMethodCallException; diff --git a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php index 2f330879a2a..4499f90d79b 100644 --- a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php +++ b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use Exception; diff --git a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php index 965fb291fbf..4b7e809d742 100644 --- a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php +++ b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use OC\Authentication\Events\RemoteWipeFinished; diff --git a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php new file mode 100644 index 00000000000..fa7459e10ff --- /dev/null +++ b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php @@ -0,0 +1,75 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl> + * + * @author Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Authentication\Listeners; + +use OC\Files\Cache\Cache; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\Files\Config\IMountProviderCollection; +use OCP\Files\Storage\IStorage; +use OCP\User\Events\BeforeUserDeletedEvent; +use OCP\User\Events\UserDeletedEvent; + +class UserDeletedFilesCleanupListener implements IEventListener { + /** @var array<string,IStorage> */ + private $homeStorageCache = []; + + /** @var IMountProviderCollection */ + private $mountProviderCollection; + + public function __construct(IMountProviderCollection $mountProviderCollection) { + $this->mountProviderCollection = $mountProviderCollection; + } + + public function handle(Event $event): void { + // since we can't reliably get the user home storage after the user is deleted + // but the user deletion might get canceled during the before event + // we only cache the user home storage during the before event and then do the + // action deletion during the after event + + if ($event instanceof BeforeUserDeletedEvent) { + $userHome = $this->mountProviderCollection->getHomeMountForUser($event->getUser()); + $storage = $userHome->getStorage(); + if (!$storage) { + throw new \Exception("User has no home storage"); + } + $this->homeStorageCache[$event->getUser()->getUID()] = $storage; + } + if ($event instanceof UserDeletedEvent) { + if (!isset($this->homeStorageCache[$event->getUser()->getUID()])) { + throw new \Exception("UserDeletedEvent fired without matching BeforeUserDeletedEvent"); + } + $storage = $this->homeStorageCache[$event->getUser()->getUID()]; + $cache = $storage->getCache(); + if ($cache instanceof Cache) { + $cache->clear(); + } else { + throw new \Exception("Home storage has invalid cache"); + } + $storage->rmdir(''); + } + } +} diff --git a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php index 057568f514e..e52b989c353 100644 --- a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php +++ b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use OC\Authentication\TwoFactorAuth\Registry; diff --git a/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php index 2d78bd2d01c..6a3f4402886 100644 --- a/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php +++ b/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use OC\Authentication\Token\Manager; diff --git a/lib/private/Authentication/Listeners/UserDeletedWebAuthnCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedWebAuthnCleanupListener.php new file mode 100644 index 00000000000..a56ac3bd54e --- /dev/null +++ b/lib/private/Authentication/Listeners/UserDeletedWebAuthnCleanupListener.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Morris Jobke <hey@morrisjobke.de> + * + * @author Morris Jobke <hey@morrisjobke.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Authentication\Listeners; + +use OC\Authentication\WebAuthn\Db\PublicKeyCredentialMapper; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\User\Events\UserDeletedEvent; + +class UserDeletedWebAuthnCleanupListener implements IEventListener { + + /** @var PublicKeyCredentialMapper */ + private $credentialMapper; + + public function __construct(PublicKeyCredentialMapper $credentialMapper) { + $this->credentialMapper = $credentialMapper; + } + + public function handle(Event $event): void { + if (!($event instanceof UserDeletedEvent)) { + return; + } + + $this->credentialMapper->deleteByUid($event->getUser()->getUID()); + } +} diff --git a/lib/private/Authentication/Listeners/UserLoggedInListener.php b/lib/private/Authentication/Listeners/UserLoggedInListener.php index 711a759fad4..88298889057 100644 --- a/lib/private/Authentication/Listeners/UserLoggedInListener.php +++ b/lib/private/Authentication/Listeners/UserLoggedInListener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Listeners; use OC\Authentication\Token\Manager; @@ -49,6 +48,11 @@ class UserLoggedInListener implements IEventListener { return; } + // prevent setting an empty pw as result of pw-less-login + if ($event->getPassword() === '') { + return; + } + // If this is already a token login there is nothing to do if ($event->isTokenLogin()) { return; diff --git a/lib/private/Authentication/Login/ALoginCommand.php b/lib/private/Authentication/Login/ALoginCommand.php index effc9adf1c0..5b245db6bda 100644 --- a/lib/private/Authentication/Login/ALoginCommand.php +++ b/lib/private/Authentication/Login/ALoginCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; abstract class ALoginCommand { diff --git a/lib/private/Authentication/Login/Chain.php b/lib/private/Authentication/Login/Chain.php index 1fc94fe9637..32f44268d52 100644 --- a/lib/private/Authentication/Login/Chain.php +++ b/lib/private/Authentication/Login/Chain.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; class Chain { diff --git a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php index f4e1ad11dd0..7e872a855a5 100644 --- a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php +++ b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OCP\IConfig; diff --git a/lib/private/Authentication/Login/CompleteLoginCommand.php b/lib/private/Authentication/Login/CompleteLoginCommand.php index d0cddba595c..ffe76b4c89d 100644 --- a/lib/private/Authentication/Login/CompleteLoginCommand.php +++ b/lib/private/Authentication/Login/CompleteLoginCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\User\Session; diff --git a/lib/private/Authentication/Login/CreateSessionTokenCommand.php b/lib/private/Authentication/Login/CreateSessionTokenCommand.php index 05b6c27f565..31ca0936942 100644 --- a/lib/private/Authentication/Login/CreateSessionTokenCommand.php +++ b/lib/private/Authentication/Login/CreateSessionTokenCommand.php @@ -1,8 +1,12 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author J0WI <J0WI@users.noreply.github.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -14,16 +18,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\Authentication\Token\IToken; @@ -46,7 +47,7 @@ class CreateSessionTokenCommand extends ALoginCommand { public function process(LoginData $loginData): LoginResult { $tokenType = IToken::REMEMBER; - if ((int)$this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) { + if ($this->config->getSystemValueInt('remember_login_cookie_lifetime', 60 * 60 * 24 * 15) === 0) { $loginData->setRememberLogin(false); $tokenType = IToken::DO_NOT_REMEMBER; } diff --git a/lib/private/Authentication/Login/EmailLoginCommand.php b/lib/private/Authentication/Login/EmailLoginCommand.php index 24b5a00196b..e2e55cc12c8 100644 --- a/lib/private/Authentication/Login/EmailLoginCommand.php +++ b/lib/private/Authentication/Login/EmailLoginCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OCP\IUserManager; diff --git a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php index 48d9e51e4b9..9b5b4ed0642 100644 --- a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php +++ b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -14,16 +17,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\User\Session; diff --git a/lib/private/Authentication/Login/LoggedInCheckCommand.php b/lib/private/Authentication/Login/LoggedInCheckCommand.php index 3c71c844d72..0efd84adbf5 100644 --- a/lib/private/Authentication/Login/LoggedInCheckCommand.php +++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -15,16 +18,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\Authentication\Events\LoginFailed; diff --git a/lib/private/Authentication/Login/LoginData.php b/lib/private/Authentication/Login/LoginData.php index 1da09f1883f..43d1a725668 100644 --- a/lib/private/Authentication/Login/LoginData.php +++ b/lib/private/Authentication/Login/LoginData.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -14,16 +17,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OCP\IRequest; diff --git a/lib/private/Authentication/Login/LoginResult.php b/lib/private/Authentication/Login/LoginResult.php index 60228307135..1f91c9c6a25 100644 --- a/lib/private/Authentication/Login/LoginResult.php +++ b/lib/private/Authentication/Login/LoginResult.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; class LoginResult { diff --git a/lib/private/Authentication/Login/PreLoginHookCommand.php b/lib/private/Authentication/Login/PreLoginHookCommand.php index cb0b3ede28f..b989927a21c 100644 --- a/lib/private/Authentication/Login/PreLoginHookCommand.php +++ b/lib/private/Authentication/Login/PreLoginHookCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -14,16 +17,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Authentication/Login/SetUserTimezoneCommand.php b/lib/private/Authentication/Login/SetUserTimezoneCommand.php index 0029f2f1677..b18851e61fa 100644 --- a/lib/private/Authentication/Login/SetUserTimezoneCommand.php +++ b/lib/private/Authentication/Login/SetUserTimezoneCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OCP\IConfig; diff --git a/lib/private/Authentication/Login/TwoFactorCommand.php b/lib/private/Authentication/Login/TwoFactorCommand.php index 86b85c83fd0..d20bc881f1f 100644 --- a/lib/private/Authentication/Login/TwoFactorCommand.php +++ b/lib/private/Authentication/Login/TwoFactorCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -14,16 +17,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use function array_pop; diff --git a/lib/private/Authentication/Login/UidLoginCommand.php b/lib/private/Authentication/Login/UidLoginCommand.php index 8c9a516c735..a1bc9c585ab 100644 --- a/lib/private/Authentication/Login/UidLoginCommand.php +++ b/lib/private/Authentication/Login/UidLoginCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\User\Manager; diff --git a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php index efaf5554c21..cd9cdfab6e8 100644 --- a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php +++ b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -13,16 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OCP\ISession; diff --git a/lib/private/Authentication/Login/UserDisabledCheckCommand.php b/lib/private/Authentication/Login/UserDisabledCheckCommand.php index 0889fc99b20..87446dc72d7 100644 --- a/lib/private/Authentication/Login/UserDisabledCheckCommand.php +++ b/lib/private/Authentication/Login/UserDisabledCheckCommand.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -14,16 +17,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - namespace OC\Authentication\Login; use OC\Core\Controller\LoginController; diff --git a/lib/private/Authentication/Login/WebAuthnChain.php b/lib/private/Authentication/Login/WebAuthnChain.php index 1f737a1674f..f3ebc313a44 100644 --- a/lib/private/Authentication/Login/WebAuthnChain.php +++ b/lib/private/Authentication/Login/WebAuthnChain.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Login; class WebAuthnChain { diff --git a/lib/private/Authentication/Login/WebAuthnLoginCommand.php b/lib/private/Authentication/Login/WebAuthnLoginCommand.php index c08108fe9bb..5f79768d257 100644 --- a/lib/private/Authentication/Login/WebAuthnLoginCommand.php +++ b/lib/private/Authentication/Login/WebAuthnLoginCommand.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Login; use OCP\IUserManager; diff --git a/lib/private/Authentication/LoginCredentials/Credentials.php b/lib/private/Authentication/LoginCredentials/Credentials.php index e4cbdccec50..42f8f374059 100644 --- a/lib/private/Authentication/LoginCredentials/Credentials.php +++ b/lib/private/Authentication/LoginCredentials/Credentials.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Authentication\LoginCredentials; use OCP\Authentication\LoginCredentials\ICredentials; diff --git a/lib/private/Authentication/LoginCredentials/Store.php b/lib/private/Authentication/LoginCredentials/Store.php index 1810732ac3a..9055f9b56a2 100644 --- a/lib/private/Authentication/LoginCredentials/Store.php +++ b/lib/private/Authentication/LoginCredentials/Store.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\LoginCredentials; use OC\Authentication\Exceptions\InvalidTokenException; diff --git a/lib/private/Authentication/Notifications/Notifier.php b/lib/private/Authentication/Notifications/Notifier.php index fce8eb82f65..849b421d4c3 100644 --- a/lib/private/Authentication/Notifications/Notifier.php +++ b/lib/private/Authentication/Notifications/Notifier.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Notifications; use InvalidArgumentException; diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php index d91866ae66f..5a008586a90 100644 --- a/lib/private/Authentication/Token/DefaultToken.php +++ b/lib/private/Authentication/Token/DefaultToken.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Token; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php index 0686f40e82f..c3d80beac69 100644 --- a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php +++ b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Token; use OC; diff --git a/lib/private/Authentication/Token/DefaultTokenMapper.php b/lib/private/Authentication/Token/DefaultTokenMapper.php index 40d503772b0..6ceb777c30f 100644 --- a/lib/private/Authentication/Token/DefaultTokenMapper.php +++ b/lib/private/Authentication/Token/DefaultTokenMapper.php @@ -27,7 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Token; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php index a6a1af5a97a..c10d7f17bc2 100644 --- a/lib/private/Authentication/Token/DefaultTokenProvider.php +++ b/lib/private/Authentication/Token/DefaultTokenProvider.php @@ -29,7 +29,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Token; use Exception; @@ -72,21 +71,12 @@ class DefaultTokenProvider implements IProvider { } /** - * Create and persist a new token - * - * @param string $token - * @param string $uid - * @param string $loginName - * @param string|null $password - * @param string $name - * @param int $type token type - * @param int $remember whether the session token should be used for remember-me - * @return IToken + * {@inheritDoc} */ public function generateToken(string $token, string $uid, string $loginName, - $password, + ?string $password, string $name, int $type = IToken::TEMPORARY_TOKEN, int $remember = IToken::DO_NOT_REMEMBER): IToken { @@ -225,7 +215,7 @@ class DefaultTokenProvider implements IProvider { */ public function getPassword(IToken $savedToken, string $tokenId): string { $password = $savedToken->getPassword(); - if (is_null($password)) { + if ($password === null || $password === '') { throw new PasswordlessTokenException(); } return $this->decryptPassword($password, $tokenId); diff --git a/lib/private/Authentication/Token/INamedToken.php b/lib/private/Authentication/Token/INamedToken.php index 30755879963..96a7719fb41 100644 --- a/lib/private/Authentication/Token/INamedToken.php +++ b/lib/private/Authentication/Token/INamedToken.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; interface INamedToken extends IToken { diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php index 2b6223fded9..e604ac715c2 100644 --- a/lib/private/Authentication/Token/IProvider.php +++ b/lib/private/Authentication/Token/IProvider.php @@ -27,7 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Token; use OC\Authentication\Exceptions\ExpiredTokenException; @@ -54,7 +53,7 @@ interface IProvider { public function generateToken(string $token, string $uid, string $loginName, - $password, + ?string $password, string $name, int $type = IToken::TEMPORARY_TOKEN, int $remember = IToken::DO_NOT_REMEMBER): IToken; diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php index 326e9554b8e..5ca4eaea843 100644 --- a/lib/private/Authentication/Token/IToken.php +++ b/lib/private/Authentication/Token/IToken.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\Token; use JsonSerializable; diff --git a/lib/private/Authentication/Token/IWipeableToken.php b/lib/private/Authentication/Token/IWipeableToken.php index efc542faa69..64dbb604ed2 100644 --- a/lib/private/Authentication/Token/IWipeableToken.php +++ b/lib/private/Authentication/Token/IWipeableToken.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; interface IWipeableToken extends IToken { diff --git a/lib/private/Authentication/Token/Manager.php b/lib/private/Authentication/Token/Manager.php index 073569de0cf..b718ce73ea4 100644 --- a/lib/private/Authentication/Token/Manager.php +++ b/lib/private/Authentication/Token/Manager.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php index d2336c81efd..3351c767ce3 100644 --- a/lib/private/Authentication/Token/PublicKeyToken.php +++ b/lib/private/Authentication/Token/PublicKeyToken.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/Authentication/Token/PublicKeyTokenMapper.php b/lib/private/Authentication/Token/PublicKeyTokenMapper.php index d44ff3c50dd..0c532312ace 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php +++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; use OCP\AppFramework\Db\DoesNotExistException; @@ -191,4 +190,43 @@ class PublicKeyTokenMapper extends QBMapper { return count($data) === 1; } + + /** + * Update the last activity timestamp + * + * In highly concurrent setups it can happen that two parallel processes + * trigger the update at (nearly) the same time. In that special case it's + * not necessary to hit the database with two actual updates. Therefore the + * target last activity is included in the WHERE clause with a few seconds + * of tolerance. + * + * Example: + * - process 1 (P1) reads the token at timestamp 1500 + * - process 1 (P2) reads the token at timestamp 1501 + * - activity update interval is 100 + * + * This means + * + * - P1 will see a last_activity smaller than the current time and update + * the token row + * - If P2 reads after P1 had written, it will see 1600 as last activity + * and the comparison on last_activity won't be truthy. This means no rows + * need to be updated a second time + * - If P2 reads before P1 had written, it will see 1501 as last activity, + * but the comparison on last_activity will still not be truthy and the + * token row is not updated a second time + * + * @param IToken $token + * @param int $now + */ + public function updateActivity(IToken $token, int $now): void { + $qb = $this->db->getQueryBuilder(); + $update = $qb->update($this->getTableName()) + ->set('last_activity', $qb->createNamedParameter($now, IQueryBuilder::PARAM_INT)) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($token->getId(), IQueryBuilder::PARAM_INT), IQueryBuilder::PARAM_INT), + $qb->expr()->lt('last_activity', $qb->createNamedParameter($now - 15, IQueryBuilder::PARAM_INT), IQueryBuilder::PARAM_INT) + ); + $update->executeStatement(); + } } diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index a293d2a8404..b9cfce6c869 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -20,14 +20,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; use OC\Authentication\Exceptions\ExpiredTokenException; @@ -81,7 +80,7 @@ class PublicKeyTokenProvider implements IProvider { public function generateToken(string $token, string $uid, string $loginName, - $password, + ?string $password, string $name, int $type = IToken::TEMPORARY_TOKEN, int $remember = IToken::DO_NOT_REMEMBER): IToken { @@ -222,9 +221,8 @@ class PublicKeyTokenProvider implements IProvider { /** @var PublicKeyToken $token */ $now = $this->time->getTime(); if ($token->getLastActivity() < ($now - $activityInterval)) { - // Update token only once per minute $token->setLastActivity($now); - $this->mapper->update($token); + $this->mapper->updateActivity($token, $now); } } @@ -414,6 +412,11 @@ class PublicKeyTokenProvider implements IProvider { public function updatePasswords(string $uid, string $password) { $this->cache->clear(); + // prevent setting an empty pw as result of pw-less-login + if ($password === '') { + return; + } + // Update the password for all tokens $tokens = $this->mapper->getTokenByUser($uid); foreach ($tokens as $t) { diff --git a/lib/private/Authentication/Token/RemoteWipe.php b/lib/private/Authentication/Token/RemoteWipe.php index b762073a8bc..9e152d16a04 100644 --- a/lib/private/Authentication/Token/RemoteWipe.php +++ b/lib/private/Authentication/Token/RemoteWipe.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\Token; use Psr\Log\LoggerInterface; diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php index bd8ff0353ee..e9aa15e11b6 100644 --- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php +++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth\Db; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php index c244843454b..ed157f49006 100644 --- a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php +++ b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth; use JsonSerializable; diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index d95cc8b1ebf..375803b1d96 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Authentication\TwoFactorAuth; use BadMethodCallException; @@ -37,6 +36,9 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Authentication\TwoFactorAuth\IActivatableAtLogin; use OCP\Authentication\TwoFactorAuth\IProvider; use OCP\Authentication\TwoFactorAuth\IRegistry; +use OCP\Authentication\TwoFactorAuth\TwoFactorProviderForUserDisabled; +use OCP\Authentication\TwoFactorAuth\TwoFactorProviderForUserEnabled; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\ISession; use OCP\IUser; @@ -79,9 +81,12 @@ class Manager { /** @var ITimeFactory */ private $timeFactory; - /** @var EventDispatcherInterface */ + /** @var IEventDispatcher */ private $dispatcher; + /** @var EventDispatcherInterface */ + private $legacyDispatcher; + public function __construct(ProviderLoader $providerLoader, IRegistry $providerRegistry, MandatoryTwoFactor $mandatoryTwoFactor, @@ -91,7 +96,8 @@ class Manager { LoggerInterface $logger, TokenProvider $tokenProvider, ITimeFactory $timeFactory, - EventDispatcherInterface $eventDispatcher) { + IEventDispatcher $eventDispatcher, + EventDispatcherInterface $legacyDispatcher) { $this->providerLoader = $providerLoader; $this->providerRegistry = $providerRegistry; $this->mandatoryTwoFactor = $mandatoryTwoFactor; @@ -102,6 +108,7 @@ class Manager { $this->tokenProvider = $tokenProvider; $this->timeFactory = $timeFactory; $this->dispatcher = $eventDispatcher; + $this->legacyDispatcher = $legacyDispatcher; } /** @@ -267,14 +274,18 @@ class Manager { $this->config->deleteUserValue($user->getUID(), 'login_token_2fa', $tokenId); $dispatchEvent = new GenericEvent($user, ['provider' => $provider->getDisplayName()]); - $this->dispatcher->dispatch(IProvider::EVENT_SUCCESS, $dispatchEvent); + $this->legacyDispatcher->dispatch(IProvider::EVENT_SUCCESS, $dispatchEvent); + + $this->dispatcher->dispatchTyped(new TwoFactorProviderForUserEnabled($user, $provider)); $this->publishEvent($user, 'twofactor_success', [ 'provider' => $provider->getDisplayName(), ]); } else { $dispatchEvent = new GenericEvent($user, ['provider' => $provider->getDisplayName()]); - $this->dispatcher->dispatch(IProvider::EVENT_FAILED, $dispatchEvent); + $this->legacyDispatcher->dispatch(IProvider::EVENT_FAILED, $dispatchEvent); + + $this->dispatcher->dispatchTyped(new TwoFactorProviderForUserDisabled($user, $provider)); $this->publishEvent($user, 'twofactor_failed', [ 'provider' => $provider->getDisplayName(), diff --git a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php index b06a517ef80..675f4faf63a 100644 --- a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php +++ b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth; use OCP\IConfig; diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php index 40385d737ae..25cdc387f61 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -16,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth; use Exception; @@ -40,8 +40,12 @@ class ProviderLoader { /** @var IAppManager */ private $appManager; - public function __construct(IAppManager $appManager) { + /** @var OC\AppFramework\Bootstrap\Coordinator */ + private $coordinator; + + public function __construct(IAppManager $appManager, OC\AppFramework\Bootstrap\Coordinator $coordinator) { $this->appManager = $appManager; + $this->coordinator = $coordinator; } /** @@ -72,6 +76,18 @@ class ProviderLoader { } } + $registeredProviders = $this->coordinator->getRegistrationContext()->getTwoFactorProviders(); + foreach ($registeredProviders as $provider) { + try { + $this->loadTwoFactorApp($provider->getAppId()); + $provider = OC::$server->query($provider->getService()); + $providers[$provider->getId()] = $provider; + } catch (QueryException $exc) { + // Provider class can not be resolved + throw new Exception('Could not load two-factor auth provider ' . $provider->getService()); + } + } + return $providers; } diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php index 4d3171e96f7..e2bb367f47e 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth; use OC\Authentication\Exceptions\InvalidProviderException; diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php index c27681c6036..5e05cb0f710 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth; use function array_filter; diff --git a/lib/private/Authentication/TwoFactorAuth/Registry.php b/lib/private/Authentication/TwoFactorAuth/Registry.php index 2af8566d3e5..1846ebcf8e2 100644 --- a/lib/private/Authentication/TwoFactorAuth/Registry.php +++ b/lib/private/Authentication/TwoFactorAuth/Registry.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\TwoFactorAuth; use OC\Authentication\TwoFactorAuth\Db\ProviderUserAssignmentDao; diff --git a/lib/private/Authentication/WebAuthn/CredentialRepository.php b/lib/private/Authentication/WebAuthn/CredentialRepository.php index f75b4b5ae46..34af75b1ba6 100644 --- a/lib/private/Authentication/WebAuthn/CredentialRepository.php +++ b/lib/private/Authentication/WebAuthn/CredentialRepository.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\WebAuthn; use OC\Authentication\WebAuthn\Db\PublicKeyCredentialEntity; diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php index ae31a2ea772..786154d6d14 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\WebAuthn\Db; use JsonSerializable; diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php index d08cb71d72f..72c557eb53a 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\WebAuthn\Db; use OCP\AppFramework\Db\DoesNotExistException; @@ -85,4 +84,17 @@ class PublicKeyCredentialMapper extends QBMapper { return $this->findEntity($qb); } + + /** + * @throws \OCP\DB\Exception + */ + public function deleteByUid(string $uid) { + $qb = $this->db->getQueryBuilder(); + + $qb->delete($this->getTableName()) + ->where( + $qb->expr()->eq('uid', $qb->createNamedParameter($uid)) + ); + $qb->executeStatement(); + } } diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php index 9ef3a0718ca..1edfb6a85ed 100644 --- a/lib/private/Authentication/WebAuthn/Manager.php +++ b/lib/private/Authentication/WebAuthn/Manager.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Authentication\WebAuthn; use Cose\Algorithm\Signature\ECDSA\ES256; diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php index 09d08f930e6..3bd58bb7681 100644 --- a/lib/private/Avatar/Avatar.php +++ b/lib/private/Avatar/Avatar.php @@ -10,9 +10,8 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jan-Christoph Borchardt <hey@jancborchardt.net> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> - * @author Lukas Reschke <lukas@statuscode.ch> * @author Michael Weimann <mail@michael-weimann.eu> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -35,7 +34,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Avatar; use Imagick; @@ -43,14 +41,14 @@ use OC\Color; use OC_Image; use OCP\Files\NotFoundException; use OCP\IAvatar; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * This class gets and sets users avatars. */ abstract class Avatar implements IAvatar { - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @@ -69,12 +67,7 @@ abstract class Avatar implements IAvatar { <text x="50%" y="350" style="font-weight:normal;font-size:280px;font-family:\'Noto Sans\';text-anchor:middle;fill:#fff">{letter}</text> </svg>'; - /** - * The base avatar constructor. - * - * @param ILogger $logger The logger - */ - public function __construct(ILogger $logger) { + public function __construct(LoggerInterface $logger) { $this->logger = $logger; } @@ -156,8 +149,9 @@ abstract class Avatar implements IAvatar { $avatar->readImageBlob($svg); $avatar->setImageFormat('png'); $image = new OC_Image(); - $image->loadFromData($avatar); - return $image->data(); + $image->loadFromData((string)$avatar); + $data = $image->data(); + return $data === null ? false : $data; } catch (\Exception $e) { return false; } diff --git a/lib/private/Avatar/AvatarManager.php b/lib/private/Avatar/AvatarManager.php index 5102396224d..c3afd8094c7 100644 --- a/lib/private/Avatar/AvatarManager.php +++ b/lib/private/Avatar/AvatarManager.php @@ -7,7 +7,8 @@ declare(strict_types=1); * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author Joas Schilling <coding@schilljs.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Michael Weimann <mail@michael-weimann.eu> @@ -15,6 +16,7 @@ declare(strict_types=1); * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> + * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 * @@ -31,11 +33,13 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Avatar; +use OC\KnownUser\KnownUserService; use OC\User\Manager; use OC\User\NoUserException; +use OCP\Accounts\IAccountManager; +use OCP\Accounts\PropertyDoesNotExistException; use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; @@ -43,13 +47,17 @@ use OCP\IAvatar; use OCP\IAvatarManager; use OCP\IConfig; use OCP\IL10N; -use OCP\ILogger; +use OCP\IUserSession; +use Psr\Log\LoggerInterface; /** * This class implements methods to access Avatar functionality */ class AvatarManager implements IAvatarManager { + /** @var IUserSession */ + private $userSession; + /** @var Manager */ private $userManager; @@ -59,32 +67,36 @@ class AvatarManager implements IAvatarManager { /** @var IL10N */ private $l; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var IConfig */ private $config; - /** - * AvatarManager constructor. - * - * @param Manager $userManager - * @param IAppData $appData - * @param IL10N $l - * @param ILogger $logger - * @param IConfig $config - */ + /** @var IAccountManager */ + private $accountManager; + + /** @var KnownUserService */ + private $knownUserService; + public function __construct( + IUserSession $userSession, Manager $userManager, IAppData $appData, IL10N $l, - ILogger $logger, - IConfig $config) { + LoggerInterface $logger, + IConfig $config, + IAccountManager $accountManager, + KnownUserService $knownUserService + ) { + $this->userSession = $userSession; $this->userManager = $userManager; $this->appData = $appData; $this->l = $l; $this->logger = $logger; $this->config = $config; + $this->accountManager = $accountManager; + $this->knownUserService = $knownUserService; } /** @@ -104,12 +116,38 @@ class AvatarManager implements IAvatarManager { // sanitize userID - fixes casing issue (needed for the filesystem stuff that is done below) $userId = $user->getUID(); + $requestingUser = null; + if ($this->userSession !== null) { + $requestingUser = $this->userSession->getUser(); + } + try { $folder = $this->appData->getFolder($userId); } catch (NotFoundException $e) { $folder = $this->appData->newFolder($userId); } + try { + $account = $this->accountManager->getAccount($user); + $avatarProperties = $account->getProperty(IAccountManager::PROPERTY_AVATAR); + $avatarScope = $avatarProperties->getScope(); + } catch (PropertyDoesNotExistException $e) { + $avatarScope = ''; + } + + if ( + // v2-private scope hides the avatar from public access and from unknown users + $avatarScope === IAccountManager::SCOPE_PRIVATE + && ( + // accessing from public link + $requestingUser === null + // logged in, but unknown to user + || !$this->knownUserService->isKnownToUser($requestingUser->getUID(), $userId) + )) { + // use a placeholder avatar which caches the generated images + return new PlaceholderAvatar($folder, $user, $this->logger); + } + return new UserAvatar($folder, $this->l, $user, $this->logger, $this->config); } diff --git a/lib/private/Avatar/GuestAvatar.php b/lib/private/Avatar/GuestAvatar.php index cc7e21b9fe6..f0297b3a93c 100644 --- a/lib/private/Avatar/GuestAvatar.php +++ b/lib/private/Avatar/GuestAvatar.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018, Michael Weimann <mail@michael-weimann.eu> * + * @author Joas Schilling <coding@schilljs.com> * @author Michael Weimann <mail@michael-weimann.eu> * * @license GNU AGPL version 3 or any later version @@ -16,18 +17,17 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Avatar; use OCP\Files\SimpleFS\InMemoryFile; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * This class represents a guest user's avatar. @@ -44,9 +44,9 @@ class GuestAvatar extends Avatar { * GuestAvatar constructor. * * @param string $userDisplayName The guest user display name - * @param ILogger $logger The logger + * @param LoggerInterface $logger The logger */ - public function __construct(string $userDisplayName, ILogger $logger) { + public function __construct(string $userDisplayName, LoggerInterface $logger) { parent::__construct($logger); $this->userDisplayName = $userDisplayName; } diff --git a/lib/private/Avatar/PlaceholderAvatar.php b/lib/private/Avatar/PlaceholderAvatar.php new file mode 100644 index 00000000000..df7a490cbe4 --- /dev/null +++ b/lib/private/Avatar/PlaceholderAvatar.php @@ -0,0 +1,180 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2018, Michael Weimann <mail@michael-weimann.eu> + * + * @author Joas Schilling <coding@schilljs.com> + * @author Vincent Petry <vincent@nextcloud.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Avatar; + +use OC\NotSquareException; +use OC\User\User; +use OCP\Files\NotFoundException; +use OCP\Files\NotPermittedException; +use OCP\Files\SimpleFS\ISimpleFile; +use OCP\Files\SimpleFS\ISimpleFolder; +use OCP\IConfig; +use OCP\IImage; +use OCP\IL10N; +use Psr\Log\LoggerInterface; + +/** + * This class represents a registered user's placeholder avatar. + * + * It generates an image based on the user's initials and caches it on storage + * for faster retrieval, unlike the GuestAvatar. + */ +class PlaceholderAvatar extends Avatar { + /** @var ISimpleFolder */ + private $folder; + + /** @var User */ + private $user; + + /** + * UserAvatar constructor. + * + * @param IConfig $config The configuration + * @param ISimpleFolder $folder The avatar files folder + * @param IL10N $l The localization helper + * @param User $user The user this class manages the avatar for + * @param LoggerInterface $logger The logger + */ + public function __construct( + ISimpleFolder $folder, + $user, + LoggerInterface $logger) { + parent::__construct($logger); + + $this->folder = $folder; + $this->user = $user; + } + + /** + * Check if an avatar exists for the user + * + * @return bool + */ + public function exists() { + return true; + } + + /** + * Sets the users avatar. + * + * @param IImage|resource|string $data An image object, imagedata or path to set a new avatar + * @throws \Exception if the provided file is not a jpg or png image + * @throws \Exception if the provided image is not valid + * @throws NotSquareException if the image is not square + * @return void + */ + public function set($data) { + // unimplemented for placeholder avatars + } + + /** + * Removes the users avatar. + */ + public function remove(bool $silent = false) { + $avatars = $this->folder->getDirectoryListing(); + + foreach ($avatars as $avatar) { + $avatar->delete(); + } + } + + /** + * Returns the avatar for an user. + * + * If there is no avatar file yet, one is generated. + * + * @param int $size + * @return ISimpleFile + * @throws NotFoundException + * @throws \OCP\Files\NotPermittedException + * @throws \OCP\PreConditionNotMetException + */ + public function getFile($size) { + $size = (int) $size; + + $ext = 'png'; + + if ($size === -1) { + $path = 'avatar-placeholder.' . $ext; + } else { + $path = 'avatar-placeholder.' . $size . '.' . $ext; + } + + try { + $file = $this->folder->getFile($path); + } catch (NotFoundException $e) { + if ($size <= 0) { + throw new NotFoundException; + } + + if (!$data = $this->generateAvatarFromSvg($size)) { + $data = $this->generateAvatar($this->getDisplayName(), $size); + } + + try { + $file = $this->folder->newFile($path); + $file->putContent($data); + } catch (NotPermittedException $e) { + $this->logger->error('Failed to save avatar placeholder for ' . $this->user->getUID()); + throw new NotFoundException(); + } + } + + return $file; + } + + /** + * Returns the user display name. + * + * @return string + */ + public function getDisplayName(): string { + return $this->user->getDisplayName(); + } + + /** + * Handles user changes. + * + * @param string $feature The changed feature + * @param mixed $oldValue The previous value + * @param mixed $newValue The new value + * @throws NotPermittedException + * @throws \OCP\PreConditionNotMetException + */ + public function userChanged($feature, $oldValue, $newValue) { + $this->remove(); + } + + /** + * Check if the avatar of a user is a custom uploaded one + * + * @return bool + */ + public function isCustomAvatar(): bool { + return false; + } +} diff --git a/lib/private/Avatar/UserAvatar.php b/lib/private/Avatar/UserAvatar.php index f7ace429f7d..027c83172c2 100644 --- a/lib/private/Avatar/UserAvatar.php +++ b/lib/private/Avatar/UserAvatar.php @@ -9,6 +9,7 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Michael Weimann <mail@michael-weimann.eu> + * @author Vincent Petry <vincent@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -19,14 +20,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Avatar; use OC\NotSquareException; @@ -39,7 +39,7 @@ use OCP\Files\SimpleFS\ISimpleFolder; use OCP\IConfig; use OCP\IImage; use OCP\IL10N; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * This class represents a registered user's avatar. @@ -64,13 +64,13 @@ class UserAvatar extends Avatar { * @param ISimpleFolder $folder The avatar files folder * @param IL10N $l The localization helper * @param User $user The user this class manages the avatar for - * @param ILogger $logger The logger + * @param LoggerInterface $logger The logger */ public function __construct( ISimpleFolder $folder, IL10N $l, $user, - ILogger $logger, + LoggerInterface $logger, IConfig $config) { parent::__construct($logger); $this->folder = $folder; @@ -270,6 +270,7 @@ class UserAvatar extends Avatar { throw new NotFoundException; } + // TODO: rework to integrate with the PlaceholderAvatar in a compatible way if ($this->folder->fileExists('generated')) { if (!$data = $this->generateAvatarFromSvg($size)) { $data = $this->generateAvatar($this->getDisplayName(), $size); diff --git a/lib/private/BackgroundJob/Job.php b/lib/private/BackgroundJob/Job.php index 312ec628e0b..6f85e3382ed 100644 --- a/lib/private/BackgroundJob/Job.php +++ b/lib/private/BackgroundJob/Job.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\BackgroundJob; use OCP\BackgroundJob\IJob; diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php index 5a89dcdeba6..9d8d1d836b6 100644 --- a/lib/private/BackgroundJob/JobList.php +++ b/lib/private/BackgroundJob/JobList.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\BackgroundJob; use OCP\AppFramework\QueryException; @@ -237,19 +236,29 @@ class JobList implements IJobList { * @return IJob|null */ public function getById($id) { + $row = $this->getDetailsById($id); + + if ($row) { + return $this->buildJob($row); + } + + return null; + } + + public function getDetailsById(int $id): ?array { $query = $this->connection->getQueryBuilder(); $query->select('*') ->from('jobs') ->where($query->expr()->eq('id', $query->createNamedParameter($id, IQueryBuilder::PARAM_INT))); - $result = $query->execute(); + $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); if ($row) { - return $this->buildJob($row); - } else { - return null; + return $row; } + + return null; } /** @@ -331,4 +340,19 @@ class JobList implements IJobList { ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId(), IQueryBuilder::PARAM_INT))); $query->execute(); } + + /** + * Reset the $job so it executes on the next trigger + * + * @param IJob $job + * @since 23.0.0 + */ + public function resetBackgroundJob(IJob $job): void { + $query = $this->connection->getQueryBuilder(); + $query->update('jobs') + ->set('last_run', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)) + ->set('reserved_at', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)) + ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId()), IQueryBuilder::PARAM_INT)); + $query->executeStatement(); + } } diff --git a/lib/private/BackgroundJob/Legacy/QueuedJob.php b/lib/private/BackgroundJob/Legacy/QueuedJob.php index 9adaeff89ec..d68fd217fdd 100644 --- a/lib/private/BackgroundJob/Legacy/QueuedJob.php +++ b/lib/private/BackgroundJob/Legacy/QueuedJob.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\BackgroundJob\Legacy; class QueuedJob extends \OC\BackgroundJob\QueuedJob { diff --git a/lib/private/BackgroundJob/Legacy/RegularJob.php b/lib/private/BackgroundJob/Legacy/RegularJob.php index 95ad8a4ed63..e3286536c9a 100644 --- a/lib/private/BackgroundJob/Legacy/RegularJob.php +++ b/lib/private/BackgroundJob/Legacy/RegularJob.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\BackgroundJob\Legacy; use OCP\AutoloadNotAllowedException; diff --git a/lib/private/BackgroundJob/QueuedJob.php b/lib/private/BackgroundJob/QueuedJob.php index 6f10ee4408d..176227e73db 100644 --- a/lib/private/BackgroundJob/QueuedJob.php +++ b/lib/private/BackgroundJob/QueuedJob.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\BackgroundJob; use OCP\ILogger; diff --git a/lib/private/BackgroundJob/TimedJob.php b/lib/private/BackgroundJob/TimedJob.php index c0ce130c6cf..62b9bab7ccc 100644 --- a/lib/private/BackgroundJob/TimedJob.php +++ b/lib/private/BackgroundJob/TimedJob.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\BackgroundJob; use OCP\BackgroundJob\IJobList; diff --git a/lib/private/Broadcast/Events/BroadcastEvent.php b/lib/private/Broadcast/Events/BroadcastEvent.php index 7d4d7017af5..47871e00132 100644 --- a/lib/private/Broadcast/Events/BroadcastEvent.php +++ b/lib/private/Broadcast/Events/BroadcastEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Broadcast\Events; use JsonSerializable; diff --git a/lib/private/Cache/CappedMemoryCache.php b/lib/private/Cache/CappedMemoryCache.php index 28e08759304..408c3935ffb 100644 --- a/lib/private/Cache/CappedMemoryCache.php +++ b/lib/private/Cache/CappedMemoryCache.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Cache; use OCP\ICache; diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php index 756bc9c36a5..0ecd894d2d2 100644 --- a/lib/private/Cache/File.php +++ b/lib/private/Cache/File.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Cache; use OC\Files\Filesystem; @@ -109,7 +108,7 @@ class File implements ICache { // unique id to avoid chunk collision, just in case $uniqueId = \OC::$server->getSecureRandom()->generate( 16, - ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER + ISecureRandom::CHAR_ALPHANUMERIC ); // use part file to prevent hasKey() to find the key diff --git a/lib/private/Calendar/CalendarQuery.php b/lib/private/Calendar/CalendarQuery.php new file mode 100644 index 00000000000..6b4e2b3be16 --- /dev/null +++ b/lib/private/Calendar/CalendarQuery.php @@ -0,0 +1,124 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Anna Larch <anna.larch@gmx.net> + * + * @author Anna Larch <anna.larch@gmx.net> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Calendar; + +use OCP\Calendar\ICalendarQuery; + +class CalendarQuery implements ICalendarQuery { + + /** @var string */ + private $principalUri; + + /** @var array */ + public $searchProperties; + + /** @var string|null */ + private $searchPattern; + + /** @var array */ + private $options; + + /** @var int|null */ + private $offset; + + /** @var int|null */ + private $limit; + + /** @var array */ + private $calendarUris; + + public function __construct(string $principalUri) { + $this->principalUri = $principalUri; + $this->searchProperties = []; + $this->options = [ + 'types' => [], + ]; + } + + public function getPrincipalUri(): string { + return $this->principalUri; + } + + public function setPrincipalUri(string $principalUri): void { + $this->principalUri = $principalUri; + } + + public function setSearchPattern(string $pattern): void { + $this->searchPattern = $pattern; + } + + public function getSearchPattern(): ?string { + return $this->searchPattern; + } + + public function addSearchProperty(string $value): void { + $this->searchProperties[] = $value; + } + + public function getSearchProperties(): array { + return $this->searchProperties; + } + + public function addSearchCalendar(string $calendarUri): void { + $this->calendarUris[] = $calendarUri; + } + + public function getCalendarUris(): array { + return $this->calendarUris; + } + + public function getLimit(): ?int { + return $this->limit; + } + + public function setLimit(int $limit): void { + $this->limit = $limit; + } + + public function getOffset(): ?int { + return $this->offset; + } + + public function setOffset(int $offset): void { + $this->offset = $offset; + } + + public function addType(string $value): void { + $this->options['types'][] = $value; + } + + public function setTimerangeStart(\DateTimeImmutable $startTime): void { + $this->options['timerange']['start'] = $startTime; + } + + public function setTimerangeEnd(\DateTimeImmutable $endTime): void { + $this->options['timerange']['end'] = $endTime; + } + + public function getOptions(): array { + return $this->options; + } +} diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php index f8401259eb4..3fa4b55d1ea 100644 --- a/lib/private/Calendar/Manager.php +++ b/lib/private/Calendar/Manager.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2017, Georg Ehrke <oc.list@georgehrke.com> * @@ -14,19 +17,27 @@ * * 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 + * 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/>. * */ - namespace OC\Calendar; +use OC\AppFramework\Bootstrap\Coordinator; use OCP\Calendar\ICalendar; +use OCP\Calendar\ICalendarProvider; +use OCP\Calendar\ICalendarQuery; +use OCP\Calendar\IManager; +use Psr\Container\ContainerInterface; +use Psr\Log\LoggerInterface; +use Throwable; +use function array_map; +use function array_merge; -class Manager implements \OCP\Calendar\IManager { +class Manager implements IManager { /** * @var ICalendar[] holds all registered calendars @@ -38,6 +49,23 @@ class Manager implements \OCP\Calendar\IManager { */ private $calendarLoaders = []; + /** @var Coordinator */ + private $coordinator; + + /** @var ContainerInterface */ + private $container; + + /** @var LoggerInterface */ + private $logger; + + public function __construct(Coordinator $coordinator, + ContainerInterface $container, + LoggerInterface $logger) { + $this->coordinator = $coordinator; + $this->container = $container; + $this->logger = $logger; + } + /** * This function is used to search and find objects within the user's calendars. * In case $pattern is empty all events/journals/todos will be returned. @@ -138,4 +166,50 @@ class Manager implements \OCP\Calendar\IManager { } $this->calendarLoaders = []; } + + public function searchForPrincipal(ICalendarQuery $query): array { + $context = $this->coordinator->getRegistrationContext(); + if ($context === null) { + return []; + } + + /** @var CalendarQuery $query */ + $calendars = array_merge( + ...array_map(function ($registration) use ($query) { + try { + /** @var ICalendarProvider $provider */ + $provider = $this->container->get($registration->getService()); + } catch (Throwable $e) { + $this->logger->error('Could not load calendar provider ' . $registration->getService() . ': ' . $e->getMessage(), [ + 'exception' => $e, + ]); + return []; + } + + return $provider->getCalendars($query->getPrincipalUri(), $query->getCalendarUris()); + }, $context->getCalendarProviders()) + ); + + $results = []; + /** @var ICalendar $calendar */ + foreach ($calendars as $calendar) { + $r = $calendar->search( + $query->getSearchPattern() ?? '', + $query->getSearchProperties(), + $query->getOptions(), + $query->getLimit(), + $query->getOffset() + ); + + foreach ($r as $o) { + $o['calendar-key'] = $calendar->getKey(); + $results[] = $o; + } + } + return $results; + } + + public function newQuery(string $principalUri): ICalendarQuery { + return new CalendarQuery($principalUri); + } } diff --git a/lib/private/Calendar/Resource/Manager.php b/lib/private/Calendar/Resource/Manager.php index 2c63ce990fa..935541d9c87 100644 --- a/lib/private/Calendar/Resource/Manager.php +++ b/lib/private/Calendar/Resource/Manager.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Calendar\Resource; use OCP\Calendar\Resource\IBackend; diff --git a/lib/private/Calendar/Room/Manager.php b/lib/private/Calendar/Room/Manager.php index 5001b715cb0..25db5197ef2 100644 --- a/lib/private/Calendar/Room/Manager.php +++ b/lib/private/Calendar/Room/Manager.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Calendar\Room; use OCP\Calendar\Room\IBackend; diff --git a/lib/private/CapabilitiesManager.php b/lib/private/CapabilitiesManager.php index 6a4d97ad159..16f9bd64252 100644 --- a/lib/private/CapabilitiesManager.php +++ b/lib/private/CapabilitiesManager.php @@ -5,8 +5,8 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -26,23 +26,22 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OCP\AppFramework\QueryException; use OCP\Capabilities\ICapability; use OCP\Capabilities\IPublicCapability; -use OCP\ILogger; +use Psr\Log\LoggerInterface; class CapabilitiesManager { /** @var \Closure[] */ private $capabilities = []; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; - public function __construct(ILogger $logger) { + public function __construct(LoggerInterface $logger) { $this->logger = $logger; } @@ -59,10 +58,8 @@ class CapabilitiesManager { try { $c = $capability(); } catch (QueryException $e) { - $this->logger->logException($e, [ - 'message' => 'CapabilitiesManager', - 'level' => ILogger::ERROR, - 'app' => 'core', + $this->logger->error('CapabilitiesManager', [ + 'exception' => $e, ]); continue; } diff --git a/lib/private/Collaboration/AutoComplete/Manager.php b/lib/private/Collaboration/AutoComplete/Manager.php index d03de3a9fd3..cab15baf535 100644 --- a/lib/private/Collaboration/AutoComplete/Manager.php +++ b/lib/private/Collaboration/AutoComplete/Manager.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\AutoComplete; use OCP\Collaboration\AutoComplete\IManager; diff --git a/lib/private/Collaboration/Collaborators/GroupPlugin.php b/lib/private/Collaboration/Collaborators/GroupPlugin.php index 18a6631ed80..75e52c19e0b 100644 --- a/lib/private/Collaboration/Collaborators/GroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/GroupPlugin.php @@ -18,14 +18,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; @@ -38,8 +37,14 @@ use OCP\IUserSession; use OCP\Share\IShare; class GroupPlugin implements ISearchPlugin { + /** @var bool */ protected $shareeEnumeration; + /** @var bool */ protected $shareWithGroupOnly; + /** @var bool */ + protected $shareeEnumerationInGroupOnly; + /** @var bool */ + protected $groupSharingDisabled; /** @var IGroupManager */ private $groupManager; @@ -56,9 +61,14 @@ class GroupPlugin implements ISearchPlugin { $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; $this->shareWithGroupOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes'; $this->shareeEnumerationInGroupOnly = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; + $this->groupSharingDisabled = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'no'; } public function search($search, $limit, $offset, ISearchResult $searchResult) { + if ($this->groupSharingDisabled) { + return false; + } + $hasMoreResults = false; $result = ['wide' => [], 'exact' => []]; @@ -118,7 +128,7 @@ class GroupPlugin implements ISearchPlugin { // On page one we try if the search result has a direct hit on the // user id and if so, we add that to the exact match list $group = $this->groupManager->get($search); - if ($group instanceof IGroup && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) { + if ($group instanceof IGroup && !$group->hideFromCollaboration() && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) { $result['exact'][] = [ 'label' => $group->getDisplayName(), 'value' => [ diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index 974254e9a3f..079fd4d2575 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -5,6 +5,7 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -17,14 +18,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; @@ -33,9 +33,9 @@ use OCP\Collaboration\Collaborators\SearchResultType; use OCP\Federation\ICloudIdManager; use OCP\Http\Client\IClientService; use OCP\IConfig; -use OCP\ILogger; use OCP\IUserSession; use OCP\Share\IShare; +use Psr\Log\LoggerInterface; class LookupPlugin implements ISearchPlugin { @@ -47,14 +47,14 @@ class LookupPlugin implements ISearchPlugin { private $currentUserRemote; /** @var ICloudIdManager */ private $cloudIdManager; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; public function __construct(IConfig $config, IClientService $clientService, IUserSession $userSession, ICloudIdManager $cloudIdManager, - ILogger $logger) { + LoggerInterface $logger) { $this->config = $config; $this->clientService = $clientService; $this->cloudIdManager = $cloudIdManager; @@ -66,7 +66,7 @@ class LookupPlugin implements ISearchPlugin { public function search($search, $limit, $offset, ISearchResult $searchResult) { $isGlobalScaleEnabled = $this->config->getSystemValue('gs.enabled', false); $isLookupServerEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes'; - $hasInternetConnection = (bool)$this->config->getSystemValue('has_internet_connection', true); + $hasInternetConnection = $this->config->getSystemValueBool('has_internet_connection', true); // if case of Global Scale we always search the lookup server if (!$isGlobalScaleEnabled && (!$isLookupServerEnabled || !$hasInternetConnection)) { @@ -96,8 +96,9 @@ class LookupPlugin implements ISearchPlugin { try { $remote = $this->cloudIdManager->resolveCloudId($lookup['federationId'])->getRemote(); } catch (\Exception $e) { - $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"'); - $this->logger->error($e->getMessage()); + $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"', [ + 'exception' => $e, + ]); continue; } if ($this->currentUserRemote === $remote) { diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php index 240e16374d5..7245501a8bf 100644 --- a/lib/private/Collaboration/Collaborators/MailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailPlugin.php @@ -17,14 +17,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OC\KnownUser\KnownUserService; diff --git a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php index bfc4c682d4f..413799e52c6 100644 --- a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php @@ -4,7 +4,7 @@ * * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php index 1fec2912ca1..4fe62523b66 100644 --- a/lib/private/Collaboration/Collaborators/RemotePlugin.php +++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php @@ -5,7 +5,7 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -17,14 +17,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php index 79dfd5e1d82..b0ee09356af 100644 --- a/lib/private/Collaboration/Collaborators/Search.php +++ b/lib/private/Collaboration/Collaborators/Search.php @@ -5,6 +5,7 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> + * @author Morris Jobke <hey@morrisjobke.de> * @author onehappycat <one.happy.cat@gmx.com> * @author Robin Appelman <robin@icewind.nl> * @@ -17,14 +18,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearch; @@ -81,8 +81,8 @@ class Search implements ISearch { // sanitizing, could go into the plugins as well - // if we have a exact match, either for the federated cloud id or for the - // email address we only return the exact match. It is highly unlikely + // if we have an exact match, either for the federated cloud id or for the + // email address, we only return the exact match. It is highly unlikely // that the exact same email address and federated cloud id exists $emailType = new SearchResultType('emails'); $remoteType = new SearchResultType('remotes'); @@ -92,6 +92,8 @@ class Search implements ISearch { $searchResult->unsetResult($emailType); } + $this->dropMailSharesWhereRemoteShareIsPossible($searchResult); + // if we have an exact local user match with an email-a-like query, // there is no need to show the remote and email matches. $userType = new SearchResultType('users'); @@ -110,4 +112,34 @@ class Search implements ISearch { } $this->pluginList[$shareType][] = $pluginInfo['class']; } + + protected function dropMailSharesWhereRemoteShareIsPossible(ISearchResult $searchResult): void { + $allResults = $searchResult->asArray(); + + $emailType = new SearchResultType('emails'); + $remoteType = new SearchResultType('remotes'); + + if (!isset($allResults[$remoteType->getLabel()]) + || !isset($allResults[$emailType->getLabel()])) { + return; + } + + $mailIdMap = []; + foreach ($allResults[$emailType->getLabel()] as $mailRow) { + // sure, array_reduce looks nicer, but foreach needs less resources and is faster + if (!isset($mailRow['uuid'])) { + continue; + } + $mailIdMap[$mailRow['uuid']] = $mailRow['value']['shareWith']; + } + + foreach ($allResults[$remoteType->getLabel()] as $resultRow) { + if (!isset($resultRow['uuid'])) { + continue; + } + if (isset($mailIdMap[$resultRow['uuid']])) { + $searchResult->removeCollaboratorResult($emailType, $mailIdMap[$resultRow['uuid']]); + } + } + } } diff --git a/lib/private/Collaboration/Collaborators/SearchResult.php b/lib/private/Collaboration/Collaborators/SearchResult.php index 8e2c5a1ff39..76d78c9c231 100644 --- a/lib/private/Collaboration/Collaborators/SearchResult.php +++ b/lib/private/Collaboration/Collaborators/SearchResult.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchResult; @@ -85,4 +84,24 @@ class SearchResult implements ISearchResult { $this->result['exact'][$type] = []; } } + + public function removeCollaboratorResult(SearchResultType $type, string $collaboratorId): bool { + $type = $type->getLabel(); + if (!isset($this->result[$type])) { + return false; + } + + $actionDone = false; + $resultArrays = [&$this->result['exact'][$type], &$this->result[$type]]; + foreach ($resultArrays as &$resultArray) { + foreach ($resultArray as $k => $result) { + if ($result['value']['shareWith'] === $collaboratorId) { + unset($resultArray[$k]); + $actionDone = true; + } + } + } + + return $actionDone; + } } diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 12ed3e98932..9ed94082f0d 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -6,7 +6,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -22,14 +22,13 @@ * * 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 + * 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/>. * */ - namespace OC\Collaboration\Collaborators; use OC\KnownUser\KnownUserService; @@ -158,7 +157,7 @@ class UserPlugin implements ISearchPlugin { $userStatuses = $this->userStatusManager->getUserStatuses(array_keys($users)); foreach ($users as $uid => $user) { $userDisplayName = $user->getDisplayName(); - $userEmail = $user->getEMailAddress(); + $userEmail = $user->getSystemEMailAddress(); $uid = (string) $uid; $status = []; @@ -245,7 +244,7 @@ class UserPlugin implements ISearchPlugin { if ($addUser) { $status = []; $uid = $user->getUID(); - $userEmail = $user->getEMailAddress(); + $userEmail = $user->getSystemEMailAddress(); if (array_key_exists($user->getUID(), $userStatuses)) { $userStatus = $userStatuses[$user->getUID()]; $status = [ diff --git a/lib/private/Collaboration/Resources/Collection.php b/lib/private/Collaboration/Resources/Collection.php index 5bdc1489fb8..ba4005c2139 100644 --- a/lib/private/Collaboration/Resources/Collection.php +++ b/lib/private/Collaboration/Resources/Collection.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Collaboration\Resources; use Doctrine\DBAL\Exception\ConstraintViolationException; diff --git a/lib/private/Collaboration/Resources/Listener.php b/lib/private/Collaboration/Resources/Listener.php index ffb5001e801..ba012b4ca44 100644 --- a/lib/private/Collaboration/Resources/Listener.php +++ b/lib/private/Collaboration/Resources/Listener.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Collaboration\Resources; use OCP\Collaboration\Resources\IManager; diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index 97213c45669..a0fba16998f 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Collaboration\Resources; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; @@ -38,8 +37,8 @@ use OCP\Collaboration\Resources\IResource; use OCP\Collaboration\Resources\ResourceException; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; -use OCP\ILogger; use OCP\IUser; +use Psr\Log\LoggerInterface; class Manager implements IManager { public const TABLE_COLLECTIONS = 'collres_collections'; @@ -50,14 +49,14 @@ class Manager implements IManager { protected $connection; /** @var IProviderManager */ protected $providerManager; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @var string[] */ protected $providers = []; - public function __construct(IDBConnection $connection, IProviderManager $providerManager, ILogger $logger) { + public function __construct(IDBConnection $connection, IProviderManager $providerManager, LoggerInterface $logger) { $this->connection = $connection; $this->providerManager = $providerManager; $this->logger = $logger; diff --git a/lib/private/Collaboration/Resources/ProviderManager.php b/lib/private/Collaboration/Resources/ProviderManager.php index 095ffdcd8ee..4b099f33b4f 100644 --- a/lib/private/Collaboration/Resources/ProviderManager.php +++ b/lib/private/Collaboration/Resources/ProviderManager.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2019 Daniel Kesselberg <mail@danielkesselberg.de> * * @author Daniel Kesselberg <mail@danielkesselberg.de> + * @author Joas Schilling <coding@schilljs.com> * * @license GNU AGPL version 3 or any later version * @@ -16,21 +17,20 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Collaboration\Resources; use OCP\AppFramework\QueryException; use OCP\Collaboration\Resources\IProvider; use OCP\Collaboration\Resources\IProviderManager; -use OCP\ILogger; use OCP\IServerContainer; +use Psr\Log\LoggerInterface; class ProviderManager implements IProviderManager { @@ -43,10 +43,10 @@ class ProviderManager implements IProviderManager { /** @var IServerContainer */ protected $serverContainer; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; - public function __construct(IServerContainer $serverContainer, ILogger $logger) { + public function __construct(IServerContainer $serverContainer, LoggerInterface $logger) { $this->serverContainer = $serverContainer; $this->logger = $logger; } @@ -57,8 +57,8 @@ class ProviderManager implements IProviderManager { try { $this->providerInstances[] = $this->serverContainer->query($provider); } catch (QueryException $e) { - $this->logger->logException($e, [ - 'message' => "Could not query resource provider $provider: " . $e->getMessage() + $this->logger->error("Could not query resource provider $provider: " . $e->getMessage(), [ + 'exception' => $e, ]); } } diff --git a/lib/private/Collaboration/Resources/Resource.php b/lib/private/Collaboration/Resources/Resource.php index 702bc2faf46..f138204403c 100644 --- a/lib/private/Collaboration/Resources/Resource.php +++ b/lib/private/Collaboration/Resources/Resource.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Collaboration\Resources; use OCP\Collaboration\Resources\ICollection; diff --git a/lib/private/Color.php b/lib/private/Color.php index 34ae487bfa7..91b9b63c009 100644 --- a/lib/private/Color.php +++ b/lib/private/Color.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC; class Color { diff --git a/lib/private/Command/AsyncBus.php b/lib/private/Command/AsyncBus.php index 6577d755c0e..ec6fbc91f68 100644 --- a/lib/private/Command/AsyncBus.php +++ b/lib/private/Command/AsyncBus.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Command; use OCP\Command\IBus; diff --git a/lib/private/Command/CallableJob.php b/lib/private/Command/CallableJob.php index 4445310ff01..8bb3c76c9af 100644 --- a/lib/private/Command/CallableJob.php +++ b/lib/private/Command/CallableJob.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Command; use OC\BackgroundJob\QueuedJob; diff --git a/lib/private/Command/ClosureJob.php b/lib/private/Command/ClosureJob.php index c92fd304f91..498fe6d1d96 100644 --- a/lib/private/Command/ClosureJob.php +++ b/lib/private/Command/ClosureJob.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Command; use OC\BackgroundJob\QueuedJob; diff --git a/lib/private/Command/CommandJob.php b/lib/private/Command/CommandJob.php index ed251b841ed..6fa0c6d7ceb 100644 --- a/lib/private/Command/CommandJob.php +++ b/lib/private/Command/CommandJob.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Command; use OC\BackgroundJob\QueuedJob; diff --git a/lib/private/Command/CronBus.php b/lib/private/Command/CronBus.php index 86aa239bdde..89a739617d0 100644 --- a/lib/private/Command/CronBus.php +++ b/lib/private/Command/CronBus.php @@ -16,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OC\Command; use OCP\Command\ICommand; diff --git a/lib/private/Command/FileAccess.php b/lib/private/Command/FileAccess.php index b6bfa47e98b..584e61696c3 100644 --- a/lib/private/Command/FileAccess.php +++ b/lib/private/Command/FileAccess.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Command; use OCP\IUser; diff --git a/lib/private/Command/QueueBus.php b/lib/private/Command/QueueBus.php index 1955da70fd9..b2ceea744bc 100644 --- a/lib/private/Command/QueueBus.php +++ b/lib/private/Command/QueueBus.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Command; use OCP\Command\IBus; diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 8517bef5893..5cf04092101 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Comments; use OCP\Comments\IComment; @@ -228,21 +227,23 @@ class Comment implements IComment { * */ public function getMentions() { - $ok = preg_match_all("/\B(?<![^a-z0-9_\-@\.\'\s])@(\"guest\/[a-f0-9]+\"|\"[a-z0-9_\-@\.\' ]+\"|[a-z0-9_\-@\.\']+)/i", $this->getMessage(), $mentions); + $ok = preg_match_all("/\B(?<![^a-z0-9_\-@\.\'\s])@(\"guest\/[a-f0-9]+\"|\"group\/[a-z0-9_\-@\.\' ]+\"|\"[a-z0-9_\-@\.\' ]+\"|[a-z0-9_\-@\.\']+)/i", $this->getMessage(), $mentions); if (!$ok || !isset($mentions[0]) || !is_array($mentions[0])) { return []; } - $uids = array_unique($mentions[0]); - usort($uids, static function ($uid1, $uid2) { - return mb_strlen($uid2) <=> mb_strlen($uid1); + $mentionIds = array_unique($mentions[0]); + usort($mentionIds, static function ($mentionId1, $mentionId2) { + return mb_strlen($mentionId2) <=> mb_strlen($mentionId1); }); $result = []; - foreach ($uids as $uid) { - $cleanUid = trim(substr($uid, 1), '"'); - if (strpos($cleanUid, 'guest/') === 0) { - $result[] = ['type' => 'guest', 'id' => $cleanUid]; + foreach ($mentionIds as $mentionId) { + $cleanId = trim(substr($mentionId, 1), '"'); + if (strpos($cleanId, 'guest/') === 0) { + $result[] = ['type' => 'guest', 'id' => $cleanId]; + } elseif (strpos($cleanId, 'group/') === 0) { + $result[] = ['type' => 'group', 'id' => substr($cleanId, 6)]; } else { - $result[] = ['type' => 'user', 'id' => $cleanUid]; + $result[] = ['type' => 'user', 'id' => $cleanId]; } } return $result; diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 1cc82b5c2ce..21caf6823f8 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -4,10 +4,11 @@ * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Simounet <contact@simounet.net> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 @@ -25,12 +26,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Comments; use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Exception\InvalidFieldNameException; -use OCA\Comments\AppInfo\Application; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\CommentsEvent; use OCP\Comments\IComment; @@ -634,6 +633,7 @@ class Manager implements ICommentsManager { * @since 21.0.0 */ public function getNumberOfUnreadCommentsForObjects(string $objectType, array $objectIds, IUser $user, $verb = ''): array { + $unreadComments = []; $query = $this->dbConn->getQueryBuilder(); $query->select('c.object_id', $query->func()->count('c.id', 'num_comments')) ->from('comments', 'c') @@ -643,7 +643,7 @@ class Manager implements ICommentsManager { $query->expr()->eq('c.object_id', 'm.object_id') )) ->where($query->expr()->eq('c.object_type', $query->createNamedParameter($objectType))) - ->andWhere($query->expr()->in('c.object_id', $query->createNamedParameter($objectIds, IQueryBuilder::PARAM_STR_ARRAY))) + ->andWhere($query->expr()->in('c.object_id', $query->createParameter('ids'))) ->andWhere($query->expr()->orX( $query->expr()->gt('c.creation_timestamp', 'm.marker_datetime'), $query->expr()->isNull('m.marker_datetime') @@ -654,12 +654,16 @@ class Manager implements ICommentsManager { $query->andWhere($query->expr()->eq('c.verb', $query->createNamedParameter($verb))); } - $result = $query->execute(); $unreadComments = array_fill_keys($objectIds, 0); - while ($row = $result->fetch()) { - $unreadComments[$row['object_id']] = (int) $row['num_comments']; + foreach (array_chunk($objectIds, 1000) as $chunk) { + $query->setParameter('ids', $chunk, IQueryBuilder::PARAM_STR_ARRAY); + + $result = $query->executeQuery(); + while ($row = $result->fetch()) { + $unreadComments[$row['object_id']] = (int) $row['num_comments']; + } + $result->closeCursor(); } - $result->closeCursor(); return $unreadComments; } @@ -1304,7 +1308,7 @@ class Manager implements ICommentsManager { * @since 21.0.0 */ public function load(): void { - $this->initialStateService->provideInitialState(Application::APP_ID, 'max-message-length', IComment::MAX_MESSAGE_LENGTH); - Util::addScript(Application::APP_ID, 'comments-app'); + $this->initialStateService->provideInitialState('comments', 'max-message-length', IComment::MAX_MESSAGE_LENGTH); + Util::addScript('comments', 'comments-app'); } } diff --git a/lib/private/Comments/ManagerFactory.php b/lib/private/Comments/ManagerFactory.php index ec2cb1e69a1..c2fb3d37ab7 100644 --- a/lib/private/Comments/ManagerFactory.php +++ b/lib/private/Comments/ManagerFactory.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Comments; use OCP\Comments\ICommentsManager; diff --git a/lib/private/Config.php b/lib/private/Config.php index a6c4acb7d96..2a83d2300dc 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -12,7 +12,7 @@ * @author Jakob Sack <mail@jakobsack.de> * @author Jan-Christoph Borchardt <hey@jancborchardt.net> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Michael Gapczynski <GapczynskiM@gmail.com> * @author Morris Jobke <hey@morrisjobke.de> @@ -36,9 +36,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; +use OCP\HintException; + /** * This class is responsible for reading and writing config.php, the very basic * configuration file of Nextcloud. diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 9b1cc57aed3..12d54b48fa9 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -28,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Console; use OC\MemoryInfo; @@ -37,8 +36,8 @@ use OC_App; use OCP\AppFramework\QueryException; use OCP\Console\ConsoleEvent; use OCP\IConfig; -use OCP\ILogger; use OCP\IRequest; +use Psr\Log\LoggerInterface; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -53,22 +52,15 @@ class Application { private $dispatcher; /** @var IRequest */ private $request; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var MemoryInfo */ private $memoryInfo; - /** - * @param IConfig $config - * @param EventDispatcherInterface $dispatcher - * @param IRequest $request - * @param ILogger $logger - * @param MemoryInfo $memoryInfo - */ public function __construct(IConfig $config, EventDispatcherInterface $dispatcher, IRequest $request, - ILogger $logger, + LoggerInterface $logger, MemoryInfo $memoryInfo) { $defaults = \OC::$server->getThemingDefaults(); $this->config = $config; @@ -142,18 +134,22 @@ class Application { try { require $file; } catch (\Exception $e) { - $this->logger->logException($e); + $this->logger->error($e->getMessage(), [ + 'exception' => $e, + ]); } } } } } elseif ($input->getArgument('command') !== '_completion' && $input->getArgument('command') !== 'maintenance:install') { - $output->writeln("Nextcloud is not installed - only a limited number of commands are available"); + $errorOutput = $output->getErrorOutput(); + $errorOutput->writeln("Nextcloud is not installed - only a limited number of commands are available"); } } catch (NeedsUpdateException $e) { if ($input->getArgument('command') !== '_completion') { - $output->writeln("Nextcloud or one of the apps require upgrade - only a limited number of commands are available"); - $output->writeln("You may use your browser or the occ upgrade command to do the upgrade"); + $errorOutput = $output->getErrorOutput(); + $errorOutput->writeln("Nextcloud or one of the apps require upgrade - only a limited number of commands are available"); + $errorOutput->writeln("You may use your browser or the occ upgrade command to do the upgrade"); } } @@ -186,8 +182,8 @@ class Application { && $input->getArgument('command') !== 'maintenance:mode') { $errOutput = $output->getErrorOutput(); $errOutput->writeln( - '<comment>Nextcloud is in maintenance mode - ' . - 'no apps have been loaded</comment>' . PHP_EOL + '<comment>Nextcloud is in maintenance mode, hence the database isn\'t accessible.' . PHP_EOL . + 'Cannot perform any command except \'maintenance:mode --off\'</comment>' . PHP_EOL ); } } diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php index 7f8250a9f3d..59e480b39e8 100644 --- a/lib/private/Console/TimestampFormatter.php +++ b/lib/private/Console/TimestampFormatter.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Console; use OCP\IConfig; @@ -104,7 +103,7 @@ class TimestampFormatter implements OutputFormatterInterface { $timeZone = $timeZone !== null ? new \DateTimeZone($timeZone) : null; $time = new \DateTime('now', $timeZone); - $timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTime::ATOM)); + $timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTimeInterface::ATOM)); return $timestampInfo . ' ' . $this->formatter->format($message); } diff --git a/lib/private/Contacts/ContactsMenu/ActionFactory.php b/lib/private/Contacts/ContactsMenu/ActionFactory.php index 0cdd1245b31..891951a88e5 100644 --- a/lib/private/Contacts/ContactsMenu/ActionFactory.php +++ b/lib/private/Contacts/ContactsMenu/ActionFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Contacts\ContactsMenu; use OC\Contacts\ContactsMenu\Actions\LinkAction; @@ -30,26 +29,21 @@ use OCP\Contacts\ContactsMenu\ILinkAction; class ActionFactory implements IActionFactory { /** - * @param string $icon - * @param string $name - * @param string $href - * @return ILinkAction + * {@inheritDoc} */ - public function newLinkAction($icon, $name, $href) { + public function newLinkAction(string $icon, string $name, string $href, string $appId = ''): ILinkAction { $action = new LinkAction(); $action->setName($name); $action->setIcon($icon); $action->setHref($href); + $action->setAppId($appId); return $action; } /** - * @param string $icon - * @param string $name - * @param string $email - * @return ILinkAction + * {@inheritDoc} */ - public function newEMailAction($icon, $name, $email) { - return $this->newLinkAction($icon, $name, 'mailto:' . $email); + public function newEMailAction(string $icon, string $name, string $email, string $appId = ''): ILinkAction { + return $this->newLinkAction($icon, $name, 'mailto:' . $email, $appId); } } diff --git a/lib/private/Contacts/ContactsMenu/ActionProviderStore.php b/lib/private/Contacts/ContactsMenu/ActionProviderStore.php index 10b83adf92d..1db99497a21 100644 --- a/lib/private/Contacts/ContactsMenu/ActionProviderStore.php +++ b/lib/private/Contacts/ContactsMenu/ActionProviderStore.php @@ -1,10 +1,12 @@ <?php declare(strict_types=1); + /** * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -15,7 +17,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -28,6 +30,7 @@ namespace OC\Contacts\ContactsMenu; use Exception; use OC\App\AppManager; use OC\Contacts\ContactsMenu\Providers\EMailProvider; +use OC\Contacts\ContactsMenu\Providers\ProfileProvider; use OCP\AppFramework\QueryException; use OCP\Contacts\ContactsMenu\IProvider; use OCP\IServerContainer; @@ -66,7 +69,8 @@ class ActionProviderStore { try { $providers[] = $this->serverContainer->query($class); } catch (QueryException $ex) { - $this->logger->error('Could not load contacts menu action provider ' . $class, + $this->logger->error( + 'Could not load contacts menu action provider ' . $class, [ 'app' => 'core', 'exception' => $ex, @@ -84,6 +88,7 @@ class ActionProviderStore { */ private function getServerProviderClasses(): array { return [ + ProfileProvider::class, EMailProvider::class, ]; } diff --git a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php index eac169afb77..5acafed2fda 100644 --- a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php +++ b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Contacts\ContactsMenu\Actions; use OCP\Contacts\ContactsMenu\ILinkAction; @@ -39,6 +38,9 @@ class LinkAction implements ILinkAction { /** @var int */ private $priority = 10; + /** @var string */ + private $appId; + /** * @param string $icon absolute URI to an icon */ @@ -89,6 +91,22 @@ class LinkAction implements ILinkAction { } /** + * @param string $appId + * @since 23.0.0 + */ + public function setAppId(string $appId) { + $this->appId = $appId; + } + + /** + * @return string + * @since 23.0.0 + */ + public function getAppId(): string { + return $this->appId; + } + + /** * @return array */ public function jsonSerialize() { @@ -96,6 +114,7 @@ class LinkAction implements ILinkAction { 'title' => $this->name, 'icon' => $this->icon, 'hyperlink' => $this->href, + 'appId' => $this->appId, ]; } } diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 69f26c7969f..eb7e752a87a 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -1,13 +1,13 @@ <?php + /** * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at> * @copyright 2017 Lukas Reschke <lukas@statuscode.ch> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Georg Ehrke <oc.list@georgehrke.com> - * @author Julius Härtl <jus@bitgrid.net> + * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Tobia De Koninck <tobia@ledfan.be> @@ -21,7 +21,7 @@ * * 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 + * 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 @@ -32,15 +32,22 @@ namespace OC\Contacts\ContactsMenu; use OC\KnownUser\KnownUserService; +use OCP\Accounts\IAccountManager; use OCP\Contacts\ContactsMenu\IContactsStore; use OCP\Contacts\ContactsMenu\IEntry; use OCP\Contacts\IManager; use OCP\IConfig; use OCP\IGroupManager; +use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory as IL10NFactory; class ContactsStore implements IContactsStore { + use \OC\Profile\TProfileHelper; + + /** @var IAccountManager */ + private $accountManager; /** @var IManager */ private $contactsManager; @@ -51,22 +58,36 @@ class ContactsStore implements IContactsStore { /** @var IUserManager */ private $userManager; + /** @var IURLGenerator */ + private $urlGenerator; + /** @var IGroupManager */ private $groupManager; /** @var KnownUserService */ private $knownUserService; - public function __construct(IManager $contactsManager, - IConfig $config, - IUserManager $userManager, - IGroupManager $groupManager, - KnownUserService $knownUserService) { + /** @var IL10NFactory */ + private $l10nFactory; + + public function __construct( + IAccountManager $accountManager, + IManager $contactsManager, + IConfig $config, + IUserManager $userManager, + IURLGenerator $urlGenerator, + IGroupManager $groupManager, + KnownUserService $knownUserService, + IL10NFactory $l10nFactory + ) { + $this->accountManager = $accountManager; $this->contactsManager = $contactsManager; $this->config = $config; $this->userManager = $userManager; + $this->urlGenerator = $urlGenerator; $this->groupManager = $groupManager; $this->knownUserService = $knownUserService; + $this->l10nFactory = $l10nFactory; } /** @@ -92,9 +113,18 @@ class ContactsStore implements IContactsStore { $options ); + $userId = $user->getUID(); + $contacts = array_filter($allContacts, function ($contact) use ($userId) { + // When searching for multiple results, we strip out the current user + if (array_key_exists('UID', $contact)) { + return $contact['UID'] !== $userId; + } + return true; + }); + $entries = array_map(function (array $contact) { return $this->contactArrayToEntry($contact); - }, $allContacts); + }, $contacts); return $this->filterContacts( $user, $entries, @@ -104,12 +134,11 @@ class ContactsStore implements IContactsStore { /** * Filters the contacts. Applied filters: - * 1. filter the current user - * 2. if the `shareapi_allow_share_dialog_user_enumeration` config option is + * 1. if the `shareapi_allow_share_dialog_user_enumeration` config option is * enabled it will filter all local users - * 3. if the `shareapi_exclude_groups` config option is enabled and the + * 2. if the `shareapi_exclude_groups` config option is enabled and the * current user is in an excluded group it will filter all local users. - * 4. if the `shareapi_only_share_with_group_members` config option is + * 3. if the `shareapi_only_share_with_group_members` config option is * enabled it will filter all users which doens't have a common group * with the current user. * @@ -118,9 +147,11 @@ class ContactsStore implements IContactsStore { * @param string $filter * @return Entry[] the filtered contacts */ - private function filterContacts(IUser $self, - array $entries, - $filter) { + private function filterContacts( + IUser $self, + array $entries, + $filter + ) { $disallowEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') !== 'yes'; $restrictEnumerationGroup = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; $restrictEnumerationPhone = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no') === 'yes'; @@ -148,10 +179,6 @@ class ContactsStore implements IContactsStore { $selfUID = $self->getUID(); return array_values(array_filter($entries, function (IEntry $entry) use ($skipLocal, $ownGroupsOnly, $selfGroups, $selfUID, $disallowEnumeration, $restrictEnumerationGroup, $restrictEnumerationPhone, $allowEnumerationFullMatch, $filter) { - if ($entry->getProperty('UID') === $selfUID) { - return false; - } - if ($entry->getProperty('isLocalSystemBook')) { if ($skipLocal) { return false; @@ -243,11 +270,7 @@ class ContactsStore implements IContactsStore { return null; } - $userId = $user->getUID(); - $allContacts = $this->contactsManager->search($shareWith, $filter); - $contacts = array_filter($allContacts, function ($contact) use ($userId) { - return $contact['UID'] !== $userId; - }); + $contacts = $this->contactsManager->search($shareWith, $filter); $match = null; foreach ($contacts as $contact) { @@ -304,6 +327,19 @@ class ContactsStore implements IContactsStore { } } + // Provide profile parameters for core/src/OC/contactsmenu/contact.handlebars template + if (isset($contact['UID']) && isset($contact['FN'])) { + $targetUserId = $contact['UID']; + $user = $this->userManager->get($targetUserId); + if (!empty($user)) { + $account = $this->accountManager->getAccount($user); + if ($this->isProfileEnabled($account)) { + $entry->setProfileTitle($this->l10nFactory->get('core')->t('View profile')); + $entry->setProfileUrl($this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId])); + } + } + } + // Attach all other properties to the entry too because some // providers might make use of it. $entry->setProperties($contact); diff --git a/lib/private/Contacts/ContactsMenu/Entry.php b/lib/private/Contacts/ContactsMenu/Entry.php index f70a40bb2ba..915a0434cc8 100644 --- a/lib/private/Contacts/ContactsMenu/Entry.php +++ b/lib/private/Contacts/ContactsMenu/Entry.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -16,7 +17,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -43,6 +44,12 @@ class Entry implements IEntry { /** @var string|null */ private $avatar; + /** @var string|null */ + private $profileTitle; + + /** @var string|null */ + private $profileUrl; + /** @var IAction[] */ private $actions = []; @@ -99,6 +106,34 @@ class Entry implements IEntry { } /** + * @param string $profileTitle + */ + public function setProfileTitle(string $profileTitle): void { + $this->profileTitle = $profileTitle; + } + + /** + * @return string + */ + public function getProfileTitle(): ?string { + return $this->profileTitle; + } + + /** + * @param string $profileUrl + */ + public function setProfileUrl(string $profileUrl): void { + $this->profileUrl = $profileUrl; + } + + /** + * @return string + */ + public function getProfileUrl(): ?string { + return $this->profileUrl; + } + + /** * @param IAction $action */ public function addAction(IAction $action): void { @@ -165,6 +200,9 @@ class Entry implements IEntry { 'topAction' => $topAction, 'actions' => $otherActions, 'lastMessage' => '', + 'emailAddresses' => $this->getEMailAddresses(), + 'profileTitle' => $this->profileTitle, + 'profileUrl' => $this->profileUrl, ]; } } diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php index d08db5775e5..cea67735da5 100644 --- a/lib/private/Contacts/ContactsMenu/Manager.php +++ b/lib/private/Contacts/ContactsMenu/Manager.php @@ -16,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OC\Contacts\ContactsMenu; use OCP\App\IAppManager; diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php index bb5e64d15aa..d69f219e84c 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Contacts\ContactsMenu\Providers; use OCP\Contacts\ContactsMenu\IActionFactory; @@ -55,7 +54,7 @@ class EMailProvider implements IProvider { // Skip continue; } - $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); + $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address, 'email'); $entry->addAction($action); } } diff --git a/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php b/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php new file mode 100644 index 00000000000..88370f193a1 --- /dev/null +++ b/lib/private/Contacts/ContactsMenu/Providers/ProfileProvider.php @@ -0,0 +1,93 @@ +<?php + +/** + * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Contacts\ContactsMenu\Providers; + +use OCP\Accounts\IAccountManager; +use OCP\Contacts\ContactsMenu\IActionFactory; +use OCP\Contacts\ContactsMenu\IEntry; +use OCP\Contacts\ContactsMenu\IProvider; +use OCP\IURLGenerator; +use OCP\IUserManager; +use OCP\L10N\IFactory as IL10NFactory; + +class ProfileProvider implements IProvider { + use \OC\Profile\TProfileHelper; + + /** @var IAccountManager */ + private $accountManager; + + /** @var IActionFactory */ + private $actionFactory; + + /** @var IL10NFactory */ + private $l10nFactory; + + /** @var IURLGenerator */ + private $urlGenerator; + + /** @var IUserManager */ + private $userManager; + + /** + * @param IAccountManager $accountManager + * @param IActionFactory $actionFactory + * @param IL10NFactory $l10nFactory + * @param IURLGenerator $urlGenerator + * @param IUserManager $userManager + */ + public function __construct( + IAccountManager $accountManager, + IActionFactory $actionFactory, + IL10NFactory $l10nFactory, + IURLGenerator $urlGenerator, + IUserManager $userManager + ) { + $this->accountManager = $accountManager; + $this->actionFactory = $actionFactory; + $this->l10nFactory = $l10nFactory; + $this->urlGenerator = $urlGenerator; + $this->userManager = $userManager; + } + + /** + * @param IEntry $entry + */ + public function process(IEntry $entry) { + $targetUserId = $entry->getProperty('UID'); + $targetUser = $this->userManager->get($targetUserId); + if (!empty($targetUser)) { + $account = $this->accountManager->getAccount($targetUser); + if ($this->isProfileEnabled($account)) { + $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/profile.svg')); + $profileActionText = $this->l10nFactory->get('core')->t('View profile'); + $profileUrl = $this->urlGenerator->linkToRouteAbsolute('core.ProfilePage.index', ['targetUserId' => $targetUserId]); + $action = $this->actionFactory->newLinkAction($iconUrl, $profileActionText, $profileUrl, 'profile'); + // Set highest priority (by descending order), other actions have the default priority 10 as defined in lib/private/Contacts/ContactsMenu/Actions/LinkAction.php + $action->setPriority(20); + $entry->addAction($action); + } + } + } +} diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php index 4cdc3d48fff..e702a439153 100644 --- a/lib/private/ContactsManager.php +++ b/lib/private/ContactsManager.php @@ -4,7 +4,7 @@ * * @author Bart Visscher <bartv@thisnet.nl> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Tobia De Koninck <tobia@ledfan.be> @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OCP\Constants; diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php index 62514e7d83a..4d9b43d0787 100644 --- a/lib/private/DB/Adapter.php +++ b/lib/private/DB/Adapter.php @@ -10,7 +10,6 @@ * @author Ole Ostergaard <ole.c.ostergaard@gmail.com> * @author Ole Ostergaard <ole.ostergaard@knime.com> * @author Robin Appelman <robin@icewind.nl> - * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 * @@ -27,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/AdapterMySQL.php b/lib/private/DB/AdapterMySQL.php index c925f9362f5..b4be5c2e96a 100644 --- a/lib/private/DB/AdapterMySQL.php +++ b/lib/private/DB/AdapterMySQL.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Joas Schilling <coding@schilljs.com> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -21,13 +20,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; class AdapterMySQL extends Adapter { /** @var string */ - protected $charset; + protected $collation; /** * @param string $tableName @@ -41,16 +39,16 @@ class AdapterMySQL extends Adapter { } public function fixupStatement($statement) { - $statement = str_replace(' ILIKE ', ' COLLATE ' . $this->getCharset() . '_general_ci LIKE ', $statement); + $statement = str_replace(' ILIKE ', ' COLLATE ' . $this->getCollation() . ' LIKE ', $statement); return $statement; } - protected function getCharset() { - if (!$this->charset) { + protected function getCollation(): string { + if (!$this->collation) { $params = $this->conn->getParams(); - $this->charset = isset($params['charset']) ? $params['charset'] : 'utf8'; + $this->collation = $params['collation'] ?? (($params['charset'] ?? 'utf8') . '_general_ci'); } - return $this->charset; + return $this->collation; } } diff --git a/lib/private/DB/AdapterOCI8.php b/lib/private/DB/AdapterOCI8.php index 553945691a6..d8e6fabe745 100644 --- a/lib/private/DB/AdapterOCI8.php +++ b/lib/private/DB/AdapterOCI8.php @@ -4,7 +4,6 @@ * * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -23,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; class AdapterOCI8 extends Adapter { diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php index 0d8794d59ac..1262fd4f1ab 100644 --- a/lib/private/DB/AdapterPgSql.php +++ b/lib/private/DB/AdapterPgSql.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; class AdapterPgSql extends Adapter { diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php index a62960bae1a..bed7194ac39 100644 --- a/lib/private/DB/AdapterSqlite.php +++ b/lib/private/DB/AdapterSqlite.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index 4d9433122ce..58d8d114705 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -33,7 +33,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\Common\EventManager; @@ -44,6 +43,9 @@ use Doctrine\DBAL\Exception; use Doctrine\DBAL\Exception\ConstraintViolationException; use Doctrine\DBAL\Exception\NotNullConstraintViolationException; use Doctrine\DBAL\Platforms\MySQLPlatform; +use Doctrine\DBAL\Platforms\OraclePlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; +use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Result; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Statement; @@ -509,8 +511,7 @@ class Connection extends \Doctrine\DBAL\Connection { * @throws Exception */ public function createSchema() { - $schemaManager = new MDB2SchemaManager($this); - $migrator = $schemaManager->getMigrator(); + $migrator = $this->getMigrator(); return $migrator->createSchema(); } @@ -522,8 +523,26 @@ class Connection extends \Doctrine\DBAL\Connection { * @throws Exception */ public function migrateToSchema(Schema $toSchema) { - $schemaManager = new MDB2SchemaManager($this); - $migrator = $schemaManager->getMigrator(); + $migrator = $this->getMigrator(); $migrator->migrate($toSchema); } + + private function getMigrator() { + // TODO properly inject those dependencies + $random = \OC::$server->getSecureRandom(); + $platform = $this->getDatabasePlatform(); + $config = \OC::$server->getConfig(); + $dispatcher = \OC::$server->getEventDispatcher(); + if ($platform instanceof SqlitePlatform) { + return new SQLiteMigrator($this, $config, $dispatcher); + } elseif ($platform instanceof OraclePlatform) { + return new OracleMigrator($this, $config, $dispatcher); + } elseif ($platform instanceof MySQLPlatform) { + return new MySQLMigrator($this, $config, $dispatcher); + } elseif ($platform instanceof PostgreSQL94Platform) { + return new PostgreSqlMigrator($this, $config, $dispatcher); + } else { + return new Migrator($this, $config, $dispatcher); + } + } } diff --git a/lib/private/DB/ConnectionAdapter.php b/lib/private/DB/ConnectionAdapter.php index 62c013e4dcf..b21bce490f4 100644 --- a/lib/private/DB/ConnectionAdapter.php +++ b/lib/private/DB/ConnectionAdapter.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2020 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php index 441e4567dbd..b4c7597f6d4 100644 --- a/lib/private/DB/ConnectionFactory.php +++ b/lib/private/DB/ConnectionFactory.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\Common\EventManager; @@ -90,6 +89,10 @@ class ConnectionFactory { if ($this->config->getValue('mysql.utf8mb4', false)) { $this->defaultConnectionParams['mysql']['charset'] = 'utf8mb4'; } + $collationOverride = $this->config->getValue('mysql.collation', null); + if ($collationOverride) { + $this->defaultConnectionParams['mysql']['collation'] = $collationOverride; + } } /** diff --git a/lib/private/DB/Exceptions/DbalException.php b/lib/private/DB/Exceptions/DbalException.php index bdb4d3147ae..ca0119a576c 100644 --- a/lib/private/DB/Exceptions/DbalException.php +++ b/lib/private/DB/Exceptions/DbalException.php @@ -2,10 +2,11 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Daniel Kesselberg <mail@danielkesselberg.de> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\DB\Exceptions; use Doctrine\DBAL\ConnectionException; diff --git a/lib/private/DB/MDB2SchemaManager.php b/lib/private/DB/MDB2SchemaManager.php deleted file mode 100644 index 30c4a87e5b3..00000000000 --- a/lib/private/DB/MDB2SchemaManager.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bart Visscher <bartv@thisnet.nl> - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Victor Dubiniuk <dubiniuk@owncloud.com> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OC\DB; - -use Doctrine\DBAL\Platforms\MySQLPlatform; -use Doctrine\DBAL\Platforms\OraclePlatform; -use Doctrine\DBAL\Platforms\PostgreSQL94Platform; -use Doctrine\DBAL\Platforms\SqlitePlatform; -use Doctrine\DBAL\Schema\Schema; - -class MDB2SchemaManager { - /** @var Connection $conn */ - protected $conn; - - /** - * @param Connection $conn - */ - public function __construct($conn) { - $this->conn = $conn; - } - - /** - * Creates tables from XML file - * @param string $file file to read structure from - * @return bool - * - * TODO: write more documentation - */ - public function createDbFromStructure($file) { - $schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $this->conn->getDatabasePlatform()); - $toSchema = new Schema([], [], $this->conn->getSchemaManager()->createSchemaConfig()); - $toSchema = $schemaReader->loadSchemaFromFile($file, $toSchema); - return $this->executeSchemaChange($toSchema); - } - - /** - * @return \OC\DB\Migrator - */ - public function getMigrator() { - $random = \OC::$server->getSecureRandom(); - $platform = $this->conn->getDatabasePlatform(); - $config = \OC::$server->getConfig(); - $dispatcher = \OC::$server->getEventDispatcher(); - if ($platform instanceof SqlitePlatform) { - return new SQLiteMigrator($this->conn, $config, $dispatcher); - } elseif ($platform instanceof OraclePlatform) { - return new OracleMigrator($this->conn, $config, $dispatcher); - } elseif ($platform instanceof MySQLPlatform) { - return new MySQLMigrator($this->conn, $config, $dispatcher); - } elseif ($platform instanceof PostgreSQL94Platform) { - return new PostgreSqlMigrator($this->conn, $config, $dispatcher); - } else { - return new Migrator($this->conn, $config, $dispatcher); - } - } - - /** - * Reads database schema from file - * - * @param string $file file to read from - * @return \Doctrine\DBAL\Schema\Schema - */ - private function readSchemaFromFile($file) { - $platform = $this->conn->getDatabasePlatform(); - $schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $platform); - $toSchema = new Schema([], [], $this->conn->getSchemaManager()->createSchemaConfig()); - return $schemaReader->loadSchemaFromFile($file, $toSchema); - } - - /** - * update the database scheme - * @param string $file file to read structure from - * @param bool $generateSql only return the sql needed for the upgrade - * @return string|boolean - */ - public function updateDbFromStructure($file, $generateSql = false) { - $toSchema = $this->readSchemaFromFile($file); - $migrator = $this->getMigrator(); - - if ($generateSql) { - return $migrator->generateChangeScript($toSchema); - } else { - $migrator->migrate($toSchema); - return true; - } - } - - /** - * @param \Doctrine\DBAL\Schema\Schema $schema - * @return string - */ - public function generateChangeScript($schema) { - $migrator = $this->getMigrator(); - return $migrator->generateChangeScript($schema); - } - - /** - * remove all tables defined in a database structure xml file - * - * @param string $file the xml file describing the tables - */ - public function removeDBStructure($file) { - $schemaReader = new MDB2SchemaReader(\OC::$server->getConfig(), $this->conn->getDatabasePlatform()); - $toSchema = new Schema([], [], $this->conn->getSchemaManager()->createSchemaConfig()); - $fromSchema = $schemaReader->loadSchemaFromFile($file, $toSchema); - $toSchema = clone $fromSchema; - foreach ($toSchema->getTables() as $table) { - $toSchema->dropTable($table->getName()); - } - $comparator = new \Doctrine\DBAL\Schema\Comparator(); - $schemaDiff = $comparator->compare($fromSchema, $toSchema); - $this->executeSchemaChange($schemaDiff); - } - - /** - * @param \Doctrine\DBAL\Schema\Schema|\Doctrine\DBAL\Schema\SchemaDiff $schema - * @return bool - */ - private function executeSchemaChange($schema) { - $this->conn->beginTransaction(); - foreach ($schema->toSql($this->conn->getDatabasePlatform()) as $sql) { - $this->conn->query($sql); - } - $this->conn->commit(); - - if ($this->conn->getDatabasePlatform() instanceof SqlitePlatform) { - $this->conn->close(); - $this->conn->connect(); - } - return true; - } -} diff --git a/lib/private/DB/MDB2SchemaReader.php b/lib/private/DB/MDB2SchemaReader.php deleted file mode 100644 index 687438495b1..00000000000 --- a/lib/private/DB/MDB2SchemaReader.php +++ /dev/null @@ -1,355 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bart Visscher <bartv@thisnet.nl> - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Oliver Gasser <oliver.gasser@gmail.com> - * @author Robin Appelman <robin@icewind.nl> - * @author Robin McCorkell <robin@mccorkell.me.uk> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Victor Dubiniuk <dubiniuk@owncloud.com> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OC\DB; - -use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Schema\Schema; -use OCP\IConfig; - -class MDB2SchemaReader { - - /** - * @var string $DBTABLEPREFIX - */ - protected $DBTABLEPREFIX; - - /** - * @var \Doctrine\DBAL\Platforms\AbstractPlatform $platform - */ - protected $platform; - - /** @var IConfig */ - protected $config; - - /** - * @param \OCP\IConfig $config - * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform - */ - public function __construct(IConfig $config, AbstractPlatform $platform) { - $this->platform = $platform; - $this->config = $config; - $this->DBTABLEPREFIX = $config->getSystemValue('dbtableprefix', 'oc_'); - } - - /** - * @param string $file - * @param Schema $schema - * @return Schema - * @throws \DomainException - */ - public function loadSchemaFromFile($file, Schema $schema) { - $loadEntities = libxml_disable_entity_loader(false); - $xml = simplexml_load_file($file); - libxml_disable_entity_loader($loadEntities); - foreach ($xml->children() as $child) { - /** - * @var \SimpleXMLElement $child - */ - switch ($child->getName()) { - case 'name': - case 'create': - case 'overwrite': - case 'charset': - break; - case 'table': - $this->loadTable($schema, $child); - break; - default: - throw new \DomainException('Unknown element: ' . $child->getName()); - - } - } - return $schema; - } - - /** - * @param \Doctrine\DBAL\Schema\Schema $schema - * @param \SimpleXMLElement $xml - * @throws \DomainException - */ - private function loadTable($schema, $xml) { - $table = null; - foreach ($xml->children() as $child) { - /** - * @var \SimpleXMLElement $child - */ - switch ($child->getName()) { - case 'name': - $name = (string)$child; - $name = str_replace('*dbprefix*', $this->DBTABLEPREFIX, $name); - $name = $this->platform->quoteIdentifier($name); - $table = $schema->createTable($name); - break; - case 'create': - case 'overwrite': - case 'charset': - break; - case 'declaration': - if (is_null($table)) { - throw new \DomainException('Table declaration before table name'); - } - $this->loadDeclaration($table, $child); - break; - default: - throw new \DomainException('Unknown element: ' . $child->getName()); - - } - } - } - - /** - * @param \Doctrine\DBAL\Schema\Table $table - * @param \SimpleXMLElement $xml - * @throws \DomainException - */ - private function loadDeclaration($table, $xml) { - foreach ($xml->children() as $child) { - /** - * @var \SimpleXMLElement $child - */ - switch ($child->getName()) { - case 'field': - $this->loadField($table, $child); - break; - case 'index': - $this->loadIndex($table, $child); - break; - default: - throw new \DomainException('Unknown element: ' . $child->getName()); - - } - } - } - - /** - * @param \Doctrine\DBAL\Schema\Table $table - * @param \SimpleXMLElement $xml - * @throws \DomainException - */ - private function loadField($table, $xml) { - $options = [ 'notnull' => false ]; - foreach ($xml->children() as $child) { - /** - * @var \SimpleXMLElement $child - */ - switch ($child->getName()) { - case 'name': - $name = (string)$child; - $name = $this->platform->quoteIdentifier($name); - break; - case 'type': - $type = (string)$child; - switch ($type) { - case 'text': - $type = 'string'; - break; - case 'clob': - $type = 'text'; - break; - case 'timestamp': - $type = 'datetime'; - break; - case 'numeric': - $type = 'decimal'; - break; - } - break; - case 'length': - $length = (string)$child; - $options['length'] = $length; - break; - case 'unsigned': - $unsigned = $this->asBool($child); - $options['unsigned'] = $unsigned; - break; - case 'notnull': - $notnull = $this->asBool($child); - $options['notnull'] = $notnull; - break; - case 'autoincrement': - $autoincrement = $this->asBool($child); - $options['autoincrement'] = $autoincrement; - break; - case 'default': - $default = (string)$child; - $options['default'] = $default; - break; - case 'comments': - $comment = (string)$child; - $options['comment'] = $comment; - break; - case 'primary': - $primary = $this->asBool($child); - $options['primary'] = $primary; - break; - case 'precision': - $precision = (string)$child; - $options['precision'] = $precision; - break; - case 'scale': - $scale = (string)$child; - $options['scale'] = $scale; - break; - default: - throw new \DomainException('Unknown element: ' . $child->getName()); - - } - } - if (isset($name) && isset($type)) { - if (isset($options['default']) && empty($options['default'])) { - if (empty($options['notnull']) || !$options['notnull']) { - unset($options['default']); - $options['notnull'] = false; - } else { - $options['default'] = ''; - } - if ($type == 'integer' || $type == 'decimal') { - $options['default'] = 0; - } elseif ($type == 'boolean') { - $options['default'] = false; - } - if (!empty($options['autoincrement']) && $options['autoincrement']) { - unset($options['default']); - } - } - if ($type === 'integer' && isset($options['default'])) { - $options['default'] = (int)$options['default']; - } - if ($type === 'integer' && isset($options['length'])) { - $length = $options['length']; - if ($length < 4) { - $type = 'smallint'; - } elseif ($length > 4) { - $type = 'bigint'; - } - } - if ($type === 'boolean' && isset($options['default'])) { - $options['default'] = $this->asBool($options['default']); - } - if (!empty($options['autoincrement']) - && !empty($options['notnull']) - ) { - $options['primary'] = true; - } - - # not used anymore in the options argument - # see https://github.com/doctrine/dbal/commit/138eb85234a1faeaa2e6a32cd7bcc66bb51c64e8#diff-300f55366adb50a32a40882ebdc95c163b141f64cba5f45f20bda04a907b3eb3L82 - # therefore it's read before and then unset right before the addColumn call - $setPrimaryKey = false; - if (!empty($options['primary']) && $options['primary']) { - $setPrimaryKey = true; - } - unset($options['primary']); - $table->addColumn($name, $type, $options); - if ($setPrimaryKey) { - $table->setPrimaryKey([$name]); - } - } - } - - /** - * @param \Doctrine\DBAL\Schema\Table $table - * @param \SimpleXMLElement $xml - * @throws \DomainException - */ - private function loadIndex($table, $xml) { - $name = null; - $fields = []; - foreach ($xml->children() as $child) { - /** - * @var \SimpleXMLElement $child - */ - switch ($child->getName()) { - case 'name': - $name = (string)$child; - break; - case 'primary': - $primary = $this->asBool($child); - break; - case 'unique': - $unique = $this->asBool($child); - break; - case 'field': - foreach ($child->children() as $field) { - /** - * @var \SimpleXMLElement $field - */ - switch ($field->getName()) { - case 'name': - $field_name = (string)$field; - $field_name = $this->platform->quoteIdentifier($field_name); - $fields[] = $field_name; - break; - case 'sorting': - break; - default: - throw new \DomainException('Unknown element: ' . $field->getName()); - - } - } - break; - default: - throw new \DomainException('Unknown element: ' . $child->getName()); - - } - } - if (!empty($fields)) { - if (isset($primary) && $primary) { - if ($table->hasPrimaryKey()) { - return; - } - $table->setPrimaryKey($fields, $name); - } else { - if (isset($unique) && $unique) { - $table->addUniqueIndex($fields, $name); - } else { - $table->addIndex($fields, $name); - } - } - } else { - throw new \DomainException('Empty index definition: ' . $name . ' options:' . print_r($fields, true)); - } - } - - /** - * @param \SimpleXMLElement|string $xml - * @return bool - */ - private function asBool($xml) { - $result = (string)$xml; - if ($result == 'true') { - $result = true; - } elseif ($result == 'false') { - $result = false; - } - return (bool)$result; - } -} diff --git a/lib/private/DB/MigrationException.php b/lib/private/DB/MigrationException.php index 76d769e08be..5b08ab9cac2 100644 --- a/lib/private/DB/MigrationException.php +++ b/lib/private/DB/MigrationException.php @@ -2,7 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -20,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; class MigrationException extends \Exception { diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 42f3b7de6a8..6ad74a58591 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Exception\DriverException; @@ -459,7 +458,7 @@ class MigrationService { $targetSchema = $toSchema->getWrappedSchema(); if ($this->checkOracle) { $beforeSchema = $this->connection->createSchema(); - $this->ensureOracleIdentifierLengthLimit($beforeSchema, $targetSchema, strlen($this->connection->getPrefix())); + $this->ensureOracleConstraints($beforeSchema, $targetSchema, strlen($this->connection->getPrefix())); } $this->connection->migrateToSchema($targetSchema); $toSchema->performDropTableCalls(); @@ -536,7 +535,7 @@ class MigrationService { $targetSchema = $toSchema->getWrappedSchema(); if ($this->checkOracle) { $sourceSchema = $this->connection->createSchema(); - $this->ensureOracleIdentifierLengthLimit($sourceSchema, $targetSchema, strlen($this->connection->getPrefix())); + $this->ensureOracleConstraints($sourceSchema, $targetSchema, strlen($this->connection->getPrefix())); } $this->connection->migrateToSchema($targetSchema); $toSchema->performDropTableCalls(); @@ -551,7 +550,25 @@ class MigrationService { $this->markAsExecuted($version); } - public function ensureOracleIdentifierLengthLimit(Schema $sourceSchema, Schema $targetSchema, int $prefixLength) { + /** + * Naming constraints: + * - Tables names must be 30 chars or shorter (27 + oc_ prefix) + * - Column names must be 30 chars or shorter + * - Index names must be 30 chars or shorter + * - Sequence names must be 30 chars or shorter + * - Primary key names must be set or the table name 23 chars or shorter + * + * Data constraints: + * - Columns with "NotNull" can not have empty string as default value + * - Columns with "NotNull" can not have number 0 as default value + * - Columns with type "bool" (which is in fact integer of length 1) can not be "NotNull" as it can not store 0/false + * + * @param Schema $sourceSchema + * @param Schema $targetSchema + * @param int $prefixLength + * @throws \Doctrine\DBAL\Exception + */ + public function ensureOracleConstraints(Schema $sourceSchema, Schema $targetSchema, int $prefixLength) { $sequences = $targetSchema->getSequences(); foreach ($targetSchema->getTables() as $table) { @@ -569,9 +586,13 @@ class MigrationService { throw new \InvalidArgumentException('Column name "' . $table->getName() . '"."' . $thing->getName() . '" is too long.'); } - if ($thing->getNotnull() && $thing->getDefault() === '' + if ((!$sourceTable instanceof Table || !$sourceTable->hasColumn($thing->getName())) && $thing->getNotnull() && $thing->getDefault() === '' && $sourceTable instanceof Table && !$sourceTable->hasColumn($thing->getName())) { - throw new \InvalidArgumentException('Column name "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.'); + throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.'); + } + + if ((!$sourceTable instanceof Table || !$sourceTable->hasColumn($thing->getName())) && $thing->getNotnull() && $thing->getType()->getName() === Types::BOOLEAN) { + throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is type Bool and also NotNull, so it can not store "false".'); } } @@ -583,7 +604,7 @@ class MigrationService { foreach ($table->getForeignKeys() as $thing) { if ((!$sourceTable instanceof Table || !$sourceTable->hasForeignKey($thing->getName())) && \strlen($thing->getName()) > 30) { - throw new \InvalidArgumentException('Foreign key name "' . $table->getName() . '"."' . $thing->getName() . '" is too long.'); + throw new \InvalidArgumentException('Foreign key name "' . $table->getName() . '"."' . $thing->getName() . '" is too long.'); } } diff --git a/lib/private/DB/Migrator.php b/lib/private/DB/Migrator.php index d7bd9115c6f..9ca37d7180a 100644 --- a/lib/private/DB/Migrator.php +++ b/lib/private/DB/Migrator.php @@ -3,15 +3,12 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> - * @author martin-rueegg <martin.rueegg@metaworx.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author tbelau666 <thomas.belau@gmx.de> * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Victor Dubiniuk <dubiniuk@owncloud.com> - * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 * @@ -28,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/MissingColumnInformation.php b/lib/private/DB/MissingColumnInformation.php index d1c81c2e199..f651546b4b3 100644 --- a/lib/private/DB/MissingColumnInformation.php +++ b/lib/private/DB/MissingColumnInformation.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\DB; class MissingColumnInformation { diff --git a/lib/private/DB/MissingIndexInformation.php b/lib/private/DB/MissingIndexInformation.php index 04853dcac2d..74498668349 100644 --- a/lib/private/DB/MissingIndexInformation.php +++ b/lib/private/DB/MissingIndexInformation.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\DB; class MissingIndexInformation { diff --git a/lib/private/DB/MissingPrimaryKeyInformation.php b/lib/private/DB/MissingPrimaryKeyInformation.php index 62b5dd2c631..f28c8cfb352 100644 --- a/lib/private/DB/MissingPrimaryKeyInformation.php +++ b/lib/private/DB/MissingPrimaryKeyInformation.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\DB; class MissingPrimaryKeyInformation { diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php index 00c29d7a6f6..0f8cbb309f3 100644 --- a/lib/private/DB/MySQLMigrator.php +++ b/lib/private/DB/MySQLMigrator.php @@ -2,11 +2,8 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Victor Dubiniuk <dubiniuk@owncloud.com> * * @license AGPL-3.0 * @@ -23,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Schema\Schema; diff --git a/lib/private/DB/MySqlTools.php b/lib/private/DB/MySqlTools.php index e738a2bd94a..a4bf728881f 100644 --- a/lib/private/DB/MySqlTools.php +++ b/lib/private/DB/MySqlTools.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use OCP\IDBConnection; diff --git a/lib/private/DB/OCSqlitePlatform.php b/lib/private/DB/OCSqlitePlatform.php index be33629e885..059cb21fdaf 100644 --- a/lib/private/DB/OCSqlitePlatform.php +++ b/lib/private/DB/OCSqlitePlatform.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; class OCSqlitePlatform extends \Doctrine\DBAL\Platforms\SqlitePlatform { diff --git a/lib/private/DB/OracleConnection.php b/lib/private/DB/OracleConnection.php index 8198f3bd5e5..b7e040965ee 100644 --- a/lib/private/DB/OracleConnection.php +++ b/lib/private/DB/OracleConnection.php @@ -6,7 +6,6 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -25,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; class OracleConnection extends Connection { diff --git a/lib/private/DB/OracleMigrator.php b/lib/private/DB/OracleMigrator.php index e1c0c79ef51..df331230f47 100644 --- a/lib/private/DB/OracleMigrator.php +++ b/lib/private/DB/OracleMigrator.php @@ -5,7 +5,6 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Morris Jobke <hey@morrisjobke.de> * @author Piotr Mrowczynski <mrow4a@yahoo.com> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -27,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/PgSqlTools.php b/lib/private/DB/PgSqlTools.php index d555bfb391b..a150e9475d3 100644 --- a/lib/private/DB/PgSqlTools.php +++ b/lib/private/DB/PgSqlTools.php @@ -6,7 +6,6 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Morris Jobke <hey@morrisjobke.de> * @author tbelau666 <thomas.belau@gmx.de> - * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 * @@ -23,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Schema\AbstractAsset; diff --git a/lib/private/DB/PostgreSqlMigrator.php b/lib/private/DB/PostgreSqlMigrator.php index 0c3b7956f47..73e295705da 100644 --- a/lib/private/DB/PostgreSqlMigrator.php +++ b/lib/private/DB/PostgreSqlMigrator.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Schema\Schema; diff --git a/lib/private/DB/PreparedStatement.php b/lib/private/DB/PreparedStatement.php index f679576a428..0debc762c87 100644 --- a/lib/private/DB/PreparedStatement.php +++ b/lib/private/DB/PreparedStatement.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/QueryBuilder/CompositeExpression.php b/lib/private/DB/QueryBuilder/CompositeExpression.php index ae9e654d5bb..0c958a96d68 100644 --- a/lib/private/DB/QueryBuilder/CompositeExpression.php +++ b/lib/private/DB/QueryBuilder/CompositeExpression.php @@ -2,8 +2,8 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license AGPL-3.0 * @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ICompositeExpression; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php index ebc7f9fb77b..c35afd0870b 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php @@ -2,6 +2,7 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> * @author Robin Appelman <robin@icewind.nl> @@ -23,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder\ExpressionBuilder; use Doctrine\DBAL\Query\Expression\ExpressionBuilder as DoctrineExpressionBuilder; @@ -425,11 +425,11 @@ class ExpressionBuilder implements IExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction */ - public function castColumn(string $column, $type): IQueryFunction { + public function castColumn($column, $type): IQueryFunction { return new QueryFunction( $this->helper->quoteColumnName($column) ); diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php index 86f7cf43508..e917ad3ad3a 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php @@ -2,8 +2,10 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 @@ -21,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\ConnectionAdapter; @@ -30,7 +31,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder; class MySqlExpressionBuilder extends ExpressionBuilder { /** @var string */ - protected $charset; + protected $collation; /** * @param ConnectionAdapter $connection @@ -40,7 +41,7 @@ class MySqlExpressionBuilder extends ExpressionBuilder { parent::__construct($connection, $queryBuilder); $params = $connection->getInner()->getParams(); - $this->charset = isset($params['charset']) ? $params['charset'] : 'utf8'; + $this->collation = $params['collation'] ?? (($params['charset'] ?? 'utf8') . '_general_ci'); } /** @@ -49,6 +50,6 @@ class MySqlExpressionBuilder extends ExpressionBuilder { public function iLike($x, $y, $type = null): string { $x = $this->helper->quoteColumnName($x); $y = $this->helper->quoteColumnName($y); - return $this->expressionBuilder->comparison($x, ' COLLATE ' . $this->charset . '_general_ci LIKE', $y); + return $this->expressionBuilder->comparison($x, ' COLLATE ' . $this->collation . ' LIKE', $y); } } diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index 86212c577a7..4cea234779e 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -4,6 +4,7 @@ * * @author Joas Schilling <coding@schilljs.com> * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 @@ -21,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\QueryBuilder\QueryFunction; @@ -161,11 +161,11 @@ class OCIExpressionBuilder extends ExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction */ - public function castColumn(string $column, $type): IQueryFunction { + public function castColumn($column, $type): IQueryFunction { if ($type === IQueryBuilder::PARAM_STR) { $column = $this->helper->quoteColumnName($column); return new QueryFunction('to_char(' . $column . ')'); diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php index 3e8cdd698b4..4e0de5ef42b 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php @@ -4,6 +4,7 @@ * * @author Joas Schilling <coding@schilljs.com> * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 @@ -21,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\QueryBuilder\QueryFunction; @@ -33,7 +33,7 @@ class PgSqlExpressionBuilder extends ExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction */ diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php index 92f1d9ed3b6..289aa09b003 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> * * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -13,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\DB\QueryBuilder\ExpressionBuilder; class SqliteExpressionBuilder extends ExpressionBuilder { diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php index b8c54546b78..dfc0d0a6d61 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php index c269fc03c8a..5581207a166 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php index a44b80bbaaf..853c65ac32a 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php index 8e490c15a3c..19cff52546b 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/Literal.php b/lib/private/DB/QueryBuilder/Literal.php index 02fd232ff0b..b4e8a36b86f 100644 --- a/lib/private/DB/QueryBuilder/Literal.php +++ b/lib/private/DB/QueryBuilder/Literal.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ILiteral; diff --git a/lib/private/DB/QueryBuilder/Parameter.php b/lib/private/DB/QueryBuilder/Parameter.php index b64b0cf5fcc..b6cfa844e01 100644 --- a/lib/private/DB/QueryBuilder/Parameter.php +++ b/lib/private/DB/QueryBuilder/Parameter.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\IParameter; diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index 3549606c2db..e1f74f5327c 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -2,6 +2,7 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author J0WI <J0WI@users.noreply.github.com> @@ -27,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder; use Doctrine\DBAL\Platforms\MySQLPlatform; @@ -309,9 +309,24 @@ class QueryBuilder implements IQueryBuilder { throw new \RuntimeException('Invalid return type for query'); } + /** + * Monkey-patched compatibility layer for apps that were adapted for Nextcloud 22 before + * the first beta, where executeStatement was named executeUpdate. + * + * Static analysis should catch those misuses, but until then let's try to keep things + * running. + * + * @internal + * @deprecated + * @todo drop ASAP + */ public function executeUpdate(): int { + return $this->executeStatement(); + } + + public function executeStatement(): int { if ($this->getType() === \Doctrine\DBAL\Query\QueryBuilder::SELECT) { - throw new \RuntimeException('Invalid query type, expected INSERT, DELETE or UPDATE query'); + throw new \RuntimeException('Invalid query type, expected INSERT, DELETE or UPDATE statement'); } try { @@ -321,7 +336,7 @@ class QueryBuilder implements IQueryBuilder { } if (!is_int($result)) { - throw new \RuntimeException('Invalid return type for query'); + throw new \RuntimeException('Invalid return type for statement'); } return $result; @@ -447,9 +462,9 @@ class QueryBuilder implements IQueryBuilder { /** * Gets the position of the first result the query object was set to retrieve (the "offset"). - * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. + * Returns 0 if {@link setFirstResult} was not applied to this QueryBuilder. * - * @return integer The position of the first result. + * @return int The position of the first result. */ public function getFirstResult() { return $this->queryBuilder->getFirstResult(); diff --git a/lib/private/DB/QueryBuilder/QueryFunction.php b/lib/private/DB/QueryBuilder/QueryFunction.php index 60f2bf12383..41798f233cd 100644 --- a/lib/private/DB/QueryBuilder/QueryFunction.php +++ b/lib/private/DB/QueryBuilder/QueryFunction.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\IQueryFunction; diff --git a/lib/private/DB/QueryBuilder/QuoteHelper.php b/lib/private/DB/QueryBuilder/QuoteHelper.php index b50ff554a68..727bb923d9c 100644 --- a/lib/private/DB/QueryBuilder/QuoteHelper.php +++ b/lib/private/DB/QueryBuilder/QuoteHelper.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ILiteral; diff --git a/lib/private/DB/ResultAdapter.php b/lib/private/DB/ResultAdapter.php index 176de5b45ea..989839a473d 100644 --- a/lib/private/DB/ResultAdapter.php +++ b/lib/private/DB/ResultAdapter.php @@ -1,8 +1,11 @@ <?php -/* + +declare(strict_types=1); + +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -13,15 +16,13 @@ * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - -declare(strict_types=1); - namespace OC\DB; use Doctrine\DBAL\Result; diff --git a/lib/private/DB/SQLiteMigrator.php b/lib/private/DB/SQLiteMigrator.php index 24b6c02b31c..76138fee545 100644 --- a/lib/private/DB/SQLiteMigrator.php +++ b/lib/private/DB/SQLiteMigrator.php @@ -2,8 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Victor Dubiniuk <dubiniuk@owncloud.com> @@ -23,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\DBAL\Schema\Schema; diff --git a/lib/private/DB/SQLiteSessionInit.php b/lib/private/DB/SQLiteSessionInit.php index 924a3b2758c..89f7e03c5f2 100644 --- a/lib/private/DB/SQLiteSessionInit.php +++ b/lib/private/DB/SQLiteSessionInit.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\DB; use Doctrine\Common\EventSubscriber; diff --git a/lib/private/DB/SchemaWrapper.php b/lib/private/DB/SchemaWrapper.php index 20ae5b6faa6..40d41f0dafc 100644 --- a/lib/private/DB/SchemaWrapper.php +++ b/lib/private/DB/SchemaWrapper.php @@ -14,16 +14,17 @@ * * 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 + * 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/>. * */ - namespace OC\DB; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Schema; use OCP\DB\ISchemaWrapper; @@ -130,4 +131,15 @@ class SchemaWrapper implements ISchemaWrapper { public function getTables() { return $this->schema->getTables(); } + + /** + * Gets the DatabasePlatform for the database. + * + * @return AbstractPlatform + * + * @throws Exception + */ + public function getDatabasePlatform() { + return $this->connection->getDatabasePlatform(); + } } diff --git a/lib/private/DB/SetTransactionIsolationLevel.php b/lib/private/DB/SetTransactionIsolationLevel.php index eb15bf11fbe..b067edde441 100644 --- a/lib/private/DB/SetTransactionIsolationLevel.php +++ b/lib/private/DB/SetTransactionIsolationLevel.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\DB; use Doctrine\Common\EventSubscriber; diff --git a/lib/private/Dashboard/DashboardManager.php b/lib/private/Dashboard/DashboardManager.php index 4501e3cc544..abeb74eef30 100644 --- a/lib/private/Dashboard/DashboardManager.php +++ b/lib/private/Dashboard/DashboardManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Dashboard; use OCP\Dashboard\Exceptions\DashboardAppNotAvailableException; diff --git a/lib/private/Dashboard/Manager.php b/lib/private/Dashboard/Manager.php index 9f703bb14ad..a77c389cdeb 100644 --- a/lib/private/Dashboard/Manager.php +++ b/lib/private/Dashboard/Manager.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Dashboard; use InvalidArgumentException; diff --git a/lib/private/DatabaseException.php b/lib/private/DatabaseException.php index 6338bd16cc8..88287003af9 100644 --- a/lib/private/DatabaseException.php +++ b/lib/private/DatabaseException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class DatabaseException extends \Exception { diff --git a/lib/private/DatabaseSetupException.php b/lib/private/DatabaseSetupException.php index 2fefb920994..44583416dbc 100644 --- a/lib/private/DatabaseSetupException.php +++ b/lib/private/DatabaseSetupException.php @@ -20,8 +20,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; +use OCP\HintException; + class DatabaseSetupException extends HintException { } diff --git a/lib/private/DateTimeFormatter.php b/lib/private/DateTimeFormatter.php index 45a1cbdb8f2..1c8b4f6d3ab 100644 --- a/lib/private/DateTimeFormatter.php +++ b/lib/private/DateTimeFormatter.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class DateTimeFormatter implements \OCP\IDateTimeFormatter { diff --git a/lib/private/DateTimeZone.php b/lib/private/DateTimeZone.php index 7bb4a861b15..49e255c75c8 100644 --- a/lib/private/DateTimeZone.php +++ b/lib/private/DateTimeZone.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OCP\IConfig; diff --git a/lib/private/Diagnostics/Event.php b/lib/private/Diagnostics/Event.php index 97da22b12a3..95b737155dc 100644 --- a/lib/private/Diagnostics/Event.php +++ b/lib/private/Diagnostics/Event.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Diagnostics; use OCP\Diagnostics\IEvent; diff --git a/lib/private/Diagnostics/EventLogger.php b/lib/private/Diagnostics/EventLogger.php index 115a8ebba92..4f3343ec625 100644 --- a/lib/private/Diagnostics/EventLogger.php +++ b/lib/private/Diagnostics/EventLogger.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Diagnostics; use OCP\Diagnostics\IEventLogger; diff --git a/lib/private/Diagnostics/Query.php b/lib/private/Diagnostics/Query.php index a5fb32e0d90..6a26e57be0e 100644 --- a/lib/private/Diagnostics/Query.php +++ b/lib/private/Diagnostics/Query.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Diagnostics; use OCP\Diagnostics\IQuery; diff --git a/lib/private/Diagnostics/QueryLogger.php b/lib/private/Diagnostics/QueryLogger.php index 6093603a576..499947178a3 100644 --- a/lib/private/Diagnostics/QueryLogger.php +++ b/lib/private/Diagnostics/QueryLogger.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Diagnostics; use OC\Cache\CappedMemoryCache; diff --git a/lib/private/DirectEditing/Manager.php b/lib/private/DirectEditing/Manager.php index 0e7e988eef2..543f1e5adb7 100644 --- a/lib/private/DirectEditing/Manager.php +++ b/lib/private/DirectEditing/Manager.php @@ -16,17 +16,17 @@ * * 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 + * 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/>. * */ - namespace OC\DirectEditing; use Doctrine\DBAL\FetchMode; +use OC\Files\Node\Folder; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; @@ -130,7 +130,12 @@ class Manager implements IManager { if ($userFolder->nodeExists($path)) { throw new \RuntimeException('File already exists'); } else { - $file = $userFolder->newFile($path); + if (!$userFolder->nodeExists(dirname($path))) { + throw new \RuntimeException('Invalid path'); + } + /** @var Folder $folder */ + $folder = $userFolder->get(dirname($path)); + $file = $folder->newFile(basename($path)); $editor = $this->getEditor($editorId); $creators = $editor->getCreators(); foreach ($creators as $creator) { diff --git a/lib/private/DirectEditing/Token.php b/lib/private/DirectEditing/Token.php index eb98f3c7123..5f98ef51386 100644 --- a/lib/private/DirectEditing/Token.php +++ b/lib/private/DirectEditing/Token.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\DirectEditing; use OCP\DirectEditing\IToken; diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php index fa913d3655b..6d604e38d4b 100644 --- a/lib/private/Encryption/DecryptAll.php +++ b/lib/private/Encryption/DecryptAll.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use OC\Encryption\Exceptions\DecryptionFailedException; diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index 596b90e7872..e3dc539dd00 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Björn Schießle <bjoern@schiessle.org> + * @author Julius Härtl <jus@bitgrid.net> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -21,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use OC\Files\Filesystem; diff --git a/lib/private/Encryption/Exceptions/DecryptionFailedException.php b/lib/private/Encryption/Exceptions/DecryptionFailedException.php index 048732d62a9..c67edabd0ce 100644 --- a/lib/private/Encryption/Exceptions/DecryptionFailedException.php +++ b/lib/private/Encryption/Exceptions/DecryptionFailedException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php b/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php index a421914dcb2..9a86d876d6a 100644 --- a/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php +++ b/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EncryptionFailedException.php b/lib/private/Encryption/Exceptions/EncryptionFailedException.php index 405e2d5bb23..8797df51e8e 100644 --- a/lib/private/Encryption/Exceptions/EncryptionFailedException.php +++ b/lib/private/Encryption/Exceptions/EncryptionFailedException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php index bb55e298ffa..7c9e70b4958 100644 --- a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php +++ b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php b/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php index c44ea9d7db0..45d70dd5f8f 100644 --- a/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php +++ b/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php b/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php index 824dce48007..64b34e1b883 100644 --- a/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php +++ b/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php b/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php index 24192e6e8d6..e0ce8616432 100644 --- a/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php +++ b/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/UnknownCipherException.php b/lib/private/Encryption/Exceptions/UnknownCipherException.php index 7a8bd76d936..fbb923ce521 100644 --- a/lib/private/Encryption/Exceptions/UnknownCipherException.php +++ b/lib/private/Encryption/Exceptions/UnknownCipherException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php index d4832d7caa2..2c486dfade6 100644 --- a/lib/private/Encryption/File.php +++ b/lib/private/Encryption/File.php @@ -25,10 +25,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use OC\Cache\CappedMemoryCache; +use OCA\Files_External\Service\GlobalStoragesService; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\Share\IManager; @@ -111,10 +111,12 @@ class File implements \OCP\Encryption\IFile { // check if it is a group mount if (\OCP\App::isEnabled("files_external")) { - $mounts = \OCA\Files_External\MountConfig::getSystemMountPoints(); - foreach ($mounts as $mount) { - if ($mount['mountpoint'] == substr($ownerPath, 1, strlen($mount['mountpoint']))) { - $mountedFor = $this->util->getUserWithAccessToMountPoint($mount['applicable']['users'], $mount['applicable']['groups']); + /** @var GlobalStoragesService $storageService */ + $storageService = \OC::$server->get(GlobalStoragesService::class); + $storages = $storageService->getAllStorages(); + foreach ($storages as $storage) { + if ($storage->getMountPoint() == substr($ownerPath, 0, strlen($storage->getMountPoint()))) { + $mountedFor = $this->util->getUserWithAccessToMountPoint($storage->getApplicableUsers(), $storage->getApplicableGroups()); $userIds = array_merge($userIds, $mountedFor); } } diff --git a/lib/private/Encryption/HookManager.php b/lib/private/Encryption/HookManager.php index 16d45556b2f..a2d6b990a88 100644 --- a/lib/private/Encryption/HookManager.php +++ b/lib/private/Encryption/HookManager.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Björn Schießle <bjoern@schiessle.org> + * @author Julius Härtl <jus@bitgrid.net> * @author Thomas Müller <thomas.mueller@tmit.eu> * * @license AGPL-3.0 @@ -20,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use OC\Files\Filesystem; diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php index 6d43813b0f1..a3772af5878 100644 --- a/lib/private/Encryption/Keys/Storage.php +++ b/lib/private/Encryption/Keys/Storage.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption\Keys; use OC\Encryption\Util; diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php index f160a16a995..55578ee25f4 100644 --- a/lib/private/Encryption/Manager.php +++ b/lib/private/Encryption/Manager.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use OC\Encryption\Keys\Storage; @@ -178,17 +177,15 @@ class Manager implements IManager { * @throws Exceptions\ModuleDoesNotExistsException */ public function getEncryptionModule($moduleId = '') { - if (!empty($moduleId)) { - if (isset($this->encryptionModules[$moduleId])) { - return call_user_func($this->encryptionModules[$moduleId]['callback']); - } else { - $message = "Module with ID: $moduleId does not exist."; - $hint = $this->l->t('Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator.', [$moduleId]); - throw new Exceptions\ModuleDoesNotExistsException($message, $hint); - } - } else { + if (empty($moduleId)) { return $this->getDefaultEncryptionModule(); } + if (isset($this->encryptionModules[$moduleId])) { + return call_user_func($this->encryptionModules[$moduleId]['callback']); + } + $message = "Module with ID: $moduleId does not exist."; + $hint = $this->l->t('Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator.', [$moduleId]); + throw new Exceptions\ModuleDoesNotExistsException($message, $hint); } /** @@ -199,17 +196,15 @@ class Manager implements IManager { */ protected function getDefaultEncryptionModule() { $defaultModuleId = $this->getDefaultEncryptionModuleId(); - if (!empty($defaultModuleId)) { - if (isset($this->encryptionModules[$defaultModuleId])) { - return call_user_func($this->encryptionModules[$defaultModuleId]['callback']); - } else { - $message = 'Default encryption module not loaded'; - throw new Exceptions\ModuleDoesNotExistsException($message); - } - } else { + if (empty($defaultModuleId)) { $message = 'No default encryption module defined'; throw new Exceptions\ModuleDoesNotExistsException($message); } + if (isset($this->encryptionModules[$defaultModuleId])) { + return call_user_func($this->encryptionModules[$defaultModuleId]['callback']); + } + $message = 'Default encryption module not loaded'; + throw new Exceptions\ModuleDoesNotExistsException($message); } /** diff --git a/lib/private/Encryption/Update.php b/lib/private/Encryption/Update.php index 2b8bfe38319..9996d6e077c 100644 --- a/lib/private/Encryption/Update.php +++ b/lib/private/Encryption/Update.php @@ -5,6 +5,7 @@ * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Julius Härtl <jus@bitgrid.net> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -23,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use InvalidArgumentException; diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index f5107d2ec43..dc878ba8fc1 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Encryption; use OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException; @@ -33,6 +32,8 @@ use OC\Encryption\Exceptions\EncryptionHeaderToLargeException; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; use OC\Files\Filesystem; use OC\Files\View; +use OCA\Files_External\Lib\StorageConfig; +use OCA\Files_External\Service\GlobalStoragesService; use OCP\Encryption\IEncryptionModule; use OCP\IConfig; use OCP\IUser; @@ -266,7 +267,7 @@ class Util { public function getUserWithAccessToMountPoint($users, $groups) { $result = []; - if (in_array('all', $users)) { + if ($users === [] && $groups === []) { $users = $this->userManager->search('', null, null); $result = array_map(function (IUser $user) { return $user->getUID(); @@ -299,10 +300,12 @@ class Util { */ public function isSystemWideMountPoint($path, $uid) { if (\OCP\App::isEnabled("files_external")) { - $mounts = \OCA\Files_External\MountConfig::getSystemMountPoints(); - foreach ($mounts as $mount) { - if (strpos($path, '/files/' . $mount['mountpoint']) === 0) { - if ($this->isMountPointApplicableToUser($mount, $uid)) { + /** @var GlobalStoragesService $storageService */ + $storageService = \OC::$server->get(GlobalStoragesService::class); + $storages = $storageService->getAllStorages(); + foreach ($storages as $storage) { + if (strpos($path, '/files/' . $storage->getMountPoint()) === 0) { + if ($this->isMountPointApplicableToUser($storage, $uid)) { return true; } } @@ -314,19 +317,21 @@ class Util { /** * check if mount point is applicable to user * - * @param array $mount contains $mount['applicable']['users'], $mount['applicable']['groups'] + * @param StorageConfig $mount * @param string $uid * @return boolean */ - private function isMountPointApplicableToUser($mount, $uid) { - $acceptedUids = ['all', $uid]; + private function isMountPointApplicableToUser(StorageConfig $mount, string $uid) { + if ($mount->getApplicableUsers() === [] && $mount->getApplicableGroups() === []) { + // applicable for everyone + return true; + } // check if mount point is applicable for the user - $intersection = array_intersect($acceptedUids, $mount['applicable']['users']); - if (!empty($intersection)) { + if (array_search($uid, $mount->getApplicableUsers()) !== false) { return true; } // check if mount point is applicable for group where the user is a member - foreach ($mount['applicable']['groups'] as $gid) { + foreach ($mount->getApplicableGroups() as $gid) { if ($this->groupManager->isInGroup($uid, $gid)) { return true; } diff --git a/lib/private/EventDispatcher/EventDispatcher.php b/lib/private/EventDispatcher/EventDispatcher.php index 4e1fba67663..7de1f68d8d7 100644 --- a/lib/private/EventDispatcher/EventDispatcher.php +++ b/lib/private/EventDispatcher/EventDispatcher.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\EventDispatcher; use Psr\Log\LoggerInterface; diff --git a/lib/private/EventDispatcher/GenericEventWrapper.php b/lib/private/EventDispatcher/GenericEventWrapper.php index 1935c675812..55e23d2ff7f 100644 --- a/lib/private/EventDispatcher/GenericEventWrapper.php +++ b/lib/private/EventDispatcher/GenericEventWrapper.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\EventDispatcher; use OCP\ILogger; diff --git a/lib/private/EventDispatcher/ServiceEventListener.php b/lib/private/EventDispatcher/ServiceEventListener.php index 301531f8931..a7e15f1df1b 100644 --- a/lib/private/EventDispatcher/ServiceEventListener.php +++ b/lib/private/EventDispatcher/ServiceEventListener.php @@ -17,7 +17,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -30,8 +30,9 @@ namespace OC\EventDispatcher; use OCP\AppFramework\QueryException; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\IContainer; +use OCP\IServerContainer; use Psr\Log\LoggerInterface; +use function sprintf; /** * Lazy service event listener @@ -41,7 +42,7 @@ use Psr\Log\LoggerInterface; */ final class ServiceEventListener { - /** @var IContainer */ + /** @var IServerContainer */ private $container; /** @var string */ @@ -53,7 +54,7 @@ final class ServiceEventListener { /** @var null|IEventListener */ private $service; - public function __construct(IContainer $container, + public function __construct(IServerContainer $container, string $class, LoggerInterface $logger) { $this->container = $container; @@ -64,11 +65,21 @@ final class ServiceEventListener { public function __invoke(Event $event) { if ($this->service === null) { try { + // TODO: fetch from the app containers, otherwise any custom services, + // parameters and aliases won't be resolved. + // See https://github.com/nextcloud/server/issues/27793 for details. $this->service = $this->container->query($this->class); } catch (QueryException $e) { - $this->logger->error("Could not load event listener service " . $this->class, [ - 'exception' => $e, - ]); + $this->logger->error( + sprintf( + 'Could not load event listener service %s: %s. Make sure the class is auto-loadable by the Nextcloud server container', + $this->class, + $e->getMessage() + ), + [ + 'exception' => $e, + ] + ); return; } } diff --git a/lib/private/EventDispatcher/SymfonyAdapter.php b/lib/private/EventDispatcher/SymfonyAdapter.php index 39985cb112c..6cd636afc55 100644 --- a/lib/private/EventDispatcher/SymfonyAdapter.php +++ b/lib/private/EventDispatcher/SymfonyAdapter.php @@ -7,7 +7,6 @@ declare(strict_types=1); * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Joas Schilling <coding@schilljs.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -19,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\EventDispatcher; use Symfony\Component\EventDispatcher\GenericEvent; diff --git a/lib/private/Federation/CloudFederationFactory.php b/lib/private/Federation/CloudFederationFactory.php index f1bae285234..010ffdafe47 100644 --- a/lib/private/Federation/CloudFederationFactory.php +++ b/lib/private/Federation/CloudFederationFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Federation; use OCP\Federation\ICloudFederationFactory; diff --git a/lib/private/Federation/CloudFederationNotification.php b/lib/private/Federation/CloudFederationNotification.php index ad1d689dcd0..aa1c3dc9e65 100644 --- a/lib/private/Federation/CloudFederationNotification.php +++ b/lib/private/Federation/CloudFederationNotification.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Federation; use OCP\Federation\ICloudFederationNotification; diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php index 597227533f9..c19ca8429ca 100644 --- a/lib/private/Federation/CloudFederationProviderManager.php +++ b/lib/private/Federation/CloudFederationProviderManager.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Federation; use OC\AppFramework\Http; @@ -168,7 +167,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager /** * @param string $url * @param ICloudFederationNotification $notification - * @return mixed + * @return array|false */ public function sendNotification($url, ICloudFederationNotification $notification) { $ocmEndPoint = $this->getOCMEndPoint($url); diff --git a/lib/private/Federation/CloudFederationShare.php b/lib/private/Federation/CloudFederationShare.php index 52acee5a24e..0f79ba521ea 100644 --- a/lib/private/Federation/CloudFederationShare.php +++ b/lib/private/Federation/CloudFederationShare.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Federation; use OCP\Federation\ICloudFederationShare; diff --git a/lib/private/Federation/CloudId.php b/lib/private/Federation/CloudId.php index 27a222c0583..50e974831a6 100644 --- a/lib/private/Federation/CloudId.php +++ b/lib/private/Federation/CloudId.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Federation; use OCP\Federation\ICloudId; diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php index 0671a0bfa02..24437456fd0 100644 --- a/lib/private/Federation/CloudIdManager.php +++ b/lib/private/Federation/CloudIdManager.php @@ -21,26 +21,33 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Federation; use OCP\Contacts\IManager; use OCP\Federation\ICloudId; use OCP\Federation\ICloudIdManager; +use OCP\IURLGenerator; +use OCP\IUserManager; class CloudIdManager implements ICloudIdManager { /** @var IManager */ private $contactsManager; + /** @var IURLGenerator */ + private $urlGenerator; + /** @var IUserManager */ + private $userManager; - public function __construct(IManager $contactsManager) { + public function __construct(IManager $contactsManager, IURLGenerator $urlGenerator, IUserManager $userManager) { $this->contactsManager = $contactsManager; + $this->urlGenerator = $urlGenerator; + $this->userManager = $userManager; } /** @@ -104,25 +111,40 @@ class CloudIdManager implements ICloudIdManager { /** * @param string $user - * @param string $remote + * @param string|null $remote * @return CloudId */ - public function getCloudId(string $user, string $remote): ICloudId { - // TODO check what the correct url is for remote (asking the remote) - $fixedRemote = $this->fixRemoteURL($remote); - if (strpos($fixedRemote, 'http://') === 0) { - $host = substr($fixedRemote, strlen('http://')); - } elseif (strpos($fixedRemote, 'https://') === 0) { - $host = substr($fixedRemote, strlen('https://')); + public function getCloudId(string $user, ?string $remote): ICloudId { + if ($remote === null) { + $remote = rtrim($this->removeProtocolFromUrl($this->urlGenerator->getAbsoluteURL('/')), '/'); + $fixedRemote = $this->fixRemoteURL($remote); + $localUser = $this->userManager->get($user); + $displayName = !is_null($localUser) ? $localUser->getDisplayName() : ''; } else { - $host = $fixedRemote; + // TODO check what the correct url is for remote (asking the remote) + $fixedRemote = $this->fixRemoteURL($remote); + $host = $this->removeProtocolFromUrl($fixedRemote); + $displayName = $this->getDisplayNameFromContact($user . '@' . $host); } $id = $user . '@' . $remote; - $displayName = $this->getDisplayNameFromContact($user . '@' . $host); return new CloudId($id, $user, $fixedRemote, $displayName); } /** + * @param string $url + * @return string + */ + private function removeProtocolFromUrl($url) { + if (strpos($url, 'https://') === 0) { + return substr($url, strlen('https://')); + } elseif (strpos($url, 'http://') === 0) { + return substr($url, strlen('http://')); + } + + return $url; + } + + /** * Strips away a potential file names and trailing slashes: * - http://localhost * - http://localhost/ diff --git a/lib/private/Files/AppData/AppData.php b/lib/private/Files/AppData/AppData.php index 5f917afe207..df72978a142 100644 --- a/lib/private/Files/AppData/AppData.php +++ b/lib/private/Files/AppData/AppData.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\AppData; use OC\Cache\CappedMemoryCache; diff --git a/lib/private/Files/AppData/Factory.php b/lib/private/Files/AppData/Factory.php index 4801b241c0b..6d7483158f6 100644 --- a/lib/private/Files/AppData/Factory.php +++ b/lib/private/Files/AppData/Factory.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\AppData; use OC\SystemConfig; diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 59e50164ef6..aec97d1ad33 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -12,6 +12,7 @@ * @author Frédéric Fortier <frederic.fortier@oronospolytechnique.com> * @author Jens-Christian Fischer <jens-christian.fischer@switch.ch> * @author Joas Schilling <coding@schilljs.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Lukas Reschke <lukas@statuscode.ch> * @author Michael Gapczynski <GapczynskiM@gmail.com> @@ -36,11 +37,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; -use OCP\DB\IResult; +use OC\Files\Search\SearchComparison; +use OC\Files\Search\SearchQuery; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Cache\CacheEntryInsertedEvent; @@ -52,6 +53,8 @@ use OCP\Files\Cache\ICache; use OCP\Files\Cache\ICacheEntry; use OCP\Files\FileInfo; use OCP\Files\IMimeTypeLoader; +use OCP\Files\Search\ISearchComparison; +use OCP\Files\Search\ISearchOperator; use OCP\Files\Search\ISearchQuery; use OCP\Files\Storage\IStorage; use OCP\IDBConnection; @@ -62,8 +65,8 @@ use OCP\IDBConnection; * The cache stores the metadata for all files and folders in a storage and is kept up to date trough the following mechanisms: * * - Scanner: scans the storage and updates the cache where needed - * - Watcher: checks for changes made to the filesystem outside of the ownCloud instance and rescans files and folder when a change is detected - * - Updater: listens to changes made to the filesystem inside of the ownCloud instance and updates the cache where needed + * - Watcher: checks for changes made to the filesystem outside of the Nextcloud instance and rescans files and folder when a change is detected + * - Updater: listens to changes made to the filesystem inside of the Nextcloud instance and updates the cache where needed * - ChangePropagator: updates the mtime and etags of parent folders whenever a change to the cache is made to the cache by the updater */ class Cache implements ICache { @@ -118,15 +121,14 @@ class Cache implements ICache { $this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); $this->connection = \OC::$server->getDatabaseConnection(); $this->eventDispatcher = \OC::$server->get(IEventDispatcher::class); - $this->querySearchHelper = new QuerySearchHelper($this->mimetypeLoader); + $this->querySearchHelper = \OC::$server->query(QuerySearchHelper::class); } protected function getQueryBuilder() { return new CacheQueryBuilder( $this->connection, \OC::$server->getSystemConfig(), - \OC::$server->getLogger(), - $this + \OC::$server->getLogger() ); } @@ -153,7 +155,7 @@ class Cache implements ICache { // normalize file $file = $this->normalize($file); - $query->whereStorageId() + $query->whereStorageId($this->getNumericStorageId()) ->wherePath($file); } else { //file id $query->whereFileId($file); @@ -482,7 +484,7 @@ class Cache implements ICache { $query = $this->getQueryBuilder(); $query->select('fileid') ->from('filecache') - ->whereStorageId() + ->whereStorageId($this->getNumericStorageId()) ->wherePath($file); $result = $query->execute(); @@ -642,6 +644,10 @@ class Cache implements ICache { $targetPath = $this->normalize($targetPath); $sourceData = $sourceCache->get($sourcePath); + if ($sourceData === false) { + throw new \Exception('Invalid source storage path: ' . $sourcePath); + } + $sourceId = $sourceData['fileid']; $newParentId = $this->getParentId($targetPath); @@ -714,7 +720,7 @@ class Cache implements ICache { public function clear() { $query = $this->getQueryBuilder(); $query->delete('filecache') - ->whereStorageId(); + ->whereStorageId($this->getNumericStorageId()); $query->execute(); $query = $this->connection->getQueryBuilder(); @@ -742,7 +748,7 @@ class Cache implements ICache { $query = $this->getQueryBuilder(); $query->select('size') ->from('filecache') - ->whereStorageId() + ->whereStorageId($this->getNumericStorageId()) ->wherePath($file); $result = $query->execute(); @@ -771,37 +777,8 @@ class Cache implements ICache { * @return ICacheEntry[] an array of cache entries where the name matches the search pattern */ public function search($pattern) { - // normalize pattern - $pattern = $this->normalize($pattern); - - if ($pattern === '%%') { - return []; - } - - $query = $this->getQueryBuilder(); - $query->selectFileCache() - ->whereStorageId() - ->andWhere($query->expr()->iLike('name', $query->createNamedParameter($pattern))); - - $result = $query->execute(); - $files = $result->fetchAll(); - $result->closeCursor(); - - return array_map(function (array $data) { - return self::cacheEntryFromData($data, $this->mimetypeLoader); - }, $files); - } - - /** - * @param IResult $result - * @return CacheEntry[] - */ - private function searchResultToCacheEntries(IResult $result): array { - $files = $result->fetchAll(); - - return array_map(function (array $data) { - return self::cacheEntryFromData($data, $this->mimetypeLoader); - }, $files); + $operator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', $pattern); + return $this->searchQuery(new SearchQuery($operator, 0, 0, [], null)); } /** @@ -812,71 +789,16 @@ class Cache implements ICache { * @return ICacheEntry[] an array of cache entries where the mimetype matches the search */ public function searchByMime($mimetype) { - $mimeId = $this->mimetypeLoader->getId($mimetype); - - $query = $this->getQueryBuilder(); - $query->selectFileCache() - ->whereStorageId(); - - if (strpos($mimetype, '/')) { - $query->andWhere($query->expr()->eq('mimetype', $query->createNamedParameter($mimeId, IQueryBuilder::PARAM_INT))); + if (strpos($mimetype, '/') === false) { + $operator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', $mimetype . '/%'); } else { - $query->andWhere($query->expr()->eq('mimepart', $query->createNamedParameter($mimeId, IQueryBuilder::PARAM_INT))); + $operator = new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'mimetype', $mimetype); } - - $result = $query->execute(); - $files = $result->fetchAll(); - $result->closeCursor(); - - return array_map(function (array $data) { - return self::cacheEntryFromData($data, $this->mimetypeLoader); - }, $files); + return $this->searchQuery(new SearchQuery($operator, 0, 0, [], null)); } public function searchQuery(ISearchQuery $searchQuery) { - $builder = $this->getQueryBuilder(); - - $query = $builder->selectFileCache('file'); - - $query->whereStorageId(); - - if ($this->querySearchHelper->shouldJoinTags($searchQuery->getSearchOperation())) { - $user = $searchQuery->getUser(); - if ($user === null) { - throw new \InvalidArgumentException("Searching by tag requires the user to be set in the query"); - } - $query - ->innerJoin('file', 'vcategory_to_object', 'tagmap', $builder->expr()->eq('file.fileid', 'tagmap.objid')) - ->innerJoin('tagmap', 'vcategory', 'tag', $builder->expr()->andX( - $builder->expr()->eq('tagmap.type', 'tag.type'), - $builder->expr()->eq('tagmap.categoryid', 'tag.id') - )) - ->andWhere($builder->expr()->eq('tag.type', $builder->createNamedParameter('files'))) - ->andWhere($builder->expr()->eq('tag.uid', $builder->createNamedParameter($user->getUID()))); - } - - $searchExpr = $this->querySearchHelper->searchOperatorToDBExpr($builder, $searchQuery->getSearchOperation()); - if ($searchExpr) { - $query->andWhere($searchExpr); - } - - if ($searchQuery->limitToHome() && ($this instanceof HomeCache)) { - $query->andWhere($builder->expr()->like('path', $query->expr()->literal('files/%'))); - } - - $this->querySearchHelper->addSearchOrdersToQuery($query, $searchQuery->getOrder()); - - if ($searchQuery->getLimit()) { - $query->setMaxResults($searchQuery->getLimit()); - } - if ($searchQuery->getOffset()) { - $query->setFirstResult($searchQuery->getOffset()); - } - - $result = $query->execute(); - $cacheEntries = $this->searchResultToCacheEntries($result); - $result->closeCursor(); - return $cacheEntries; + return current($this->querySearchHelper->searchInCaches($searchQuery, [$this])); } /** @@ -945,7 +867,7 @@ class Cache implements ICache { $query->selectAlias($query->func()->sum('size'), 'f1') ->selectAlias($query->func()->min('size'), 'f2') ->from('filecache') - ->whereStorageId() + ->whereStorageId($this->getNumericStorageId()) ->whereParent($id); $result = $query->execute(); @@ -978,7 +900,7 @@ class Cache implements ICache { $query = $this->getQueryBuilder(); $query->select('fileid') ->from('filecache') - ->whereStorageId(); + ->whereStorageId($this->getNumericStorageId()); $result = $query->execute(); $files = $result->fetchAll(\PDO::FETCH_COLUMN); @@ -1002,7 +924,7 @@ class Cache implements ICache { $query = $this->getQueryBuilder(); $query->select('path') ->from('filecache') - ->whereStorageId() + ->whereStorageId($this->getNumericStorageId()) ->andWhere($query->expr()->lt('size', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT))) ->orderBy('fileid', 'DESC') ->setMaxResults(1); @@ -1024,7 +946,7 @@ class Cache implements ICache { $query = $this->getQueryBuilder(); $query->select('path') ->from('filecache') - ->whereStorageId() + ->whereStorageId($this->getNumericStorageId()) ->whereFileId($id); $result = $query->execute(); @@ -1123,4 +1045,16 @@ class Cache implements ICache { 'metadata_etag' => $entry->getMetadataEtag(), ]; } + + public function getQueryFilterForStorage(): ISearchOperator { + return new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'storage', $this->getNumericStorageId()); + } + + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { + if ($rawEntry->getStorageId() === $this->getNumericStorageId()) { + return $rawEntry; + } else { + return null; + } + } } diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php index a9d2a1acbf0..156f075c2d0 100644 --- a/lib/private/Files/Cache/CacheEntry.php +++ b/lib/private/Files/Cache/CacheEntry.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OCP\Files\Cache\ICacheEntry; @@ -125,4 +124,8 @@ class CacheEntry implements ICacheEntry { public function getData() { return $this->data; } + + public function __clone() { + $this->data = array_merge([], $this->data); + } } diff --git a/lib/private/Files/Cache/CacheQueryBuilder.php b/lib/private/Files/Cache/CacheQueryBuilder.php index ac17cfaffb2..774691ebc31 100644 --- a/lib/private/Files/Cache/CacheQueryBuilder.php +++ b/lib/private/Files/Cache/CacheQueryBuilder.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Cache; use OC\DB\QueryBuilder\QueryBuilder; @@ -36,13 +35,10 @@ use OCP\ILogger; * Query builder with commonly used helpers for filecache queries */ class CacheQueryBuilder extends QueryBuilder { - private $cache; private $alias = null; - public function __construct(IDBConnection $connection, SystemConfig $systemConfig, ILogger $logger, Cache $cache) { + public function __construct(IDBConnection $connection, SystemConfig $systemConfig, ILogger $logger) { parent::__construct($connection, $systemConfig, $logger); - - $this->cache = $cache; } public function selectFileCache(string $alias = null) { @@ -57,8 +53,8 @@ class CacheQueryBuilder extends QueryBuilder { return $this; } - public function whereStorageId() { - $this->andWhere($this->expr()->eq('storage', $this->createNamedParameter($this->cache->getNumericStorageId(), IQueryBuilder::PARAM_INT))); + public function whereStorageId(int $storageId) { + $this->andWhere($this->expr()->eq('storage', $this->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))); return $this; } diff --git a/lib/private/Files/Cache/FailedCache.php b/lib/private/Files/Cache/FailedCache.php index d9315ec50d5..d60e09ea329 100644 --- a/lib/private/Files/Cache/FailedCache.php +++ b/lib/private/Files/Cache/FailedCache.php @@ -19,12 +19,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; +use OC\Files\Search\SearchComparison; use OCP\Constants; use OCP\Files\Cache\ICache; use OCP\Files\Cache\ICacheEntry; +use OCP\Files\Search\ISearchComparison; +use OCP\Files\Search\ISearchOperator; use OCP\Files\Search\ISearchQuery; /** @@ -139,4 +141,12 @@ class FailedCache implements ICache { public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int { throw new \Exception("Invalid cache"); } + + public function getQueryFilterForStorage(): ISearchOperator { + return new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'storage', -1); + } + + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { + return null; + } } diff --git a/lib/private/Files/Cache/HomeCache.php b/lib/private/Files/Cache/HomeCache.php index d2e8a1f301f..6b6b94c3f20 100644 --- a/lib/private/Files/Cache/HomeCache.php +++ b/lib/private/Files/Cache/HomeCache.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/private/Files/Cache/HomePropagator.php b/lib/private/Files/Cache/HomePropagator.php index 87e5018f9ab..6dba09d756b 100644 --- a/lib/private/Files/Cache/HomePropagator.php +++ b/lib/private/Files/Cache/HomePropagator.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OCP\IDBConnection; diff --git a/lib/private/Files/Cache/LocalRootScanner.php b/lib/private/Files/Cache/LocalRootScanner.php index a10f51150e1..0b6bc497ea3 100644 --- a/lib/private/Files/Cache/LocalRootScanner.php +++ b/lib/private/Files/Cache/LocalRootScanner.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Cache; class LocalRootScanner extends Scanner { diff --git a/lib/private/Files/Cache/MoveFromCacheTrait.php b/lib/private/Files/Cache/MoveFromCacheTrait.php index 2f5bbfb7eea..77cd7ea6d8c 100644 --- a/lib/private/Files/Cache/MoveFromCacheTrait.php +++ b/lib/private/Files/Cache/MoveFromCacheTrait.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license AGPL-3.0 * @@ -20,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OCP\Files\Cache\ICache; diff --git a/lib/private/Files/Cache/NullWatcher.php b/lib/private/Files/Cache/NullWatcher.php index 146961d1c51..2e83c1006bb 100644 --- a/lib/private/Files/Cache/NullWatcher.php +++ b/lib/private/Files/Cache/NullWatcher.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Cache; class NullWatcher extends Watcher { diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php index cdbe8b60175..f8b2548a747 100644 --- a/lib/private/Files/Cache/Propagator.php +++ b/lib/private/Files/Cache/Propagator.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index fc4b582cbce..e065e95e4fd 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -16,216 +16,151 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Cache; -use OCP\DB\QueryBuilder\IQueryBuilder; +use OC\Files\Search\QueryOptimizer\QueryOptimizer; +use OC\Files\Search\SearchBinaryOperator; +use OC\SystemConfig; +use OCP\Files\Cache\ICache; +use OCP\Files\Cache\ICacheEntry; use OCP\Files\IMimeTypeLoader; use OCP\Files\Search\ISearchBinaryOperator; -use OCP\Files\Search\ISearchComparison; -use OCP\Files\Search\ISearchOperator; -use OCP\Files\Search\ISearchOrder; +use OCP\Files\Search\ISearchQuery; +use OCP\IDBConnection; +use OCP\ILogger; -/** - * Tools for transforming search queries into database queries - */ class QuerySearchHelper { - protected static $searchOperatorMap = [ - ISearchComparison::COMPARE_LIKE => 'iLike', - ISearchComparison::COMPARE_EQUAL => 'eq', - ISearchComparison::COMPARE_GREATER_THAN => 'gt', - ISearchComparison::COMPARE_GREATER_THAN_EQUAL => 'gte', - ISearchComparison::COMPARE_LESS_THAN => 'lt', - ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lte' - ]; - - protected static $searchOperatorNegativeMap = [ - ISearchComparison::COMPARE_LIKE => 'notLike', - ISearchComparison::COMPARE_EQUAL => 'neq', - ISearchComparison::COMPARE_GREATER_THAN => 'lte', - ISearchComparison::COMPARE_GREATER_THAN_EQUAL => 'lt', - ISearchComparison::COMPARE_LESS_THAN => 'gte', - ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lt' - ]; - - public const TAG_FAVORITE = '_$!<Favorite>!$_'; /** @var IMimeTypeLoader */ private $mimetypeLoader; - - /** - * QuerySearchUtil constructor. - * - * @param IMimeTypeLoader $mimetypeLoader - */ - public function __construct(IMimeTypeLoader $mimetypeLoader) { + /** @var IDBConnection */ + private $connection; + /** @var SystemConfig */ + private $systemConfig; + /** @var ILogger */ + private $logger; + /** @var SearchBuilder */ + private $searchBuilder; + /** @var QueryOptimizer */ + private $queryOptimizer; + + public function __construct( + IMimeTypeLoader $mimetypeLoader, + IDBConnection $connection, + SystemConfig $systemConfig, + ILogger $logger, + SearchBuilder $searchBuilder, + QueryOptimizer $queryOptimizer + ) { $this->mimetypeLoader = $mimetypeLoader; + $this->connection = $connection; + $this->systemConfig = $systemConfig; + $this->logger = $logger; + $this->searchBuilder = $searchBuilder; + $this->queryOptimizer = $queryOptimizer; } - /** - * Whether or not the tag tables should be joined to complete the search - * - * @param ISearchOperator $operator - * @return boolean - */ - public function shouldJoinTags(ISearchOperator $operator) { - if ($operator instanceof ISearchBinaryOperator) { - return array_reduce($operator->getArguments(), function ($shouldJoin, ISearchOperator $operator) { - return $shouldJoin || $this->shouldJoinTags($operator); - }, false); - } elseif ($operator instanceof ISearchComparison) { - return $operator->getField() === 'tagname' || $operator->getField() === 'favorite'; - } - return false; + protected function getQueryBuilder() { + return new CacheQueryBuilder( + $this->connection, + $this->systemConfig, + $this->logger + ); } /** - * @param IQueryBuilder $builder - * @param ISearchOperator $operator + * Perform a file system search in multiple caches + * + * the results will be grouped by the same array keys as the $caches argument to allow + * post-processing based on which cache the result came from + * + * @template T of array-key + * @param ISearchQuery $searchQuery + * @param array<T, ICache> $caches + * @return array<T, ICacheEntry[]> */ - public function searchOperatorArrayToDBExprArray(IQueryBuilder $builder, array $operators) { - return array_filter(array_map(function ($operator) use ($builder) { - return $this->searchOperatorToDBExpr($builder, $operator); - }, $operators)); - } - - public function searchOperatorToDBExpr(IQueryBuilder $builder, ISearchOperator $operator) { - $expr = $builder->expr(); - if ($operator instanceof ISearchBinaryOperator) { - if (count($operator->getArguments()) === 0) { - return null; - } - - switch ($operator->getType()) { - case ISearchBinaryOperator::OPERATOR_NOT: - $negativeOperator = $operator->getArguments()[0]; - if ($negativeOperator instanceof ISearchComparison) { - return $this->searchComparisonToDBExpr($builder, $negativeOperator, self::$searchOperatorNegativeMap); - } else { - throw new \InvalidArgumentException('Binary operators inside "not" is not supported'); - } - // no break - case ISearchBinaryOperator::OPERATOR_AND: - return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments())); - case ISearchBinaryOperator::OPERATOR_OR: - return call_user_func_array([$expr, 'orX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments())); - default: - throw new \InvalidArgumentException('Invalid operator type: ' . $operator->getType()); + public function searchInCaches(ISearchQuery $searchQuery, array $caches): array { + // search in multiple caches at once by creating one query in the following format + // SELECT ... FROM oc_filecache WHERE + // <filter expressions from the search query> + // AND ( + // <filter expression for storage1> OR + // <filter expression for storage2> OR + // ... + // ); + // + // This gives us all the files matching the search query from all caches + // + // while the resulting rows don't have a way to tell what storage they came from (multiple storages/caches can share storage_id) + // we can just ask every cache if the row belongs to them and give them the cache to do any post processing on the result. + + $builder = $this->getQueryBuilder(); + + $query = $builder->selectFileCache('file'); + + if ($this->searchBuilder->shouldJoinTags($searchQuery->getSearchOperation())) { + $user = $searchQuery->getUser(); + if ($user === null) { + throw new \InvalidArgumentException("Searching by tag requires the user to be set in the query"); } - } elseif ($operator instanceof ISearchComparison) { - return $this->searchComparisonToDBExpr($builder, $operator, self::$searchOperatorMap); - } else { - throw new \InvalidArgumentException('Invalid operator type: ' . get_class($operator)); + $query + ->innerJoin('file', 'vcategory_to_object', 'tagmap', $builder->expr()->eq('file.fileid', 'tagmap.objid')) + ->innerJoin('tagmap', 'vcategory', 'tag', $builder->expr()->andX( + $builder->expr()->eq('tagmap.type', 'tag.type'), + $builder->expr()->eq('tagmap.categoryid', 'tag.id') + )) + ->andWhere($builder->expr()->eq('tag.type', $builder->createNamedParameter('files'))) + ->andWhere($builder->expr()->eq('tag.uid', $builder->createNamedParameter($user->getUID()))); } - } - private function searchComparisonToDBExpr(IQueryBuilder $builder, ISearchComparison $comparison, array $operatorMap) { - $this->validateComparison($comparison); + $storageFilters = array_values(array_map(function (ICache $cache) { + return $cache->getQueryFilterForStorage(); + }, $caches)); + $storageFilter = new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, $storageFilters); + $filter = new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [$searchQuery->getSearchOperation(), $storageFilter]); + $this->queryOptimizer->processOperator($filter); - [$field, $value, $type] = $this->getOperatorFieldAndValue($comparison); - if (isset($operatorMap[$type])) { - $queryOperator = $operatorMap[$type]; - return $builder->expr()->$queryOperator($field, $this->getParameterForValue($builder, $value)); - } else { - throw new \InvalidArgumentException('Invalid operator type: ' . $comparison->getType()); + $searchExpr = $this->searchBuilder->searchOperatorToDBExpr($builder, $filter); + if ($searchExpr) { + $query->andWhere($searchExpr); } - } - private function getOperatorFieldAndValue(ISearchComparison $operator) { - $field = $operator->getField(); - $value = $operator->getValue(); - $type = $operator->getType(); - if ($field === 'mimetype') { - if ($operator->getType() === ISearchComparison::COMPARE_EQUAL) { - $value = (int)$this->mimetypeLoader->getId($value); - } elseif ($operator->getType() === ISearchComparison::COMPARE_LIKE) { - // transform "mimetype='foo/%'" to "mimepart='foo'" - if (preg_match('|(.+)/%|', $value, $matches)) { - $field = 'mimepart'; - $value = (int)$this->mimetypeLoader->getId($matches[1]); - $type = ISearchComparison::COMPARE_EQUAL; - } elseif (strpos($value, '%') !== false) { - throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported'); - } else { - $field = 'mimetype'; - $value = (int)$this->mimetypeLoader->getId($value); - $type = ISearchComparison::COMPARE_EQUAL; - } - } - } elseif ($field === 'favorite') { - $field = 'tag.category'; - $value = self::TAG_FAVORITE; - } elseif ($field === 'tagname') { - $field = 'tag.category'; - } elseif ($field === 'fileid') { - $field = 'file.fileid'; - } elseif ($field === 'path' && $type === ISearchComparison::COMPARE_EQUAL) { - $field = 'path_hash'; - $value = md5((string)$value); - } - return [$field, $value, $type]; - } + $this->searchBuilder->addSearchOrdersToQuery($query, $searchQuery->getOrder()); - private function validateComparison(ISearchComparison $operator) { - $types = [ - 'mimetype' => 'string', - 'mtime' => 'integer', - 'name' => 'string', - 'path' => 'string', - 'size' => 'integer', - 'tagname' => 'string', - 'favorite' => 'boolean', - 'fileid' => 'integer' - ]; - $comparisons = [ - 'mimetype' => ['eq', 'like'], - 'mtime' => ['eq', 'gt', 'lt', 'gte', 'lte'], - 'name' => ['eq', 'like'], - 'path' => ['eq', 'like'], - 'size' => ['eq', 'gt', 'lt', 'gte', 'lte'], - 'tagname' => ['eq', 'like'], - 'favorite' => ['eq'], - 'fileid' => ['eq'] - ]; - - if (!isset($types[$operator->getField()])) { - throw new \InvalidArgumentException('Unsupported comparison field ' . $operator->getField()); - } - $type = $types[$operator->getField()]; - if (gettype($operator->getValue()) !== $type) { - throw new \InvalidArgumentException('Invalid type for field ' . $operator->getField()); + if ($searchQuery->getLimit()) { + $query->setMaxResults($searchQuery->getLimit()); } - if (!in_array($operator->getType(), $comparisons[$operator->getField()])) { - throw new \InvalidArgumentException('Unsupported comparison for field ' . $operator->getField() . ': ' . $operator->getType()); + if ($searchQuery->getOffset()) { + $query->setFirstResult($searchQuery->getOffset()); } - } - private function getParameterForValue(IQueryBuilder $builder, $value) { - if ($value instanceof \DateTime) { - $value = $value->getTimestamp(); - } - if (is_numeric($value)) { - $type = IQueryBuilder::PARAM_INT; - } else { - $type = IQueryBuilder::PARAM_STR; - } - return $builder->createNamedParameter($value, $type); - } + $result = $query->execute(); + $files = $result->fetchAll(); - /** - * @param IQueryBuilder $query - * @param ISearchOrder[] $orders - */ - public function addSearchOrdersToQuery(IQueryBuilder $query, array $orders) { - foreach ($orders as $order) { - $query->addOrderBy($order->getField(), $order->getDirection()); + $rawEntries = array_map(function (array $data) { + return Cache::cacheEntryFromData($data, $this->mimetypeLoader); + }, $files); + + $result->closeCursor(); + + // loop trough all caches for each result to see if the result matches that storage + // results are grouped by the same array keys as the caches argument to allow the caller to distringuish the source of the results + $results = array_fill_keys(array_keys($caches), []); + foreach ($rawEntries as $rawEntry) { + foreach ($caches as $cacheKey => $cache) { + $entry = $cache->getCacheEntryFromSearchResult($rawEntry); + if ($entry) { + $results[$cacheKey][] = $entry; + } + } } + return $results; } } diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 7bb0341e201..8baab8746fc 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -33,7 +33,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use Doctrine\DBAL\Exception; diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php new file mode 100644 index 00000000000..003d3ac15e7 --- /dev/null +++ b/lib/private/Files/Cache/SearchBuilder.php @@ -0,0 +1,238 @@ +<?php +/** + * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> + * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Tobias Kaminsky <tobias@kaminsky.me> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Files\Cache; + +use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\Files\IMimeTypeLoader; +use OCP\Files\Search\ISearchBinaryOperator; +use OCP\Files\Search\ISearchComparison; +use OCP\Files\Search\ISearchOperator; +use OCP\Files\Search\ISearchOrder; + +/** + * Tools for transforming search queries into database queries + */ +class SearchBuilder { + protected static $searchOperatorMap = [ + ISearchComparison::COMPARE_LIKE => 'iLike', + ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE => 'like', + ISearchComparison::COMPARE_EQUAL => 'eq', + ISearchComparison::COMPARE_GREATER_THAN => 'gt', + ISearchComparison::COMPARE_GREATER_THAN_EQUAL => 'gte', + ISearchComparison::COMPARE_LESS_THAN => 'lt', + ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lte', + ]; + + protected static $searchOperatorNegativeMap = [ + ISearchComparison::COMPARE_LIKE => 'notLike', + ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE => 'notLike', + ISearchComparison::COMPARE_EQUAL => 'neq', + ISearchComparison::COMPARE_GREATER_THAN => 'lte', + ISearchComparison::COMPARE_GREATER_THAN_EQUAL => 'lt', + ISearchComparison::COMPARE_LESS_THAN => 'gte', + ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lt', + ]; + + public const TAG_FAVORITE = '_$!<Favorite>!$_'; + + /** @var IMimeTypeLoader */ + private $mimetypeLoader; + + public function __construct( + IMimeTypeLoader $mimetypeLoader + ) { + $this->mimetypeLoader = $mimetypeLoader; + } + + /** + * Whether or not the tag tables should be joined to complete the search + * + * @param ISearchOperator $operator + * @return boolean + */ + public function shouldJoinTags(ISearchOperator $operator) { + if ($operator instanceof ISearchBinaryOperator) { + return array_reduce($operator->getArguments(), function ($shouldJoin, ISearchOperator $operator) { + return $shouldJoin || $this->shouldJoinTags($operator); + }, false); + } elseif ($operator instanceof ISearchComparison) { + return $operator->getField() === 'tagname' || $operator->getField() === 'favorite'; + } + return false; + } + + /** + * @param IQueryBuilder $builder + * @param ISearchOperator[] $operators + */ + public function searchOperatorArrayToDBExprArray(IQueryBuilder $builder, array $operators) { + return array_filter(array_map(function ($operator) use ($builder) { + return $this->searchOperatorToDBExpr($builder, $operator); + }, $operators)); + } + + public function searchOperatorToDBExpr(IQueryBuilder $builder, ISearchOperator $operator) { + $expr = $builder->expr(); + + if ($operator instanceof ISearchBinaryOperator) { + if (count($operator->getArguments()) === 0) { + return null; + } + + switch ($operator->getType()) { + case ISearchBinaryOperator::OPERATOR_NOT: + $negativeOperator = $operator->getArguments()[0]; + if ($negativeOperator instanceof ISearchComparison) { + return $this->searchComparisonToDBExpr($builder, $negativeOperator, self::$searchOperatorNegativeMap); + } else { + throw new \InvalidArgumentException('Binary operators inside "not" is not supported'); + } + // no break + case ISearchBinaryOperator::OPERATOR_AND: + return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments())); + case ISearchBinaryOperator::OPERATOR_OR: + return call_user_func_array([$expr, 'orX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments())); + default: + throw new \InvalidArgumentException('Invalid operator type: ' . $operator->getType()); + } + } elseif ($operator instanceof ISearchComparison) { + return $this->searchComparisonToDBExpr($builder, $operator, self::$searchOperatorMap); + } else { + throw new \InvalidArgumentException('Invalid operator type: ' . get_class($operator)); + } + } + + private function searchComparisonToDBExpr(IQueryBuilder $builder, ISearchComparison $comparison, array $operatorMap) { + $this->validateComparison($comparison); + + [$field, $value, $type] = $this->getOperatorFieldAndValue($comparison); + if (isset($operatorMap[$type])) { + $queryOperator = $operatorMap[$type]; + return $builder->expr()->$queryOperator($field, $this->getParameterForValue($builder, $value)); + } else { + throw new \InvalidArgumentException('Invalid operator type: ' . $comparison->getType()); + } + } + + private function getOperatorFieldAndValue(ISearchComparison $operator) { + $field = $operator->getField(); + $value = $operator->getValue(); + $type = $operator->getType(); + if ($field === 'mimetype') { + $value = (string)$value; + if ($operator->getType() === ISearchComparison::COMPARE_EQUAL) { + $value = (int)$this->mimetypeLoader->getId($value); + } elseif ($operator->getType() === ISearchComparison::COMPARE_LIKE) { + // transform "mimetype='foo/%'" to "mimepart='foo'" + if (preg_match('|(.+)/%|', $value, $matches)) { + $field = 'mimepart'; + $value = (int)$this->mimetypeLoader->getId($matches[1]); + $type = ISearchComparison::COMPARE_EQUAL; + } elseif (strpos($value, '%') !== false) { + throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported'); + } else { + $field = 'mimetype'; + $value = (int)$this->mimetypeLoader->getId($value); + $type = ISearchComparison::COMPARE_EQUAL; + } + } + } elseif ($field === 'favorite') { + $field = 'tag.category'; + $value = self::TAG_FAVORITE; + } elseif ($field === 'tagname') { + $field = 'tag.category'; + } elseif ($field === 'fileid') { + $field = 'file.fileid'; + } elseif ($field === 'path' && $type === ISearchComparison::COMPARE_EQUAL && $operator->getQueryHint(ISearchComparison::HINT_PATH_EQ_HASH, true)) { + $field = 'path_hash'; + $value = md5((string)$value); + } + return [$field, $value, $type]; + } + + private function validateComparison(ISearchComparison $operator) { + $types = [ + 'mimetype' => 'string', + 'mtime' => 'integer', + 'name' => 'string', + 'path' => 'string', + 'size' => 'integer', + 'tagname' => 'string', + 'favorite' => 'boolean', + 'fileid' => 'integer', + 'storage' => 'integer', + ]; + $comparisons = [ + 'mimetype' => ['eq', 'like'], + 'mtime' => ['eq', 'gt', 'lt', 'gte', 'lte'], + 'name' => ['eq', 'like', 'clike'], + 'path' => ['eq', 'like', 'clike'], + 'size' => ['eq', 'gt', 'lt', 'gte', 'lte'], + 'tagname' => ['eq', 'like'], + 'favorite' => ['eq'], + 'fileid' => ['eq'], + 'storage' => ['eq'], + ]; + + if (!isset($types[$operator->getField()])) { + throw new \InvalidArgumentException('Unsupported comparison field ' . $operator->getField()); + } + $type = $types[$operator->getField()]; + if (gettype($operator->getValue()) !== $type) { + throw new \InvalidArgumentException('Invalid type for field ' . $operator->getField()); + } + if (!in_array($operator->getType(), $comparisons[$operator->getField()])) { + throw new \InvalidArgumentException('Unsupported comparison for field ' . $operator->getField() . ': ' . $operator->getType()); + } + } + + private function getParameterForValue(IQueryBuilder $builder, $value) { + if ($value instanceof \DateTime) { + $value = $value->getTimestamp(); + } + if (is_numeric($value)) { + $type = IQueryBuilder::PARAM_INT; + } else { + $type = IQueryBuilder::PARAM_STR; + } + return $builder->createNamedParameter($value, $type); + } + + /** + * @param IQueryBuilder $query + * @param ISearchOrder[] $orders + */ + public function addSearchOrdersToQuery(IQueryBuilder $query, array $orders) { + foreach ($orders as $order) { + $field = $order->getField(); + if ($field === 'fileid') { + $field = 'file.fileid'; + } + $query->addOrderBy($field, $order->getDirection()); + } + } +} diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php index af37bef8415..33785607ef7 100644 --- a/lib/private/Files/Cache/Storage.php +++ b/lib/private/Files/Cache/Storage.php @@ -8,6 +8,7 @@ * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Robin McCorkell <robin@mccorkell.me.uk> + * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Vincent Petry <vincent@nextcloud.com> * @@ -26,10 +27,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\Storage\IStorage; +use Psr\Log\LoggerInterface; /** * Handle the mapping between the string and numeric storage ids @@ -175,6 +177,9 @@ class Storage { */ public function setAvailability($isAvailable, int $delay = 0) { $available = $isAvailable ? 1 : 0; + if (!$isAvailable) { + \OC::$server->get(LoggerInterface::class)->info('Storage with ' . $this->storageId . ' marked as unavailable', ['app' => 'lib']); + } $query = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $query->update('storages') @@ -215,4 +220,43 @@ class Storage { $query->execute(); } } + + /** + * remove the entry for the storage by the mount id + * + * @param int $mountId + */ + public static function cleanByMountId(int $mountId) { + $db = \OC::$server->getDatabaseConnection(); + + try { + $db->beginTransaction(); + + $query = $db->getQueryBuilder(); + $query->select('storage_id') + ->from('mounts') + ->where($query->expr()->eq('mount_id', $query->createNamedParameter($mountId, IQueryBuilder::PARAM_INT))); + $storageIds = $query->executeQuery()->fetchAll(\PDO::FETCH_COLUMN); + + $query = $db->getQueryBuilder(); + $query->delete('filecache') + ->where($query->expr()->in('storage', $query->createNamedParameter($storageIds, IQueryBuilder::PARAM_INT_ARRAY))); + $query->executeStatement(); + + $query = $db->getQueryBuilder(); + $query->delete('storages') + ->where($query->expr()->eq('numeric_id', $query->createNamedParameter($storageIds, IQueryBuilder::PARAM_INT_ARRAY))); + $query->executeStatement(); + + $query = $db->getQueryBuilder(); + $query->delete('mounts') + ->where($query->expr()->eq('mount_id', $query->createNamedParameter($mountId, IQueryBuilder::PARAM_INT))); + $query->executeStatement(); + + $db->commit(); + } catch (\Exception $e) { + $db->rollBack(); + throw $e; + } + } } diff --git a/lib/private/Files/Cache/StorageGlobal.php b/lib/private/Files/Cache/StorageGlobal.php index 23d6035084d..7162f8e4908 100644 --- a/lib/private/Files/Cache/StorageGlobal.php +++ b/lib/private/Files/Cache/StorageGlobal.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Cache; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 04179ba0aaf..98fb51fe264 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OC\Files\FileInfo; diff --git a/lib/private/Files/Cache/Watcher.php b/lib/private/Files/Cache/Watcher.php index 19e17e60959..1c1ce6d777b 100644 --- a/lib/private/Files/Cache/Watcher.php +++ b/lib/private/Files/Cache/Watcher.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index fe3124301ba..540b6f7b8c3 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -25,18 +25,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Cache; use OC\Files\Search\SearchBinaryOperator; use OC\Files\Search\SearchComparison; -use OC\Files\Search\SearchQuery; -use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\Cache\ICacheEntry; use OCP\Files\Search\ISearchBinaryOperator; use OCP\Files\Search\ISearchComparison; -use OCP\Files\Search\ISearchQuery; +use OCP\Files\Search\ISearchOperator; /** * Jail to a subdirectory of the wrapped cache @@ -108,10 +105,6 @@ class CacheJail extends CacheWrapper { } } - /** - * @param ICacheEntry|array $entry - * @return array - */ protected function formatCacheEntry($entry) { if (isset($entry['path'])) { $entry['path'] = $this->getJailedPath($entry['path']); @@ -230,104 +223,6 @@ class CacheJail extends CacheWrapper { return $this->getCache()->getStatus($this->getSourcePath($file)); } - private function formatSearchResults($results) { - return array_map(function ($entry) { - $entry['path'] = $this->getJailedPath($entry['path'], $this->getGetUnjailedRoot()); - return $entry; - }, $results); - } - - /** - * search for files matching $pattern - * - * @param string $pattern - * @return array an array of file data - */ - public function search($pattern) { - // normalize pattern - $pattern = $this->normalize($pattern); - - if ($pattern === '%%') { - return []; - } - - $query = $this->getQueryBuilder(); - $query->selectFileCache() - ->whereStorageId() - ->andWhere($query->expr()->orX( - $query->expr()->like('path', $query->createNamedParameter($this->getGetUnjailedRoot() . '/%')), - $query->expr()->eq('path_hash', $query->createNamedParameter(md5($this->getGetUnjailedRoot()))), - )) - ->andWhere($query->expr()->iLike('name', $query->createNamedParameter($pattern))); - - $result = $query->execute(); - $files = $result->fetchAll(); - $result->closeCursor(); - - $results = array_map(function (array $data) { - return self::cacheEntryFromData($data, $this->mimetypeLoader); - }, $files); - return $this->formatSearchResults($results); - } - - /** - * search for files by mimetype - * - * @param string $mimetype - * @return array - */ - public function searchByMime($mimetype) { - $mimeId = $this->mimetypeLoader->getId($mimetype); - - $query = $this->getQueryBuilder(); - $query->selectFileCache() - ->whereStorageId() - ->andWhere($query->expr()->orX( - $query->expr()->like('path', $query->createNamedParameter($this->getGetUnjailedRoot() . '/%')), - $query->expr()->eq('path_hash', $query->createNamedParameter(md5($this->getGetUnjailedRoot()))), - )); - - if (strpos($mimetype, '/')) { - $query->andWhere($query->expr()->eq('mimetype', $query->createNamedParameter($mimeId, IQueryBuilder::PARAM_INT))); - } else { - $query->andWhere($query->expr()->eq('mimepart', $query->createNamedParameter($mimeId, IQueryBuilder::PARAM_INT))); - } - - $result = $query->execute(); - $files = $result->fetchAll(); - $result->closeCursor(); - - $results = array_map(function (array $data) { - return self::cacheEntryFromData($data, $this->mimetypeLoader); - }, $files); - return $this->formatSearchResults($results); - } - - public function searchQuery(ISearchQuery $query) { - $prefixFilter = new SearchComparison( - ISearchComparison::COMPARE_LIKE, - 'path', - $this->getGetUnjailedRoot() . '/%' - ); - $rootFilter = new SearchComparison( - ISearchComparison::COMPARE_EQUAL, - 'path', - $this->getGetUnjailedRoot() - ); - $operation = new SearchBinaryOperator( - ISearchBinaryOperator::OPERATOR_AND, - [new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, [$prefixFilter, $rootFilter]) , $query->getSearchOperation()] - ); - $simpleQuery = new SearchQuery($operation, 0, 0, $query->getOrder(), $query->getUser()); - $results = $this->getCache()->searchQuery($simpleQuery); - $results = $this->formatSearchResults($results); - - $limit = $query->getLimit() === 0 ? null : $query->getLimit(); - $results = array_slice($results, $query->getOffset(), $limit); - - return $results; - } - /** * update the folder size and the size of all parent folders * @@ -409,4 +304,34 @@ class CacheJail extends CacheWrapper { } return $this->getCache()->moveFromCache($sourceCache, $sourcePath, $this->getSourcePath($targetPath)); } + + public function getQueryFilterForStorage(): ISearchOperator { + if ($this->getGetUnjailedRoot() !== '' && $this->getGetUnjailedRoot() !== '/') { + return new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, + [ + $this->getCache()->getQueryFilterForStorage(), + new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, + [ + new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', $this->getGetUnjailedRoot()), + new SearchComparison(ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE, 'path', $this->getGetUnjailedRoot() . '/%'), + ], + ) + ] + ); + } else { + return $this->getCache()->getQueryFilterForStorage(); + } + } + + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { + $rawEntry = $this->getCache()->getCacheEntryFromSearchResult($rawEntry); + if ($rawEntry) { + $jailedPath = $this->getJailedPath($rawEntry->getPath()); + if ($jailedPath !== null) { + return $this->formatCacheEntry(clone $rawEntry); + } + } + + return null; + } } diff --git a/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php b/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php index 706f5d832f4..cbf16a909ff 100644 --- a/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php +++ b/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache\Wrapper; class CachePermissionsMask extends CacheWrapper { diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php index cac6cfed87e..8b8b4b6af80 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -27,12 +27,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Cache; +use OC\Files\Cache\QuerySearchHelper; use OCP\Files\Cache\ICache; use OCP\Files\Cache\ICacheEntry; +use OCP\Files\Search\ISearchOperator; use OCP\Files\Search\ISearchQuery; class CacheWrapper extends Cache { @@ -46,6 +47,9 @@ class CacheWrapper extends Cache { */ public function __construct($cache) { $this->cache = $cache; + $this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); + $this->connection = \OC::$server->getDatabaseConnection(); + $this->querySearchHelper = \OC::$server->get(QuerySearchHelper::class); } protected function getCache() { @@ -216,31 +220,8 @@ class CacheWrapper extends Cache { return $this->getCache()->getStatus($file); } - /** - * search for files matching $pattern - * - * @param string $pattern - * @return ICacheEntry[] an array of file data - */ - public function search($pattern) { - $results = $this->getCache()->search($pattern); - return array_map([$this, 'formatCacheEntry'], $results); - } - - /** - * search for files by mimetype - * - * @param string $mimetype - * @return ICacheEntry[] - */ - public function searchByMime($mimetype) { - $results = $this->getCache()->searchByMime($mimetype); - return array_map([$this, 'formatCacheEntry'], $results); - } - - public function searchQuery(ISearchQuery $query) { - $results = $this->getCache()->searchQuery($query); - return array_map([$this, 'formatCacheEntry'], $results); + public function searchQuery(ISearchQuery $searchQuery) { + return current($this->querySearchHelper->searchInCaches($searchQuery, [$this])); } /** @@ -322,4 +303,17 @@ class CacheWrapper extends Cache { public static function getById($id) { return parent::getById($id); } + + public function getQueryFilterForStorage(): ISearchOperator { + return $this->getCache()->getQueryFilterForStorage(); + } + + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { + $rawEntry = $this->getCache()->getCacheEntryFromSearchResult($rawEntry); + if ($rawEntry) { + return $this->formatCacheEntry(clone $rawEntry); + } + + return null; + } } diff --git a/lib/private/Files/Cache/Wrapper/JailPropagator.php b/lib/private/Files/Cache/Wrapper/JailPropagator.php index d18de7c2d1d..25e53ded39d 100644 --- a/lib/private/Files/Cache/Wrapper/JailPropagator.php +++ b/lib/private/Files/Cache/Wrapper/JailPropagator.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> * * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -14,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Propagator; diff --git a/lib/private/Files/Config/CachedMountFileInfo.php b/lib/private/Files/Config/CachedMountFileInfo.php index 7bae52bb65d..7fdc26f7d53 100644 --- a/lib/private/Files/Config/CachedMountFileInfo.php +++ b/lib/private/Files/Config/CachedMountFileInfo.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Config; use OCP\Files\Config\ICachedMountFileInfo; @@ -31,7 +30,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf /** @var string */ private $internalPath; - public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId = null, $rootInternalPath = '', $internalPath) { + public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath, $internalPath) { parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath); $this->internalPath = $internalPath; } diff --git a/lib/private/Files/Config/CachedMountInfo.php b/lib/private/Files/Config/CachedMountInfo.php index 38919020ee4..e7e10cfe2af 100644 --- a/lib/private/Files/Config/CachedMountInfo.php +++ b/lib/private/Files/Config/CachedMountInfo.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Config; use OC\Files\Filesystem; diff --git a/lib/private/Files/Config/LazyStorageMountInfo.php b/lib/private/Files/Config/LazyStorageMountInfo.php index 8d183d44e84..bfd632c5f6e 100644 --- a/lib/private/Files/Config/LazyStorageMountInfo.php +++ b/lib/private/Files/Config/LazyStorageMountInfo.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Config; use OCP\Files\Mount\IMountPoint; diff --git a/lib/private/Files/Config/MountProviderCollection.php b/lib/private/Files/Config/MountProviderCollection.php index 3900e9870bd..ba70e29ab8d 100644 --- a/lib/private/Files/Config/MountProviderCollection.php +++ b/lib/private/Files/Config/MountProviderCollection.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Config; use OC\Hooks\Emitter; diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index fddd2d956a1..71eb918a58c 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Config; use OC\Cache\CappedMemoryCache; @@ -326,18 +325,30 @@ class UserMountCache implements IUserMountCache { } catch (NotFoundException $e) { return []; } - $mountsForStorage = $this->getMountsForStorageId($storageId, $user); + $builder = $this->connection->getQueryBuilder(); + $query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point', 'mount_id', 'f.path') + ->from('mounts', 'm') + ->innerJoin('m', 'filecache', 'f', $builder->expr()->eq('m.root_id', 'f.fileid')) + ->where($builder->expr()->eq('storage_id', $builder->createPositionalParameter($storageId, IQueryBuilder::PARAM_INT))); + + if ($user) { + $query->andWhere($builder->expr()->eq('user_id', $builder->createPositionalParameter($user))); + } + $result = $query->execute(); + $rows = $result->fetchAll(); + $result->closeCursor(); // filter mounts that are from the same storage but a different directory - $filteredMounts = array_filter($mountsForStorage, function (ICachedMountInfo $mount) use ($internalPath, $fileId) { - if ($fileId === $mount->getRootId()) { + $filteredMounts = array_filter($rows, function (array $row) use ($internalPath, $fileId) { + if ($fileId === (int)$row['root_id']) { return true; } - $internalMountPath = $mount->getRootInternalPath(); + $internalMountPath = isset($row['path']) ? $row['path'] : ''; return $internalMountPath === '' || substr($internalPath, 0, strlen($internalMountPath) + 1) === $internalMountPath . '/'; }); + $filteredMounts = array_filter(array_map([$this, 'dbRowToMountInfo'], $filteredMounts)); return array_map(function (ICachedMountInfo $mount) use ($internalPath) { return new CachedMountFileInfo( $mount->getUser(), diff --git a/lib/private/Files/Config/UserMountCacheListener.php b/lib/private/Files/Config/UserMountCacheListener.php index bacd5728957..eef91a03853 100644 --- a/lib/private/Files/Config/UserMountCacheListener.php +++ b/lib/private/Files/Config/UserMountCacheListener.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Config; use OC\User\Manager; diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index d4cc6ffe4b2..8a8de6e4c19 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -30,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index bf94be273f2..a9b1b87c8e7 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -35,29 +35,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Class for abstraction of filesystem functions - * This class won't call any filesystem functions for itself but will pass them to the correct OC_Filestorage object - * this class should also handle all the file permission related stuff - * - * Hooks provided: - * read(path) - * write(path, &run) - * post_write(path) - * create(path, &run) (when a file is created, both create and write will be emitted in that order) - * post_create(path) - * delete(path, &run) - * post_delete(path) - * rename(oldpath,newpath, &run) - * post_rename(oldpath,newpath) - * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emitted in that order) - * post_rename(oldpath,newpath) - * post_initMountPoints(user, user_dir) - * - * the &run parameter can be set to false to prevent the operation from occurring - */ - namespace OC\Files; use OC\Cache\CappedMemoryCache; @@ -312,7 +289,7 @@ class Filesystem { * get the storage mounted at $mountPoint * * @param string $mountPoint - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null */ public static function getStorage($mountPoint) { if (!self::$mounts) { @@ -800,10 +777,6 @@ class Filesystem { * @return string */ public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false, $keepUnicode = false) { - if (is_null(self::$normalizedPathCache)) { - self::$normalizedPathCache = new CappedMemoryCache(2048); - } - /** * FIXME: This is a workaround for existing classes and files which call * this function with another type than a valid string. This @@ -812,16 +785,20 @@ class Filesystem { */ $path = (string)$path; + if ($path === '') { + return '/'; + } + + if (is_null(self::$normalizedPathCache)) { + self::$normalizedPathCache = new CappedMemoryCache(2048); + } + $cacheKey = json_encode([$path, $stripTrailingSlash, $isAbsolutePath, $keepUnicode]); if ($cacheKey && isset(self::$normalizedPathCache[$cacheKey])) { return self::$normalizedPathCache[$cacheKey]; } - if ($path === '') { - return '/'; - } - //normalize unicode if possible if (!$keepUnicode) { $path = \OC_Util::normalizeUnicode($path); @@ -831,10 +808,10 @@ class Filesystem { $path = '/' . $path; $patterns = [ - '/\\\\/s', // no windows style slashes - '/\/\.(\/\.)?\//s', // remove '/./' - '/\/{2,}/s', // remove sequence of slashes - '/\/\.$/s', // remove trailing /. + '#\\\\#s', // no windows style '\\' slashes + '#/\.(/\.)*/#s', // remove '/./' + '#\//+#s', // remove sequence of slashes + '#/\.$#s', // remove trailing '/.' ]; do { diff --git a/lib/private/Files/Mount/CacheMountProvider.php b/lib/private/Files/Mount/CacheMountProvider.php index 8e632642a75..16ecefb0dac 100644 --- a/lib/private/Files/Mount/CacheMountProvider.php +++ b/lib/private/Files/Mount/CacheMountProvider.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Mount; use OCP\Files\Config\IMountProvider; diff --git a/lib/private/Files/Mount/LocalHomeMountProvider.php b/lib/private/Files/Mount/LocalHomeMountProvider.php index 68c69cc8cdc..c7b2296c4a8 100644 --- a/lib/private/Files/Mount/LocalHomeMountProvider.php +++ b/lib/private/Files/Mount/LocalHomeMountProvider.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Mount; use OCP\Files\Config\IHomeMountProvider; diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php index f3fa77a394c..d9abab8997a 100644 --- a/lib/private/Files/Mount/Manager.php +++ b/lib/private/Files/Mount/Manager.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Mount; use OC\Cache\CappedMemoryCache; diff --git a/lib/private/Files/Mount/MountPoint.php b/lib/private/Files/Mount/MountPoint.php index cbf3785c409..368be0a917e 100644 --- a/lib/private/Files/Mount/MountPoint.php +++ b/lib/private/Files/Mount/MountPoint.php @@ -28,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Mount; use OC\Files\Filesystem; @@ -39,7 +38,7 @@ use OCP\ILogger; class MountPoint implements IMountPoint { /** - * @var \OC\Files\Storage\Storage $storage + * @var \OC\Files\Storage\Storage|null $storage */ protected $storage = null; protected $class; @@ -167,7 +166,7 @@ class MountPoint implements IMountPoint { } /** - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null */ public function getStorage() { if (is_null($this->storage)) { @@ -269,7 +268,13 @@ class MountPoint implements IMountPoint { */ public function getStorageRootId() { if (is_null($this->rootId) || $this->rootId === -1) { - $this->rootId = (int)$this->getStorage()->getCache()->getId(''); + $storage = $this->getStorage(); + // if we can't create the storage return -1 as root id, this is then handled the same as if the root isn't scanned yet + if ($storage === null) { + $this->rootId = -1; + } else { + $this->rootId = (int)$storage->getCache()->getId(''); + } } return $this->rootId; } diff --git a/lib/private/Files/Mount/MoveableMount.php b/lib/private/Files/Mount/MoveableMount.php index 2c9cfc91dad..7ebb7fa2c87 100644 --- a/lib/private/Files/Mount/MoveableMount.php +++ b/lib/private/Files/Mount/MoveableMount.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Mount; /** diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php index 9b243d7f8f2..441f7a2957e 100644 --- a/lib/private/Files/Mount/ObjectHomeMountProvider.php +++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Mount; use OCP\Files\Config\IHomeMountProvider; diff --git a/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php b/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php index 4185c9b86a7..2830e37ded3 100644 --- a/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php +++ b/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Mount; use OC\Files\ObjectStore\AppdataPreviewObjectStoreStorage; diff --git a/lib/private/Files/Node/File.php b/lib/private/Files/Node/File.php index c140c3e977b..e125715e6a8 100644 --- a/lib/private/Files/Node/File.php +++ b/lib/private/Files/Node/File.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OCP\Files\GenericFileException; diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 36c4cbe58bc..400fd6bedcc 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -28,19 +28,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; -use OC\DB\QueryBuilder\Literal; +use OC\Files\Cache\QuerySearchHelper; use OC\Files\Search\SearchBinaryOperator; +use OC\Files\Cache\Wrapper\CacheJail; use OC\Files\Search\SearchComparison; +use OC\Files\Search\SearchOrder; use OC\Files\Search\SearchQuery; -use OC\Files\Storage\Wrapper\Jail; -use OC\Files\Storage\Storage; -use OCA\Files_Sharing\SharedStorage; -use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\Cache\ICacheEntry; -use OCP\Files\Config\ICachedMountInfo; use OCP\Files\FileInfo; use OCP\Files\Mount\IMountPoint; use OCP\Files\NotFoundException; @@ -48,6 +44,7 @@ use OCP\Files\NotPermittedException; use OCP\Files\Search\ISearchBinaryOperator; use OCP\Files\Search\ISearchComparison; use OCP\Files\Search\ISearchOperator; +use OCP\Files\Search\ISearchOrder; use OCP\Files\Search\ISearchQuery; use OCP\IUserManager; @@ -76,7 +73,7 @@ class Folder extends Node implements \OCP\Files\Folder { /** * @param string $path - * @return string + * @return string|null */ public function getRelativePath($path) { if ($this->path === '' or $this->path === '/') { @@ -190,6 +187,9 @@ class Folder extends Node implements \OCP\Files\Folder { * @throws \OCP\Files\NotPermittedException */ public function newFile($path, $content = null) { + if (empty($path)) { + throw new NotPermittedException('Could not create as provided path is empty'); + } if ($this->checkPermissions(\OCP\Constants::PERMISSION_CREATE)) { $fullPath = $this->getFullPath($path); $nonExisting = new NonExistingFile($this->root, $this->view, $fullPath); @@ -231,18 +231,8 @@ class Folder extends Node implements \OCP\Files\Folder { $query = $this->queryFromOperator(new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', '%' . $query . '%')); } - // Limit+offset for queries with ordering - // - // Because we currently can't do ordering between the results from different storages in sql - // The only way to do ordering is requesting the $limit number of entries from all storages - // sorting them and returning the first $limit entries. - // - // For offset we have the same problem, we don't know how many entries from each storage should be skipped - // by a given $offset, so instead we query $offset + $limit from each storage and return entries $offset..($offset+$limit) - // after merging and sorting them. - // - // This is suboptimal but because limit and offset tend to be fairly small in real world use cases it should - // still be significantly better than disabling paging altogether + // search is handled by a single query covering all caches that this folder contains + // this is done by collect $limitToHome = $query->limitToHome(); if ($limitToHome && count(explode('/', $this->path)) !== 3) { @@ -253,60 +243,51 @@ class Folder extends Node implements \OCP\Files\Folder { $mount = $this->root->getMount($this->path); $storage = $mount->getStorage(); $internalPath = $mount->getInternalPath($this->path); - $internalPath = rtrim($internalPath, '/'); - if ($internalPath !== '') { - $internalPath = $internalPath . '/'; - } - - $subQueryLimit = $query->getLimit() > 0 ? $query->getLimit() + $query->getOffset() : 0; - $rootQuery = new SearchQuery( - new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [ - new SearchComparison(ISearchComparison::COMPARE_LIKE, 'path', $internalPath . '%'), - $query->getSearchOperation(), - ] - ), - $subQueryLimit, - 0, - $query->getOrder(), - $query->getUser() - ); - $files = []; + // collect all caches for this folder, indexed by their mountpoint relative to this folder + // and save the mount which is needed later to construct the FileInfo objects - $cache = $storage->getCache(''); - - $results = $cache->searchQuery($rootQuery); - foreach ($results as $result) { - $files[] = $this->cacheEntryToFileInfo($mount, '', $internalPath, $result); + if ($internalPath !== '') { + // a temporary CacheJail is used to handle filtering down the results to within this folder + $caches = ['' => new CacheJail($storage->getCache(''), $internalPath)]; + } else { + $caches = ['' => $storage->getCache('')]; } + $mountByMountPoint = ['' => $mount]; if (!$limitToHome) { $mounts = $this->root->getMountsIn($this->path); foreach ($mounts as $mount) { - $subQuery = new SearchQuery( - $query->getSearchOperation(), - $subQueryLimit, - 0, - $query->getOrder(), - $query->getUser() - ); - $storage = $mount->getStorage(); if ($storage) { - $cache = $storage->getCache(''); - $relativeMountPoint = ltrim(substr($mount->getMountPoint(), $rootLength), '/'); - $results = $cache->searchQuery($subQuery); - foreach ($results as $result) { - $files[] = $this->cacheEntryToFileInfo($mount, $relativeMountPoint, '', $result); - } + $caches[$relativeMountPoint] = $storage->getCache(''); + $mountByMountPoint[$relativeMountPoint] = $mount; } } } + /** @var QuerySearchHelper $searchHelper */ + $searchHelper = \OC::$server->get(QuerySearchHelper::class); + $resultsPerCache = $searchHelper->searchInCaches($query, $caches); + + // loop trough all results per-cache, constructing the FileInfo object from the CacheEntry and merge them all + $files = array_merge(...array_map(function (array $results, $relativeMountPoint) use ($mountByMountPoint) { + $mount = $mountByMountPoint[$relativeMountPoint]; + return array_map(function (ICacheEntry $result) use ($relativeMountPoint, $mount) { + return $this->cacheEntryToFileInfo($mount, $relativeMountPoint, $result); + }, $results); + }, array_values($resultsPerCache), array_keys($resultsPerCache))); + + // don't include this folder in the results + $files = array_filter($files, function (FileInfo $file) { + return $file->getPath() !== $this->getPath(); + }); + + // since results were returned per-cache, they are no longer fully sorted $order = $query->getOrder(); if ($order) { - usort($files, function (FileInfo $a,FileInfo $b) use ($order) { + usort($files, function (FileInfo $a, FileInfo $b) use ($order) { foreach ($order as $orderField) { $cmp = $orderField->sortFileInfo($a, $b); if ($cmp !== 0) { @@ -316,18 +297,17 @@ class Folder extends Node implements \OCP\Files\Folder { return 0; }); } - $files = array_values(array_slice($files, $query->getOffset(), $query->getLimit() > 0 ? $query->getLimit() : null)); return array_map(function (FileInfo $file) { return $this->createNode($file->getPath(), $file); }, $files); } - private function cacheEntryToFileInfo(IMountPoint $mount, string $appendRoot, string $trimRoot, ICacheEntry $cacheEntry): FileInfo { - $trimLength = strlen($trimRoot); + private function cacheEntryToFileInfo(IMountPoint $mount, string $appendRoot, ICacheEntry $cacheEntry): FileInfo { $cacheEntry['internalPath'] = $cacheEntry['path']; - $cacheEntry['path'] = $appendRoot . substr($cacheEntry['path'], $trimLength); - return new \OC\Files\FileInfo($this->path . '/' . $cacheEntry['path'], $mount->getStorage(), $cacheEntry['internalPath'], $cacheEntry, $mount); + $cacheEntry['path'] = $appendRoot . $cacheEntry->getPath(); + $subPath = $cacheEntry['path'] !== '' ? '/' . $cacheEntry['path'] : ''; + return new \OC\Files\FileInfo($this->path . $subPath, $mount->getStorage(), $cacheEntry['internalPath'], $cacheEntry, $mount); } /** @@ -369,17 +349,28 @@ class Folder extends Node implements \OCP\Files\Folder { $user = null; } $mountsContainingFile = $mountCache->getMountsForFileId((int)$id, $user); + + // when a user has access trough the same storage trough multiple paths + // (such as an external storage that is both mounted for a user and shared to the user) + // the mount cache will only hold a single entry for the storage + // this can lead to issues as the different ways the user has access to a storage can have different permissions + // + // so instead of using the cached entries directly, we instead filter the current mounts by the rootid of the cache entry + + $mountRootIds = array_map(function ($mount) { + return $mount->getRootId(); + }, $mountsContainingFile); + $mountRootPaths = array_map(function ($mount) { + return $mount->getRootInternalPath(); + }, $mountsContainingFile); + $mountRoots = array_combine($mountRootIds, $mountRootPaths); + $mounts = $this->root->getMountsIn($this->path); $mounts[] = $this->root->getMount($this->path); - /** @var IMountPoint[] $folderMounts */ - $folderMounts = array_combine(array_map(function (IMountPoint $mountPoint) { - return $mountPoint->getMountPoint(); - }, $mounts), $mounts); - /** @var ICachedMountInfo[] $mountsContainingFile */ - $mountsContainingFile = array_values(array_filter($mountsContainingFile, function (ICachedMountInfo $cachedMountInfo) use ($folderMounts) { - return isset($folderMounts[$cachedMountInfo->getMountPoint()]); - })); + $mountsContainingFile = array_filter($mounts, function ($mount) use ($mountRoots) { + return isset($mountRoots[$mount->getStorageRootId()]); + }); if (count($mountsContainingFile) === 0) { if ($user === $this->getAppDataDirectoryName()) { @@ -388,18 +379,18 @@ class Folder extends Node implements \OCP\Files\Folder { return []; } - $nodes = array_map(function (ICachedMountInfo $cachedMountInfo) use ($folderMounts, $id) { - $mount = $folderMounts[$cachedMountInfo->getMountPoint()]; + $nodes = array_map(function (IMountPoint $mount) use ($id, $mountRoots) { + $rootInternalPath = $mountRoots[$mount->getStorageRootId()]; $cacheEntry = $mount->getStorage()->getCache()->get((int)$id); if (!$cacheEntry) { return null; } // cache jails will hide the "true" internal path - $internalPath = ltrim($cachedMountInfo->getRootInternalPath() . '/' . $cacheEntry->getPath(), '/'); - $pathRelativeToMount = substr($internalPath, strlen($cachedMountInfo->getRootInternalPath())); + $internalPath = ltrim($rootInternalPath . '/' . $cacheEntry->getPath(), '/'); + $pathRelativeToMount = substr($internalPath, strlen($rootInternalPath)); $pathRelativeToMount = ltrim($pathRelativeToMount, '/'); - $absolutePath = rtrim($cachedMountInfo->getMountPoint() . $pathRelativeToMount, '/'); + $absolutePath = rtrim($mount->getMountPoint() . $pathRelativeToMount, '/'); return $this->root->createNode($absolutePath, new \OC\Files\FileInfo( $absolutePath, $mount->getStorage(), $cacheEntry->getPath(), $cacheEntry, $mount, \OC::$server->getUserManager()->get($mount->getStorage()->getOwner($pathRelativeToMount)) @@ -408,9 +399,13 @@ class Folder extends Node implements \OCP\Files\Folder { $nodes = array_filter($nodes); - return array_filter($nodes, function (Node $node) { + $folders = array_filter($nodes, function (Node $node) { return $this->getRelativePath($node->getPath()); }); + usort($folders, function ($a, $b) { + return $b->getPath() <=> $a->getPath(); + }); + return $folders; } protected function getAppDataDirectoryName(): string { @@ -489,158 +484,37 @@ class Folder extends Node implements \OCP\Files\Folder { * @return \OCP\Files\Node[] */ public function getRecent($limit, $offset = 0) { - $mimetypeLoader = \OC::$server->getMimeTypeLoader(); - $mounts = $this->root->getMountsIn($this->path); - $mounts[] = $this->getMountPoint(); - - $mounts = array_filter($mounts, function (IMountPoint $mount) { - return $mount->getStorage(); - }); - $storageIds = array_map(function (IMountPoint $mount) { - return $mount->getStorage()->getCache()->getNumericStorageId(); - }, $mounts); - /** @var IMountPoint[] $mountMap */ - $mountMap = array_combine($storageIds, $mounts); - $folderMimetype = $mimetypeLoader->getId(FileInfo::MIMETYPE_FOLDER); - - /* - * Construct an array of the storage id with their prefix path - * This helps us to filter in the final query - */ - $filters = array_map(function (IMountPoint $mount) { - $storage = $mount->getStorage(); - - $storageId = $storage->getCache()->getNumericStorageId(); - $prefix = ''; - - if ($storage->instanceOfStorage(Jail::class)) { - $prefix = $storage->getUnJailedPath(''); - } - - return [ - 'storageId' => $storageId, - 'pathPrefix' => $prefix, - ]; - }, $mounts); - - // Search in batches of 500 entries - $searchLimit = 500; - $results = []; - $searchResultCount = 0; - $count = 0; - do { - $searchResult = $this->recentSearch($searchLimit, $offset, $folderMimetype, $filters); - - // Exit condition if there are no more results - if (count($searchResult) === 0) { - break; - } - - $searchResultCount += count($searchResult); - - $parseResult = $this->recentParse($searchResult, $mountMap, $mimetypeLoader); - - foreach ($parseResult as $result) { - $results[] = $result; - } - - $offset += $searchLimit; - $count++; - } while (count($results) < $limit && ($searchResultCount < (3 * $limit) || $count < 5)); - - return array_slice($results, 0, $limit); - } - - private function recentSearch($limit, $offset, $folderMimetype, $filters) { - $dbconn = \OC::$server->getDatabaseConnection(); - $builder = $dbconn->getQueryBuilder(); - $query = $builder - ->select('f.*') - ->from('filecache', 'f'); - - /* - * Here is where we construct the filtering. - * Note that this is expensive filtering as it is a lot of like queries. - * However the alternative is we do this filtering and parsing later in php with the risk of looping endlessly - */ - $storageFilters = $builder->expr()->orX(); - foreach ($filters as $filter) { - $storageFilter = $builder->expr()->andX( - $builder->expr()->eq('f.storage', $builder->createNamedParameter($filter['storageId'])) - ); - - if ($filter['pathPrefix'] !== '') { - $storageFilter->add( - $builder->expr()->like('f.path', $builder->createNamedParameter($dbconn->escapeLikeParameter($filter['pathPrefix']) . '/%')) - ); - } - - $storageFilters->add($storageFilter); - } - - $query->andWhere($storageFilters); - - $query->andWhere($builder->expr()->orX( - // handle non empty folders separate - $builder->expr()->neq('f.mimetype', $builder->createNamedParameter($folderMimetype, IQueryBuilder::PARAM_INT)), - $builder->expr()->eq('f.size', new Literal(0)) - )) - ->andWhere($builder->expr()->notLike('f.path', $builder->createNamedParameter('files_versions/%'))) - ->andWhere($builder->expr()->notLike('f.path', $builder->createNamedParameter('files_trashbin/%'))) - ->orderBy('f.mtime', 'DESC') - ->setMaxResults($limit) - ->setFirstResult($offset); - - $result = $query->execute(); - $rows = $result->fetchAll(); - $result->closeCursor(); - - return $rows; - } - - private function recentParse($result, $mountMap, $mimetypeLoader) { - $files = array_filter(array_map(function (array $entry) use ($mountMap, $mimetypeLoader) { - $mount = $mountMap[$entry['storage']]; - $entry['internalPath'] = $entry['path']; - $entry['mimetype'] = $mimetypeLoader->getMimetypeById($entry['mimetype']); - $entry['mimepart'] = $mimetypeLoader->getMimetypeById($entry['mimepart']); - $path = $this->getAbsolutePath($mount, $entry['path']); - if (is_null($path)) { - return null; - } - $fileInfo = new \OC\Files\FileInfo($path, $mount->getStorage(), $entry['internalPath'], $entry, $mount); - return $this->root->createNode($fileInfo->getPath(), $fileInfo); - }, $result)); - - return array_values(array_filter($files, function (Node $node) { - $cacheEntry = $node->getMountPoint()->getStorage()->getCache()->get($node->getId()); - if (!$cacheEntry) { - return false; - } - $relative = $this->getRelativePath($node->getPath()); - return $relative !== null && $relative !== '/' - && ($cacheEntry->getPermissions() & \OCP\Constants::PERMISSION_READ) === \OCP\Constants::PERMISSION_READ; - })); - } - - private function getAbsolutePath(IMountPoint $mount, $path) { - $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OC\Files\Storage\Wrapper\Jail')) { - if ($storage->instanceOfStorage(SharedStorage::class)) { - $storage->getSourceStorage(); - } - /** @var \OC\Files\Storage\Wrapper\Jail $storage */ - $jailRoot = $storage->getUnjailedPath(''); - $rootLength = strlen($jailRoot) + 1; - if ($path === $jailRoot) { - return $mount->getMountPoint(); - } elseif (substr($path, 0, $rootLength) === $jailRoot . '/') { - return $mount->getMountPoint() . substr($path, $rootLength); - } else { - return null; - } - } else { - return $mount->getMountPoint() . $path; - } + $query = new SearchQuery( + new SearchBinaryOperator( + // filter out non empty folders + ISearchBinaryOperator::OPERATOR_OR, + [ + new SearchBinaryOperator( + ISearchBinaryOperator::OPERATOR_NOT, + [ + new SearchComparison( + ISearchComparison::COMPARE_EQUAL, + 'mimetype', + FileInfo::MIMETYPE_FOLDER + ), + ] + ), + new SearchComparison( + ISearchComparison::COMPARE_EQUAL, + 'size', + 0 + ), + ] + ), + $limit, + $offset, + [ + new SearchOrder( + ISearchOrder::DIRECTION_DESCENDING, + 'mtime' + ), + ] + ); + return $this->search($query); } } diff --git a/lib/private/Files/Node/HookConnector.php b/lib/private/Files/Node/HookConnector.php index 2f2641868af..149ffafd46b 100644 --- a/lib/private/Files/Node/HookConnector.php +++ b/lib/private/Files/Node/HookConnector.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OC\Files\Filesystem; diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php index 52dfb3c20a4..55421257886 100644 --- a/lib/private/Files/Node/LazyFolder.php +++ b/lib/private/Files/Node/LazyFolder.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Node; /** diff --git a/lib/private/Files/Node/LazyRoot.php b/lib/private/Files/Node/LazyRoot.php index 899fd130655..c4d61f653e4 100644 --- a/lib/private/Files/Node/LazyRoot.php +++ b/lib/private/Files/Node/LazyRoot.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OCP\Files\IRootFolder; diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php index 4077a7f4d72..b939bfce945 100644 --- a/lib/private/Files/Node/Node.php +++ b/lib/private/Files/Node/Node.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OC\Files\Filesystem; diff --git a/lib/private/Files/Node/NonExistingFile.php b/lib/private/Files/Node/NonExistingFile.php index dc6a6f8c0c0..e1d706006ba 100644 --- a/lib/private/Files/Node/NonExistingFile.php +++ b/lib/private/Files/Node/NonExistingFile.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OCP\Files\NotFoundException; diff --git a/lib/private/Files/Node/NonExistingFolder.php b/lib/private/Files/Node/NonExistingFolder.php index eaf7963eb9b..d99446e8ff8 100644 --- a/lib/private/Files/Node/NonExistingFolder.php +++ b/lib/private/Files/Node/NonExistingFolder.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OCP\Files\NotFoundException; diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php index fba8a24b40f..4a86207f25a 100644 --- a/lib/private/Files/Node/Root.php +++ b/lib/private/Files/Node/Root.php @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Node; use OC\Cache\CappedMemoryCache; @@ -192,7 +191,7 @@ class Root extends Folder implements IRootFolder { * @param string $path * @throws \OCP\Files\NotFoundException * @throws \OCP\Files\NotPermittedException - * @return string + * @return Node */ public function get($path) { $path = $this->normalizePath($path); diff --git a/lib/private/Files/Notify/Change.php b/lib/private/Files/Notify/Change.php index 3cabbec94f0..decb0db96b1 100644 --- a/lib/private/Files/Notify/Change.php +++ b/lib/private/Files/Notify/Change.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Notify; use OCP\Files\Notify\IChange; diff --git a/lib/private/Files/Notify/RenameChange.php b/lib/private/Files/Notify/RenameChange.php index 225e41bc483..e581278c504 100644 --- a/lib/private/Files/Notify/RenameChange.php +++ b/lib/private/Files/Notify/RenameChange.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Notify; use OCP\Files\Notify\IRenameChange; diff --git a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php index bdc41f9ed95..1e10c3ad593 100644 --- a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; class AppdataPreviewObjectStoreStorage extends ObjectStoreStorage { diff --git a/lib/private/Files/ObjectStore/Azure.php b/lib/private/Files/ObjectStore/Azure.php index 2ef13d60c56..553f593b299 100644 --- a/lib/private/Files/ObjectStore/Azure.php +++ b/lib/private/Files/ObjectStore/Azure.php @@ -13,17 +13,17 @@ * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use MicrosoftAzure\Storage\Blob\BlobRestProxy; +use MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions; use MicrosoftAzure\Storage\Common\Exceptions\ServiceException; use OCP\Files\ObjectStore\IObjectStore; @@ -100,13 +100,12 @@ class Azure implements IObjectStore { return $blob->getContentStream(); } - /** - * @param string $urn the unified resource name used to identify the object - * @param resource $stream stream with the data to write - * @throws \Exception when something goes wrong, message will be logged - */ - public function writeObject($urn, $stream) { - $this->getBlobClient()->createBlockBlob($this->containerName, $urn, $stream); + public function writeObject($urn, $stream, string $mimetype = null) { + $options = new CreateBlockBlobOptions(); + if ($mimetype) { + $options->setContentType($mimetype); + } + $this->getBlobClient()->createBlockBlob($this->containerName, $urn, $stream, $options); } /** diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php index 7a95665b10d..afc0ac96abc 100644 --- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\ObjectStore; use OC\User\User; diff --git a/lib/private/Files/ObjectStore/Mapper.php b/lib/private/Files/ObjectStore/Mapper.php index a5186877738..74d65454b12 100644 --- a/lib/private/Files/ObjectStore/Mapper.php +++ b/lib/private/Files/ObjectStore/Mapper.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\ObjectStore; use OCP\IUser; diff --git a/lib/private/Files/ObjectStore/NoopScanner.php b/lib/private/Files/ObjectStore/NoopScanner.php index 9195e7f8d9f..42e212271d5 100644 --- a/lib/private/Files/ObjectStore/NoopScanner.php +++ b/lib/private/Files/ObjectStore/NoopScanner.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\ObjectStore; use OC\Files\Cache\Scanner; diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 5d2cbe61ab6..4050daddb35 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\ObjectStore; use Icewind\Streams\CallbackWrapper; @@ -466,6 +465,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { $stat['mimetype'] = $mimetype; $stat['etag'] = $this->getETag($path); + $stat['checksum'] = ''; $exists = $this->getCache()->inCache($path); $uploadPath = $exists ? $path : $path . '.part'; @@ -486,13 +486,16 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { ]); $size = $writtenSize; }); - $this->objectStore->writeObject($urn, $countStream); + $this->objectStore->writeObject($urn, $countStream, $mimetype); if (is_resource($countStream)) { fclose($countStream); } $stat['size'] = $size; } else { - $this->objectStore->writeObject($urn, $stream); + $this->objectStore->writeObject($urn, $stream, $mimetype); + if (is_resource($stream)) { + fclose($stream); + } } } catch (\Exception $ex) { if (!$exists) { diff --git a/lib/private/Files/ObjectStore/S3.php b/lib/private/Files/ObjectStore/S3.php index 3d1a658eb9f..074f3a1df91 100644 --- a/lib/private/Files/ObjectStore/S3.php +++ b/lib/private/Files/ObjectStore/S3.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use OCP\Files\ObjectStore\IObjectStore; diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index d88ef0ac8e7..c99ebdbcd5c 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -5,6 +5,7 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Florent <florent@coppint.com> + * @author James Letendre <James.Letendre@gmail.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -20,14 +21,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use Aws\ClientResolver; @@ -57,6 +57,9 @@ trait S3ConnectionTrait { /** @var int */ protected $timeout; + /** @var string */ + protected $proxy; + /** @var int */ protected $uploadPartSize; @@ -71,8 +74,9 @@ trait S3ConnectionTrait { $this->test = isset($params['test']); $this->bucket = $params['bucket']; - $this->timeout = !isset($params['timeout']) ? 15 : $params['timeout']; - $this->uploadPartSize = !isset($params['uploadPartSize']) ? 524288000 : $params['uploadPartSize']; + $this->proxy = $params['proxy'] ?? false; + $this->timeout = $params['timeout'] ?? 15; + $this->uploadPartSize = $params['uploadPartSize'] ?? 524288000; $params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region']; $params['hostname'] = empty($params['hostname']) ? 's3.' . $params['region'] . '.amazonaws.com' : $params['hostname']; if (!isset($params['port']) || $params['port'] === '') { @@ -86,6 +90,10 @@ trait S3ConnectionTrait { return $this->bucket; } + public function getProxy() { + return $this->proxy; + } + /** * Returns the connection * @@ -121,9 +129,10 @@ trait S3ConnectionTrait { 'use_path_style_endpoint' => isset($this->params['use_path_style']) ? $this->params['use_path_style'] : false, 'signature_provider' => \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()), 'csm' => false, + 'use_arn_region' => false, ]; - if (isset($this->params['proxy'])) { - $options['request.options'] = ['proxy' => $this->params['proxy']]; + if ($this->getProxy()) { + $options['http'] = [ 'proxy' => $this->getProxy() ]; } if (isset($this->params['legacy_auth']) && $this->params['legacy_auth']) { $options['signature_version'] = 'v2'; diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php index 4d6ac3608df..c88246094ed 100644 --- a/lib/private/Files/ObjectStore/S3ObjectTrait.php +++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php @@ -17,22 +17,22 @@ * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use Aws\S3\Exception\S3MultipartUploadException; use Aws\S3\MultipartUploader; -use Aws\S3\ObjectUploader; use Aws\S3\S3Client; -use Icewind\Streams\CallbackWrapper; +use GuzzleHttp\Psr7\Utils; use OC\Files\Stream\SeekableHttpStream; +use GuzzleHttp\Psr7; +use Psr\Http\Message\StreamInterface; trait S3ObjectTrait { /** @@ -70,39 +70,88 @@ trait S3ObjectTrait { ], ]; + if ($this->getProxy()) { + $opts['http']['proxy'] = $this->getProxy(); + $opts['http']['request_fulluri'] = true; + } + $context = stream_context_create($opts); return fopen($request->getUri(), 'r', false, $context); }); } /** + * Single object put helper + * * @param string $urn the unified resource name used to identify the object - * @param resource $stream stream with the data to write + * @param StreamInterface $stream stream with the data to write + * @param string|null $mimetype the mimetype to set for the remove object @since 22.0.0 * @throws \Exception when something goes wrong, message will be logged - * @since 7.0.0 */ - public function writeObject($urn, $stream) { - $count = 0; - $countStream = CallbackWrapper::wrap($stream, function ($read) use (&$count) { - $count += $read; - }); + protected function writeSingle(string $urn, StreamInterface $stream, string $mimetype = null): void { + $this->getConnection()->putObject([ + 'Bucket' => $this->bucket, + 'Key' => $urn, + 'Body' => $stream, + 'ACL' => 'private', + 'ContentType' => $mimetype, + ]); + } - $uploader = new MultipartUploader($this->getConnection(), $countStream, [ + + /** + * Multipart upload helper that tries to avoid orphaned fragments in S3 + * + * @param string $urn the unified resource name used to identify the object + * @param StreamInterface $stream stream with the data to write + * @param string|null $mimetype the mimetype to set for the remove object + * @throws \Exception when something goes wrong, message will be logged + */ + protected function writeMultiPart(string $urn, StreamInterface $stream, string $mimetype = null): void { + $uploader = new MultipartUploader($this->getConnection(), $stream, [ 'bucket' => $this->bucket, 'key' => $urn, 'part_size' => $this->uploadPartSize, + 'params' => [ + 'ContentType' => $mimetype + ], ]); try { $uploader->upload(); } catch (S3MultipartUploadException $e) { - // This is an empty file so just touch it then - if ($count === 0 && feof($countStream)) { - $uploader = new ObjectUploader($this->getConnection(), $this->bucket, $urn, ''); - $uploader->upload(); - } else { - throw $e; + // if anything goes wrong with multipart, make sure that you don´t poison and + // slow down s3 bucket with orphaned fragments + $uploadInfo = $e->getState()->getId(); + if ($e->getState()->isInitiated() && (array_key_exists('UploadId', $uploadInfo))) { + $this->getConnection()->abortMultipartUpload($uploadInfo); } + throw $e; + } + } + + + /** + * @param string $urn the unified resource name used to identify the object + * @param resource $stream stream with the data to write + * @param string|null $mimetype the mimetype to set for the remove object @since 22.0.0 + * @throws \Exception when something goes wrong, message will be logged + * @since 7.0.0 + */ + public function writeObject($urn, $stream, string $mimetype = null) { + $psrStream = Utils::streamFor($stream); + + // ($psrStream->isSeekable() && $psrStream->getSize() !== null) evaluates to true for a On-Seekable stream + // so the optimisation does not apply + $buffer = new Psr7\Stream(fopen("php://memory", 'rwb+')); + Utils::copyToStream($psrStream, $buffer, MultipartUploader::PART_MIN_SIZE); + $buffer->seek(0); + if ($buffer->getSize() < MultipartUploader::PART_MIN_SIZE) { + // buffer is fully seekable, so use it directly for the small upload + $this->writeSingle($urn, $buffer, $mimetype); + } else { + $loadStream = new Psr7\AppendStream([$buffer, $psrStream]); + $this->writeMultiPart($urn, $loadStream, $mimetype); } } diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php index ab8854849fa..1e5ef697835 100644 --- a/lib/private/Files/ObjectStore/S3Signature.php +++ b/lib/private/Files/ObjectStore/S3Signature.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Robin Appelman <robin@icewind.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> @@ -15,7 +15,7 @@ * * 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 + * 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 @@ -129,7 +129,7 @@ class S3Signature implements SignatureInterface { ) { $modify = [ 'remove_headers' => ['X-Amz-Date'], - 'set_headers' => ['Date' => gmdate(\DateTime::RFC2822)] + 'set_headers' => ['Date' => gmdate(\DateTimeInterface::RFC2822)] ]; // Add the security token header if one is being used by the credentials diff --git a/lib/private/Files/ObjectStore/StorageObjectStore.php b/lib/private/Files/ObjectStore/StorageObjectStore.php index 2076bb3f88b..85926be897e 100644 --- a/lib/private/Files/ObjectStore/StorageObjectStore.php +++ b/lib/private/Files/ObjectStore/StorageObjectStore.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use OCP\Files\ObjectStore\IObjectStore; @@ -65,13 +64,7 @@ class StorageObjectStore implements IObjectStore { throw new \Exception(); } - /** - * @param string $urn the unified resource name used to identify the object - * @param resource $stream stream with the data to write - * @throws \Exception when something goes wrong, message will be logged - * @since 7.0.0 - */ - public function writeObject($urn, $stream) { + public function writeObject($urn, $stream, string $mimetype = null) { $handle = $this->storage->fopen($urn, 'w'); if ($handle) { stream_copy_to_stream($stream, $handle); diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index 1b0888b0700..3607eff5b29 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\ObjectStore; use GuzzleHttp\Client; @@ -74,12 +73,7 @@ class Swift implements IObjectStore { return $this->params['container']; } - /** - * @param string $urn the unified resource name used to identify the object - * @param resource $stream stream with the data to write - * @throws \Exception from openstack lib when something goes wrong - */ - public function writeObject($urn, $stream) { + public function writeObject($urn, $stream, string $mimetype = null) { $tmpFile = \OC::$server->getTempManager()->getTemporaryFile('swiftwrite'); file_put_contents($tmpFile, $stream); $handle = fopen($tmpFile, 'rb'); @@ -88,12 +82,14 @@ class Swift implements IObjectStore { $this->getContainer()->createObject([ 'name' => $urn, 'stream' => stream_for($handle), + 'contentType' => $mimetype, ]); } else { $this->getContainer()->createLargeObject([ 'name' => $urn, 'stream' => stream_for($handle), 'segmentSize' => SWIFT_SEGMENT_SIZE, + 'contentType' => $mimetype, ]); } } diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index 8a4f3fcd905..df4b5a93678 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -23,14 +23,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use GuzzleHttp\Client; diff --git a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php index 635d0908c9a..b1478762550 100644 --- a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php +++ b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\ObjectStore; use OpenStack\Identity\v2\Service; diff --git a/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php b/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php new file mode 100644 index 00000000000..eea4b430578 --- /dev/null +++ b/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php @@ -0,0 +1,58 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Files\Search\QueryOptimizer; + +use OCP\Files\Search\ISearchBinaryOperator; +use OCP\Files\Search\ISearchComparison; +use OCP\Files\Search\ISearchOperator; + +class PathPrefixOptimizer extends QueryOptimizerStep { + public function escapeLikeParameter(string $param): string { + return addcslashes($param, '\\_%'); + } + + public function processOperator(ISearchOperator &$operator) { + // normally the `path = "$prefix"` search query part of the prefix filter would be generated as an `path_hash = md5($prefix)` sql query + // since the `path_hash` sql column usually provides much faster querying that selecting on the `path` sql column + // + // however, since we're already doing a filter on the `path` column in the form of `path LIKE "$prefix/%"` + // generating a `path = "$prefix"` sql query lets the database handle use the same column for both expressions and potentially use the same index + if ($operator instanceof ISearchBinaryOperator && $operator->getType() === ISearchBinaryOperator::OPERATOR_OR && count($operator->getArguments()) == 2) { + $a = $operator->getArguments()[0]; + $b = $operator->getArguments()[1]; + if ($a instanceof ISearchComparison && $b instanceof ISearchComparison && $a->getField() === 'path' && $b->getField() === 'path') { + if ($a->getType() === ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE && $b->getType() === ISearchComparison::COMPARE_EQUAL + && $a->getValue() === $this->escapeLikeParameter($b->getValue()) . '/%') { + $b->setQueryHint(ISearchComparison::HINT_PATH_EQ_HASH, false); + } + if ($b->getType() === ISearchComparison::COMPARE_LIKE_CASE_SENSITIVE && $a->getType() === ISearchComparison::COMPARE_EQUAL + && $b->getValue() === $this->escapeLikeParameter($a->getValue()) . '/%') { + $a->setQueryHint(ISearchComparison::HINT_PATH_EQ_HASH, false); + } + } + } + + parent::processOperator($operator); + } +} diff --git a/lib/private/Files/Search/QueryOptimizer/QueryOptimizer.php b/lib/private/Files/Search/QueryOptimizer/QueryOptimizer.php new file mode 100644 index 00000000000..1635e50335a --- /dev/null +++ b/lib/private/Files/Search/QueryOptimizer/QueryOptimizer.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Files\Search\QueryOptimizer; + +use OCP\Files\Search\ISearchOperator; + +class QueryOptimizer { + /** @var QueryOptimizerStep[] */ + private $steps = []; + + public function __construct( + PathPrefixOptimizer $pathPrefixOptimizer + ) { + $this->steps = [ + $pathPrefixOptimizer + ]; + } + + public function processOperator(ISearchOperator $operator) { + foreach ($this->steps as $step) { + $step->processOperator($operator); + } + } +} diff --git a/lib/private/Files/Search/QueryOptimizer/QueryOptimizerStep.php b/lib/private/Files/Search/QueryOptimizer/QueryOptimizerStep.php new file mode 100644 index 00000000000..4f683899723 --- /dev/null +++ b/lib/private/Files/Search/QueryOptimizer/QueryOptimizerStep.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Files\Search\QueryOptimizer; + +use OCP\Files\Search\ISearchBinaryOperator; +use OCP\Files\Search\ISearchOperator; + +class QueryOptimizerStep { + public function processOperator(ISearchOperator &$operator) { + if ($operator instanceof ISearchBinaryOperator) { + foreach ($operator->getArguments() as $argument) { + $this->processOperator($argument); + } + } + } +} diff --git a/lib/private/Files/Search/SearchBinaryOperator.php b/lib/private/Files/Search/SearchBinaryOperator.php index 523ac0eba33..d7bba8f1b4e 100644 --- a/lib/private/Files/Search/SearchBinaryOperator.php +++ b/lib/private/Files/Search/SearchBinaryOperator.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Search; use OCP\Files\Search\ISearchBinaryOperator; @@ -31,6 +30,7 @@ class SearchBinaryOperator implements ISearchBinaryOperator { private $type; /** @var ISearchOperator[] */ private $arguments; + private $hints = []; /** * SearchBinaryOperator constructor. @@ -56,4 +56,12 @@ class SearchBinaryOperator implements ISearchBinaryOperator { public function getArguments() { return $this->arguments; } + + public function getQueryHint(string $name, $default) { + return $this->hints[$name] ?? $default; + } + + public function setQueryHint(string $name, $value): void { + $this->hints[$name] = $value; + } } diff --git a/lib/private/Files/Search/SearchComparison.php b/lib/private/Files/Search/SearchComparison.php index 32a18810db9..ab5a4d0ed73 100644 --- a/lib/private/Files/Search/SearchComparison.php +++ b/lib/private/Files/Search/SearchComparison.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Search; use OCP\Files\Search\ISearchComparison; @@ -32,6 +31,7 @@ class SearchComparison implements ISearchComparison { private $field; /** @var string|integer|\DateTime */ private $value; + private $hints = []; /** * SearchComparison constructor. @@ -66,4 +66,12 @@ class SearchComparison implements ISearchComparison { public function getValue() { return $this->value; } + + public function getQueryHint(string $name, $default) { + return $this->hints[$name] ?? $default; + } + + public function setQueryHint(string $name, $value): void { + $this->hints[$name] = $value; + } } diff --git a/lib/private/Files/Search/SearchOrder.php b/lib/private/Files/Search/SearchOrder.php index deb73baa4c0..1395a87ac72 100644 --- a/lib/private/Files/Search/SearchOrder.php +++ b/lib/private/Files/Search/SearchOrder.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Search; use OCP\Files\FileInfo; diff --git a/lib/private/Files/Search/SearchQuery.php b/lib/private/Files/Search/SearchQuery.php index 091fe57d21b..7c76bdff978 100644 --- a/lib/private/Files/Search/SearchQuery.php +++ b/lib/private/Files/Search/SearchQuery.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Search; use OCP\Files\Search\ISearchOperator; diff --git a/lib/private/Files/SimpleFS/NewSimpleFile.php b/lib/private/Files/SimpleFS/NewSimpleFile.php index 381948a7440..f805403fd87 100644 --- a/lib/private/Files/SimpleFS/NewSimpleFile.php +++ b/lib/private/Files/SimpleFS/NewSimpleFile.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\SimpleFS; use Icewind\Streams\CallbackWrapper; diff --git a/lib/private/Files/SimpleFS/SimpleFile.php b/lib/private/Files/SimpleFS/SimpleFile.php index 0d3cbc7b743..baf9b24e020 100644 --- a/lib/private/Files/SimpleFS/SimpleFile.php +++ b/lib/private/Files/SimpleFS/SimpleFile.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\SimpleFS; use OCP\Files\File; diff --git a/lib/private/Files/SimpleFS/SimpleFolder.php b/lib/private/Files/SimpleFS/SimpleFolder.php index dc8d6554e72..cd2a712019e 100644 --- a/lib/private/Files/SimpleFS/SimpleFolder.php +++ b/lib/private/Files/SimpleFS/SimpleFolder.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\SimpleFS; use OCP\Files\File; diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index aa2aeee403b..4c07426dd70 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -9,6 +9,7 @@ * @author hkjolhede <hkjolhede@gmail.com> * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> + * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Martin Mattel <martin.mattel@diemattels.at> * @author Michael Gapczynski <GapczynskiM@gmail.com> @@ -39,7 +40,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use OC\Files\Cache\Cache; @@ -153,7 +153,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { public function isDeletable($path) { if ($path === '' || $path === '/') { - return false; + return $this->isUpdatable($path); } $parent = dirname($path); return $this->isUpdatable($parent) && $this->isUpdatable($path); @@ -316,12 +316,12 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { } /** - * check if a file or folder has been updated since $time + * Check if a file or folder has been updated since $time * * The method is only used to check if the cache needs to be updated. Storage backends that don't support checking * the mtime should always return false here. As a result storage implementations that always return false expect * exclusive access to the backend and will not pick up files that have been added in a way that circumvents - * ownClouds filesystem. + * Nextcloud filesystem. * * @param string $path * @param int $time @@ -612,6 +612,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $dh = $sourceStorage->opendir($sourceInternalPath); $result = $this->mkdir($targetInternalPath); if (is_resource($dh)) { + $result = true; while ($result and ($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file)) { $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); diff --git a/lib/private/Files/Storage/CommonTest.php b/lib/private/Files/Storage/CommonTest.php index 43a87f8d704..3800bba2b52 100644 --- a/lib/private/Files/Storage/CommonTest.php +++ b/lib/private/Files/Storage/CommonTest.php @@ -26,11 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * test implementation for \OC\Files\Storage\Common with \OC\Files\Storage\Local - */ - namespace OC\Files\Storage; class CommonTest extends \OC\Files\Storage\Common { diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index 8f09452e1fb..161f346e52f 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -35,7 +35,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use Exception; diff --git a/lib/private/Files/Storage/FailedStorage.php b/lib/private/Files/Storage/FailedStorage.php index bb97fe73875..18a2c9c2bb5 100644 --- a/lib/private/Files/Storage/FailedStorage.php +++ b/lib/private/Files/Storage/FailedStorage.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use OC\Files\Cache\FailedCache; diff --git a/lib/private/Files/Storage/Flysystem.php b/lib/private/Files/Storage/Flysystem.php deleted file mode 100644 index c5105187652..00000000000 --- a/lib/private/Files/Storage/Flysystem.php +++ /dev/null @@ -1,265 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OC\Files\Storage; - -use Icewind\Streams\CallbackWrapper; -use Icewind\Streams\IteratorDirectory; -use League\Flysystem\AdapterInterface; -use League\Flysystem\FileNotFoundException; -use League\Flysystem\Filesystem; -use League\Flysystem\Plugin\GetWithMetadata; - -/** - * Generic adapter between flysystem adapters and owncloud's storage system - * - * To use: subclass and call $this->buildFlysystem with the flysystem adapter of choice - */ -abstract class Flysystem extends Common { - /** - * @var Filesystem - */ - protected $flysystem; - - /** - * @var string - */ - protected $root = ''; - - /** - * Initialize the storage backend with a flyssytem adapter - * - * @param \League\Flysystem\AdapterInterface $adapter - */ - protected function buildFlySystem(AdapterInterface $adapter) { - $this->flysystem = new Filesystem($adapter); - $this->flysystem->addPlugin(new GetWithMetadata()); - } - - protected function buildPath($path) { - $fullPath = \OC\Files\Filesystem::normalizePath($this->root . '/' . $path); - return ltrim($fullPath, '/'); - } - - /** - * {@inheritdoc} - */ - public function file_get_contents($path) { - return $this->flysystem->read($this->buildPath($path)); - } - - /** - * {@inheritdoc} - */ - public function file_put_contents($path, $data) { - $result = $this->flysystem->put($this->buildPath($path), $data); - if ($result === true) { - return strlen($data); - } - return $result; - } - - /** - * {@inheritdoc} - */ - public function file_exists($path) { - return $this->flysystem->has($this->buildPath($path)); - } - - /** - * {@inheritdoc} - */ - public function unlink($path) { - if ($this->is_dir($path)) { - return $this->rmdir($path); - } - try { - return $this->flysystem->delete($this->buildPath($path)); - } catch (FileNotFoundException $e) { - return false; - } - } - - /** - * {@inheritdoc} - */ - public function rename($source, $target) { - if ($this->file_exists($target)) { - $this->unlink($target); - } - return $this->flysystem->rename($this->buildPath($source), $this->buildPath($target)); - } - - /** - * {@inheritdoc} - */ - public function copy($source, $target) { - if ($this->file_exists($target)) { - $this->unlink($target); - } - return $this->flysystem->copy($this->buildPath($source), $this->buildPath($target)); - } - - /** - * {@inheritdoc} - */ - public function filesize($path) { - if ($this->is_dir($path)) { - return 0; - } else { - return $this->flysystem->getSize($this->buildPath($path)); - } - } - - /** - * {@inheritdoc} - */ - public function mkdir($path) { - if ($this->file_exists($path)) { - return false; - } - return $this->flysystem->createDir($this->buildPath($path)); - } - - /** - * {@inheritdoc} - */ - public function filemtime($path) { - return $this->flysystem->getTimestamp($this->buildPath($path)); - } - - /** - * {@inheritdoc} - */ - public function rmdir($path) { - try { - return @$this->flysystem->deleteDir($this->buildPath($path)); - } catch (FileNotFoundException $e) { - return false; - } - } - - /** - * {@inheritdoc} - */ - public function opendir($path) { - try { - $content = $this->flysystem->listContents($this->buildPath($path)); - } catch (FileNotFoundException $e) { - return false; - } - $names = array_map(function ($object) { - return $object['basename']; - }, $content); - return IteratorDirectory::wrap($names); - } - - /** - * {@inheritdoc} - */ - public function fopen($path, $mode) { - $fullPath = $this->buildPath($path); - $useExisting = true; - switch ($mode) { - case 'r': - case 'rb': - try { - return $this->flysystem->readStream($fullPath); - } catch (FileNotFoundException $e) { - return false; - } - case 'w': - case 'w+': - case 'wb': - case 'wb+': - $useExisting = false; - // no break - case 'a': - case 'ab': - case 'r+': - case 'a+': - case 'x': - case 'x+': - case 'c': - case 'c+': - //emulate these - if ($useExisting and $this->file_exists($path)) { - if (!$this->isUpdatable($path)) { - return false; - } - $tmpFile = $this->getCachedFile($path); - } else { - if (!$this->isCreatable(dirname($path))) { - return false; - } - $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); - } - $source = fopen($tmpFile, $mode); - return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) { - $this->flysystem->putStream($fullPath, fopen($tmpFile, 'r')); - unlink($tmpFile); - }); - } - return false; - } - - /** - * {@inheritdoc} - */ - public function touch($path, $mtime = null) { - if ($this->file_exists($path)) { - return false; - } else { - $this->file_put_contents($path, ''); - return true; - } - } - - /** - * {@inheritdoc} - */ - public function stat($path) { - $info = $this->flysystem->getWithMetadata($this->buildPath($path), ['timestamp', 'size']); - return [ - 'mtime' => $info['timestamp'], - 'size' => $info['size'] - ]; - } - - /** - * {@inheritdoc} - */ - public function filetype($path) { - if ($path === '' or $path === '/' or $path === '.') { - return 'dir'; - } - try { - $info = $this->flysystem->getMetadata($this->buildPath($path)); - } catch (FileNotFoundException $e) { - return false; - } - return $info['type']; - } -} diff --git a/lib/private/Files/Storage/Home.php b/lib/private/Files/Storage/Home.php index 5c35c93bfc8..5427bc425c2 100644 --- a/lib/private/Files/Storage/Home.php +++ b/lib/private/Files/Storage/Home.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use OC\Files\Cache\HomePropagator; diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 944b0b69959..13f1a6f2ec4 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -11,6 +11,7 @@ * @author J0WI <J0WI@users.noreply.github.com> * @author Jakob Sack <mail@jakobsack.de> * @author Joas Schilling <coding@schilljs.com> + * @author Johannes Leuker <j.leuker@hosting.de> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Klaas Freitag <freitag@owncloud.com> * @author Lukas Reschke <lukas@statuscode.ch> @@ -39,7 +40,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use OC\Files\Filesystem; @@ -87,8 +87,9 @@ class Local extends \OC\Files\Storage\Common { public function mkdir($path) { $sourcePath = $this->getSourcePath($path); + $oldMask = umask(022); $result = @mkdir($sourcePath, 0777, true); - chmod($sourcePath, 0755); + umask($oldMask); return $result; } @@ -168,7 +169,7 @@ class Local extends \OC\Files\Storage\Common { $permissions = Constants::PERMISSION_SHARE; $statPermissions = $stat['mode']; - $isDir = ($statPermissions & 0x4000) === 0x4000; + $isDir = ($statPermissions & 0x4000) === 0x4000 && !($statPermissions & 0x8000); if ($statPermissions & 0x0100) { $permissions += Constants::PERMISSION_READ; } @@ -215,7 +216,7 @@ class Local extends \OC\Files\Storage\Common { } public function filesize($path) { - if ($this->is_dir($path)) { + if (!$this->is_file($path)) { return 0; } $fullPath = $this->getSourcePath($path); @@ -258,11 +259,13 @@ class Local extends \OC\Files\Storage\Common { if ($this->file_exists($path) and !$this->isUpdatable($path)) { return false; } + $oldMask = umask(022); if (!is_null($mtime)) { $result = @touch($this->getSourcePath($path), $mtime); } else { $result = @touch($this->getSourcePath($path)); } + umask($oldMask); if ($result) { clearstatcache(true, $this->getSourcePath($path)); } @@ -275,7 +278,10 @@ class Local extends \OC\Files\Storage\Common { } public function file_put_contents($path, $data) { - return file_put_contents($this->getSourcePath($path), $data); + $oldMask = umask(022); + $result = file_put_contents($this->getSourcePath($path), $data); + umask($oldMask); + return $result; } public function unlink($path) { @@ -288,16 +294,14 @@ class Local extends \OC\Files\Storage\Common { } } - private function treeContainsBlacklistedFile(string $path): bool { + private function checkTreeForForbiddenItems(string $path) { $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); foreach ($iterator as $file) { /** @var \SplFileInfo $file */ if (Filesystem::isFileBlacklisted($file->getBasename())) { - return true; + throw new ForbiddenException('Invalid path: ' . $file->getPathname(), false); } } - - return false; } public function rename($path1, $path2) { @@ -337,9 +341,7 @@ class Local extends \OC\Files\Storage\Common { return $result; } - if ($this->treeContainsBlacklistedFile($this->getSourcePath($path1))) { - throw new ForbiddenException('Invalid path', false); - } + $this->checkTreeForForbiddenItems($this->getSourcePath($path1)); } return rename($this->getSourcePath($path1), $this->getSourcePath($path2)); @@ -349,12 +351,18 @@ class Local extends \OC\Files\Storage\Common { if ($this->is_dir($path1)) { return parent::copy($path1, $path2); } else { - return copy($this->getSourcePath($path1), $this->getSourcePath($path2)); + $oldMask = umask(022); + $result = copy($this->getSourcePath($path1), $this->getSourcePath($path2)); + umask($oldMask); + return $result; } } public function fopen($path, $mode) { - return fopen($this->getSourcePath($path), $mode); + $oldMask = umask(022); + $result = fopen($this->getSourcePath($path), $mode); + umask($oldMask); + return $result; } public function hash($type, $path, $raw = false) { @@ -437,7 +445,7 @@ class Local extends \OC\Files\Storage\Common { */ public function getSourcePath($path) { if (Filesystem::isFileBlacklisted($path)) { - throw new ForbiddenException('Invalid path', false); + throw new ForbiddenException('Invalid path: ' . $path, false); } $fullPath = $this->datadir . $path; @@ -484,7 +492,7 @@ class Local extends \OC\Files\Storage\Common { } private function calculateEtag(string $path, array $stat): string { - if ($stat['mode'] & 0x4000) { // is_dir + if ($stat['mode'] & 0x4000 && !($stat['mode'] & 0x8000)) { // is_dir & not socket return parent::getETag($path); } else { if ($stat === false) { @@ -517,7 +525,10 @@ class Local extends \OC\Files\Storage\Common { * @return bool */ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) { - if ($sourceStorage->instanceOfStorage(Local::class)) { + // Don't treat ACLStorageWrapper like local storage where copy can be done directly. + // Instead use the slower recursive copying in php from Common::copyFromStorage with + // more permissions checks. + if ($sourceStorage->instanceOfStorage(Local::class) && !$sourceStorage->instanceOfStorage('OCA\GroupFolders\ACL\ACLStorageWrapper')) { if ($sourceStorage->instanceOfStorage(Jail::class)) { /** * @var \OC\Files\Storage\Wrapper\Jail $sourceStorage @@ -560,8 +571,11 @@ class Local extends \OC\Files\Storage\Common { public function writeStream(string $path, $stream, int $size = null): int { $result = $this->file_put_contents($path, $stream); + if (is_resource($stream)) { + fclose($stream); + } if ($result === false) { - throw new GenericFileException("Failed write steam to $path"); + throw new GenericFileException("Failed write stream to $path"); } else { return $result; } diff --git a/lib/private/Files/Storage/LocalRootStorage.php b/lib/private/Files/Storage/LocalRootStorage.php index 6f954212484..71584afef08 100644 --- a/lib/private/Files/Storage/LocalRootStorage.php +++ b/lib/private/Files/Storage/LocalRootStorage.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Storage; use OC\Files\Cache\LocalRootScanner; diff --git a/lib/private/Files/Storage/LocalTempFileTrait.php b/lib/private/Files/Storage/LocalTempFileTrait.php index 0a3785d92dd..2a1338148f5 100644 --- a/lib/private/Files/Storage/LocalTempFileTrait.php +++ b/lib/private/Files/Storage/LocalTempFileTrait.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; /** diff --git a/lib/private/Files/Storage/PolyFill/CopyDirectory.php b/lib/private/Files/Storage/PolyFill/CopyDirectory.php index 6a12089c70a..7fd418f6dca 100644 --- a/lib/private/Files/Storage/PolyFill/CopyDirectory.php +++ b/lib/private/Files/Storage/PolyFill/CopyDirectory.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\PolyFill; trait CopyDirectory { @@ -65,15 +64,15 @@ trait CopyDirectory { */ abstract public function mkdir($path); - public function copy($source, $target) { - if ($this->is_dir($source)) { - if ($this->file_exists($target)) { - $this->unlink($target); + public function copy($path1, $path2) { + if ($this->is_dir($path1)) { + if ($this->file_exists($path2)) { + $this->unlink($path2); } - $this->mkdir($target); - return $this->copyRecursive($source, $target); + $this->mkdir($path2); + return $this->copyRecursive($path1, $path2); } else { - return parent::copy($source, $target); + return parent::copy($path1, $path2); } } diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php index 94f1ee62430..cc317de2669 100644 --- a/lib/private/Files/Storage/Storage.php +++ b/lib/private/Files/Storage/Storage.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use OCP\Lock\ILockingProvider; diff --git a/lib/private/Files/Storage/StorageFactory.php b/lib/private/Files/Storage/StorageFactory.php index 2e7dd732edd..cab739c4a81 100644 --- a/lib/private/Files/Storage/StorageFactory.php +++ b/lib/private/Files/Storage/StorageFactory.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; use OCP\Files\Mount\IMountPoint; diff --git a/lib/private/Files/Storage/Temporary.php b/lib/private/Files/Storage/Temporary.php index 686600e5d21..393a37f834a 100644 --- a/lib/private/Files/Storage/Temporary.php +++ b/lib/private/Files/Storage/Temporary.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage; /** diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php index 61814a0d087..b6d1ba2178b 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OCP\Files\Storage\IStorage; diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index e2b486546af..ac27697e68c 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -5,6 +5,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author J0WI <J0WI@users.noreply.github.com> * @author Lukas Reschke <lukas@statuscode.ch> + * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> @@ -25,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OC\Cache\CappedMemoryCache; diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index a7a915afad9..e44b7afe6fd 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -7,6 +7,7 @@ * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author J0WI <J0WI@users.noreply.github.com> + * @author jknockaert <jasper@knockaert.nl> * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -32,7 +33,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; @@ -925,21 +925,20 @@ class Encryption extends Wrapper { $path = $realFile; } - $firstBlock = $this->readFirstBlock($path); - $result = $this->parseRawHeader($firstBlock); + $result = []; - // if the header doesn't contain a encryption module we check if it is a - // legacy file. If true, we add the default encryption module - if (!isset($result[Util::HEADER_ENCRYPTION_MODULE_KEY])) { - if (!empty($result)) { + // first check if it is an encrypted file at all + // We would do query to filecache only if we know that entry in filecache exists + + $info = $this->getCache()->get($path); + if (isset($info['encrypted']) && $info['encrypted'] === true) { + $firstBlock = $this->readFirstBlock($path); + $result = $this->parseRawHeader($firstBlock); + + // if the header doesn't contain a encryption module we check if it is a + // legacy file. If true, we add the default encryption module + if (!isset($result[Util::HEADER_ENCRYPTION_MODULE_KEY]) && (!empty($result) || $exists)) { $result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE'; - } elseif ($exists) { - // if the header was empty we have to check first if it is a encrypted file at all - // We would do query to filecache only if we know that entry in filecache exists - $info = $this->getCache()->get($path); - if (isset($info['encrypted']) && $info['encrypted'] === true) { - $result[Util::HEADER_ENCRYPTION_MODULE_KEY] = 'OC_DEFAULT_MODULE'; - } } } @@ -1034,6 +1033,7 @@ class Encryption extends Wrapper { // always fall back to fopen $target = $this->fopen($path, 'w'); [$count, $result] = \OC_Helper::streamCopy($stream, $target); + fclose($stream); fclose($target); return $count; } diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index aa6cbf7e40c..65ee6f1181a 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OC\Files\Cache\Wrapper\CacheJail; diff --git a/lib/private/Files/Storage/Wrapper/PermissionsMask.php b/lib/private/Files/Storage/Wrapper/PermissionsMask.php index 9c2d123b7bf..e54d3bb721a 100644 --- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php +++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OC\Files\Cache\Wrapper\CachePermissionsMask; diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php index d631dae7747..4cd0a5e0b4a 100644 --- a/lib/private/Files/Storage/Wrapper/Quota.php +++ b/lib/private/Files/Storage/Wrapper/Quota.php @@ -4,7 +4,7 @@ * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author J0WI <J0WI@users.noreply.github.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> @@ -30,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OC\Files\Filesystem; diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index d45d5e9f9f0..5faffece67e 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Storage\Wrapper; use OCP\Files\InvalidPathException; diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index 16d2ca3ce97..e1233e76b93 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Stream; use Icewind\Streams\Wrapper; @@ -213,7 +212,7 @@ class Encryption extends Wrapper { } else { $wrapped = fopen($protocol . '://', $mode, false, $context); } - } catch (\BadMethodCallException $e) { + } catch (\Exception $e) { stream_wrapper_unregister($protocol); throw $e; } @@ -524,7 +523,7 @@ class Encryption extends Wrapper { /** * write header at beginning of encrypted file * - * @return integer + * @return int|false * @throws EncryptionHeaderKeyExistsException if header key is already in use */ protected function writeHeader() { diff --git a/lib/private/Files/Stream/HashWrapper.php b/lib/private/Files/Stream/HashWrapper.php index 059dd117555..fd9bb3cdd0b 100644 --- a/lib/private/Files/Stream/HashWrapper.php +++ b/lib/private/Files/Stream/HashWrapper.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Files\Stream; use Icewind\Streams\Wrapper; diff --git a/lib/private/Files/Stream/Quota.php b/lib/private/Files/Stream/Quota.php index f5db662a0ae..1549d95eba8 100644 --- a/lib/private/Files/Stream/Quota.php +++ b/lib/private/Files/Stream/Quota.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Stream; use Icewind\Streams\Wrapper; diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php index efbfd293ad5..af797c7720d 100644 --- a/lib/private/Files/Stream/SeekableHttpStream.php +++ b/lib/private/Files/Stream/SeekableHttpStream.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Files\Stream; use Icewind\Streams\File; @@ -77,6 +76,8 @@ class SeekableHttpStream implements File { private $current; /** @var int */ private $offset = 0; + /** @var int */ + private $length = 0; private function reconnect(int $start) { $range = $start . '-'; @@ -102,12 +103,14 @@ class SeekableHttpStream implements File { $content = trim(explode(':', $contentRange)[1]); $range = trim(explode(' ', $content)[1]); $begin = intval(explode('-', $range)[0]); + $length = intval(explode('/', $range)[1]); if ($begin !== $start) { return false; } $this->offset = $begin; + $this->length = $length; return true; } @@ -141,7 +144,12 @@ class SeekableHttpStream implements File { } return $this->reconnect($this->offset + $offset); case SEEK_END: - return false; + if ($this->length === 0) { + return false; + } elseif ($this->length + $offset === $this->offset) { + return true; + } + return $this->reconnect($this->length + $offset); } return false; } diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php index 33d42bc9c42..dde224e5ead 100644 --- a/lib/private/Files/Template/TemplateManager.php +++ b/lib/private/Files/Template/TemplateManager.php @@ -1,7 +1,12 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net> * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -20,10 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -declare(strict_types=1); - - namespace OC\Files\Template; use OC\AppFramework\Bootstrap\Coordinator; @@ -36,7 +37,6 @@ use OCP\Files\GenericFileException; use OCP\Files\IRootFolder; use OCP\Files\Node; use OCP\Files\NotFoundException; -use OCP\Files\NotPermittedException; use OCP\Files\Template\FileCreatedFromTemplateEvent; use OCP\Files\Template\ICustomTemplateProvider; use OCP\Files\Template\ITemplateManager; @@ -155,7 +155,12 @@ class TemplateManager implements ITemplateManager { } catch (NotFoundException $e) { } try { - $targetFile = $userFolder->newFile($filePath); + if (!$userFolder->nodeExists(dirname($filePath))) { + throw new GenericFileException($this->l10n->t('Invalid path')); + } + $folder = $userFolder->get(dirname($filePath)); + $targetFile = $folder->newFile(basename($filePath)); + $template = null; if ($templateType === 'user' && $templateId !== '') { $template = $userFolder->get($templateId); $template->copy($targetFile->getPath()); @@ -296,9 +301,10 @@ class TemplateManager implements ITemplateManager { } try { - $folder = $userFolder->newFolder($userTemplatePath); - } catch (NotPermittedException $e) { $folder = $userFolder->get($userTemplatePath); + } catch (NotFoundException $e) { + $folder = $userFolder->get(dirname($userTemplatePath)); + $folder = $folder->newFolder(basename($userTemplatePath)); } $folderIsEmpty = count($folder->getDirectoryListing()) === 0; diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php index 247f6005e57..bd2bfb5f939 100644 --- a/lib/private/Files/Type/Detection.php +++ b/lib/private/Files/Type/Detection.php @@ -39,7 +39,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Type; use OCP\Files\IMimeTypeDetector; diff --git a/lib/private/Files/Type/Loader.php b/lib/private/Files/Type/Loader.php index 489ed65c228..8193a3f7b03 100644 --- a/lib/private/Files/Type/Loader.php +++ b/lib/private/Files/Type/Loader.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Type; use OCP\Files\IMimeTypeLoader; diff --git a/lib/private/Files/Type/TemplateManager.php b/lib/private/Files/Type/TemplateManager.php index 5cd6b61f823..6210edaaf05 100644 --- a/lib/private/Files/Type/TemplateManager.php +++ b/lib/private/Files/Type/TemplateManager.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Type; /** diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index 5509a49941b..72a7084f40d 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files\Utils; use OC\Files\Cache\Cache; diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 2223858b7a9..113290e2686 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -44,7 +44,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Files; use Icewind\Streams\CallbackWrapper; @@ -422,7 +421,9 @@ class View { */ public function readfile($path) { $this->assertPathLength($path); - @ob_end_clean(); + if (ob_get_level()) { + ob_end_clean(); + } $handle = $this->fopen($path, 'rb'); if ($handle) { $chunkSize = 524288; // 512 kB chunks @@ -446,7 +447,9 @@ class View { */ public function readfilePart($path, $from, $to) { $this->assertPathLength($path); - @ob_end_clean(); + if (ob_get_level()) { + ob_end_clean(); + } $handle = $this->fopen($path, 'rb'); if ($handle) { $chunkSize = 524288; // 512 kB chunks @@ -2171,7 +2174,7 @@ class View { throw new NotFoundException($this->getAbsolutePath($filename) . ' not found'); } $uid = $info->getOwner()->getUID(); - if ($uid != \OCP\User::getUser()) { + if ($uid != \OC_User::getUser()) { Filesystem::initMountPoints($uid); $ownerView = new View('/' . $uid . '/files'); try { diff --git a/lib/private/ForbiddenException.php b/lib/private/ForbiddenException.php index 8a00b78291a..8cc9a698253 100644 --- a/lib/private/ForbiddenException.php +++ b/lib/private/ForbiddenException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; /** diff --git a/lib/private/FullTextSearch/FullTextSearchManager.php b/lib/private/FullTextSearch/FullTextSearchManager.php index 119c97fa95b..6265c6dc94d 100644 --- a/lib/private/FullTextSearch/FullTextSearchManager.php +++ b/lib/private/FullTextSearch/FullTextSearchManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\FullTextSearch; use OCP\FullTextSearch\Exceptions\FullTextSearchAppNotAvailableException; diff --git a/lib/private/FullTextSearch/Model/DocumentAccess.php b/lib/private/FullTextSearch/Model/DocumentAccess.php index d4c7a06d079..3fe08dfcc08 100644 --- a/lib/private/FullTextSearch/Model/DocumentAccess.php +++ b/lib/private/FullTextSearch/Model/DocumentAccess.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\FullTextSearch\Model; use JsonSerializable; diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php index 252aa66395a..a1648ab6e2a 100644 --- a/lib/private/FullTextSearch/Model/IndexDocument.php +++ b/lib/private/FullTextSearch/Model/IndexDocument.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\FullTextSearch\Model; use JsonSerializable; @@ -722,7 +721,7 @@ class IndexDocument implements IIndexDocument, JsonSerializable { * @param string $excerpt * @return string */ - final private function cleanExcerpt(string $excerpt): string { + private function cleanExcerpt(string $excerpt): string { $excerpt = str_replace("\\n", ' ', $excerpt); $excerpt = str_replace("\\r", ' ', $excerpt); $excerpt = str_replace("\\t", ' ', $excerpt); diff --git a/lib/private/FullTextSearch/Model/SearchOption.php b/lib/private/FullTextSearch/Model/SearchOption.php index 1ff3fbba272..c4c63a801a3 100644 --- a/lib/private/FullTextSearch/Model/SearchOption.php +++ b/lib/private/FullTextSearch/Model/SearchOption.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\FullTextSearch\Model; use JsonSerializable; diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php index f6241938f82..9c9ac71efa9 100644 --- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php +++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\FullTextSearch\Model; use JsonSerializable; diff --git a/lib/private/FullTextSearch/Model/SearchTemplate.php b/lib/private/FullTextSearch/Model/SearchTemplate.php index 4940e57c281..eb1ab8ead84 100644 --- a/lib/private/FullTextSearch/Model/SearchTemplate.php +++ b/lib/private/FullTextSearch/Model/SearchTemplate.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\FullTextSearch\Model; use JsonSerializable; diff --git a/lib/private/GlobalScale/Config.php b/lib/private/GlobalScale/Config.php index d4bde44a5fa..71bcbbc4a1e 100644 --- a/lib/private/GlobalScale/Config.php +++ b/lib/private/GlobalScale/Config.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\GlobalScale; use OCP\IConfig; diff --git a/lib/private/Group/Backend.php b/lib/private/Group/Backend.php index e041254bd5a..037cdacf445 100644 --- a/lib/private/Group/Backend.php +++ b/lib/private/Group/Backend.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Group; /** diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 29fcb503b10..7b7ee41def9 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -4,10 +4,13 @@ * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author Johannes Leuker <j.leuker@hosting.de> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Loki3000 <github@labcms.ru> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author tgrant <tom.grant760@gmail.com> + * @author Tom Grant <TomG736@users.noreply.github.com> * * @license AGPL-3.0 * @@ -24,23 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -/* - * - * The following SQL statement is just a help for developers and will not be - * executed! - * - * CREATE TABLE `groups` ( - * `gid` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - * PRIMARY KEY (`gid`) - * ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - * - * CREATE TABLE `group_user` ( - * `gid` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - * `uid` varchar(64) COLLATE utf8_unicode_ci NOT NULL - * ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - * - */ - namespace OC\Group; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; @@ -458,7 +444,11 @@ class Database extends ABackend implements public function getDisplayName(string $gid): string { if (isset($this->groupCache[$gid])) { - return $this->groupCache[$gid]['displayname']; + $displayName = $this->groupCache[$gid]['displayname']; + + if (isset($displayName) && trim($displayName) !== '') { + return $displayName; + } } $this->fixDI(); diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php index bb9a65de012..9a9996f7f60 100644 --- a/lib/private/Group/Group.php +++ b/lib/private/Group/Group.php @@ -6,7 +6,8 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author Johannes Leuker <j.leuker@hosting.de> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -29,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Group; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php index 145b3631206..e1bd009e79c 100644 --- a/lib/private/Group/Manager.php +++ b/lib/private/Group/Manager.php @@ -7,7 +7,7 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Knut Ahlers <knut@ahlers.me> * @author Lukas Reschke <lukas@statuscode.ch> @@ -37,7 +37,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Group; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php index 5449cdbe29a..fb10caa86ea 100644 --- a/lib/private/Group/MetaData.php +++ b/lib/private/Group/MetaData.php @@ -6,9 +6,8 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Stephan Peijnik <speijnik@anexia-it.com> * @author Thomas Müller <thomas.mueller@tmit.eu> @@ -28,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Group; use OC\Group\Manager as GroupManager; diff --git a/lib/private/HintException.php b/lib/private/HintException.php index acb8df414a3..735832266cf 100644 --- a/lib/private/HintException.php +++ b/lib/private/HintException.php @@ -1,27 +1,25 @@ <?php + +declare(strict_types=1); /** - * @copyright Copyright (c) 2016, ownCloud, Inc. + * @copyright Copyright (c) 2021 Gary Kim <gary@garykim.dev> * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * @author Bart Visscher <bartv@thisnet.nl> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Michael Gapczynski <GapczynskiM@gmail.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Thomas Müller <thomas.mueller@tmit.eu> + * @author Gary Kim <gary@garykim.dev> * - * @license AGPL-3.0 + * @license GNU AGPL version 3 or any later version * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. + * 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 + * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> + * 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/>. * */ @@ -33,48 +31,7 @@ namespace OC; * An Exception class with the intention to be presented to the end user * * @package OC + * @depreacted 23.0.0 Use \OCP\HintException */ -class HintException extends \Exception { - private $hint; - - /** - * HintException constructor. - * - * @param string $message The error message. It will be not revealed to the - * the user (unless the hint is empty) and thus - * should be not translated. - * @param string $hint A useful message that is presented to the end - * user. It should be translated, but must not - * contain sensitive data. - * @param int $code - * @param \Exception|null $previous - */ - public function __construct($message, $hint = '', $code = 0, \Exception $previous = null) { - $this->hint = $hint; - parent::__construct($message, $code, $previous); - } - - /** - * Returns a string representation of this Exception that includes the error - * code, the message and the hint. - * - * @return string - */ - public function __toString() { - return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n"; - } - - /** - * Returns the hint with the intention to be presented to the end user. If - * an empty hint was specified upon instatiation, the message is returned - * instead. - * - * @return string - */ - public function getHint() { - if (empty($this->hint)) { - return $this->message; - } - return $this->hint; - } +class HintException extends \OCP\HintException { } diff --git a/lib/private/Hooks/BasicEmitter.php b/lib/private/Hooks/BasicEmitter.php index ce15dcb3db2..61b5184a804 100644 --- a/lib/private/Hooks/BasicEmitter.php +++ b/lib/private/Hooks/BasicEmitter.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -21,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Hooks; /** diff --git a/lib/private/Hooks/Emitter.php b/lib/private/Hooks/Emitter.php index 4240cef520b..bc5af2b60a2 100644 --- a/lib/private/Hooks/Emitter.php +++ b/lib/private/Hooks/Emitter.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Hooks; /** diff --git a/lib/private/Hooks/EmitterTrait.php b/lib/private/Hooks/EmitterTrait.php index 1cbfe0f5a06..de012cca044 100644 --- a/lib/private/Hooks/EmitterTrait.php +++ b/lib/private/Hooks/EmitterTrait.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Hooks; /** diff --git a/lib/private/Hooks/PublicEmitter.php b/lib/private/Hooks/PublicEmitter.php index e698b322180..b72b12dbbbf 100644 --- a/lib/private/Hooks/PublicEmitter.php +++ b/lib/private/Hooks/PublicEmitter.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Hooks; /** diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index 12d1efb45a2..55a44eb41ba 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -31,14 +31,12 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Http\Client; use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\RequestOptions; use OCP\Http\Client\IClient; use OCP\Http\Client\IResponse; -use OCP\Http\Client\LocalServerException; use OCP\ICertificateManager; use OCP\IConfig; use OCP\ILogger; @@ -57,17 +55,21 @@ class Client implements IClient { private $logger; /** @var ICertificateManager */ private $certificateManager; + /** @var LocalAddressChecker */ + private $localAddressChecker; public function __construct( IConfig $config, ILogger $logger, ICertificateManager $certificateManager, - GuzzleClient $client + GuzzleClient $client, + LocalAddressChecker $localAddressChecker ) { $this->config = $config; $this->logger = $logger; $this->client = $client; $this->certificateManager = $certificateManager; + $this->localAddressChecker = $localAddressChecker; } private function buildRequestOptions(array $options): array { @@ -78,6 +80,21 @@ class Client implements IClient { RequestOptions::TIMEOUT => 30, ]; + $options['nextcloud']['allow_local_address'] = $this->isLocalAddressAllowed($options); + if ($options['nextcloud']['allow_local_address'] === false) { + $onRedirectFunction = function ( + \Psr\Http\Message\RequestInterface $request, + \Psr\Http\Message\ResponseInterface $response, + \Psr\Http\Message\UriInterface $uri + ) use ($options) { + $this->preventLocalAddress($uri->__toString(), $options); + }; + + $defaults[RequestOptions::ALLOW_REDIRECTS] = [ + 'on_redirect' => $onRedirectFunction + ]; + } + // Only add RequestOptions::PROXY if Nextcloud is explicitly // configured to use a proxy. This is needed in order not to override // Guzzle default values. @@ -155,51 +172,21 @@ class Client implements IClient { return $proxy; } - protected function preventLocalAddress(string $uri, array $options): void { + private function isLocalAddressAllowed(array $options) : bool { if (($options['nextcloud']['allow_local_address'] ?? false) || $this->config->getSystemValueBool('allow_local_remote_servers', false)) { - return; - } - - $host = parse_url($uri, PHP_URL_HOST); - if ($host === false || $host === null) { - $this->logger->warning("Could not detect any host in $uri"); - throw new LocalServerException('Could not detect any host'); - } - - $host = strtolower($host); - // Remove brackets from IPv6 addresses - if (strpos($host, '[') === 0 && substr($host, -1) === ']') { - $host = substr($host, 1, -1); + return true; } - // Disallow localhost and local network - if ($host === 'localhost' || substr($host, -6) === '.local' || substr($host, -10) === '.localhost') { - $this->logger->warning("Host $host was not connected to because it violates local access rules"); - throw new LocalServerException('Host violates local access rules'); - } - - // Disallow hostname only - if (substr_count($host, '.') === 0) { - $this->logger->warning("Host $host was not connected to because it violates local access rules"); - throw new LocalServerException('Host violates local access rules'); - } + return false; + } - if ((bool)filter_var($host, FILTER_VALIDATE_IP) && !filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { - $this->logger->warning("Host $host was not connected to because it violates local access rules"); - throw new LocalServerException('Host violates local access rules'); + protected function preventLocalAddress(string $uri, array $options): void { + if ($this->isLocalAddressAllowed($options)) { + return; } - // Also check for IPv6 IPv4 nesting, because that's not covered by filter_var - if ((bool)filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && substr_count($host, '.') > 0) { - $delimiter = strrpos($host, ':'); // Get last colon - $ipv4Address = substr($host, $delimiter + 1); - - if (!filter_var($ipv4Address, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { - $this->logger->warning("Host $host was not connected to because it violates local access rules"); - throw new LocalServerException('Host violates local access rules'); - } - } + $this->localAddressChecker->ThrowIfLocalAddress($uri); } /** diff --git a/lib/private/Http/Client/ClientService.php b/lib/private/Http/Client/ClientService.php index 3858032308a..d1aed2d7883 100644 --- a/lib/private/Http/Client/ClientService.php +++ b/lib/private/Http/Client/ClientService.php @@ -24,10 +24,11 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Http\Client; use GuzzleHttp\Client as GuzzleClient; +use GuzzleHttp\HandlerStack; +use GuzzleHttp\Handler\CurlHandler; use OCP\Http\Client\IClient; use OCP\Http\Client\IClientService; use OCP\ICertificateManager; @@ -46,19 +47,39 @@ class ClientService implements IClientService { private $logger; /** @var ICertificateManager */ private $certificateManager; + /** @var DnsPinMiddleware */ + private $dnsPinMiddleware; + /** @var LocalAddressChecker */ + private $localAddressChecker; public function __construct(IConfig $config, ILogger $logger, - ICertificateManager $certificateManager) { + ICertificateManager $certificateManager, + DnsPinMiddleware $dnsPinMiddleware, + LocalAddressChecker $localAddressChecker) { $this->config = $config; $this->logger = $logger; $this->certificateManager = $certificateManager; + $this->dnsPinMiddleware = $dnsPinMiddleware; + $this->localAddressChecker = $localAddressChecker; } /** * @return Client */ public function newClient(): IClient { - return new Client($this->config, $this->logger, $this->certificateManager, new GuzzleClient()); + $handler = new CurlHandler(); + $stack = HandlerStack::create($handler); + $stack->push($this->dnsPinMiddleware->addDnsPinning()); + + $client = new GuzzleClient(['handler' => $stack]); + + return new Client( + $this->config, + $this->logger, + $this->certificateManager, + $client, + $this->localAddressChecker + ); } } diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php new file mode 100644 index 00000000000..ee0ea053dcf --- /dev/null +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -0,0 +1,150 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021, Lukas Reschke <lukas@statuscode.ch> + * + * @author Lukas Reschke <lukas@statuscode.ch> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Http\Client; + +use Psr\Http\Message\RequestInterface; + +class DnsPinMiddleware { + /** @var NegativeDnsCache */ + private $negativeDnsCache; + /** @var LocalAddressChecker */ + private $localAddressChecker; + + public function __construct( + NegativeDnsCache $negativeDnsCache, + LocalAddressChecker $localAddressChecker + ) { + $this->negativeDnsCache = $negativeDnsCache; + $this->localAddressChecker = $localAddressChecker; + } + + /** + * Fetch soa record for a target + * + * @param string $target + * @return array|null + */ + private function soaRecord(string $target): ?array { + $labels = explode('.', $target); + + $top = count($labels) >= 2 ? array_pop($labels) : ''; + $second = array_pop($labels); + + $hostname = $second . '.' . $top; + $responses = dns_get_record($hostname, DNS_SOA); + + if ($responses === false || count($responses) === 0) { + return null; + } + + return reset($responses); + } + + private function dnsResolve(string $target, int $recursionCount) : array { + if ($recursionCount >= 10) { + return []; + } + + $recursionCount++; + $targetIps = []; + + $soaDnsEntry = $this->soaRecord($target); + $dnsNegativeTtl = $soaDnsEntry['minimum-ttl'] ?? null; + + $dnsTypes = [DNS_A, DNS_AAAA, DNS_CNAME]; + foreach ($dnsTypes as $dnsType) { + if ($this->negativeDnsCache->isNegativeCached($target, $dnsType)) { + continue; + } + + $dnsResponses = dns_get_record($target, $dnsType); + $canHaveCnameRecord = true; + if ($dnsResponses !== false && count($dnsResponses) > 0) { + foreach ($dnsResponses as $dnsResponse) { + if (isset($dnsResponse['ip'])) { + $targetIps[] = $dnsResponse['ip']; + $canHaveCnameRecord = false; + } elseif (isset($dnsResponse['ipv6'])) { + $targetIps[] = $dnsResponse['ipv6']; + $canHaveCnameRecord = false; + } elseif (isset($dnsResponse['target']) && $canHaveCnameRecord) { + $targetIps = array_merge($targetIps, $this->dnsResolve($dnsResponse['target'], $recursionCount)); + $canHaveCnameRecord = true; + } + } + } elseif ($dnsNegativeTtl !== null) { + $this->negativeDnsCache->setNegativeCacheForDnsType($target, $dnsType, $dnsNegativeTtl); + } + } + + return $targetIps; + } + + public function addDnsPinning() { + return function (callable $handler) { + return function ( + RequestInterface $request, + array $options + ) use ($handler) { + if ($options['nextcloud']['allow_local_address'] === true) { + return $handler($request, $options); + } + + $hostName = (string)$request->getUri()->getHost(); + $port = $request->getUri()->getPort(); + + $ports = [ + '80', + '443', + ]; + + if ($port !== null) { + $ports[] = (string)$port; + } + + $targetIps = $this->dnsResolve($hostName, 0); + + $curlResolves = []; + + foreach ($ports as $port) { + $curlResolves["$hostName:$port"] = []; + + foreach ($targetIps as $ip) { + $this->localAddressChecker->ThrowIfLocalIp($ip); + $curlResolves["$hostName:$port"][] = $ip; + } + } + + // Coalesce the per-host:port ips back into a comma separated list + foreach ($curlResolves as $hostport => $ips) { + $options['curl'][CURLOPT_RESOLVE][] = "$hostport:" . implode(',', $ips); + } + + return $handler($request, $options); + }; + }; + } +} diff --git a/lib/private/Http/Client/LocalAddressChecker.php b/lib/private/Http/Client/LocalAddressChecker.php new file mode 100644 index 00000000000..c534c5971d1 --- /dev/null +++ b/lib/private/Http/Client/LocalAddressChecker.php @@ -0,0 +1,84 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021, Lukas Reschke <lukas@statuscode.ch> + * + * @author Lukas Reschke <lukas@statuscode.ch> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Http\Client; + +use OCP\ILogger; +use OCP\Http\Client\LocalServerException; + +class LocalAddressChecker { + /** @var ILogger */ + private $logger; + + public function __construct(ILogger $logger) { + $this->logger = $logger; + } + + public function ThrowIfLocalIp(string $ip) : void { + if ((bool)filter_var($ip, FILTER_VALIDATE_IP) && !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { + $this->logger->warning("Host $ip was not connected to because it violates local access rules"); + throw new LocalServerException('Host violates local access rules'); + } + + // Also check for IPv6 IPv4 nesting, because that's not covered by filter_var + if ((bool)filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && substr_count($ip, '.') > 0) { + $delimiter = strrpos($ip, ':'); // Get last colon + $ipv4Address = substr($ip, $delimiter + 1); + + if (!filter_var($ipv4Address, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { + $this->logger->warning("Host $ip was not connected to because it violates local access rules"); + throw new LocalServerException('Host violates local access rules'); + } + } + } + + public function ThrowIfLocalAddress(string $uri) : void { + $host = parse_url($uri, PHP_URL_HOST); + if ($host === false || $host === null) { + $this->logger->warning("Could not detect any host in $uri"); + throw new LocalServerException('Could not detect any host'); + } + + $host = strtolower($host); + // Remove brackets from IPv6 addresses + if (strpos($host, '[') === 0 && substr($host, -1) === ']') { + $host = substr($host, 1, -1); + } + + // Disallow localhost and local network + if ($host === 'localhost' || substr($host, -6) === '.local' || substr($host, -10) === '.localhost') { + $this->logger->warning("Host $host was not connected to because it violates local access rules"); + throw new LocalServerException('Host violates local access rules'); + } + + // Disallow hostname only + if (substr_count($host, '.') === 0 && !(bool)filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + $this->logger->warning("Host $host was not connected to because it violates local access rules"); + throw new LocalServerException('Host violates local access rules'); + } + + $this->ThrowIfLocalIp($host); + } +} diff --git a/lib/private/Http/Client/NegativeDnsCache.php b/lib/private/Http/Client/NegativeDnsCache.php new file mode 100644 index 00000000000..6c7585b11e3 --- /dev/null +++ b/lib/private/Http/Client/NegativeDnsCache.php @@ -0,0 +1,51 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021, Lukas Reschke <lukas@statuscode.ch> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Lukas Reschke <lukas@statuscode.ch> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Http\Client; + +use OCP\ICache; +use OCP\ICacheFactory; + +class NegativeDnsCache { + /** @var ICache */ + private $cache; + + public function __construct(ICacheFactory $memcache) { + $this->cache = $memcache->createLocal('NegativeDnsCache'); + } + + private function createCacheKey(string $domain, int $type) : string { + return $domain . "-" . (string)$type; + } + + public function setNegativeCacheForDnsType(string $domain, int $type, int $ttl) : void { + $this->cache->set($this->createCacheKey($domain, $type), "true", $ttl); + } + + public function isNegativeCached(string $domain, int $type) : bool { + return (bool)$this->cache->hasKey($this->createCacheKey($domain, $type)); + } +} diff --git a/lib/private/Http/Client/Response.php b/lib/private/Http/Client/Response.php index 722fc40c04a..054c902fcc5 100644 --- a/lib/private/Http/Client/Response.php +++ b/lib/private/Http/Client/Response.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Http\Client; use OCP\Http\Client\IResponse; diff --git a/lib/private/Http/CookieHelper.php b/lib/private/Http/CookieHelper.php index 122f4907b2a..720a1e9185d 100644 --- a/lib/private/Http/CookieHelper.php +++ b/lib/private/Http/CookieHelper.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Marco Ziech <marco@ziech.net> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -17,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Http; class CookieHelper { diff --git a/lib/private/Http/WellKnown/RequestManager.php b/lib/private/Http/WellKnown/RequestManager.php index 052e2d38ea7..17e2ed658a6 100644 --- a/lib/private/Http/WellKnown/RequestManager.php +++ b/lib/private/Http/WellKnown/RequestManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Http\WellKnown; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/lib/private/InitialStateService.php b/lib/private/InitialStateService.php index bbc893269f7..4920e1bf40e 100644 --- a/lib/private/InitialStateService.php +++ b/lib/private/InitialStateService.php @@ -7,6 +7,7 @@ declare(strict_types=1); * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -18,14 +19,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC; use Closure; @@ -33,12 +33,12 @@ use OC\AppFramework\Bootstrap\Coordinator; use OCP\AppFramework\QueryException; use OCP\AppFramework\Services\InitialStateProvider; use OCP\IInitialStateService; -use OCP\ILogger; use OCP\IServerContainer; +use Psr\Log\LoggerInterface; class InitialStateService implements IInitialStateService { - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var string[][] */ @@ -53,7 +53,7 @@ class InitialStateService implements IInitialStateService { /** @var IServerContainer */ private $container; - public function __construct(ILogger $logger, Coordinator $bootstrapCoordinator, IServerContainer $container) { + public function __construct(LoggerInterface $logger, Coordinator $bootstrapCoordinator, IServerContainer $container) { $this->logger = $logger; $this->bootstrapCoordinator = $bootstrapCoordinator; $this->container = $container; @@ -118,9 +118,8 @@ class InitialStateService implements IInitialStateService { $provider = $this->container->query($initialState->getService()); } catch (QueryException $e) { // Log an continue. We can be fault tolerant here. - $this->logger->logException($e, [ - 'message' => 'Could not load initial state provider dynamically: ' . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error('Could not load initial state provider dynamically: ' . $e->getMessage(), [ + 'exception' => $e, 'app' => $initialState->getAppId(), ]); continue; diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 2a0fdab87ff..f3af74167d1 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch> * + * @author acsfer <carlos@reendex.com> * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Brice Maron <brice@bmaron.net> * @author Christoph Wurst <christoph@winzerhof-wurst.at> @@ -10,11 +11,10 @@ * @author Frank Karlitschek <frank@karlitschek.de> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Kamil Domanski <kdomanski@kdemail.net> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Markus Staab <markus.staab@redaxo.de> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -37,7 +37,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use Doctrine\DBAL\Exception\TableExistsException; @@ -46,14 +45,16 @@ use OC\App\AppStore\Fetcher\AppFetcher; use OC\AppFramework\Bootstrap\Coordinator; use OC\Archive\TAR; use OC\DB\Connection; +use OC\DB\MigrationService; use OC_App; -use OC_DB; use OC_Helper; +use OCP\HintException; use OCP\Http\Client\IClientService; use OCP\IConfig; use OCP\ILogger; use OCP\ITempManager; use phpseclib\File\X509; +use Psr\Log\LoggerInterface; /** * This class provides the functionality needed to install, update and remove apps @@ -65,7 +66,7 @@ class Installer { private $clientService; /** @var ITempManager */ private $tempManager; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var IConfig */ private $config; @@ -76,18 +77,11 @@ class Installer { /** @var bool */ private $isCLI; - /** - * @param AppFetcher $appFetcher - * @param IClientService $clientService - * @param ITempManager $tempManager - * @param ILogger $logger - * @param IConfig $config - */ public function __construct( AppFetcher $appFetcher, IClientService $clientService, ITempManager $tempManager, - ILogger $logger, + LoggerInterface $logger, IConfig $config, bool $isCLI ) { @@ -114,9 +108,13 @@ class Installer { } $basedir = $app['path'].'/'.$appId; - $info = OC_App::getAppInfo($basedir.'/appinfo/info.xml', true); + + if (is_file($basedir . '/appinfo/database.xml')) { + throw new \Exception('The appinfo/database.xml file is not longer supported. Used in ' . $appId); + } $l = \OC::$server->getL10N('core'); + $info = OC_App::getAppInfo($basedir.'/appinfo/info.xml', true, $l->getLanguageCode()); if (!is_array($info)) { throw new \Exception( @@ -152,16 +150,9 @@ class Installer { } //install the database - if (is_file($basedir.'/appinfo/database.xml')) { - if (\OC::$server->getConfig()->getAppValue($info['id'], 'installed_version') === null) { - OC_DB::createDbFromStructure($basedir.'/appinfo/database.xml'); - } else { - OC_DB::updateDbFromStructure($basedir.'/appinfo/database.xml'); - } - } else { - $ms = new \OC\DB\MigrationService($info['id'], \OC::$server->get(Connection::class)); - $ms->migrate('latest', true); - } + $ms = new MigrationService($info['id'], \OC::$server->get(Connection::class)); + $ms->migrate('latest', true); + if ($previousVersion) { OC_App::executeRepairSteps($appId, $info['repair-steps']['post-migration']); } @@ -171,8 +162,7 @@ class Installer { //run appinfo/install.php self::includeAppScript($basedir . '/appinfo/install.php'); - $appData = OC_App::getAppInfo($appId); - OC_App::executeRepairSteps($appId, $appData['repair-steps']['install']); + OC_App::executeRepairSteps($appId, $info['repair-steps']['install']); //set the installed version \OC::$server->getConfig()->setAppValue($info['id'], 'installed_version', OC_App::getAppVersion($info['id'], false)); @@ -203,9 +193,8 @@ class Installer { try { $this->downloadApp($appId, $allowUnstable); } catch (\Exception $e) { - $this->logger->logException($e, [ - 'level' => ILogger::ERROR, - 'app' => 'core', + $this->logger->error($e->getMessage(), [ + 'exception' => $e, ]); return false; } @@ -309,7 +298,10 @@ class Installer { // Check if the signature actually matches the downloaded content $certificate = openssl_get_publickey($app['certificate']); $verified = (bool)openssl_verify(file_get_contents($tempFile), base64_decode($app['releases'][0]['signature']), $certificate, OPENSSL_ALGO_SHA512); - openssl_free_key($certificate); + // PHP 8+ deprecates openssl_free_key and automatically destroys the key instance when it goes out of scope + if ((PHP_VERSION_ID < 80000)) { + openssl_free_key($certificate); + } if ($verified === true) { // Seems to match, let's proceed @@ -341,9 +333,13 @@ class Installer { } // Check if appinfo/info.xml has the same app ID as well - $loadEntities = libxml_disable_entity_loader(false); - $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); - libxml_disable_entity_loader($loadEntities); + if ((PHP_VERSION_ID < 80000)) { + $loadEntities = libxml_disable_entity_loader(false); + $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); + libxml_disable_entity_loader($loadEntities); + } else { + $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); + } if ((string)$xml->id !== $appId) { throw new \Exception( sprintf( @@ -601,20 +597,8 @@ class Installer { $appPath = OC_App::getAppPath($app); \OC_App::registerAutoloading($app, $appPath); - if (is_file("$appPath/appinfo/database.xml")) { - try { - OC_DB::createDbFromStructure("$appPath/appinfo/database.xml"); - } catch (TableExistsException $e) { - throw new HintException( - 'Failed to enable app ' . $app, - 'Please ask for help via one of our <a href="https://nextcloud.com/support/" target="_blank" rel="noreferrer noopener">support channels</a>.', - 0, $e - ); - } - } else { - $ms = new \OC\DB\MigrationService($app, \OC::$server->get(Connection::class)); - $ms->migrate('latest', true); - } + $ms = new MigrationService($app, \OC::$server->get(Connection::class)); + $ms->migrate('latest', true); //run appinfo/install.php self::includeAppScript("$appPath/appinfo/install.php"); diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index 122fac8927f..273eba35446 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -29,7 +29,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck; use OC\Core\Command\Maintenance\Mimetype\GenerateMimetypeFileBuilder; diff --git a/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php b/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php index daef60ac1fc..18a4ba40e1a 100644 --- a/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php +++ b/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck\Exceptions; /** diff --git a/lib/private/IntegrityCheck/Helpers/AppLocator.php b/lib/private/IntegrityCheck/Helpers/AppLocator.php index fdfc81de859..9980fbdf497 100644 --- a/lib/private/IntegrityCheck/Helpers/AppLocator.php +++ b/lib/private/IntegrityCheck/Helpers/AppLocator.php @@ -24,13 +24,12 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck\Helpers; /** * Class AppLocator provides a non-static helper for OC_App::getPath($appId) * it is not possible to use IAppManager at this point as IAppManager has a - * dependency on a running ownCloud. + * dependency on a running Nextcloud. * * @package OC\IntegrityCheck\Helpers */ diff --git a/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php b/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php index 814410331ec..5b6d0448703 100644 --- a/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php +++ b/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck\Helpers; /** diff --git a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php index 2a0c0dd2017..cd16a619915 100644 --- a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php +++ b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck\Helpers; /** diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php index 016c2447946..aea1ad6c3e9 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck\Iterator; /** diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php index 51b134059d5..fcdd3e3067c 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\IntegrityCheck\Iterator; class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator { diff --git a/lib/private/KnownUser/KnownUser.php b/lib/private/KnownUser/KnownUser.php index 939c9199c79..fa0453e0329 100644 --- a/lib/private/KnownUser/KnownUser.php +++ b/lib/private/KnownUser/KnownUser.php @@ -1,9 +1,12 @@ <?php declare(strict_types=1); + /** * @copyright Copyright (c) 2021 Joas Schilling <coding@schilljs.com> * + * @author Joas Schilling <coding@schilljs.com> + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -13,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\KnownUser; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/KnownUser/KnownUserMapper.php b/lib/private/KnownUser/KnownUserMapper.php index e77e4752702..864ece36345 100644 --- a/lib/private/KnownUser/KnownUserMapper.php +++ b/lib/private/KnownUser/KnownUserMapper.php @@ -1,9 +1,12 @@ <?php declare(strict_types=1); + /** * @copyright Copyright (c) 2021 Joas Schilling <coding@schilljs.com> * + * @author Joas Schilling <coding@schilljs.com> + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -13,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\KnownUser; use OCP\AppFramework\Db\QBMapper; diff --git a/lib/private/KnownUser/KnownUserService.php b/lib/private/KnownUser/KnownUserService.php index 96af21c836f..fec24542007 100644 --- a/lib/private/KnownUser/KnownUserService.php +++ b/lib/private/KnownUser/KnownUserService.php @@ -1,9 +1,13 @@ <?php declare(strict_types=1); + /** * @copyright Copyright (c) 2021 Joas Schilling <coding@schilljs.com> * + * @author Joas Schilling <coding@schilljs.com> + * @author Vincent Petry <vincent@nextcloud.com> + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -13,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\KnownUser; class KnownUserService { @@ -74,6 +77,10 @@ class KnownUserService { * @return bool */ public function isKnownToUser(string $knownTo, string $contactUserId): bool { + if ($knownTo === $contactUserId) { + return true; + } + if (!isset($this->knownUsers[$knownTo])) { $entities = $this->mapper->getKnownUsers($knownTo); $this->knownUsers[$knownTo] = []; diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 6640e596ab1..a3ff7bf70e2 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright 2016 Roeland Jago Douma <roeland@famdouma.nl> @@ -11,7 +14,7 @@ * @author Georg Ehrke <oc.list@georgehrke.com> * @author GretaD <gretadoci@gmail.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -43,6 +46,7 @@ use OCP\IUser; use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\L10N\ILanguageIterator; +use function is_null; /** * A factory that generates language instances @@ -101,10 +105,12 @@ class Factory implements IFactory { * @param IUserSession $userSession * @param string $serverRoot */ - public function __construct(IConfig $config, - IRequest $request, - IUserSession $userSession, - $serverRoot) { + public function __construct( + IConfig $config, + IRequest $request, + IUserSession $userSession, + $serverRoot + ) { $this->config = $config; $this->request = $request; $this->userSession = $userSession; @@ -146,7 +152,10 @@ class Factory implements IFactory { if (!isset($this->instances[$lang][$app])) { $this->instances[$lang][$app] = new L10N( - $this, $app, $lang, $locale, + $this, + $app, + $lang, + $locale, $this->getL10nFilesForApp($app, $lang) ); } @@ -158,21 +167,24 @@ class Factory implements IFactory { /** * Find the best language * - * @param string|null $app App id or null for core + * @param string|null $appId App id or null for core + * * @return string language If nothing works it returns 'en' */ - public function findLanguage($app = null) { + public function findLanguage(?string $appId = null): string { + // Step 1: Forced language always has precedence over anything else $forceLang = $this->config->getSystemValue('force_language', false); if (is_string($forceLang)) { $this->requestLanguage = $forceLang; } - if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) { + // Step 2: Return cached language + if ($this->requestLanguage !== '' && $this->languageExists($appId, $this->requestLanguage)) { return $this->requestLanguage; } /** - * At this point Nextcloud might not yet be installed and thus the lookup + * Step 3: At this point Nextcloud might not yet be installed and thus the lookup * in the preferences table might fail. For this reason we need to check * whether the instance has already been installed * @@ -189,30 +201,67 @@ class Factory implements IFactory { $userId = null; $userLang = null; } - if ($userLang) { $this->requestLanguage = $userLang; - if ($this->languageExists($app, $userLang)) { + if ($this->languageExists($appId, $userLang)) { return $userLang; } } + // Step 4: Check the request headers try { // Try to get the language from the Request - $lang = $this->getLanguageFromRequest($app); - if ($userId !== null && $app === null && !$userLang) { + $lang = $this->getLanguageFromRequest($appId); + if ($userId !== null && $appId === null && !$userLang) { $this->config->setUserValue($userId, 'core', 'lang', $lang); } return $lang; } catch (LanguageNotFoundException $e) { // Finding language from request failed fall back to default language $defaultLanguage = $this->config->getSystemValue('default_language', false); - if ($defaultLanguage !== false && $this->languageExists($app, $defaultLanguage)) { + if ($defaultLanguage !== false && $this->languageExists($appId, $defaultLanguage)) { return $defaultLanguage; } } - // We could not find any language so fall back to english + // Step 5: fall back to English + return 'en'; + } + + public function findGenericLanguage(string $appId = null): string { + // Step 1: Forced language always has precedence over anything else + $forcedLanguage = $this->config->getSystemValue('force_language', false); + if ($forcedLanguage !== false) { + return $forcedLanguage; + } + + // Step 2: Check if we have a default language + $defaultLanguage = $this->config->getSystemValue('default_language', false); + if ($defaultLanguage !== false && $this->languageExists($appId, $defaultLanguage)) { + return $defaultLanguage; + } + + // Step 3.1: Check if Nextcloud is already installed before we try to access user info + if (!$this->config->getSystemValue('installed', false)) { + return 'en'; + } + // Step 3.2: Check the current user (if any) for their preferred language + $user = $this->userSession->getUser(); + if ($user !== null) { + $userLang = $this->config->getUserValue($user->getUID(), 'core', 'lang', null); + if ($userLang !== null) { + return $userLang; + } + } + + // Step 4: Check the request headers + try { + return $this->getLanguageFromRequest($appId); + } catch (LanguageNotFoundException $e) { + // Ignore and continue + } + + // Step 5: fall back to English return 'en'; } @@ -281,9 +330,9 @@ class Factory implements IFactory { * Find all available languages for an app * * @param string|null $app App id or null for core - * @return array an array of available languages + * @return string[] an array of available languages */ - public function findAvailableLanguages($app = null) { + public function findAvailableLanguages($app = null): array { $key = $app; if ($key === null) { $key = 'null'; @@ -348,12 +397,12 @@ class Factory implements IFactory { * @return bool */ public function languageExists($app, $lang) { - if ($lang === 'en') {//english is always available + if ($lang === 'en') { //english is always available return true; } $languages = $this->findAvailableLanguages($app); - return array_search($lang, $languages) !== false; + return in_array($lang, $languages); } public function getLanguageIterator(IUser $user = null): ILanguageIterator { @@ -407,11 +456,9 @@ class Factory implements IFactory { } /** - * @param string|null $app - * @return string * @throws LanguageNotFoundException */ - private function getLanguageFromRequest($app) { + private function getLanguageFromRequest(?string $app = null): string { $header = $this->request->getHeader('ACCEPT_LANGUAGE'); if ($header !== '') { $available = $this->findAvailableLanguages($app); @@ -445,18 +492,15 @@ class Factory implements IFactory { /** * if default language is set to de_DE (formal German) this should be * preferred to 'de' (non-formal German) if possible - * - * @param string|null $app - * @param string $lang - * @return string */ - protected function respectDefaultLanguage($app, $lang) { + protected function respectDefaultLanguage(?string $app, string $lang): string { $result = $lang; $defaultLanguage = $this->config->getSystemValue('default_language', false); // use formal version of german ("Sie" instead of "Du") if the default // language is set to 'de_DE' if possible - if (is_string($defaultLanguage) && + if ( + is_string($defaultLanguage) && strtolower($lang) === 'de' && strtolower($defaultLanguage) === 'de_de' && $this->languageExists($app, 'de_DE') @@ -505,9 +549,9 @@ class Factory implements IFactory { if (($this->isSubDirectory($transFile, $this->serverRoot . '/core/l10n/') || $this->isSubDirectory($transFile, $this->serverRoot . '/lib/l10n/') - || $this->isSubDirectory($transFile, \OC_App::getAppPath($app) . '/l10n/') - ) - && file_exists($transFile)) { + || $this->isSubDirectory($transFile, \OC_App::getAppPath($app) . '/l10n/')) + && file_exists($transFile) + ) { // load the translations file $languageFiles[] = $transFile; } @@ -562,9 +606,9 @@ class Factory implements IFactory { $plural = preg_replace('#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2]); $body = str_replace( - [ 'plural', 'n', '$n$plurals', ], - [ '$plural', '$n', '$nplurals', ], - 'nplurals='. $nplurals . '; plural=' . $plural + ['plural', 'n', '$n$plurals',], + ['$plural', '$n', '$nplurals',], + 'nplurals=' . $nplurals . '; plural=' . $plural ); // add parents @@ -608,36 +652,33 @@ class Factory implements IFactory { } /** - * returns the common language and other languages in an - * associative array - * - * @return array + * @inheritDoc */ - public function getLanguages() { + public function getLanguages(): array { $forceLanguage = $this->config->getSystemValue('force_language', false); if ($forceLanguage !== false) { $l = $this->get('lib', $forceLanguage); $potentialName = $l->t('__language_name__'); return [ - 'commonlanguages' => [[ + 'commonLanguages' => [[ 'code' => $forceLanguage, 'name' => $potentialName, ]], - 'languages' => [], + 'otherLanguages' => [], ]; } $languageCodes = $this->findAvailableLanguages(); $commonLanguages = []; - $languages = []; + $otherLanguages = []; foreach ($languageCodes as $lang) { $l = $this->get('lib', $lang); // TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version $potentialName = $l->t('__language_name__'); - if ($l->getLanguageCode() === $lang && $potentialName[0] !== '_') {//first check if the language name is in the translation file + if ($l->getLanguageCode() === $lang && $potentialName[0] !== '_') { //first check if the language name is in the translation file $ln = [ 'code' => $lang, 'name' => $potentialName @@ -647,7 +688,7 @@ class Factory implements IFactory { 'code' => $lang, 'name' => 'English (US)' ]; - } else {//fallback to language code + } else { //fallback to language code $ln = [ 'code' => $lang, 'name' => $lang @@ -659,14 +700,14 @@ class Factory implements IFactory { if (in_array($lang, self::COMMON_LANGUAGE_CODES)) { $commonLanguages[array_search($lang, self::COMMON_LANGUAGE_CODES)] = $ln; } else { - $languages[] = $ln; + $otherLanguages[] = $ln; } } ksort($commonLanguages); // sort now by displayed language not the iso-code - usort($languages, function ($a, $b) { + usort($otherLanguages, function ($a, $b) { if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) { // If a doesn't have a name, but b does, list b before a return 1; @@ -681,8 +722,8 @@ class Factory implements IFactory { return [ // reset indexes - 'commonlanguages' => array_values($commonLanguages), - 'languages' => $languages + 'commonLanguages' => array_values($commonLanguages), + 'otherLanguages' => $otherLanguages ]; } } diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php index 3b32ec2827f..09c0f1cdb35 100644 --- a/lib/private/L10N/L10N.php +++ b/lib/private/L10N/L10N.php @@ -26,13 +26,12 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\L10N; use OCP\IL10N; use OCP\L10N\IFactory; use Punic\Calendar; -use Symfony\Component\Translation\PluralizationRules; +use Symfony\Component\Translation\IdentityTranslator; class L10N implements IL10N { @@ -48,11 +47,8 @@ class L10N implements IL10N { /** @var string Locale of this object */ protected $locale; - /** @var string Plural forms (string) */ - private $pluralFormString = 'nplurals=2; plural=(n != 1);'; - - /** @var string Plural forms (function) */ - private $pluralFormFunction = null; + /** @var IdentityTranslator */ + private $identityTranslator; /** @var string[] */ private $translations = []; @@ -214,20 +210,16 @@ class L10N implements IL10N { } /** - * Returnsed function accepts the argument $n - * - * Called by \OC_L10N_String - * @return \Closure the plural form function + * @internal + * @return IdentityTranslator */ - public function getPluralFormFunction(): \Closure { - if (\is_null($this->pluralFormFunction)) { - $lang = $this->getLanguageCode(); - $this->pluralFormFunction = function ($n) use ($lang) { - return PluralizationRules::get($n, $lang); - }; + public function getIdentityTranslator(): IdentityTranslator { + if (\is_null($this->identityTranslator)) { + $this->identityTranslator = new IdentityTranslator(); + $this->identityTranslator->setLocale($this->getLocaleCode()); } - return $this->pluralFormFunction; + return $this->identityTranslator; } /** @@ -242,9 +234,6 @@ class L10N implements IL10N { return false; } - if (!empty($json['pluralForm'])) { - $this->pluralFormString = $json['pluralForm']; - } $this->translations = array_merge($this->translations, $json['translations']); return true; } diff --git a/lib/private/L10N/L10NString.php b/lib/private/L10N/L10NString.php index a82228189b6..33ccc4b1409 100644 --- a/lib/private/L10N/L10NString.php +++ b/lib/private/L10N/L10NString.php @@ -4,12 +4,9 @@ * * @author Bart Visscher <bartv@thisnet.nl> * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jakob Sack <mail@jakobsack.de> * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -28,11 +25,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\L10N; class L10NString implements \JsonSerializable { - /** @var \OC\L10N\L10N */ + /** @var L10N */ protected $l10n; /** @var string */ @@ -45,37 +41,44 @@ class L10NString implements \JsonSerializable { protected $count; /** - * @param \OC\L10N\L10N $l10n + * @param L10N $l10n * @param string|string[] $text * @param array $parameters * @param int $count */ - public function __construct(\OC\L10N\L10N $l10n, $text, $parameters, $count = 1) { + public function __construct(L10N $l10n, $text, array $parameters, int $count = 1) { $this->l10n = $l10n; $this->text = $text; $this->parameters = $parameters; $this->count = $count; } - /** - * @return string - */ - public function __toString() { + public function __toString(): string { $translations = $this->l10n->getTranslations(); + $identityTranslator = $this->l10n->getIdentityTranslator(); - $text = $this->text; + // Use the indexed version as per \Symfony\Contracts\Translation\TranslatorInterface + $identity = $this->text; if (array_key_exists($this->text, $translations)) { - if (is_array($translations[$this->text])) { - $fn = $this->l10n->getPluralFormFunction(); - $id = $fn($this->count); - $text = $translations[$this->text][$id]; - } else { - $text = $translations[$this->text]; + $identity = $translations[$this->text]; + } + + if (is_array($identity)) { + $pipeCheck = implode('', $identity); + if (strpos($pipeCheck, '|') !== false) { + return 'Can not use pipe character in translations'; } + + $identity = implode('|', $identity); + } elseif (strpos($identity, '|') !== false) { + return 'Can not use pipe character in translations'; } - // Replace %n first (won't interfere with vsprintf) - $text = str_replace('%n', (string)$this->count, $text); + $identity = str_replace('%n', '%count%', $identity); + + // $count as %count% as per \Symfony\Contracts\Translation\TranslatorInterface + $text = $identityTranslator->trans($identity, ['%count%' => $this->count]); + return vsprintf($text, $this->parameters); } diff --git a/lib/private/L10N/LanguageIterator.php b/lib/private/L10N/LanguageIterator.php index cbbafde92ff..c48a27fb6ce 100644 --- a/lib/private/L10N/LanguageIterator.php +++ b/lib/private/L10N/LanguageIterator.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\L10N; use OCP\IConfig; diff --git a/lib/private/L10N/LanguageNotFoundException.php b/lib/private/L10N/LanguageNotFoundException.php index 20b22a8b5ec..d483fd799dd 100644 --- a/lib/private/L10N/LanguageNotFoundException.php +++ b/lib/private/L10N/LanguageNotFoundException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\L10N; class LanguageNotFoundException extends \Exception { diff --git a/lib/private/L10N/LazyL10N.php b/lib/private/L10N/LazyL10N.php index 9ffcb4df98f..f56761799b3 100644 --- a/lib/private/L10N/LazyL10N.php +++ b/lib/private/L10N/LazyL10N.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\L10N; use OCP\IL10N; diff --git a/lib/private/LDAP/NullLDAPProviderFactory.php b/lib/private/LDAP/NullLDAPProviderFactory.php new file mode 100644 index 00000000000..23dfe78952c --- /dev/null +++ b/lib/private/LDAP/NullLDAPProviderFactory.php @@ -0,0 +1,42 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl> + * + * @author Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\LDAP; + +use OCP\IServerContainer; +use OCP\LDAP\ILDAPProviderFactory; + +class NullLDAPProviderFactory implements ILDAPProviderFactory { + public function __construct(IServerContainer $serverContainer) { + } + + public function getLDAPProvider() { + throw new \Exception("No LDAP provider is available"); + } + + public function isAvailable(): bool { + return false; + } +} diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index b07d77a02fa..e2984b4bacf 100755 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Lock/AbstractLockingProvider.php b/lib/private/Lock/AbstractLockingProvider.php index e23e8566c13..f4899bbb2b2 100644 --- a/lib/private/Lock/AbstractLockingProvider.php +++ b/lib/private/Lock/AbstractLockingProvider.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Lock; use OCP\Lock\ILockingProvider; diff --git a/lib/private/Lock/DBLockingProvider.php b/lib/private/Lock/DBLockingProvider.php index 30566c7b253..1ea78d047d2 100644 --- a/lib/private/Lock/DBLockingProvider.php +++ b/lib/private/Lock/DBLockingProvider.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Lock; use OC\DB\QueryBuilder\Literal; diff --git a/lib/private/Lock/MemcacheLockingProvider.php b/lib/private/Lock/MemcacheLockingProvider.php index 439894e901f..008a7875d7e 100644 --- a/lib/private/Lock/MemcacheLockingProvider.php +++ b/lib/private/Lock/MemcacheLockingProvider.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Lock; use OCP\IMemcache; diff --git a/lib/private/Lock/NoopLockingProvider.php b/lib/private/Lock/NoopLockingProvider.php index 728ad26de68..95ae8cf0cda 100644 --- a/lib/private/Lock/NoopLockingProvider.php +++ b/lib/private/Lock/NoopLockingProvider.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Lock; use OCP\Lock\ILockingProvider; diff --git a/lib/private/Lockdown/Filesystem/NullCache.php b/lib/private/Lockdown/Filesystem/NullCache.php index 267b76ab8fb..4fde9668ded 100644 --- a/lib/private/Lockdown/Filesystem/NullCache.php +++ b/lib/private/Lockdown/Filesystem/NullCache.php @@ -13,21 +13,23 @@ * * 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 + * 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/>. * */ - namespace OC\Lockdown\Filesystem; use OC\Files\Cache\CacheEntry; +use OC\Files\Search\SearchComparison; use OCP\Constants; use OCP\Files\Cache\ICache; use OCP\Files\Cache\ICacheEntry; use OCP\Files\FileInfo; +use OCP\Files\Search\ISearchComparison; +use OCP\Files\Search\ISearchOperator; use OCP\Files\Search\ISearchQuery; class NullCache implements ICache { @@ -127,4 +129,12 @@ class NullCache implements ICache { public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int { throw new \OC\ForbiddenException('This request is not allowed to access the filesystem'); } + + public function getQueryFilterForStorage(): ISearchOperator { + return new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'storage', -1); + } + + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry { + return null; + } } diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php index 72bdeebcd0c..ac8c30418bd 100644 --- a/lib/private/Lockdown/Filesystem/NullStorage.php +++ b/lib/private/Lockdown/Filesystem/NullStorage.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Lockdown\Filesystem; use Icewind\Streams\IteratorDirectory; diff --git a/lib/private/Lockdown/LockdownManager.php b/lib/private/Lockdown/LockdownManager.php index 2883ee0e1ef..bb76d801725 100644 --- a/lib/private/Lockdown/LockdownManager.php +++ b/lib/private/Lockdown/LockdownManager.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Lockdown; use OC\Authentication\Token\IToken; diff --git a/lib/private/Log.php b/lib/private/Log.php index db86aa8bfe3..9c6a1b614c6 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -33,7 +33,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use Nextcloud\LogNormalizer\Normalizer; diff --git a/lib/private/Log/ErrorHandler.php b/lib/private/Log/ErrorHandler.php index 3f4c9ee64b1..d56fecb1ecb 100644 --- a/lib/private/Log/ErrorHandler.php +++ b/lib/private/Log/ErrorHandler.php @@ -5,6 +5,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Thomas Müller <thomas.mueller@tmit.eu> @@ -24,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Log; use OCP\ILogger; @@ -39,7 +39,7 @@ class ErrorHandler { * @return string */ protected static function removePassword($msg) { - return preg_replace('/\/\/(.*):(.*)@/', '//xxx:xxx@', $msg); + return preg_replace('#//(.*):(.*)@#', '//xxx:xxx@', $msg); } public static function register($debug = false) { @@ -85,18 +85,35 @@ class ErrorHandler { //Recoverable errors handler public static function onError($number, $message, $file, $line) { - if (error_reporting() === 0) { + if (!(error_reporting() & $number)) { return; } $msg = $message . ' at ' . $file . '#' . $line; $e = new \Error(self::removePassword($msg)); - self::$logger->logException($e, ['app' => 'PHP']); + self::$logger->logException($e, ['app' => 'PHP', 'level' => self::errnoToLogLevel($number)]); } //Recoverable handler which catch all errors, warnings and notices public static function onAll($number, $message, $file, $line) { $msg = $message . ' at ' . $file . '#' . $line; $e = new \Error(self::removePassword($msg)); - self::$logger->logException($e, ['app' => 'PHP', 'level' => 0]); + self::$logger->logException($e, ['app' => 'PHP', 'level' => self::errnoToLogLevel($number)]); + } + + public static function errnoToLogLevel(int $errno): int { + switch ($errno) { + case E_USER_WARNING: + return ILogger::WARN; + + case E_USER_DEPRECATED: + return ILogger::DEBUG; + + case E_USER_NOTICE: + return ILogger::INFO; + + case E_USER_ERROR: + default: + return ILogger::ERROR; + } } } diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index b62293946d0..dab134b26a4 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -19,21 +19,27 @@ * * 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 + * 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/>. * */ - namespace OC\Log; use OC\Core\Controller\SetupController; -use OC\HintException; use OC\Security\IdentityProof\Key; use OC\Setup; use OC\SystemConfig; +use OCA\Encryption\Controller\RecoveryController; +use OCA\Encryption\Controller\SettingsController; +use OCA\Encryption\Crypto\Crypt; +use OCA\Encryption\Crypto\Encryption; +use OCA\Encryption\Hooks\UserHooks; +use OCA\Encryption\KeyManager; +use OCA\Encryption\Session; +use OCP\HintException; class ExceptionSerializer { public const methodsWithSensitiveParameters = [ @@ -113,6 +119,61 @@ class ExceptionSerializer { Key::class => [ '__construct' ], + \Redis::class => [ + 'auth' + ], + \RedisCluster::class => [ + '__construct' + ], + Crypt::class => [ + 'symmetricEncryptFileContent', + 'encrypt', + 'generatePasswordHash', + 'encryptPrivateKey', + 'decryptPrivateKey', + 'isValidPrivateKey', + 'symmetricDecryptFileContent', + 'checkSignature', + 'createSignature', + 'decrypt', + 'multiKeyDecrypt', + 'multiKeyEncrypt', + ], + RecoveryController::class => [ + 'adminRecovery', + 'changeRecoveryPassword' + ], + SettingsController::class => [ + 'updatePrivateKeyPassword', + ], + Encryption::class => [ + 'encrypt', + 'decrypt', + ], + KeyManager::class => [ + 'checkRecoveryPassword', + 'storeKeyPair', + 'setRecoveryKey', + 'setPrivateKey', + 'setFileKey', + 'setAllFileKeys', + ], + Session::class => [ + 'setPrivateKey', + 'prepareDecryptAll', + ], + \OCA\Encryption\Users\Setup::class => [ + 'setupUser', + ], + UserHooks::class => [ + 'login', + 'postCreateUser', + 'postDeleteUser', + 'prePasswordReset', + 'postPasswordReset', + 'preSetPassphrase', + 'setPassphrase', + ], ]; private function editTrace(array &$sensitiveValues, array $traceLine): array { @@ -167,14 +228,27 @@ class ExceptionSerializer { }, $filteredTrace); } - private function encodeArg($arg) { + private function encodeArg($arg, $nestingLevel = 5) { if (is_object($arg)) { - $data = get_object_vars($arg); - $data['__class__'] = get_class($arg); - return array_map([$this, 'encodeArg'], $data); + if ($nestingLevel === 0) { + return [ + '__class__' => get_class($arg), + '__properties__' => 'Encoding skipped as the maximum nesting level was reached', + ]; + } + + $objectInfo = [ '__class__' => get_class($arg) ]; + $objectVars = get_object_vars($arg); + return array_map(function ($arg) use ($nestingLevel) { + return $this->encodeArg($arg, $nestingLevel - 1); + }, array_merge($objectInfo, $objectVars)); } if (is_array($arg)) { + if ($nestingLevel === 0) { + return ['Encoding skipped as the maximum nesting level was reached']; + } + // Only log the first 5 elements of an array unless we are on debug if ((int)$this->systemConfig->getValue('loglevel', 2) !== 0) { $elemCount = count($arg); @@ -183,7 +257,9 @@ class ExceptionSerializer { $arg[] = 'And ' . ($elemCount - 5) . ' more entries, set log level to debug to see all entries'; } } - return array_map([$this, 'encodeArg'], $arg); + return array_map(function ($e) use ($nestingLevel) { + return $this->encodeArg($e, $nestingLevel - 1); + }, $arg); } return $arg; diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index afeab1b8fd7..a33667c9b68 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -34,7 +34,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Log; use OC\SystemConfig; diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php index 1175b475302..87ce0396594 100644 --- a/lib/private/Log/LogDetails.php +++ b/lib/private/Log/LogDetails.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Log; use OC\SystemConfig; @@ -38,7 +37,7 @@ abstract class LogDetails { public function logDetails(string $app, $message, int $level): array { // default to ISO8601 - $format = $this->config->getValue('logdateformat', \DateTime::ATOM); + $format = $this->config->getValue('logdateformat', \DateTimeInterface::ATOM); $logTimeZone = $this->config->getValue('logtimezone', 'UTC'); try { $timezone = new \DateTimeZone($logTimeZone); @@ -83,13 +82,17 @@ abstract class LogDetails { 'version' ); - if (is_array($message) && !array_key_exists('Exception', $message)) { - // Exception messages should stay as they are, + if (is_array($message)) { + // Exception messages are extracted and the exception is put into a separate field // anything else modern is split to 'message' (string) and // data (array) fields - $shortMessage = $message['message'] ?? '(no message provided)'; - $entry['data'] = $message; - $entry['message'] = $shortMessage; + if (array_key_exists('Exception', $message)) { + $entry['exception'] = $message; + $entry['message'] = $message['CustomMessage'] !== '--' ? $message['CustomMessage'] : $message['Message']; + } else { + $entry['data'] = $message; + $entry['message'] = $message['message'] ?? '(no message provided)'; + } } return $entry; diff --git a/lib/private/Log/LogFactory.php b/lib/private/Log/LogFactory.php index 6e6ded3758b..f0f804cd51c 100644 --- a/lib/private/Log/LogFactory.php +++ b/lib/private/Log/LogFactory.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Log; use OC\Log; diff --git a/lib/private/Log/PsrLoggerAdapter.php b/lib/private/Log/PsrLoggerAdapter.php index 8cd64bfe903..1cf81c49a69 100644 --- a/lib/private/Log/PsrLoggerAdapter.php +++ b/lib/private/Log/PsrLoggerAdapter.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Log; use OC\Log; diff --git a/lib/private/Log/Rotate.php b/lib/private/Log/Rotate.php index 76d026bc854..58b2932b417 100644 --- a/lib/private/Log/Rotate.php +++ b/lib/private/Log/Rotate.php @@ -5,7 +5,6 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -23,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Log; use OCP\Log\RotationTrait; diff --git a/lib/private/Log/Syslog.php b/lib/private/Log/Syslog.php index 02cffe066b1..7c3d1a54b78 100644 --- a/lib/private/Log/Syslog.php +++ b/lib/private/Log/Syslog.php @@ -5,7 +5,6 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bart Visscher <bartv@thisnet.nl> * @author Julius Härtl <jus@bitgrid.net> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -24,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Log; use OC\SystemConfig; diff --git a/lib/private/Log/Systemdlog.php b/lib/private/Log/Systemdlog.php index 979befbdae1..a01826c0b05 100644 --- a/lib/private/Log/Systemdlog.php +++ b/lib/private/Log/Systemdlog.php @@ -16,18 +16,17 @@ * * 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 + * 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/>. * */ - namespace OC\Log; -use OC\HintException; use OC\SystemConfig; +use OCP\HintException; use OCP\ILogger; use OCP\Log\IWriter; diff --git a/lib/private/Mail/Attachment.php b/lib/private/Mail/Attachment.php index 1f88c875565..bebcd19e107 100644 --- a/lib/private/Mail/Attachment.php +++ b/lib/private/Mail/Attachment.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Mail; use OCP\Mail\IAttachment; diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index d5bd27007df..a83f7787829 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -29,14 +29,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Mail; use OCP\Defaults; @@ -569,7 +568,7 @@ EOF; * * @param string $text Text of button; Note: When $plainText falls back to this, HTML is automatically escaped in the HTML email * @param string $url URL of button - * @param string $plainText Text of button in plain text version + * @param string|false $plainText Text of button in plain text version * if empty the $text is used, if false none will be used * * @since 12.0.0 @@ -620,7 +619,11 @@ EOF; public function addFooter(string $text = '', ?string $lang = null) { if ($text === '') { $l10n = $this->l10nFactory->get('lib', $lang); - $text = $this->themingDefaults->getName() . ' - ' . $this->themingDefaults->getSlogan($lang) . '<br>' . $l10n->t('This is an automatically sent email, please do not reply.'); + $slogan = $this->themingDefaults->getSlogan($lang); + if ($slogan !== '') { + $slogan = ' - ' . $slogan; + } + $text = $this->themingDefaults->getName() . $slogan . '<br>' . $l10n->t('This is an automatically sent email, please do not reply.'); } if ($this->footerAdded) { diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index e31784db587..1189907eac9 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -33,7 +33,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Mail; use Egulias\EmailValidator\EmailValidator; @@ -45,11 +44,11 @@ use OCP\IL10N; use OCP\ILogger; use OCP\IURLGenerator; use OCP\L10N\IFactory; +use OCP\Mail\Events\BeforeMessageSent; use OCP\Mail\IAttachment; use OCP\Mail\IEMailTemplate; use OCP\Mail\IMailer; use OCP\Mail\IMessage; -use OCP\Mail\Events\BeforeMessageSent; /** * Class Mailer provides some basic functions to create a mail message that can be used in combination with @@ -293,6 +292,15 @@ class Mailer implements IMailer { $transport->setStreamOptions($streamingOptions); } + $overwriteCliUrl = parse_url( + $this->config->getSystemValueString('overwrite.cli.url', ''), + PHP_URL_HOST + ); + + if (!empty($overwriteCliUrl)) { + $transport->setLocalDomain($overwriteCliUrl); + } + return $transport; } diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php index a158c573eaf..c1b08b4e231 100644 --- a/lib/private/Mail/Message.php +++ b/lib/private/Mail/Message.php @@ -29,7 +29,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Mail; use OCP\Mail\IAttachment; diff --git a/lib/private/Memcache/APCu.php b/lib/private/Memcache/APCu.php index ed3c81b70d7..56345890bf2 100644 --- a/lib/private/Memcache/APCu.php +++ b/lib/private/Memcache/APCu.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Memcache/ArrayCache.php b/lib/private/Memcache/ArrayCache.php index 8c91d9fcbbb..b89aff0b7ed 100644 --- a/lib/private/Memcache/ArrayCache.php +++ b/lib/private/Memcache/ArrayCache.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; use OCP\IMemcache; diff --git a/lib/private/Memcache/CADTrait.php b/lib/private/Memcache/CADTrait.php index 4c02c3356ab..a0843fc7731 100644 --- a/lib/private/Memcache/CADTrait.php +++ b/lib/private/Memcache/CADTrait.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; trait CADTrait { diff --git a/lib/private/Memcache/CASTrait.php b/lib/private/Memcache/CASTrait.php index 163afa2c3d4..13688651043 100644 --- a/lib/private/Memcache/CASTrait.php +++ b/lib/private/Memcache/CASTrait.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; trait CASTrait { diff --git a/lib/private/Memcache/Cache.php b/lib/private/Memcache/Cache.php index fe141b7bf19..95213c16849 100644 --- a/lib/private/Memcache/Cache.php +++ b/lib/private/Memcache/Cache.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; abstract class Cache implements \ArrayAccess, \OCP\ICache { diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php index 17ee2a58e04..08f19e11ef3 100644 --- a/lib/private/Memcache/Factory.php +++ b/lib/private/Memcache/Factory.php @@ -7,6 +7,7 @@ * @author Lukas Reschke <lukas@statuscode.ch> * @author Markus Goetz <markus@woboq.com> * @author Morris Jobke <hey@morrisjobke.de> + * @author Richard Steinmetz <richard@steinmetz.cloud> * @author Robin Appelman <robin@icewind.nl> * @author Robin McCorkell <robin@mccorkell.me.uk> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -28,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; use OCP\ICache; @@ -86,36 +86,16 @@ class Factory implements ICacheFactory { $missingCacheMessage = 'Memcache {class} not available for {use} cache'; $missingCacheHint = 'Is the matching PHP module installed and enabled?'; if (!class_exists($localCacheClass) || !$localCacheClass::isAvailable()) { - if (\OC::$CLI && !defined('PHPUNIT_RUN')) { - // CLI should not hard-fail on broken memcache - $this->logger->info($missingCacheMessage, [ - 'class' => $localCacheClass, - 'use' => 'local', - 'app' => 'cli' - ]); - $localCacheClass = self::NULL_CACHE; - } else { - throw new \OC\HintException(strtr($missingCacheMessage, [ - '{class}' => $localCacheClass, '{use}' => 'local' - ]), $missingCacheHint); - } + throw new \OCP\HintException(strtr($missingCacheMessage, [ + '{class}' => $localCacheClass, '{use}' => 'local' + ]), $missingCacheHint); } if (!class_exists($distributedCacheClass) || !$distributedCacheClass::isAvailable()) { - if (\OC::$CLI && !defined('PHPUNIT_RUN')) { - // CLI should not hard-fail on broken memcache - $this->logger->info($missingCacheMessage, [ - 'class' => $distributedCacheClass, - 'use' => 'distributed', - 'app' => 'cli' - ]); - $distributedCacheClass = self::NULL_CACHE; - } else { - throw new \OC\HintException(strtr($missingCacheMessage, [ - '{class}' => $distributedCacheClass, '{use}' => 'distributed' - ]), $missingCacheHint); - } + throw new \OCP\HintException(strtr($missingCacheMessage, [ + '{class}' => $distributedCacheClass, '{use}' => 'distributed' + ]), $missingCacheHint); } - if (!($lockingCacheClass && class_exists($distributedCacheClass) && $lockingCacheClass::isAvailable())) { + if (!($lockingCacheClass && class_exists($lockingCacheClass) && $lockingCacheClass::isAvailable())) { // don't fallback since the fallback might not be suitable for storing lock $lockingCacheClass = self::NULL_CACHE; } diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php index 7b852a418e1..b3414a7d290 100644 --- a/lib/private/Memcache/Memcached.php +++ b/lib/private/Memcache/Memcached.php @@ -29,10 +29,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; -use OC\HintException; +use OCP\HintException; use OCP\IMemcache; class Memcached extends Cache implements IMemcache { diff --git a/lib/private/Memcache/NullCache.php b/lib/private/Memcache/NullCache.php index 5ad3cb22201..7b56ec932f4 100644 --- a/lib/private/Memcache/NullCache.php +++ b/lib/private/Memcache/NullCache.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; class NullCache extends Cache implements \OCP\IMemcache { diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php index 56470afa0c5..aee1773d565 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -2,6 +2,7 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> @@ -26,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Memcache; use OCP\IMemcacheTTL; @@ -69,7 +69,7 @@ class Redis extends Cache implements IMemcacheTTL { } public function hasKey($key) { - return self::$cache->exists($this->getNameSpace() . $key); + return (bool)self::$cache->exists($this->getNameSpace() . $key); } public function remove($key) { diff --git a/lib/private/MemoryInfo.php b/lib/private/MemoryInfo.php index f227d38df9f..074e9f915fe 100644 --- a/lib/private/MemoryInfo.php +++ b/lib/private/MemoryInfo.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC; /** diff --git a/lib/private/Migration/BackgroundRepair.php b/lib/private/Migration/BackgroundRepair.php index 749a1a1bc69..25026575d38 100644 --- a/lib/private/Migration/BackgroundRepair.php +++ b/lib/private/Migration/BackgroundRepair.php @@ -5,6 +5,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Lukas Reschke <lukas@statuscode.ch> + * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -23,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Migration; use OC\BackgroundJob\JobList; diff --git a/lib/private/Migration/ConsoleOutput.php b/lib/private/Migration/ConsoleOutput.php index 2ad42843dba..cf4362d3144 100644 --- a/lib/private/Migration/ConsoleOutput.php +++ b/lib/private/Migration/ConsoleOutput.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Migration; use OCP\Migration\IOutput; diff --git a/lib/private/Migration/SimpleOutput.php b/lib/private/Migration/SimpleOutput.php index 11f2ed2837c..5024fdac585 100644 --- a/lib/private/Migration/SimpleOutput.php +++ b/lib/private/Migration/SimpleOutput.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Migration; use OCP\ILogger; diff --git a/lib/private/NaturalSort.php b/lib/private/NaturalSort.php index d328ad0f359..d38c4622796 100644 --- a/lib/private/NaturalSort.php +++ b/lib/private/NaturalSort.php @@ -6,7 +6,6 @@ * @author AW-UC <git@a-wesemann.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin McCorkell <robin@mccorkell.me.uk> * @author Vincent Petry <vincent@nextcloud.com> * @@ -25,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OCP\ILogger; diff --git a/lib/private/NaturalSort_DefaultCollator.php b/lib/private/NaturalSort_DefaultCollator.php index f19b8218939..35bed8a37c7 100644 --- a/lib/private/NaturalSort_DefaultCollator.php +++ b/lib/private/NaturalSort_DefaultCollator.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class NaturalSort_DefaultCollator { diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index e250523b98f..2ffd25df9b8 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -8,7 +8,7 @@ * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\App\AppManager; @@ -50,6 +49,8 @@ class NavigationManager implements INavigationManager { protected $entries = []; protected $closureEntries = []; protected $activeEntry; + protected $unreadCounters = []; + /** @var bool */ protected $init = false; /** @var IAppManager|AppManager */ @@ -98,7 +99,11 @@ class NavigationManager implements INavigationManager { if (!isset($entry['type'])) { $entry['type'] = 'link'; } - $this->entries[$entry['id']] = $entry; + + $id = $entry['id']; + $entry['unread'] = isset($this->unreadCounters[$id]) ? $this->unreadCounters[$id] : 0; + + $this->entries[$id] = $entry; } /** @@ -320,4 +325,8 @@ class NavigationManager implements INavigationManager { } return false; } + + public function setUnreadCounter(string $id, int $unreadCounter): void { + $this->unreadCounters[$id] = $unreadCounter; + } } diff --git a/lib/private/NeedsUpdateException.php b/lib/private/NeedsUpdateException.php index 0b9d323d96a..fcf63a6b373 100644 --- a/lib/private/NeedsUpdateException.php +++ b/lib/private/NeedsUpdateException.php @@ -2,7 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -20,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class NeedsUpdateException extends ServiceUnavailableException { diff --git a/lib/private/NotSquareException.php b/lib/private/NotSquareException.php index a67fac7c20e..40957e7d924 100644 --- a/lib/private/NotSquareException.php +++ b/lib/private/NotSquareException.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christopher Schäpers <kondou@ts.unde.re> - * @author Morris Jobke <hey@morrisjobke.de> * * @license AGPL-3.0 * @@ -20,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class NotSquareException extends \Exception { diff --git a/lib/private/Notification/Action.php b/lib/private/Notification/Action.php index a04f622c3cb..6d1375a611b 100644 --- a/lib/private/Notification/Action.php +++ b/lib/private/Notification/Action.php @@ -22,7 +22,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Notification; use OCP\Notification\IAction; diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index f485b37cae7..fb3a46d5f5d 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -24,9 +24,9 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Notification; +use OC\AppFramework\Bootstrap\Coordinator; use OCP\AppFramework\QueryException; use OCP\ILogger; use OCP\Notification\AlreadyProcessedException; @@ -43,6 +43,8 @@ class Manager implements IManager { protected $validator; /** @var ILogger */ protected $logger; + /** @var Coordinator */ + private $coordinator; /** @var IApp[] */ protected $apps; @@ -58,17 +60,23 @@ class Manager implements IManager { protected $preparingPushNotification; /** @var bool */ protected $deferPushing; + /** @var bool */ + private $parsedRegistrationContext; public function __construct(IValidator $validator, - ILogger $logger) { + ILogger $logger, + Coordinator $coordinator) { $this->validator = $validator; $this->logger = $logger; + $this->coordinator = $coordinator; + $this->apps = []; $this->notifiers = []; $this->appClasses = []; $this->notifierClasses = []; $this->preparingPushNotification = false; $this->deferPushing = false; + $this->parsedRegistrationContext = false; } /** * @param string $appClass The service must implement IApp, otherwise a @@ -141,6 +149,32 @@ class Manager implements IManager { * @return INotifier[] */ public function getNotifiers(): array { + if (!$this->parsedRegistrationContext) { + $notifierServices = $this->coordinator->getRegistrationContext()->getNotifierServices(); + foreach ($notifierServices as $notifierService) { + try { + $notifier = \OC::$server->query($notifierService->getService()); + } catch (QueryException $e) { + $this->logger->logException($e, [ + 'message' => 'Failed to load notification notifier class: ' . $notifierService->getService(), + 'app' => 'notifications', + ]); + continue; + } + + if (!($notifier instanceof INotifier)) { + $this->logger->error('Notification notifier class ' . $notifierService->getService() . ' is not implementing ' . INotifier::class, [ + 'app' => 'notifications', + ]); + continue; + } + + $this->notifiers[] = $notifier; + } + + $this->parsedRegistrationContext = true; + } + if (empty($this->notifierClasses)) { return $this->notifiers; } diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php index c0848817361..3e5cf1d6934 100644 --- a/lib/private/Notification/Notification.php +++ b/lib/private/Notification/Notification.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Notification; use OCP\Notification\IAction; diff --git a/lib/private/OCS/CoreCapabilities.php b/lib/private/OCS/CoreCapabilities.php index 81c7bf93da5..ab06b04cc91 100644 --- a/lib/private/OCS/CoreCapabilities.php +++ b/lib/private/OCS/CoreCapabilities.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\OCS; use OCP\Capabilities\ICapability; diff --git a/lib/private/OCS/DiscoveryService.php b/lib/private/OCS/DiscoveryService.php index 0a28b09fda1..1d10bbac870 100644 --- a/lib/private/OCS/DiscoveryService.php +++ b/lib/private/OCS/DiscoveryService.php @@ -19,14 +19,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\OCS; use OCP\AppFramework\Http; diff --git a/lib/private/OCS/Exception.php b/lib/private/OCS/Exception.php index 63a7bdb54ea..981c138b385 100644 --- a/lib/private/OCS/Exception.php +++ b/lib/private/OCS/Exception.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\OCS; class Exception extends \Exception { diff --git a/lib/private/OCS/Provider.php b/lib/private/OCS/Provider.php index 68100c64819..5e7a86a1341 100644 --- a/lib/private/OCS/Provider.php +++ b/lib/private/OCS/Provider.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\OCS; class Provider extends \OCP\AppFramework\Controller { diff --git a/lib/private/OCS/Result.php b/lib/private/OCS/Result.php index be2e6259309..73c2bf98272 100644 --- a/lib/private/OCS/Result.php +++ b/lib/private/OCS/Result.php @@ -28,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\OCS; class Result { diff --git a/lib/private/Preview/BMP.php b/lib/private/Preview/BMP.php index 7c69d555051..c429f31f0e2 100644 --- a/lib/private/Preview/BMP.php +++ b/lib/private/Preview/BMP.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; class BMP extends Image { diff --git a/lib/private/Preview/BackgroundCleanupJob.php b/lib/private/Preview/BackgroundCleanupJob.php index e0546c4a11c..c78ef7d7257 100644 --- a/lib/private/Preview/BackgroundCleanupJob.php +++ b/lib/private/Preview/BackgroundCleanupJob.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Preview; use OC\BackgroundJob\TimedJob; diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php index e8d8c7a3fa5..969fb948d94 100644 --- a/lib/private/Preview/Bitmap.php +++ b/lib/private/Preview/Bitmap.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use Imagick; diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php index f3441b5211c..f026d3259f5 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Preview; use OC\Archive\ZIP; diff --git a/lib/private/Preview/Font.php b/lib/private/Preview/Font.php index 7f34dc04b15..baf29e1defc 100644 --- a/lib/private/Preview/Font.php +++ b/lib/private/Preview/Font.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; // .otf, .ttf and .pfb diff --git a/lib/private/Preview/GIF.php b/lib/private/Preview/GIF.php index bd9e569920d..482f014e3dc 100644 --- a/lib/private/Preview/GIF.php +++ b/lib/private/Preview/GIF.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; class GIF extends Image { diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index 2be08d1b2c4..6e1e0997a68 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -4,7 +4,8 @@ * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Elijah Martin-Merrill <elijah@nyp-itsours.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author J0WI <J0WI@users.noreply.github.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -19,14 +20,13 @@ * * 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 + * 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/>. * */ - namespace OC\Preview; use OCP\Files\File; @@ -224,6 +224,7 @@ class Generator { $previewProviders = $this->previewManager->getProviders(); foreach ($previewProviders as $supportedMimeType => $providers) { + // Filter out providers that does not support this mime if (!preg_match($supportedMimeType, $mimeType)) { continue; } @@ -238,8 +239,8 @@ class Generator { continue; } - $maxWidth = (int)$this->config->getSystemValue('preview_max_x', 4096); - $maxHeight = (int)$this->config->getSystemValue('preview_max_y', 4096); + $maxWidth = $this->config->getSystemValueInt('preview_max_x', 4096); + $maxHeight = $this->config->getSystemValueInt('preview_max_y', 4096); $preview = $this->helper->getThumbnail($provider, $file, $maxWidth, $maxHeight); diff --git a/lib/private/Preview/GeneratorHelper.php b/lib/private/Preview/GeneratorHelper.php index 843aa0ed420..a5a9dacf63b 100644 --- a/lib/private/Preview/GeneratorHelper.php +++ b/lib/private/Preview/GeneratorHelper.php @@ -16,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php index 872db6f2ec9..68c83fad97d 100644 --- a/lib/private/Preview/HEIC.php +++ b/lib/private/Preview/HEIC.php @@ -27,7 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/Illustrator.php b/lib/private/Preview/Illustrator.php index 20c35522dcc..3d926c304c5 100644 --- a/lib/private/Preview/Illustrator.php +++ b/lib/private/Preview/Illustrator.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.ai diff --git a/lib/private/Preview/Image.php b/lib/private/Preview/Image.php index eea471a2356..4bf0cb7a3d4 100644 --- a/lib/private/Preview/Image.php +++ b/lib/private/Preview/Image.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Georg Ehrke <oc.list@georgehrke.com> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> * @author josh4trunks <joshruehlig@gmail.com> * @author Olivier Paroz <github@oparoz.com> @@ -26,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; @@ -38,7 +38,7 @@ abstract class Image extends ProviderV2 { * {@inheritDoc} */ public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { - $maxSizeForImages = \OC::$server->getConfig()->getSystemValue('preview_max_filesize_image', 50); + $maxSizeForImages = \OC::$server->getConfig()->getSystemValueInt('preview_max_filesize_image', 50); $size = $file->getSize(); if ($maxSizeForImages !== -1 && $size > ($maxSizeForImages * 1024 * 1024)) { diff --git a/lib/private/Preview/JPEG.php b/lib/private/Preview/JPEG.php index abdb6b661fc..14ae95690c0 100644 --- a/lib/private/Preview/JPEG.php +++ b/lib/private/Preview/JPEG.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; class JPEG extends Image { diff --git a/lib/private/Preview/Krita.php b/lib/private/Preview/Krita.php index b14d1a3f17b..ec7be4b82cf 100644 --- a/lib/private/Preview/Krita.php +++ b/lib/private/Preview/Krita.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php index 868078aa012..dec838b6e5a 100644 --- a/lib/private/Preview/MP3.php +++ b/lib/private/Preview/MP3.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use ID3Parser\ID3Parser; diff --git a/lib/private/Preview/MSOffice2003.php b/lib/private/Preview/MSOffice2003.php index 76781e1249a..34cee499ff8 100644 --- a/lib/private/Preview/MSOffice2003.php +++ b/lib/private/Preview/MSOffice2003.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.docm, .dotm, .xls(m), .xlt(m), .xla(m), .ppt(m), .pot(m), .pps(m), .ppa(m) diff --git a/lib/private/Preview/MSOffice2007.php b/lib/private/Preview/MSOffice2007.php index bd1e53dd27f..3d3049e1c12 100644 --- a/lib/private/Preview/MSOffice2007.php +++ b/lib/private/Preview/MSOffice2007.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.docx, .dotx, .xlsx, .xltx, .pptx, .potx, .ppsx diff --git a/lib/private/Preview/MSOfficeDoc.php b/lib/private/Preview/MSOfficeDoc.php index 2068de6f8f5..e04503629e1 100644 --- a/lib/private/Preview/MSOfficeDoc.php +++ b/lib/private/Preview/MSOfficeDoc.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.doc, .dot diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php index d900c2b3ac2..e24bdb5959b 100644 --- a/lib/private/Preview/MarkDown.php +++ b/lib/private/Preview/MarkDown.php @@ -3,6 +3,8 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Joas Schilling <coding@schilljs.com> + * @author Julius Härtl <jus@bitgrid.net> + * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -21,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php index 68157f1a87f..b139758596c 100644 --- a/lib/private/Preview/Movie.php +++ b/lib/private/Preview/Movie.php @@ -27,11 +27,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; use OCP\IImage; +use Psr\Log\LoggerInterface; class Movie extends ProviderV2 { public static $avconvBinary; @@ -50,17 +50,34 @@ class Movie extends ProviderV2 { public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { // TODO: use proc_open() and stream the source file ? - $absPath = $this->getLocalFile($file, 5242880); // only use the first 5MB + $result = null; + if ($this->useTempFile($file)) { + // try downloading 5 MB first as it's likely that the first frames are present there + // in some cases this doesn't work for example when the moov atom is at the + // end of the file, so if it fails we fall back to getting the full file + $sizeAttempts = [5242880, null]; + } else { + // size is irrelevant, only attempt once + $sizeAttempts = [null]; + } - $result = $this->generateThumbNail($maxX, $maxY, $absPath, 5); - if ($result === null) { - $result = $this->generateThumbNail($maxX, $maxY, $absPath, 1); + foreach ($sizeAttempts as $size) { + $absPath = $this->getLocalFile($file, $size); + + $result = $this->generateThumbNail($maxX, $maxY, $absPath, 5); if ($result === null) { - $result = $this->generateThumbNail($maxX, $maxY, $absPath, 0); + $result = $this->generateThumbNail($maxX, $maxY, $absPath, 1); + if ($result === null) { + $result = $this->generateThumbNail($maxX, $maxY, $absPath, 0); + } } - } - $this->cleanTmpFiles(); + $this->cleanTmpFiles(); + + if ($result !== null) { + break; + } + } return $result; } @@ -79,13 +96,13 @@ class Movie extends ProviderV2 { $cmd = self::$avconvBinary . ' -y -ss ' . escapeshellarg($second) . ' -i ' . escapeshellarg($absPath) . ' -an -f mjpeg -vframes 1 -vsync 1 ' . escapeshellarg($tmpPath) . - ' > /dev/null 2>&1'; + ' 2>&1'; } else { $cmd = self::$ffmpegBinary . ' -y -ss ' . escapeshellarg($second) . ' -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1' . ' ' . escapeshellarg($tmpPath) . - ' > /dev/null 2>&1'; + ' 2>&1'; } exec($cmd, $output, $returnCode); @@ -100,6 +117,10 @@ class Movie extends ProviderV2 { return $image; } } + + $logger = \OC::$server->get(LoggerInterface::class); + $logger->error('Movie preview generation failed Output: {output}', ['app' => 'core', 'output' => $output]); + unlink($tmpPath); return null; } diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php index d6f9ac3dfd7..fef218823e2 100644 --- a/lib/private/Preview/Office.php +++ b/lib/private/Preview/Office.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/OpenDocument.php b/lib/private/Preview/OpenDocument.php index 01e191c2789..8deb9fd0a1e 100644 --- a/lib/private/Preview/OpenDocument.php +++ b/lib/private/Preview/OpenDocument.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.odt, .ott, .oth, .odm, .odg, .otg, .odp, .otp, .ods, .ots, .odc, .odf, .odb, .odi, .oxt diff --git a/lib/private/Preview/PDF.php b/lib/private/Preview/PDF.php index cc341be46a0..405fd1545f9 100644 --- a/lib/private/Preview/PDF.php +++ b/lib/private/Preview/PDF.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.pdf diff --git a/lib/private/Preview/PNG.php b/lib/private/Preview/PNG.php index a10a1709401..5a3f2136575 100644 --- a/lib/private/Preview/PNG.php +++ b/lib/private/Preview/PNG.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; class PNG extends Image { diff --git a/lib/private/Preview/Photoshop.php b/lib/private/Preview/Photoshop.php index 2f2eb5f42d8..9d79abf8191 100644 --- a/lib/private/Preview/Photoshop.php +++ b/lib/private/Preview/Photoshop.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.psd diff --git a/lib/private/Preview/Postscript.php b/lib/private/Preview/Postscript.php index e651048744c..06ea7fc8037 100644 --- a/lib/private/Preview/Postscript.php +++ b/lib/private/Preview/Postscript.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.eps diff --git a/lib/private/Preview/Provider.php b/lib/private/Preview/Provider.php index b8490fb0894..e87aded4786 100644 --- a/lib/private/Preview/Provider.php +++ b/lib/private/Preview/Provider.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Preview\IProvider; diff --git a/lib/private/Preview/ProviderV1Adapter.php b/lib/private/Preview/ProviderV1Adapter.php index 6f5242a5204..22db380d30d 100644 --- a/lib/private/Preview/ProviderV1Adapter.php +++ b/lib/private/Preview/ProviderV1Adapter.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Preview; use OC\Files\View; diff --git a/lib/private/Preview/ProviderV2.php b/lib/private/Preview/ProviderV2.php index 5a369639892..1b5bee0e5cc 100644 --- a/lib/private/Preview/ProviderV2.php +++ b/lib/private/Preview/ProviderV2.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Preview; use OCP\Files\File; @@ -71,6 +70,10 @@ abstract class ProviderV2 implements IProviderV2 { */ abstract public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage; + protected function useTempFile(File $file) { + return $file->isEncrypted() || !$file->getStorage()->isLocal(); + } + /** * Get a path to either the local file or temporary file * @@ -79,8 +82,7 @@ abstract class ProviderV2 implements IProviderV2 { * @return string */ protected function getLocalFile(File $file, int $maxSize = null): string { - $useTempFile = $file->isEncrypted() || !$file->getStorage()->isLocal(); - if ($useTempFile) { + if ($this->useTempFile($file)) { $absPath = \OC::$server->getTempManager()->getTemporaryFile(); $content = $file->fopen('r'); diff --git a/lib/private/Preview/SGI.php b/lib/private/Preview/SGI.php index 2e198362670..9f392d2252f 100644 --- a/lib/private/Preview/SGI.php +++ b/lib/private/Preview/SGI.php @@ -13,7 +13,7 @@ * * 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 + * 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 diff --git a/lib/private/Preview/SVG.php b/lib/private/Preview/SVG.php index 6630dc26978..cee0f341716 100644 --- a/lib/private/Preview/SVG.php +++ b/lib/private/Preview/SVG.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/StarOffice.php b/lib/private/Preview/StarOffice.php index fd176858a84..58f210d2ff6 100644 --- a/lib/private/Preview/StarOffice.php +++ b/lib/private/Preview/StarOffice.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.sxw, .stw, .sxc, .stc, .sxd, .std, .sxi, .sti, .sxg, .sxm diff --git a/lib/private/Preview/Storage/Root.php b/lib/private/Preview/Storage/Root.php index 675263fdd50..0eac3ce2064 100644 --- a/lib/private/Preview/Storage/Root.php +++ b/lib/private/Preview/Storage/Root.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Preview\Storage; use OC\Files\AppData\AppData; diff --git a/lib/private/Preview/TGA.php b/lib/private/Preview/TGA.php index d29cb3e2c10..cb591be2231 100644 --- a/lib/private/Preview/TGA.php +++ b/lib/private/Preview/TGA.php @@ -13,7 +13,7 @@ * * 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 + * 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 diff --git a/lib/private/Preview/TIFF.php b/lib/private/Preview/TIFF.php index 20d5552432b..1a5d957d3ee 100644 --- a/lib/private/Preview/TIFF.php +++ b/lib/private/Preview/TIFF.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; //.tiff diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index 9c5b7aa1440..0ae35fb3eec 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php index c686b8e0e43..7f4593f9fe3 100644 --- a/lib/private/Preview/Watcher.php +++ b/lib/private/Preview/Watcher.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Preview; use OCP\Files\Folder; diff --git a/lib/private/Preview/WatcherConnector.php b/lib/private/Preview/WatcherConnector.php index 4d2d4676d91..4d038c9a2b7 100644 --- a/lib/private/Preview/WatcherConnector.php +++ b/lib/private/Preview/WatcherConnector.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Preview; use OC\SystemConfig; diff --git a/lib/private/Preview/WebP.php b/lib/private/Preview/WebP.php index d2172b1242c..c8f8d11c393 100644 --- a/lib/private/Preview/WebP.php +++ b/lib/private/Preview/WebP.php @@ -1,11 +1,11 @@ <?php declare(strict_types=1); + /** * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> * * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\Preview; use OCP\Files\FileInfo; diff --git a/lib/private/Preview/XBitmap.php b/lib/private/Preview/XBitmap.php index f549841d837..e0adb48b881 100644 --- a/lib/private/Preview/XBitmap.php +++ b/lib/private/Preview/XBitmap.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Preview; class XBitmap extends Image { diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php index d6dc700e4a2..02d017a5017 100644 --- a/lib/private/PreviewManager.php +++ b/lib/private/PreviewManager.php @@ -28,11 +28,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; +use OC\AppFramework\Bootstrap\Coordinator; use OC\Preview\Generator; use OC\Preview\GeneratorHelper; +use OCP\AppFramework\QueryException; use OCP\Files\File; use OCP\Files\IAppData; use OCP\Files\IRootFolder; @@ -40,8 +41,10 @@ use OCP\Files\NotFoundException; use OCP\Files\SimpleFS\ISimpleFile; use OCP\IConfig; use OCP\IPreview; +use OCP\IServerContainer; use OCP\Preview\IProviderV2; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use function array_key_exists; class PreviewManager implements IPreview { /** @var IConfig */ @@ -80,6 +83,20 @@ class PreviewManager implements IPreview { /** @var string */ protected $userId; + /** @var Coordinator */ + private $bootstrapCoordinator; + + /** + * Hash map (without value) of loaded bootstrap providers + * + * @var null[] + * @psalm-var array<string, null> + */ + private $loadedBootstrapProviders = []; + + /** @var IServerContainer */ + private $container; + /** * PreviewManager constructor. * @@ -94,13 +111,17 @@ class PreviewManager implements IPreview { IAppData $appData, EventDispatcherInterface $eventDispatcher, GeneratorHelper $helper, - $userId) { + $userId, + Coordinator $bootstrapCoordinator, + IServerContainer $container) { $this->config = $config; $this->rootFolder = $rootFolder; $this->appData = $appData; $this->eventDispatcher = $eventDispatcher; $this->helper = $helper; $this->userId = $userId; + $this->bootstrapCoordinator = $bootstrapCoordinator; + $this->container = $container; } /** @@ -135,6 +156,7 @@ class PreviewManager implements IPreview { } $this->registerCoreProviders(); + $this->registerBootstrapProviders(); if ($this->providerListDirty) { $keys = array_map('strlen', array_keys($this->providers)); array_multisort($keys, SORT_DESC, $this->providers); @@ -221,6 +243,7 @@ class PreviewManager implements IPreview { } $this->registerCoreProviders(); + $this->registerBootstrapProviders(); $providerMimeTypes = array_keys($this->providers); foreach ($providerMimeTypes as $supportedMimeType) { if (preg_match($supportedMimeType, $mimeType)) { @@ -278,7 +301,6 @@ class PreviewManager implements IPreview { * - OC\Preview\JPEG * - OC\Preview\GIF * - OC\Preview\BMP - * - OC\Preview\HEIC * - OC\Preview\XBitmap * - OC\Preview\MarkDown * - OC\Preview\MP3 @@ -286,6 +308,7 @@ class PreviewManager implements IPreview { * * The following providers are disabled by default due to performance or privacy concerns: * - OC\Preview\Font + * - OC\Preview\HEIC * - OC\Preview\Illustrator * - OC\Preview\Movie * - OC\Preview\MSOfficeDoc @@ -311,7 +334,6 @@ class PreviewManager implements IPreview { Preview\JPEG::class, Preview\GIF::class, Preview\BMP::class, - Preview\HEIC::class, Preview\XBitmap::class, Preview\Krita::class, Preview\WebP::class, @@ -433,4 +455,31 @@ class PreviewManager implements IPreview { } } } + + private function registerBootstrapProviders(): void { + $context = $this->bootstrapCoordinator->getRegistrationContext(); + + if ($context === null) { + // Just ignore for now + return; + } + + $providers = $context->getPreviewProviders(); + foreach ($providers as $provider) { + $key = $provider->getMimeTypeRegex() . '-' . $provider->getService(); + if (array_key_exists($key, $this->loadedBootstrapProviders)) { + // Do not load the provider more than once + continue; + } + $this->loadedBootstrapProviders[$key] = null; + + $this->registerProvider($provider->getMimeTypeRegex(), function () use ($provider) { + try { + return $this->container->query($provider->getService()); + } catch (QueryException $e) { + return null; + } + }); + } + } } diff --git a/lib/private/PreviewNotAvailableException.php b/lib/private/PreviewNotAvailableException.php index eb411182746..f4564546ea8 100644 --- a/lib/private/PreviewNotAvailableException.php +++ b/lib/private/PreviewNotAvailableException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC; class PreviewNotAvailableException extends \Exception { diff --git a/lib/private/Profile/Actions/EmailAction.php b/lib/private/Profile/Actions/EmailAction.php new file mode 100644 index 00000000000..1eef1236630 --- /dev/null +++ b/lib/private/Profile/Actions/EmailAction.php @@ -0,0 +1,94 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Profile\Actions; + +use OCP\Accounts\IAccountManager; +use OCP\IURLGenerator; +use OCP\IUser; +use OCP\L10N\IFactory; +use OCP\Profile\ILinkAction; + +class EmailAction implements ILinkAction { + + /** @var string */ + private $value; + + /** @var IAccountManager */ + private $accountManager; + + /** @var IFactory */ + private $l10nFactory; + + /** @var IUrlGenerator */ + private $urlGenerator; + + public function __construct( + IAccountManager $accountManager, + IFactory $l10nFactory, + IURLGenerator $urlGenerator + ) { + $this->accountManager = $accountManager; + $this->l10nFactory = $l10nFactory; + $this->urlGenerator = $urlGenerator; + } + + public function preload(IUser $targetUser): void { + $account = $this->accountManager->getAccount($targetUser); + $this->value = $account->getProperty(IAccountManager::PROPERTY_EMAIL)->getValue(); + } + + public function getAppId(): string { + return 'core'; + } + + public function getId(): string { + return IAccountManager::PROPERTY_EMAIL; + } + + public function getDisplayId(): string { + return $this->l10nFactory->get('core')->t('Email'); + } + + public function getTitle(): string { + return $this->l10nFactory->get('core')->t('Mail %s', [$this->value]); + } + + public function getPriority(): int { + return 20; + } + + public function getIcon(): string { + return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); + } + + public function getTarget(): ?string { + if (empty($this->value)) { + return null; + } + return 'mailto:' . $this->value; + } +} diff --git a/lib/private/Profile/Actions/PhoneAction.php b/lib/private/Profile/Actions/PhoneAction.php new file mode 100644 index 00000000000..df0e30cd277 --- /dev/null +++ b/lib/private/Profile/Actions/PhoneAction.php @@ -0,0 +1,94 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Profile\Actions; + +use OCP\Accounts\IAccountManager; +use OCP\IURLGenerator; +use OCP\IUser; +use OCP\L10N\IFactory; +use OCP\Profile\ILinkAction; + +class PhoneAction implements ILinkAction { + + /** @var string */ + private $value; + + /** @var IAccountManager */ + private $accountManager; + + /** @var IFactory */ + private $l10nFactory; + + /** @var IUrlGenerator */ + private $urlGenerator; + + public function __construct( + IAccountManager $accountManager, + IFactory $l10nFactory, + IURLGenerator $urlGenerator + ) { + $this->accountManager = $accountManager; + $this->l10nFactory = $l10nFactory; + $this->urlGenerator = $urlGenerator; + } + + public function preload(IUser $targetUser): void { + $account = $this->accountManager->getAccount($targetUser); + $this->value = $account->getProperty(IAccountManager::PROPERTY_PHONE)->getValue(); + } + + public function getAppId(): string { + return 'core'; + } + + public function getId(): string { + return IAccountManager::PROPERTY_PHONE; + } + + public function getDisplayId(): string { + return $this->l10nFactory->get('core')->t('Phone'); + } + + public function getTitle(): string { + return $this->l10nFactory->get('core')->t('Call %s', [$this->value]); + } + + public function getPriority(): int { + return 30; + } + + public function getIcon(): string { + return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/phone.svg')); + } + + public function getTarget(): ?string { + if (empty($this->value)) { + return null; + } + return 'tel:' . $this->value; + } +} diff --git a/lib/private/Profile/Actions/TwitterAction.php b/lib/private/Profile/Actions/TwitterAction.php new file mode 100644 index 00000000000..3dcfa8aaf12 --- /dev/null +++ b/lib/private/Profile/Actions/TwitterAction.php @@ -0,0 +1,97 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Profile\Actions; + +use function Safe\substr; +use OCP\Accounts\IAccountManager; +use OCP\IURLGenerator; +use OCP\IUser; +use OCP\L10N\IFactory; +use OCP\Profile\ILinkAction; + +class TwitterAction implements ILinkAction { + + /** @var string */ + private $value; + + /** @var IAccountManager */ + private $accountManager; + + /** @var IFactory */ + private $l10nFactory; + + /** @var IUrlGenerator */ + private $urlGenerator; + + public function __construct( + IAccountManager $accountManager, + IFactory $l10nFactory, + IURLGenerator $urlGenerator + ) { + $this->accountManager = $accountManager; + $this->l10nFactory = $l10nFactory; + $this->urlGenerator = $urlGenerator; + } + + public function preload(IUser $targetUser): void { + $account = $this->accountManager->getAccount($targetUser); + $this->value = $account->getProperty(IAccountManager::PROPERTY_TWITTER)->getValue(); + } + + public function getAppId(): string { + return 'core'; + } + + public function getId(): string { + return IAccountManager::PROPERTY_TWITTER; + } + + public function getDisplayId(): string { + return $this->l10nFactory->get('core')->t('Twitter'); + } + + public function getTitle(): string { + $displayUsername = $this->value[0] === '@' ? $this->value : '@' . $this->value; + return $this->l10nFactory->get('core')->t('View %s on Twitter', [$displayUsername]); + } + + public function getPriority(): int { + return 50; + } + + public function getIcon(): string { + return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/twitter.svg')); + } + + public function getTarget(): ?string { + if (empty($this->value)) { + return null; + } + $username = $this->value[0] === '@' ? substr($this->value, 1) : $this->value; + return 'https://twitter.com/' . $username; + } +} diff --git a/lib/private/Profile/Actions/WebsiteAction.php b/lib/private/Profile/Actions/WebsiteAction.php new file mode 100644 index 00000000000..ea1daeee20e --- /dev/null +++ b/lib/private/Profile/Actions/WebsiteAction.php @@ -0,0 +1,94 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Profile\Actions; + +use OCP\Accounts\IAccountManager; +use OCP\IURLGenerator; +use OCP\IUser; +use OCP\L10N\IFactory; +use OCP\Profile\ILinkAction; + +class WebsiteAction implements ILinkAction { + + /** @var string */ + private $value; + + /** @var IAccountManager */ + private $accountManager; + + /** @var IFactory */ + private $l10nFactory; + + /** @var IUrlGenerator */ + private $urlGenerator; + + public function __construct( + IAccountManager $accountManager, + IFactory $l10nFactory, + IURLGenerator $urlGenerator + ) { + $this->accountManager = $accountManager; + $this->l10nFactory = $l10nFactory; + $this->urlGenerator = $urlGenerator; + } + + public function preload(IUser $targetUser): void { + $account = $this->accountManager->getAccount($targetUser); + $this->value = $account->getProperty(IAccountManager::PROPERTY_WEBSITE)->getValue(); + } + + public function getAppId(): string { + return 'core'; + } + + public function getId(): string { + return IAccountManager::PROPERTY_WEBSITE; + } + + public function getDisplayId(): string { + return $this->l10nFactory->get('core')->t('Website'); + } + + public function getTitle(): string { + return $this->l10nFactory->get('core')->t('Visit %s', [$this->value]); + } + + public function getPriority(): int { + return 40; + } + + public function getIcon(): string { + return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/timezone.svg')); + } + + public function getTarget(): ?string { + if (empty($this->value)) { + return null; + } + return $this->value; + } +} diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php new file mode 100644 index 00000000000..e0c619725e7 --- /dev/null +++ b/lib/private/Profile/ProfileManager.php @@ -0,0 +1,342 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Profile; + +use function Safe\usort; +use OC\AppFramework\Bootstrap\Coordinator; +use OC\Core\Db\ProfileConfig; +use OC\Core\Db\ProfileConfigMapper; +use OC\KnownUser\KnownUserService; +use OC\Profile\Actions\EmailAction; +use OC\Profile\Actions\PhoneAction; +use OC\Profile\Actions\TwitterAction; +use OC\Profile\Actions\WebsiteAction; +use OCP\Accounts\IAccountManager; +use OCP\Accounts\PropertyDoesNotExistException; +use OCP\App\IAppManager; +use OCP\AppFramework\Db\DoesNotExistException; +use OCP\IUser; +use OCP\L10N\IFactory; +use OCP\Profile\ILinkAction; +use Psr\Container\ContainerInterface; +use Psr\Log\LoggerInterface; + +class ProfileManager { + + /** @var IAccountManager */ + private $accountManager; + + /** @var IAppManager */ + private $appManager; + + /** @var ProfileConfigMapper */ + private $configMapper; + + /** @var ContainerInterface */ + private $container; + + /** @var KnownUserService */ + private $knownUserService; + + /** @var IFactory */ + private $l10nFactory; + + /** @var LoggerInterface */ + private $logger; + + /** @var Coordinator */ + private $coordinator; + + /** @var ILinkAction[] */ + private $actions = []; + + /** + * Array of account property actions + */ + private const ACCOUNT_PROPERTY_ACTIONS = [ + EmailAction::class, + PhoneAction::class, + WebsiteAction::class, + TwitterAction::class, + ]; + + /** + * Array of account properties displayed on the profile + */ + private const PROFILE_PROPERTIES = [ + IAccountManager::PROPERTY_ADDRESS, + IAccountManager::PROPERTY_BIOGRAPHY, + IAccountManager::PROPERTY_DISPLAYNAME, + IAccountManager::PROPERTY_HEADLINE, + IAccountManager::PROPERTY_ORGANISATION, + IAccountManager::PROPERTY_ROLE, + ]; + + public function __construct( + IAccountManager $accountManager, + IAppManager $appManager, + ProfileConfigMapper $configMapper, + ContainerInterface $container, + KnownUserService $knownUserService, + IFactory $l10nFactory, + LoggerInterface $logger, + Coordinator $coordinator + ) { + $this->accountManager = $accountManager; + $this->appManager = $appManager; + $this->configMapper = $configMapper; + $this->container = $container; + $this->knownUserService = $knownUserService; + $this->l10nFactory = $l10nFactory; + $this->logger = $logger; + $this->coordinator = $coordinator; + } + + /** + * Register an action for the user + */ + private function registerAction(IUser $targetUser, ?IUser $visitingUser, ILinkAction $action): void { + $action->preload($targetUser); + + if ($action->getTarget() === null) { + // Actions without a target are not registered + return; + } + + if (isset($this->actions[$action->getId()])) { + $this->logger->error('Cannot register duplicate action: ' . $action->getId()); + return; + } + + if ($action->getAppId() !== 'core') { + if (!$this->appManager->isEnabledForUser($action->getAppId(), $targetUser)) { + $this->logger->notice('App: ' . $action->getAppId() . ' cannot register actions as it is not enabled for the user: ' . $targetUser->getUID()); + return; + } + if ($visitingUser === null) { + $this->logger->notice('App: ' . $action->getAppId() . ' cannot register actions as it is not available to non logged in users'); + return; + } + if (!$this->appManager->isEnabledForUser($action->getAppId(), $visitingUser)) { + $this->logger->notice('App: ' . $action->getAppId() . ' cannot register actions as it is not enabled for the visiting user: ' . $visitingUser->getUID()); + return; + } + } + + // Add action to associative array of actions + $this->actions[$action->getId()] = $action; + } + + /** + * Return an array of registered profile actions for the user + * + * @return ILinkAction[] + */ + private function getActions(IUser $targetUser, ?IUser $visitingUser): array { + $context = $this->coordinator->getRegistrationContext(); + if ($context === null) { + return []; + } + + foreach (self::ACCOUNT_PROPERTY_ACTIONS as $actionClass) { + /** @var ILinkAction $provider */ + $provider = $this->container->get($actionClass); + $this->registerAction($targetUser, $visitingUser, $provider); + } + + foreach ($context->getProfileActions() as $registration) { + /** @var ILinkAction $provider */ + $provider = $this->container->get($registration->getService()); + $this->registerAction($targetUser, $visitingUser, $provider); + } + + $actionsClone = $this->actions; + // Sort associative array into indexed array in ascending order of priority + usort($actionsClone, function (ILinkAction $a, ILinkAction $b) { + return $a->getPriority() === $b->getPriority() ? 0 : ($a->getPriority() < $b->getPriority() ? -1 : 1); + }); + return $actionsClone; + } + + /** + * Return whether the profile parameter is visible to the visiting user + */ + private function isParameterVisible(IUser $targetUser, ?IUser $visitingUser, string $paramId): bool { + try { + $account = $this->accountManager->getAccount($targetUser); + $scope = $account->getProperty($paramId)->getScope(); + } catch (PropertyDoesNotExistException $e) { + // Allow the exception as not all profile parameters are account properties + } + + $visibility = $this->getProfileConfig($targetUser, $visitingUser)[$paramId]['visibility']; + // Handle profile visibility and account property scope + switch ($visibility) { + case ProfileConfig::VISIBILITY_HIDE: + return false; + case ProfileConfig::VISIBILITY_SHOW_USERS_ONLY: + if (!empty($scope)) { + switch ($scope) { + case IAccountManager::SCOPE_PRIVATE: + return $visitingUser !== null && $this->knownUserService->isKnownToUser($targetUser->getUID(), $visitingUser->getUID()); + case IAccountManager::SCOPE_LOCAL: + case IAccountManager::SCOPE_FEDERATED: + case IAccountManager::SCOPE_PUBLISHED: + return $visitingUser !== null; + default: + return false; + } + } + return $visitingUser !== null; + case ProfileConfig::VISIBILITY_SHOW: + if (!empty($scope)) { + switch ($scope) { + case IAccountManager::SCOPE_PRIVATE: + return $visitingUser !== null && $this->knownUserService->isKnownToUser($targetUser->getUID(), $visitingUser->getUID()); + case IAccountManager::SCOPE_LOCAL: + case IAccountManager::SCOPE_FEDERATED: + case IAccountManager::SCOPE_PUBLISHED: + return true; + default: + return false; + } + } + return true; + default: + return false; + } + } + + /** + * Return the profile parameters + */ + public function getProfileParams(IUser $targetUser, ?IUser $visitingUser): array { + $account = $this->accountManager->getAccount($targetUser); + // Initialize associative array of profile parameters + $profileParameters = [ + 'userId' => $account->getUser()->getUID(), + ]; + + // Add account properties + foreach (self::PROFILE_PROPERTIES as $property) { + $profileParameters[$property] = + $this->isParameterVisible($targetUser, $visitingUser, $property) + // Explicitly set to null when value is empty string + ? ($account->getProperty($property)->getValue() ?: null) + : null; + } + + // Add avatar visibility + $profileParameters['isUserAvatarVisible'] = $this->isParameterVisible($targetUser, $visitingUser, IAccountManager::PROPERTY_AVATAR); + + // Add actions + $profileParameters['actions'] = array_map( + function (ILinkAction $action) { + return [ + 'id' => $action->getId(), + 'icon' => $action->getIcon(), + 'title' => $action->getTitle(), + 'target' => $action->getTarget(), + ]; + }, + // This is needed to reindex the array after filtering + array_values( + array_filter( + $this->getActions($targetUser, $visitingUser), + function (ILinkAction $action) use ($targetUser, $visitingUser) { + return $this->isParameterVisible($targetUser, $visitingUser, $action->getId()); + } + ), + ) + ); + + return $profileParameters; + } + + /** + * Return the default profile config + */ + private function getDefaultProfileConfig(IUser $targetUser, ?IUser $visitingUser): array { + // Contruct the default config for actions + $actionsConfig = []; + foreach ($this->getActions($targetUser, $visitingUser) as $action) { + $actionsConfig[$action->getId()] = [ + 'displayId' => $action->getDisplayId(), + 'visibility' => ProfileConfig::DEFAULT_VISIBILITY, + ]; + } + + // Map of account properties to display IDs + $propertyDisplayMap = [ + IAccountManager::PROPERTY_ADDRESS => $this->l10nFactory->get('core')->t('Address'), + IAccountManager::PROPERTY_AVATAR => $this->l10nFactory->get('core')->t('Avatar'), + IAccountManager::PROPERTY_BIOGRAPHY => $this->l10nFactory->get('core')->t('About'), + IAccountManager::PROPERTY_DISPLAYNAME => $this->l10nFactory->get('core')->t('Full name'), + IAccountManager::PROPERTY_HEADLINE => $this->l10nFactory->get('core')->t('Headline'), + IAccountManager::PROPERTY_ORGANISATION => $this->l10nFactory->get('core')->t('Organisation'), + IAccountManager::PROPERTY_ROLE => $this->l10nFactory->get('core')->t('Role'), + IAccountManager::PROPERTY_EMAIL => $this->l10nFactory->get('core')->t('Email'), + IAccountManager::PROPERTY_PHONE => $this->l10nFactory->get('core')->t('Phone'), + IAccountManager::PROPERTY_TWITTER => $this->l10nFactory->get('core')->t('Twitter'), + IAccountManager::PROPERTY_WEBSITE => $this->l10nFactory->get('core')->t('Website'), + ]; + + // Contruct the default config for account properties + $propertiesConfig = []; + foreach ($propertyDisplayMap as $property => $displayId) { + $propertiesConfig[$property] = [ + 'displayId' => $displayId, + 'visibility' => ProfileConfig::DEFAULT_PROPERTY_VISIBILITY[$property], + ]; + } + + return array_merge($actionsConfig, $propertiesConfig); + } + + /** + * Return the profile config + */ + public function getProfileConfig(IUser $targetUser, ?IUser $visitingUser): array { + $defaultProfileConfig = $this->getDefaultProfileConfig($targetUser, $visitingUser); + try { + $config = $this->configMapper->get($targetUser->getUID()); + // Merge defaults with the existing config in case the defaults are missing + $config->setConfigArray(array_merge($defaultProfileConfig, $config->getConfigArray())); + $this->configMapper->update($config); + $configArray = $config->getConfigArray(); + } catch (DoesNotExistException $e) { + // Create a new default config if it does not exist + $config = new ProfileConfig(); + $config->setUserId($targetUser->getUID()); + $config->setConfigArray($defaultProfileConfig); + $this->configMapper->insert($config); + $configArray = $config->getConfigArray(); + } + + return $configArray; + } +} diff --git a/lib/private/Profile/TProfileHelper.php b/lib/private/Profile/TProfileHelper.php new file mode 100644 index 00000000000..0d4b5c6286e --- /dev/null +++ b/lib/private/Profile/TProfileHelper.php @@ -0,0 +1,46 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OC\Profile; + +use OCP\Accounts\IAccount; +use OCP\Accounts\IAccountManager; + +trait TProfileHelper { + + /** + * Returns whether the profile is enabled for the account + * + * @since 23.0.0 + */ + protected function isProfileEnabled(IAccount $account): ?bool { + return filter_var( + $account->getProperty(IAccountManager::PROPERTY_PROFILE_ENABLED)->getValue(), + FILTER_VALIDATE_BOOLEAN, + FILTER_NULL_ON_FAILURE, + ); + } +} diff --git a/lib/private/RedisFactory.php b/lib/private/RedisFactory.php index 52e69a18778..d8c0d12c5cc 100644 --- a/lib/private/RedisFactory.php +++ b/lib/private/RedisFactory.php @@ -24,11 +24,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class RedisFactory { - /** @var \Redis */ + public const REDIS_MINIMAL_VERSION = '3.1.3'; + public const REDIS_EXTRA_PARAMETERS_MINIMAL_VERSION = '5.3.0'; + + /** @var \Redis|\RedisCluster */ private $instance; /** @var SystemConfig */ @@ -44,25 +46,51 @@ class RedisFactory { } private function create() { - if ($config = $this->config->getValue('redis.cluster', [])) { - if (!class_exists('RedisCluster')) { - throw new \Exception('Redis Cluster support is not available'); - } - // cluster config - if (isset($config['timeout'])) { - $timeout = $config['timeout']; + $isCluster = in_array('redis.cluster', $this->config->getKeys()); + $config = $isCluster + ? $this->config->getValue('redis.cluster', []) + : $this->config->getValue('redis', []); + + if ($isCluster && !class_exists('RedisCluster')) { + throw new \Exception('Redis Cluster support is not available'); + } + + if (isset($config['timeout'])) { + $timeout = $config['timeout']; + } else { + $timeout = 0.0; + } + + if (isset($config['read_timeout'])) { + $readTimeout = $config['read_timeout']; + } else { + $readTimeout = 0.0; + } + + $auth = null; + if (isset($config['password']) && $config['password'] !== '') { + if (isset($config['user']) && $config['user'] !== '') { + $auth = [$config['user'], $config['password']]; } else { - $timeout = null; + $auth = $config['password']; } - if (isset($config['read_timeout'])) { - $readTimeout = $config['read_timeout']; - } else { - $readTimeout = null; + } + + // # TLS support + // # https://github.com/phpredis/phpredis/issues/1600 + $connectionParameters = $this->getSslContext($config); + + // cluster config + if ($isCluster) { + if (!isset($config['seeds'])) { + throw new \Exception('Redis cluster config is missing the "seeds" attribute'); } - if (isset($config['password']) && $config['password'] !== '') { - $this->instance = new \RedisCluster(null, $config['seeds'], $timeout, $readTimeout, false, $config['password']); + + // Support for older phpredis versions not supporting connectionParameters + if ($connectionParameters !== null) { + $this->instance = new \RedisCluster(null, $config['seeds'], $timeout, $readTimeout, false, $auth, $connectionParameters); } else { - $this->instance = new \RedisCluster(null, $config['seeds'], $timeout, $readTimeout); + $this->instance = new \RedisCluster(null, $config['seeds'], $timeout, $readTimeout, false, $auth); } if (isset($config['failover_mode'])) { @@ -70,12 +98,13 @@ class RedisFactory { } } else { $this->instance = new \Redis(); - $config = $this->config->getValue('redis', []); + if (isset($config['host'])) { $host = $config['host']; } else { $host = '127.0.0.1'; } + if (isset($config['port'])) { $port = $config['port']; } elseif ($host[0] !== '/') { @@ -83,15 +112,22 @@ class RedisFactory { } else { $port = null; } - if (isset($config['timeout'])) { - $timeout = $config['timeout']; + + // Support for older phpredis versions not supporting connectionParameters + if ($connectionParameters !== null) { + // Non-clustered redis requires connection parameters to be wrapped inside `stream` + $connectionParameters = [ + 'stream' => $this->getSslContext($config) + ]; + $this->instance->connect($host, $port, $timeout, null, 0, $readTimeout, $connectionParameters); } else { - $timeout = 0.0; // unlimited + $this->instance->connect($host, $port, $timeout, null, 0, $readTimeout); } - $this->instance->connect($host, $port, $timeout); - if (isset($config['password']) && $config['password'] !== '') { - $this->instance->auth($config['password']); + + // Auth if configured + if ($auth !== null) { + $this->instance->auth($auth); } if (isset($config['dbindex'])) { @@ -100,6 +136,26 @@ class RedisFactory { } } + /** + * Get the ssl context config + * + * @param array $config the current config + * @return array|null + * @throws \UnexpectedValueException + */ + private function getSslContext($config) { + if (isset($config['ssl_context'])) { + if (!$this->isConnectionParametersSupported()) { + throw new \UnexpectedValueException(\sprintf( + 'php-redis extension must be version %s or higher to support ssl context', + self::REDIS_EXTRA_PARAMETERS_MINIMAL_VERSION + )); + } + return $config['ssl_context']; + } + return null; + } + public function getInstance() { if (!$this->isAvailable()) { throw new \Exception('Redis support is not available'); @@ -111,8 +167,19 @@ class RedisFactory { return $this->instance; } - public function isAvailable() { - return extension_loaded('redis') - && version_compare(phpversion('redis'), '2.2.5', '>='); + public function isAvailable(): bool { + return \extension_loaded('redis') && + \version_compare(\phpversion('redis'), self::REDIS_MINIMAL_VERSION, '>='); + } + + /** + * Php redis does support configurable extra parameters since version 5.3.0, see: https://github.com/phpredis/phpredis#connect-open. + * We need to check if the current version supports extra connection parameters, otherwise the connect method will throw an exception + * + * @return boolean + */ + private function isConnectionParametersSupported(): bool { + return \extension_loaded('redis') && + \version_compare(\phpversion('redis'), self::REDIS_EXTRA_PARAMETERS_MINIMAL_VERSION, '>='); } } diff --git a/lib/private/Remote/Api/ApiBase.php b/lib/private/Remote/Api/ApiBase.php index 1da2d004e1d..af114bd9498 100644 --- a/lib/private/Remote/Api/ApiBase.php +++ b/lib/private/Remote/Api/ApiBase.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote\Api; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/Api/ApiCollection.php b/lib/private/Remote/Api/ApiCollection.php index 9ce4c7d0661..261f7e6c9b0 100644 --- a/lib/private/Remote/Api/ApiCollection.php +++ b/lib/private/Remote/Api/ApiCollection.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote\Api; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/Api/ApiFactory.php b/lib/private/Remote/Api/ApiFactory.php index 81bc41f9269..27eaa163496 100644 --- a/lib/private/Remote/Api/ApiFactory.php +++ b/lib/private/Remote/Api/ApiFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote\Api; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/Api/NotFoundException.php b/lib/private/Remote/Api/NotFoundException.php index fadf4a4d324..8d226b00120 100644 --- a/lib/private/Remote/Api/NotFoundException.php +++ b/lib/private/Remote/Api/NotFoundException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote\Api; class NotFoundException extends \Exception { diff --git a/lib/private/Remote/Api/OCS.php b/lib/private/Remote/Api/OCS.php index d6bed57f561..e6ee65378c4 100644 --- a/lib/private/Remote/Api/OCS.php +++ b/lib/private/Remote/Api/OCS.php @@ -4,6 +4,7 @@ * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -14,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote\Api; use GuzzleHttp\Exception\ClientException; diff --git a/lib/private/Remote/Credentials.php b/lib/private/Remote/Credentials.php index 09f5e1cda78..56cf745c34c 100644 --- a/lib/private/Remote/Credentials.php +++ b/lib/private/Remote/Credentials.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote; use OCP\Remote\ICredentials; diff --git a/lib/private/Remote/Instance.php b/lib/private/Remote/Instance.php index 3b04e17527e..591bc3d6ae0 100644 --- a/lib/private/Remote/Instance.php +++ b/lib/private/Remote/Instance.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote; use OC\Remote\Api\NotFoundException; diff --git a/lib/private/Remote/InstanceFactory.php b/lib/private/Remote/InstanceFactory.php index a4445a8306b..6941d06cb2e 100644 --- a/lib/private/Remote/InstanceFactory.php +++ b/lib/private/Remote/InstanceFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/User.php b/lib/private/Remote/User.php index fbf30b384cd..5590fcfba38 100644 --- a/lib/private/Remote/User.php +++ b/lib/private/Remote/User.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Remote; use OCP\Remote\IUser; diff --git a/lib/private/Repair.php b/lib/private/Repair.php index 353f6c855bc..688b053fa12 100644 --- a/lib/private/Repair.php +++ b/lib/private/Repair.php @@ -2,11 +2,12 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Michael Weimann <mail@michael-weimann.eu> @@ -31,7 +32,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\App\AppStore\Bundles\BundleFetcher; @@ -45,6 +45,7 @@ use OC\Repair\ClearFrontendCaches; use OC\Repair\ClearGeneratedAvatarCache; use OC\Repair\Collation; use OC\Repair\MoveUpdaterStepFile; +use OC\Repair\NC22\LookupServerSendCheck; use OC\Repair\Owncloud\CleanPreviews; use OC\Repair\NC11\FixMountStorages; use OC\Repair\Owncloud\MoveAvatars; @@ -199,7 +200,8 @@ class Repair implements IOutput { \OC::$server->get(ShippedDashboardEnable::class), \OC::$server->get(AddBruteForceCleanupJob::class), \OC::$server->get(AddCheckForUserCertificatesJob::class), - \OC::$server->get(RepairDavShares::class) + \OC::$server->get(RepairDavShares::class), + \OC::$server->get(LookupServerSendCheck::class), ]; } diff --git a/lib/private/Repair/AddBruteForceCleanupJob.php b/lib/private/Repair/AddBruteForceCleanupJob.php index b287b4baa2f..5a82c7c9176 100644 --- a/lib/private/Repair/AddBruteForceCleanupJob.php +++ b/lib/private/Repair/AddBruteForceCleanupJob.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair; use OC\Security\Bruteforce\CleanupJob; diff --git a/lib/private/Repair/AddCleanupUpdaterBackupsJob.php b/lib/private/Repair/AddCleanupUpdaterBackupsJob.php index 44c1942ec5d..b9e20186fc8 100644 --- a/lib/private/Repair/AddCleanupUpdaterBackupsJob.php +++ b/lib/private/Repair/AddCleanupUpdaterBackupsJob.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair; use OC\Core\BackgroundJobs\BackgroundCleanupUpdaterBackupsJob; diff --git a/lib/private/Repair/CleanTags.php b/lib/private/Repair/CleanTags.php index 5b8e44f37b6..0dd70112984 100644 --- a/lib/private/Repair/CleanTags.php +++ b/lib/private/Repair/CleanTags.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Repair; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/ClearFrontendCaches.php b/lib/private/Repair/ClearFrontendCaches.php index 523a1fc6be5..96a7833fecc 100644 --- a/lib/private/Repair/ClearFrontendCaches.php +++ b/lib/private/Repair/ClearFrontendCaches.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair; use OC\Template\JSCombiner; diff --git a/lib/private/Repair/ClearGeneratedAvatarCache.php b/lib/private/Repair/ClearGeneratedAvatarCache.php index 26d436451bf..314299a0528 100644 --- a/lib/private/Repair/ClearGeneratedAvatarCache.php +++ b/lib/private/Repair/ClearGeneratedAvatarCache.php @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Michael Weimann <mail@michael-weimann.eu> * * @license GNU AGPL version 3 or any later version @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair; use OC\Avatar\AvatarManager; diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php index d2974c1680a..01773f7e69f 100644 --- a/lib/private/Repair/Collation.php +++ b/lib/private/Repair/Collation.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Repair; use Doctrine\DBAL\Exception\DriverException; diff --git a/lib/private/Repair/MoveUpdaterStepFile.php b/lib/private/Repair/MoveUpdaterStepFile.php index e912838f50a..bc7430d7a7f 100644 --- a/lib/private/Repair/MoveUpdaterStepFile.php +++ b/lib/private/Repair/MoveUpdaterStepFile.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair; use OCP\Migration\IOutput; diff --git a/lib/private/Repair/NC11/FixMountStorages.php b/lib/private/Repair/NC11/FixMountStorages.php index 199b504fa35..6552ea4bde9 100644 --- a/lib/private/Repair/NC11/FixMountStorages.php +++ b/lib/private/Repair/NC11/FixMountStorages.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\NC11; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/NC13/AddLogRotateJob.php b/lib/private/Repair/NC13/AddLogRotateJob.php index 7bd290894a4..0b5f3d10e70 100644 --- a/lib/private/Repair/NC13/AddLogRotateJob.php +++ b/lib/private/Repair/NC13/AddLogRotateJob.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\NC13; use OC\Log\Rotate; diff --git a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php index f2958de5b96..afd442a18b5 100644 --- a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php +++ b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC14; use OC\Preview\BackgroundCleanupJob; diff --git a/lib/private/Repair/NC16/AddClenupLoginFlowV2BackgroundJob.php b/lib/private/Repair/NC16/AddClenupLoginFlowV2BackgroundJob.php index 34afd5dea60..70c73fbf9a6 100644 --- a/lib/private/Repair/NC16/AddClenupLoginFlowV2BackgroundJob.php +++ b/lib/private/Repair/NC16/AddClenupLoginFlowV2BackgroundJob.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC16; use OC\Core\BackgroundJobs\CleanupLoginFlowV2; diff --git a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php index fb09097f6ef..39b48562791 100644 --- a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php +++ b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC16; use OCP\Files\IAppData; diff --git a/lib/private/Repair/NC16/ClearCollectionsAccessCache.php b/lib/private/Repair/NC16/ClearCollectionsAccessCache.php index 6d13a8f13a0..44cb4b050ad 100644 --- a/lib/private/Repair/NC16/ClearCollectionsAccessCache.php +++ b/lib/private/Repair/NC16/ClearCollectionsAccessCache.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC16; use OC\Collaboration\Resources\Manager; diff --git a/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php b/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php index 1a86b8706ae..95839823a82 100644 --- a/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php +++ b/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC18; use OCP\IConfig; diff --git a/lib/private/Repair/NC20/EncryptionLegacyCipher.php b/lib/private/Repair/NC20/EncryptionLegacyCipher.php index e60a2435349..d9ac1bcad4b 100644 --- a/lib/private/Repair/NC20/EncryptionLegacyCipher.php +++ b/lib/private/Repair/NC20/EncryptionLegacyCipher.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC20; use OCP\Encryption\IManager; diff --git a/lib/private/Repair/NC20/EncryptionMigration.php b/lib/private/Repair/NC20/EncryptionMigration.php index 45789d2317b..60b5032955c 100644 --- a/lib/private/Repair/NC20/EncryptionMigration.php +++ b/lib/private/Repair/NC20/EncryptionMigration.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC20; use OCP\Encryption\IManager; diff --git a/lib/private/Repair/NC20/ShippedDashboardEnable.php b/lib/private/Repair/NC20/ShippedDashboardEnable.php index b8900373b2a..61f402f1af4 100644 --- a/lib/private/Repair/NC20/ShippedDashboardEnable.php +++ b/lib/private/Repair/NC20/ShippedDashboardEnable.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net> * @@ -13,17 +16,13 @@ * * 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 + * 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/>. * */ - -declare(strict_types=1); - - namespace OC\Repair\NC20; use OCP\IConfig; diff --git a/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php b/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php index df6637e3948..3a98f6bab3c 100644 --- a/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php +++ b/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\NC21; use OC\Core\BackgroundJobs\CheckForUserCertificates; diff --git a/lib/private/Repair/NC21/ValidatePhoneNumber.php b/lib/private/Repair/NC21/ValidatePhoneNumber.php index 995c38602f3..3217a1f082c 100644 --- a/lib/private/Repair/NC21/ValidatePhoneNumber.php +++ b/lib/private/Repair/NC21/ValidatePhoneNumber.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2020 Joas Schilling <coding@schilljs.com> * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Joas Schilling <coding@schilljs.com> * * @license GNU AGPL version 3 or any later version @@ -16,17 +17,15 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair\NC21; -use OC\Accounts\AccountManager; use OCP\Accounts\IAccountManager; use OCP\IConfig; use OCP\IUser; @@ -40,11 +39,11 @@ class ValidatePhoneNumber implements IRepairStep { protected $config; /** @var IUserManager */ protected $userManager; - /** @var AccountManager */ + /** @var IAccountManager */ private $accountManager; public function __construct(IUserManager $userManager, - AccountManager $accountManager, + IAccountManager $accountManager, IConfig $config) { $this->config = $config; $this->userManager = $userManager; @@ -55,10 +54,6 @@ class ValidatePhoneNumber implements IRepairStep { return 'Validate the phone number and store it in a known format for search'; } - private function shouldRun(): bool { - return true; - } - public function run(IOutput $output): void { if ($this->config->getSystemValueString('default_phone_region', '') === '') { throw new \Exception('Can not validate phone numbers without `default_phone_region` being set in the config file'); @@ -68,13 +63,16 @@ class ValidatePhoneNumber implements IRepairStep { $numRemoved = 0; $this->userManager->callForSeenUsers(function (IUser $user) use (&$numUpdated, &$numRemoved) { - $account = $this->accountManager->getUser($user); + $account = $this->accountManager->getAccount($user); + $property = $account->getProperty(IAccountManager::PROPERTY_PHONE); - if ($account[IAccountManager::PROPERTY_PHONE]['value'] !== '') { - $updated = $this->accountManager->updateUser($user, $account); + if ($property->getValue() !== '') { + $this->accountManager->updateAccount($account); + $updatedAccount = $this->accountManager->getAccount($user); + $updatedProperty = $updatedAccount->getProperty(IAccountManager::PROPERTY_PHONE); - if ($account[IAccountManager::PROPERTY_PHONE]['value'] !== $updated[IAccountManager::PROPERTY_PHONE]['value']) { - if ($updated[IAccountManager::PROPERTY_PHONE]['value'] === '') { + if ($property->getValue() !== $updatedProperty->getValue()) { + if ($updatedProperty->getValue() === '') { $numRemoved++; } else { $numUpdated++; diff --git a/lib/private/Repair/NC22/LookupServerSendCheck.php b/lib/private/Repair/NC22/LookupServerSendCheck.php new file mode 100644 index 00000000000..c68a608ed25 --- /dev/null +++ b/lib/private/Repair/NC22/LookupServerSendCheck.php @@ -0,0 +1,64 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Roeland Jago Douma <roeland@famdouma.nl> + * + * @author Morris Jobke <hey@morrisjobke.de> + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Repair\NC22; + +use OC\Core\BackgroundJobs\LookupServerSendCheckBackgroundJob; +use OCP\BackgroundJob\IJobList; +use OCP\IConfig; +use OCP\Migration\IOutput; +use OCP\Migration\IRepairStep; + +class LookupServerSendCheck implements IRepairStep { + + /** @var IJobList */ + private $jobList; + + /** @var IConfig */ + private $config; + + public function __construct(IJobList $jobList, IConfig $config) { + $this->jobList = $jobList; + $this->config = $config; + } + + public function getName(): string { + return 'Add background job to set the lookup server share state for users'; + } + + private function shouldRun(): bool { + $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); + + // was added to 22.0.0.3 + return (version_compare($versionFromBeforeUpdate, '22.0.0.3', '<') && version_compare($versionFromBeforeUpdate, '22.0.0.0', '>=')) + || + (version_compare($versionFromBeforeUpdate, '21.0.1.2', '<') && version_compare($versionFromBeforeUpdate, '21.0.0.0', '>')); + } + + public function run(IOutput $output): void { + $this->jobList->add(LookupServerSendCheckBackgroundJob::class); + } +} diff --git a/lib/private/Repair/OldGroupMembershipShares.php b/lib/private/Repair/OldGroupMembershipShares.php index d991ef82ac9..1cee4077731 100644 --- a/lib/private/Repair/OldGroupMembershipShares.php +++ b/lib/private/Repair/OldGroupMembershipShares.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Repair; use OCP\IDBConnection; diff --git a/lib/private/Repair/Owncloud/CleanPreviews.php b/lib/private/Repair/Owncloud/CleanPreviews.php index 267a1be7985..b9146b77249 100644 --- a/lib/private/Repair/Owncloud/CleanPreviews.php +++ b/lib/private/Repair/Owncloud/CleanPreviews.php @@ -13,7 +13,7 @@ * * 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 + * 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 diff --git a/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php b/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php index 90aa59b2950..67f9d6912d9 100644 --- a/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php +++ b/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php @@ -13,7 +13,7 @@ * * 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 + * 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 diff --git a/lib/private/Repair/Owncloud/DropAccountTermsTable.php b/lib/private/Repair/Owncloud/DropAccountTermsTable.php index c6e8a9d4645..e0c6a4f17ac 100644 --- a/lib/private/Repair/Owncloud/DropAccountTermsTable.php +++ b/lib/private/Repair/Owncloud/DropAccountTermsTable.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\Owncloud; use OCP\IDBConnection; diff --git a/lib/private/Repair/Owncloud/InstallCoreBundle.php b/lib/private/Repair/Owncloud/InstallCoreBundle.php index 10d5357e5d8..a733bc43923 100644 --- a/lib/private/Repair/Owncloud/InstallCoreBundle.php +++ b/lib/private/Repair/Owncloud/InstallCoreBundle.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\Owncloud; use OC\App\AppStore\Bundles\BundleFetcher; diff --git a/lib/private/Repair/Owncloud/MoveAvatars.php b/lib/private/Repair/Owncloud/MoveAvatars.php index 37c79de22ab..ab48731ecb0 100644 --- a/lib/private/Repair/Owncloud/MoveAvatars.php +++ b/lib/private/Repair/Owncloud/MoveAvatars.php @@ -13,7 +13,7 @@ * * 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 + * 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 diff --git a/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php b/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php index 6cda9424696..280426fb9c1 100644 --- a/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php +++ b/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php @@ -14,7 +14,7 @@ * * 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 + * 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 diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php index f11397d7ae5..13677d80de0 100644 --- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php +++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\Owncloud; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/Owncloud/UpdateLanguageCodes.php b/lib/private/Repair/Owncloud/UpdateLanguageCodes.php index cd923b4e802..cb4525b6c1d 100644 --- a/lib/private/Repair/Owncloud/UpdateLanguageCodes.php +++ b/lib/private/Repair/Owncloud/UpdateLanguageCodes.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OC\Repair\Owncloud; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php index 32cbd1f73f8..1b0270e928d 100644 --- a/lib/private/Repair/RemoveLinkShares.php +++ b/lib/private/Repair/RemoveLinkShares.php @@ -8,7 +8,7 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -20,14 +20,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Repair; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php index 8c53eaad43b..9c0bce66ae8 100644 --- a/lib/private/Repair/RepairDavShares.php +++ b/lib/private/Repair/RepairDavShares.php @@ -1,6 +1,7 @@ <?php declare(strict_types=1); + /** * @copyright Copyright (c) 2020 Arthur Schiwon <blizzz@arthur-schiwon.de> * @@ -15,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\Repair; use OCP\DB\Exception; diff --git a/lib/private/Repair/RepairInvalidShares.php b/lib/private/Repair/RepairInvalidShares.php index bc03374ff98..c34d5d9e005 100644 --- a/lib/private/Repair/RepairInvalidShares.php +++ b/lib/private/Repair/RepairInvalidShares.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Repair; use OCP\Migration\IOutput; diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index d0e3bbff707..61512627258 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -31,7 +31,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Repair; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -193,6 +192,17 @@ class RepairMimeTypes implements IRepairStep { return $this->updateMimetypes($updatedMimetypes); } + private function introduceFlatOpenDocumentType() { + $updatedMimetypes = [ + "fodt" => "application/vnd.oasis.opendocument.text-flat-xml", + "fods" => "application/vnd.oasis.opendocument.spreadsheet-flat-xml", + "fodg" => "application/vnd.oasis.opendocument.graphics-flat-xml", + "fodp" => "application/vnd.oasis.opendocument.presentation-flat-xml", + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + private function introduceOrgModeType() { $updatedMimetypes = [ 'org' => 'text/org' @@ -246,5 +256,9 @@ class RepairMimeTypes implements IRepairStep { if (version_compare($ocVersionFromBeforeUpdate, '21.0.0.7', '<') && $this->introduceOrgModeType()) { $out->info('Fixed orgmode mime types'); } + + if (version_compare($ocVersionFromBeforeUpdate, '23.0.0.2', '<') && $this->introduceFlatOpenDocumentType()) { + $out->info('Fixed Flat OpenDocument mime types'); + } } } diff --git a/lib/private/Repair/SqliteAutoincrement.php b/lib/private/Repair/SqliteAutoincrement.php index 651a3c144f3..4a8b2a45d3f 100644 --- a/lib/private/Repair/SqliteAutoincrement.php +++ b/lib/private/Repair/SqliteAutoincrement.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Repair; use Doctrine\DBAL\Platforms\SqlitePlatform; @@ -84,7 +83,7 @@ class SqliteAutoincrement implements IRepairStep { foreach ($columnNames as $columnName) { $columnSchema = $tableSchema->getColumn($columnName); $columnDiff = new ColumnDiff($columnSchema->getName(), $columnSchema); - $tableDiff->changedColumns[] = $columnDiff; + $tableDiff->changedColumns[$columnSchema->getName()] = $columnDiff; $schemaDiff->changedTables[] = $tableDiff; } } catch (SchemaException $e) { diff --git a/lib/private/RepairException.php b/lib/private/RepairException.php index c06fcc91f6e..6cce3b0e0d6 100644 --- a/lib/private/RepairException.php +++ b/lib/private/RepairException.php @@ -2,7 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Morris Jobke <hey@morrisjobke.de> * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 @@ -20,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; /** diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index c80da2914a4..23ca2a6a0fa 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\RichObjectStrings; use OCP\RichObjectStrings\Definitions; diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php index e94039cce1a..553ea285fd4 100644 --- a/lib/private/Route/CachingRouter.php +++ b/lib/private/Route/CachingRouter.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Route; use OCP\ILogger; diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php index 8e419344881..ad440a001af 100644 --- a/lib/private/Route/Route.php +++ b/lib/private/Route/Route.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Route; use OCP\Route\IRoute; diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index 2ed8a1991e7..fcde8f08897 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -7,13 +7,13 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> + * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Robin McCorkell <robin@mccorkell.me.uk> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 * @@ -30,7 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Route; use OC\AppFramework\Routing\RouteParser; @@ -131,8 +130,9 @@ class Router implements IRouter { if (isset($this->loadedApps[$app])) { return; } - $file = \OC_App::getAppPath($app) . '/appinfo/routes.php'; - if ($file !== false && file_exists($file)) { + $appPath = \OC_App::getAppPath($app); + $file = $appPath . '/appinfo/routes.php'; + if ($appPath !== false && file_exists($file)) { $routingFiles = [$app => $file]; } else { $routingFiles = []; diff --git a/lib/private/Search.php b/lib/private/Search.php index 9ecf34aef54..b1e39843e49 100644 --- a/lib/private/Search.php +++ b/lib/private/Search.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OCP\ISearch; diff --git a/lib/private/Search/Provider/File.php b/lib/private/Search/Provider/File.php index d42d57b8003..fba8e6db05f 100644 --- a/lib/private/Search/Provider/File.php +++ b/lib/private/Search/Provider/File.php @@ -6,10 +6,9 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jakob Sack <mail@jakobsack.de> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 * @@ -26,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Search\Provider; use OC\Files\Search\SearchComparison; diff --git a/lib/private/Search/Result/Audio.php b/lib/private/Search/Result/Audio.php index e3917b7e4b3..0a734767df0 100644 --- a/lib/private/Search/Result/Audio.php +++ b/lib/private/Search/Result/Audio.php @@ -5,7 +5,6 @@ * @author Andrew Brown <andrew@casabrown.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Morris Jobke <hey@morrisjobke.de> * * @license AGPL-3.0 * @@ -22,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Search\Result; /** diff --git a/lib/private/Search/Result/File.php b/lib/private/Search/Result/File.php index c3b0c4e3751..dc10cab09e9 100644 --- a/lib/private/Search/Result/File.php +++ b/lib/private/Search/Result/File.php @@ -4,10 +4,10 @@ * * @author Andrew Brown <andrew@casabrown.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> + * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 * @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Search\Result; use OCP\Files\FileInfo; @@ -133,7 +132,11 @@ class File extends \OCP\Search\Result { $userID = $userSession->getUser()->getUID(); self::$userFolderCache = \OC::$server->getUserFolder($userID); } - return self::$userFolderCache->getRelativePath($path); + $relativePath = self::$userFolderCache->getRelativePath($path); + if ($relativePath === null) { + throw new \Exception("Search result not in user folder"); + } + return $relativePath; } /** diff --git a/lib/private/Search/Result/Folder.php b/lib/private/Search/Result/Folder.php index 1268b1379b2..590943fb941 100644 --- a/lib/private/Search/Result/Folder.php +++ b/lib/private/Search/Result/Folder.php @@ -5,7 +5,6 @@ * @author Andrew Brown <andrew@casabrown.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Morris Jobke <hey@morrisjobke.de> * * @license AGPL-3.0 * @@ -22,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Search\Result; /** diff --git a/lib/private/Search/Result/Image.php b/lib/private/Search/Result/Image.php index 5a46138f594..9870e316a79 100644 --- a/lib/private/Search/Result/Image.php +++ b/lib/private/Search/Result/Image.php @@ -5,7 +5,6 @@ * @author Andrew Brown <andrew@casabrown.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Morris Jobke <hey@morrisjobke.de> * * @license AGPL-3.0 * @@ -22,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Search\Result; /** diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php index 09355f3aa0e..d5f35f504e0 100644 --- a/lib/private/Search/SearchComposer.php +++ b/lib/private/Search/SearchComposer.php @@ -7,7 +7,7 @@ declare(strict_types=1); * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Search; use InvalidArgumentException; diff --git a/lib/private/Search/SearchQuery.php b/lib/private/Search/SearchQuery.php index 728802b6e80..c89446d5970 100644 --- a/lib/private/Search/SearchQuery.php +++ b/lib/private/Search/SearchQuery.php @@ -7,7 +7,7 @@ declare(strict_types=1); * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Search; use OCP\Search\ISearchQuery; diff --git a/lib/private/Security/Bruteforce/Capabilities.php b/lib/private/Security/Bruteforce/Capabilities.php index 7547348ce34..3b494d5bf49 100644 --- a/lib/private/Security/Bruteforce/Capabilities.php +++ b/lib/private/Security/Bruteforce/Capabilities.php @@ -1,7 +1,11 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2017 Roeland Jago Douma <roeland@famdouma.nl> * + * @author J0WI <J0WI@users.noreply.github.com> * @author Julius Härtl <jus@bitgrid.net> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -14,14 +18,13 @@ * * 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 + * 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/>. * */ - namespace OC\Security\Bruteforce; use OCP\Capabilities\IPublicCapability; @@ -46,7 +49,7 @@ class Capabilities implements IPublicCapability { $this->throttler = $throttler; } - public function getCapabilities() { + public function getCapabilities(): array { if (version_compare(\OC::$server->getConfig()->getSystemValue('version', '0.0.0.0'), '12.0.0.0', '<')) { return []; } diff --git a/lib/private/Security/Bruteforce/CleanupJob.php b/lib/private/Security/Bruteforce/CleanupJob.php index edf59cdcdc5..1e5f83360d5 100644 --- a/lib/private/Security/Bruteforce/CleanupJob.php +++ b/lib/private/Security/Bruteforce/CleanupJob.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\Bruteforce; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php index e1d9127a7bb..6c898cdf7e6 100644 --- a/lib/private/Security/Bruteforce/Throttler.php +++ b/lib/private/Security/Bruteforce/Throttler.php @@ -23,14 +23,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\Bruteforce; use OC\Security\Normalizer\IpAddress; diff --git a/lib/private/Security/CSP/ContentSecurityPolicy.php b/lib/private/Security/CSP/ContentSecurityPolicy.php index 4d41bd56206..78517f639a7 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicy.php +++ b/lib/private/Security/CSP/ContentSecurityPolicy.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security\CSP; /** diff --git a/lib/private/Security/CSP/ContentSecurityPolicyManager.php b/lib/private/Security/CSP/ContentSecurityPolicyManager.php index 60a176cbd8b..ff770435eda 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicyManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyManager.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security\CSP; use OCP\AppFramework\Http\ContentSecurityPolicy; diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php index cc5a3c2d8fb..f3329135727 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php @@ -21,14 +21,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\CSP; use OC\AppFramework\Http\Request; diff --git a/lib/private/Security/CSRF/CsrfToken.php b/lib/private/Security/CSRF/CsrfToken.php index 25ec8572a66..a76e169e5b9 100644 --- a/lib/private/Security/CSRF/CsrfToken.php +++ b/lib/private/Security/CSRF/CsrfToken.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security\CSRF; /** diff --git a/lib/private/Security/CSRF/CsrfTokenGenerator.php b/lib/private/Security/CSRF/CsrfTokenGenerator.php index 721c427c8c7..0576fda9e06 100644 --- a/lib/private/Security/CSRF/CsrfTokenGenerator.php +++ b/lib/private/Security/CSRF/CsrfTokenGenerator.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security\CSRF; use OCP\Security\ISecureRandom; diff --git a/lib/private/Security/CSRF/CsrfTokenManager.php b/lib/private/Security/CSRF/CsrfTokenManager.php index f0536c770b5..2c6dd45866d 100644 --- a/lib/private/Security/CSRF/CsrfTokenManager.php +++ b/lib/private/Security/CSRF/CsrfTokenManager.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security\CSRF; use OC\Security\CSRF\TokenStorage\SessionStorage; diff --git a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php index ed9b068faa2..ab05d5b1493 100644 --- a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php +++ b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security\CSRF\TokenStorage; use OCP\ISession; diff --git a/lib/private/Security/Certificate.php b/lib/private/Security/Certificate.php index c89122f9a4b..fb5b9aa8a93 100644 --- a/lib/private/Security/Certificate.php +++ b/lib/private/Security/Certificate.php @@ -1,10 +1,13 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author J0WI <J0WI@users.noreply.github.com> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -22,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; use OCP\ICertificate; @@ -49,7 +51,7 @@ class Certificate implements ICertificate { * @param string $name * @throws \Exception If the certificate could not get parsed */ - public function __construct($data, $name) { + public function __construct(string $data, string $name) { $this->name = $name; $gmt = new \DateTimeZone('GMT'); @@ -75,42 +77,42 @@ class Certificate implements ICertificate { /** * @return string */ - public function getName() { + public function getName(): string { return $this->name; } /** * @return string|null */ - public function getCommonName() { + public function getCommonName(): ?string { return $this->commonName; } /** - * @return string + * @return string|null */ - public function getOrganization() { + public function getOrganization(): ?string { return $this->organization; } /** * @return \DateTime */ - public function getIssueDate() { + public function getIssueDate(): \DateTime { return $this->issueDate; } /** * @return \DateTime */ - public function getExpireDate() { + public function getExpireDate(): \DateTime { return $this->expireDate; } /** * @return bool */ - public function isExpired() { + public function isExpired(): bool { $now = new \DateTime(); return $this->issueDate > $now or $now > $this->expireDate; } @@ -118,14 +120,14 @@ class Certificate implements ICertificate { /** * @return string|null */ - public function getIssuerName() { + public function getIssuerName(): ?string { return $this->issuerName; } /** * @return string|null */ - public function getIssuerOrganization() { + public function getIssuerOrganization(): ?string { return $this->issuerOrganization; } } diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php index ef0c6563320..0c6791163c2 100644 --- a/lib/private/Security/CertificateManager.php +++ b/lib/private/Security/CertificateManager.php @@ -1,10 +1,14 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -26,10 +30,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; use OC\Files\Filesystem; +use OCP\ICertificate; use OCP\ICertificateManager; use OCP\IConfig; use OCP\ILogger; @@ -78,7 +82,7 @@ class CertificateManager implements ICertificateManager { * * @return \OCP\ICertificate[] */ - public function listCertificates() { + public function listCertificates(): array { if (!$this->config->getSystemValue('installed', false)) { return []; } @@ -130,7 +134,7 @@ class CertificateManager implements ICertificateManager { /** * create the certificate bundle of all trusted certificated */ - public function createCertificateBundle() { + public function createCertificateBundle(): void { $path = $this->getPathToCertificates(); $certs = $this->listCertificates(); @@ -182,7 +186,7 @@ class CertificateManager implements ICertificateManager { * @return \OCP\ICertificate * @throws \Exception If the certificate could not get added */ - public function addCertificate($certificate, $name) { + public function addCertificate(string $certificate, string $name): ICertificate { if (!Filesystem::isValidPath($name) or Filesystem::isFileBlacklisted($name)) { throw new \Exception('Filename is not valid'); } @@ -209,7 +213,7 @@ class CertificateManager implements ICertificateManager { * @param string $name * @return bool */ - public function removeCertificate($name) { + public function removeCertificate(string $name): bool { if (!Filesystem::isValidPath($name)) { return false; } @@ -226,7 +230,7 @@ class CertificateManager implements ICertificateManager { * * @return string */ - public function getCertificateBundle() { + public function getCertificateBundle(): string { return $this->getPathToCertificates() . 'rootcerts.crt'; } @@ -235,7 +239,7 @@ class CertificateManager implements ICertificateManager { * * @return string */ - public function getAbsoluteBundlePath() { + public function getAbsoluteBundlePath(): string { if (!$this->hasCertificates()) { return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'; } @@ -250,7 +254,7 @@ class CertificateManager implements ICertificateManager { /** * @return string */ - private function getPathToCertificates() { + private function getPathToCertificates(): string { return '/files_external/'; } @@ -259,7 +263,7 @@ class CertificateManager implements ICertificateManager { * * @return bool */ - private function needsRebundling() { + private function needsRebundling(): bool { $targetBundle = $this->getCertificateBundle(); if (!$this->view->file_exists($targetBundle)) { return true; @@ -274,7 +278,7 @@ class CertificateManager implements ICertificateManager { * * @return int */ - protected function getFilemtimeOfCaBundle() { + protected function getFilemtimeOfCaBundle(): int { return filemtime(\OC::$SERVERROOT . '/resources/config/ca-bundle.crt'); } } diff --git a/lib/private/Security/CredentialsManager.php b/lib/private/Security/CredentialsManager.php index 7ba8a0020ff..0bddaeda1b0 100644 --- a/lib/private/Security/CredentialsManager.php +++ b/lib/private/Security/CredentialsManager.php @@ -1,8 +1,12 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> * @author Robin McCorkell <robin@mccorkell.me.uk> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -22,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; use OCP\IDBConnection; @@ -59,11 +62,11 @@ class CredentialsManager implements ICredentialsManager { * @param string $identifier * @param mixed $credentials */ - public function store($userId, $identifier, $credentials) { + public function store(string $userId, string $identifier, $credentials): void { $value = $this->crypto->encrypt(json_encode($credentials)); $this->dbConnection->setValues(self::DB_TABLE, [ - 'user' => (string)$userId, + 'user' => $userId, 'identifier' => $identifier, ], [ 'credentials' => $value, @@ -77,7 +80,7 @@ class CredentialsManager implements ICredentialsManager { * @param string $identifier * @return mixed */ - public function retrieve($userId, $identifier) { + public function retrieve(string $userId, string $identifier) { $qb = $this->dbConnection->getQueryBuilder(); $qb->select('credentials') ->from(self::DB_TABLE) @@ -86,7 +89,7 @@ class CredentialsManager implements ICredentialsManager { if ($userId === '') { $qb->andWhere($qb->expr()->emptyString('user')); } else { - $qb->andWhere($qb->expr()->eq('user', $qb->createNamedParameter((string)$userId))); + $qb->andWhere($qb->expr()->eq('user', $qb->createNamedParameter($userId))); } $qResult = $qb->execute(); @@ -108,7 +111,7 @@ class CredentialsManager implements ICredentialsManager { * @param string $identifier * @return int rows removed */ - public function delete($userId, $identifier) { + public function delete(string $userId, string $identifier): int { $qb = $this->dbConnection->getQueryBuilder(); $qb->delete(self::DB_TABLE) ->where($qb->expr()->eq('identifier', $qb->createNamedParameter($identifier))); @@ -116,7 +119,7 @@ class CredentialsManager implements ICredentialsManager { if ($userId === '') { $qb->andWhere($qb->expr()->emptyString('user')); } else { - $qb->andWhere($qb->expr()->eq('user', $qb->createNamedParameter((string)$userId))); + $qb->andWhere($qb->expr()->eq('user', $qb->createNamedParameter($userId))); } return $qb->execute(); @@ -128,7 +131,7 @@ class CredentialsManager implements ICredentialsManager { * @param string $userId * @return int rows removed */ - public function erase($userId) { + public function erase(string $userId): int { $qb = $this->dbConnection->getQueryBuilder(); $qb->delete(self::DB_TABLE) ->where($qb->expr()->eq('user', $qb->createNamedParameter($userId))) diff --git a/lib/private/Security/Crypto.php b/lib/private/Security/Crypto.php index 7b1e1a49b19..e9ef4417925 100644 --- a/lib/private/Security/Crypto.php +++ b/lib/private/Security/Crypto.php @@ -27,9 +27,9 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; +use Exception; use OCP\IConfig; use OCP\Security\ICrypto; use OCP\Security\ISecureRandom; @@ -83,9 +83,12 @@ class Crypto implements ICrypto { /** * Encrypts a value and adds an HMAC (Encrypt-Then-MAC) + * * @param string $plaintext * @param string $password Password to encrypt, if not specified the secret from config.php will be taken * @return string Authenticated ciphertext + * @throws Exception if it was not possible to gather sufficient entropy + * @throws Exception if encrypting the data failed */ public function encrypt(string $plaintext, string $password = ''): string { if ($password === '') { @@ -97,7 +100,13 @@ class Crypto implements ICrypto { $iv = \random_bytes($this->ivLength); $this->cipher->setIV($iv); - $ciphertext = bin2hex($this->cipher->encrypt($plaintext)); + /** @var string|false $encrypted */ + $encrypted = $this->cipher->encrypt($plaintext); + if ($encrypted === false) { + throw new Exception('Encrypting failed.'); + } + + $ciphertext = bin2hex($encrypted); $iv = bin2hex($iv); $hmac = bin2hex($this->calculateHMAC($ciphertext.$iv, substr($keyMaterial, 32))); @@ -109,8 +118,8 @@ class Crypto implements ICrypto { * @param string $authenticatedCiphertext * @param string $password Password to encrypt, if not specified the secret from config.php will be taken * @return string plaintext - * @throws \Exception If the HMAC does not match - * @throws \Exception If the decryption failed + * @throws Exception If the HMAC does not match + * @throws Exception If the decryption failed */ public function decrypt(string $authenticatedCiphertext, string $password = ''): string { if ($password === '') { @@ -121,17 +130,17 @@ class Crypto implements ICrypto { $parts = explode('|', $authenticatedCiphertext); $partCount = \count($parts); if ($partCount < 3 || $partCount > 4) { - throw new \Exception('Authenticated ciphertext could not be decoded.'); + throw new Exception('Authenticated ciphertext could not be decoded.'); } - $ciphertext = hex2bin($parts[0]); + $ciphertext = $this->hex2bin($parts[0]); $iv = $parts[1]; - $hmac = hex2bin($parts[2]); + $hmac = $this->hex2bin($parts[2]); if ($partCount === 4) { $version = $parts[3]; if ($version >= '2') { - $iv = hex2bin($iv); + $iv = $this->hex2bin($iv); } if ($version === '3') { @@ -144,12 +153,28 @@ class Crypto implements ICrypto { $this->cipher->setIV($iv); if (!hash_equals($this->calculateHMAC($parts[0] . $parts[1], $hmacKey), $hmac)) { - throw new \Exception('HMAC does not match.'); + throw new Exception('HMAC does not match.'); } $result = $this->cipher->decrypt($ciphertext); if ($result === false) { - throw new \Exception('Decryption failed'); + throw new Exception('Decryption failed'); + } + + return $result; + } + + private function hex2bin(string $hex): string { + if (!ctype_xdigit($hex)) { + throw new \RuntimeException('String contains non hex chars: ' . $hex); + } + if (strlen($hex) % 2 !== 0) { + throw new \RuntimeException('Hex string is not of even length: ' . $hex); + } + $result = hex2bin($hex); + + if ($result === false) { + throw new \RuntimeException('Hex to bin conversion failed: ' . $hex); } return $result; diff --git a/lib/private/Security/FeaturePolicy/FeaturePolicy.php b/lib/private/Security/FeaturePolicy/FeaturePolicy.php index 93556708789..a0ab2065ece 100644 --- a/lib/private/Security/FeaturePolicy/FeaturePolicy.php +++ b/lib/private/Security/FeaturePolicy/FeaturePolicy.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\FeaturePolicy; class FeaturePolicy extends \OCP\AppFramework\Http\FeaturePolicy { diff --git a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php index b2959c310c8..3aa93ac3da4 100644 --- a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php +++ b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\FeaturePolicy; use OCP\AppFramework\Http\EmptyFeaturePolicy; diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php index 4b068ce0110..5b3fc2b47a9 100644 --- a/lib/private/Security/Hasher.php +++ b/lib/private/Security/Hasher.php @@ -9,7 +9,6 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Lukas Reschke <lukas@statuscode.ch> * @author MichaIng <micha@dietpi.com> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license AGPL-3.0 @@ -27,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; use OCP\IConfig; diff --git a/lib/private/Security/IdentityProof/Key.php b/lib/private/Security/IdentityProof/Key.php index 342d44b4a3b..349ffd3c15a 100644 --- a/lib/private/Security/IdentityProof/Key.php +++ b/lib/private/Security/IdentityProof/Key.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\IdentityProof; class Key { diff --git a/lib/private/Security/IdentityProof/Manager.php b/lib/private/Security/IdentityProof/Manager.php index 6c54f1fa2de..0878efeebc7 100644 --- a/lib/private/Security/IdentityProof/Manager.php +++ b/lib/private/Security/IdentityProof/Manager.php @@ -20,14 +20,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\IdentityProof; use OC\Files\AppData\Factory; diff --git a/lib/private/Security/IdentityProof/Signer.php b/lib/private/Security/IdentityProof/Signer.php index 26293a5ec4a..7431bfe815f 100644 --- a/lib/private/Security/IdentityProof/Signer.php +++ b/lib/private/Security/IdentityProof/Signer.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\IdentityProof; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php index cbfc212e1ce..705235413e4 100644 --- a/lib/private/Security/Normalizer/IpAddress.php +++ b/lib/private/Security/Normalizer/IpAddress.php @@ -8,6 +8,7 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Konrad Bucheli <kb@open.ch> * @author Lukas Reschke <lukas@statuscode.ch> + * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Citharel <nextcloud@tcit.fr> * @@ -20,14 +21,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\Normalizer; /** @@ -93,7 +93,7 @@ class IpAddress { } /** - * Gets either the /32 (IPv4) or the /128 (IPv6) subnet of an IP address + * Gets either the /32 (IPv4) or the /64 (IPv6) subnet of an IP address * * @return string */ @@ -106,7 +106,7 @@ class IpAddress { } return $this->getIPv6Subnet( $this->ip, - 128 + 64 ); } diff --git a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php new file mode 100644 index 00000000000..1415b5c4131 --- /dev/null +++ b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php @@ -0,0 +1,124 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Lukas Reschke <lukas@statuscode.ch> + * + * @author Lukas Reschke <lukas@statuscode.ch> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\Security\RateLimiting\Backend; + +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\IDBConnection; + +class DatabaseBackend implements IBackend { + private const TABLE_NAME = 'ratelimit_entries'; + + /** @var IDBConnection */ + private $dbConnection; + /** @var ITimeFactory */ + private $timeFactory; + + /** + * @param IDBConnection $dbConnection + * @param ITimeFactory $timeFactory + */ + public function __construct( + IDBConnection $dbConnection, + ITimeFactory $timeFactory + ) { + $this->dbConnection = $dbConnection; + $this->timeFactory = $timeFactory; + } + + /** + * @param string $methodIdentifier + * @param string $userIdentifier + * @return string + */ + private function hash(string $methodIdentifier, + string $userIdentifier): string { + return hash('sha512', $methodIdentifier . $userIdentifier); + } + + /** + * @param string $identifier + * @param int $seconds + * @return int + * @throws \OCP\DB\Exception + */ + private function getExistingAttemptCount( + string $identifier + ): int { + $currentTime = $this->timeFactory->getDateTime(); + + $qb = $this->dbConnection->getQueryBuilder(); + $qb->delete(self::TABLE_NAME) + ->where( + $qb->expr()->lte('delete_after', $qb->createNamedParameter($currentTime, IQueryBuilder::PARAM_DATE)) + ) + ->executeStatement(); + + $qb = $this->dbConnection->getQueryBuilder(); + $qb->select($qb->func()->count()) + ->from(self::TABLE_NAME) + ->where( + $qb->expr()->eq('hash', $qb->createNamedParameter($identifier, IQueryBuilder::PARAM_STR)) + ) + ->andWhere( + $qb->expr()->gte('delete_after', $qb->createNamedParameter($currentTime, IQueryBuilder::PARAM_DATE)) + ); + + $cursor = $qb->executeQuery(); + $row = $cursor->fetchOne(); + $cursor->closeCursor(); + + return (int)$row; + } + + /** + * {@inheritDoc} + */ + public function getAttempts(string $methodIdentifier, + string $userIdentifier): int { + $identifier = $this->hash($methodIdentifier, $userIdentifier); + return $this->getExistingAttemptCount($identifier); + } + + /** + * {@inheritDoc} + */ + public function registerAttempt(string $methodIdentifier, + string $userIdentifier, + int $period) { + $identifier = $this->hash($methodIdentifier, $userIdentifier); + $deleteAfter = $this->timeFactory->getDateTime()->add(new \DateInterval("PT{$period}S")); + + $qb = $this->dbConnection->getQueryBuilder(); + + $qb->insert(self::TABLE_NAME) + ->values([ + 'hash' => $qb->createNamedParameter($identifier, IQueryBuilder::PARAM_STR), + 'delete_after' => $qb->createNamedParameter($deleteAfter, IQueryBuilder::PARAM_DATE), + ]) + ->executeStatement(); + } +} diff --git a/lib/private/Security/RateLimiting/Backend/IBackend.php b/lib/private/Security/RateLimiting/Backend/IBackend.php index 57dd4e3cc6d..960bfd2d159 100644 --- a/lib/private/Security/RateLimiting/Backend/IBackend.php +++ b/lib/private/Security/RateLimiting/Backend/IBackend.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\RateLimiting\Backend; /** @@ -36,16 +35,14 @@ namespace OC\Security\RateLimiting\Backend; */ interface IBackend { /** - * Gets the amount of attempts within the last specified seconds + * Gets the number of attempts for the specified method * * @param string $methodIdentifier Identifier for the method * @param string $userIdentifier Identifier for the user - * @param int $seconds Seconds to look back at * @return int */ public function getAttempts(string $methodIdentifier, - string $userIdentifier, - int $seconds): int; + string $userIdentifier): int; /** * Registers an attempt diff --git a/lib/private/Security/RateLimiting/Backend/MemoryCache.php b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php index 2893d31ece2..f4880fb239c 100644 --- a/lib/private/Security/RateLimiting/Backend/MemoryCache.php +++ b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php @@ -19,14 +19,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\RateLimiting\Backend; use OCP\AppFramework\Utility\ITimeFactory; @@ -34,12 +33,12 @@ use OCP\ICache; use OCP\ICacheFactory; /** - * Class MemoryCache uses the configured distributed memory cache for storing + * Class MemoryCacheBackend uses the configured distributed memory cache for storing * rate limiting data. * * @package OC\Security\RateLimiting\Backend */ -class MemoryCache implements IBackend { +class MemoryCacheBackend implements IBackend { /** @var ICache */ private $cache; /** @var ITimeFactory */ @@ -87,16 +86,14 @@ class MemoryCache implements IBackend { * {@inheritDoc} */ public function getAttempts(string $methodIdentifier, - string $userIdentifier, - int $seconds): int { + string $userIdentifier): int { $identifier = $this->hash($methodIdentifier, $userIdentifier); $existingAttempts = $this->getExistingAttempts($identifier); $count = 0; $currentTime = $this->timeFactory->getTime(); - /** @var array $existingAttempts */ - foreach ($existingAttempts as $attempt) { - if (($attempt + $seconds) > $currentTime) { + foreach ($existingAttempts as $expirationTime) { + if ($expirationTime > $currentTime) { $count++; } } @@ -114,16 +111,16 @@ class MemoryCache implements IBackend { $existingAttempts = $this->getExistingAttempts($identifier); $currentTime = $this->timeFactory->getTime(); - // Unset all attempts older than $period - foreach ($existingAttempts as $key => $attempt) { - if (($attempt + $period) < $currentTime) { + // Unset all attempts that are already expired + foreach ($existingAttempts as $key => $expirationTime) { + if ($expirationTime < $currentTime) { unset($existingAttempts[$key]); } } $existingAttempts = array_values($existingAttempts); // Store the new attempt - $existingAttempts[] = (string)$currentTime; + $existingAttempts[] = (string)($currentTime + $period); $this->cache->set($identifier, json_encode($existingAttempts)); } } diff --git a/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php b/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php index 000056a322c..08091e997ca 100644 --- a/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php +++ b/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\RateLimiting\Exception; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; diff --git a/lib/private/Security/RateLimiting/Limiter.php b/lib/private/Security/RateLimiting/Limiter.php index 26671f52301..91657452d99 100644 --- a/lib/private/Security/RateLimiting/Limiter.php +++ b/lib/private/Security/RateLimiting/Limiter.php @@ -17,36 +17,29 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Security\RateLimiting; use OC\Security\Normalizer\IpAddress; use OC\Security\RateLimiting\Backend\IBackend; use OC\Security\RateLimiting\Exception\RateLimitExceededException; -use OCP\AppFramework\Utility\ITimeFactory; use OCP\IUser; class Limiter { /** @var IBackend */ private $backend; - /** @var ITimeFactory */ - private $timeFactory; /** - * @param ITimeFactory $timeFactory * @param IBackend $backend */ - public function __construct(ITimeFactory $timeFactory, - IBackend $backend) { + public function __construct(IBackend $backend) { $this->backend = $backend; - $this->timeFactory = $timeFactory; } /** @@ -60,12 +53,12 @@ class Limiter { string $userIdentifier, int $period, int $limit): void { - $existingAttempts = $this->backend->getAttempts($methodIdentifier, $userIdentifier, $period); + $existingAttempts = $this->backend->getAttempts($methodIdentifier, $userIdentifier); if ($existingAttempts >= $limit) { throw new RateLimitExceededException(); } - $this->backend->registerAttempt($methodIdentifier, $userIdentifier, $this->timeFactory->getTime()); + $this->backend->registerAttempt($methodIdentifier, $userIdentifier, $period); } /** diff --git a/lib/private/Security/SecureRandom.php b/lib/private/Security/SecureRandom.php index 815b70caa03..4bf8995d737 100644 --- a/lib/private/Security/SecureRandom.php +++ b/lib/private/Security/SecureRandom.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; use OCP\Security\ISecureRandom; diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php index 8004bf7dc6f..49f4194d77f 100644 --- a/lib/private/Security/TrustedDomainHelper.php +++ b/lib/private/Security/TrustedDomainHelper.php @@ -1,12 +1,15 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author J0WI <J0WI@users.noreply.github.com> * @author Johannes Ernst <jernst@indiecomputing.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license AGPL-3.0 @@ -24,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Security; use OC\AppFramework\Http\Request; @@ -51,7 +53,7 @@ class TrustedDomainHelper { * @param string $host * @return string $host without appended port */ - private function getDomainWithoutPort($host) { + private function getDomainWithoutPort(string $host): string { $pos = strrpos($host, ':'); if ($pos !== false) { $port = substr($host, $pos + 1); @@ -71,7 +73,7 @@ class TrustedDomainHelper { * @return bool true if the given domain is trusted or if no trusted domains * have been configured */ - public function isTrustedDomain($domainWithPort) { + public function isTrustedDomain(string $domainWithPort): bool { // overwritehost is always trusted if ($this->config->getSystemValue('overwritehost') !== '') { return true; diff --git a/lib/private/Security/VerificationToken/CleanUpJob.php b/lib/private/Security/VerificationToken/CleanUpJob.php new file mode 100644 index 00000000000..be9d24ece45 --- /dev/null +++ b/lib/private/Security/VerificationToken/CleanUpJob.php @@ -0,0 +1,90 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OC\Security\VerificationToken; + +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\IConfig; +use OCP\ILogger; +use OCP\IUserManager; +use OCP\Security\VerificationToken\InvalidTokenException; +use OCP\Security\VerificationToken\IVerificationToken; + +class CleanUpJob extends \OCP\BackgroundJob\Job { + + /** @var int */ + protected $runNotBefore; + /** @var string */ + protected $userId; + /** @var string */ + protected $subject; + /** @var string */ + protected $pwdPrefix; + /** @var IConfig */ + private $config; + /** @var IVerificationToken */ + private $verificationToken; + /** @var IUserManager */ + private $userManager; + + public function __construct(ITimeFactory $time, IConfig $config, IVerificationToken $verificationToken, IUserManager $userManager) { + parent::__construct($time); + $this->config = $config; + $this->verificationToken = $verificationToken; + $this->userManager = $userManager; + } + + public function setArgument($argument) { + parent::setArgument($argument); + $args = \json_decode($argument, true); + $this->userId = (string)$args['userId']; + $this->subject = (string)$args['subject']; + $this->pwdPrefix = (string)$args['pp']; + $this->runNotBefore = (int)$args['notBefore']; + } + + protected function run($argument) { + try { + $user = $this->userManager->get($this->userId); + if ($user === null) { + return; + } + $this->verificationToken->check('irrelevant', $user, $this->subject, $this->pwdPrefix); + } catch (InvalidTokenException $e) { + if ($e->getCode() === InvalidTokenException::TOKEN_EXPIRED) { + // make sure to only remove expired tokens + $this->config->deleteUserValue($this->userId, 'core', $this->subject); + } + } + } + + public function execute($jobList, ILogger $logger = null) { + if ($this->time->getTime() >= $this->runNotBefore) { + $jobList->remove($this, $this->argument); + parent::execute($jobList, $logger); + } + } +} diff --git a/lib/private/Security/VerificationToken/VerificationToken.php b/lib/private/Security/VerificationToken/VerificationToken.php new file mode 100644 index 00000000000..c85e0e7b5a1 --- /dev/null +++ b/lib/private/Security/VerificationToken/VerificationToken.php @@ -0,0 +1,129 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OC\Security\VerificationToken; + +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\IJobList; +use OCP\IConfig; +use OCP\IUser; +use OCP\Security\ICrypto; +use OCP\Security\ISecureRandom; +use OCP\Security\VerificationToken\InvalidTokenException; +use OCP\Security\VerificationToken\IVerificationToken; +use function json_encode; + +class VerificationToken implements IVerificationToken { + protected const TOKEN_LIFETIME = 60 * 60 * 24 * 7; + + /** @var IConfig */ + private $config; + /** @var ICrypto */ + private $crypto; + /** @var ITimeFactory */ + private $timeFactory; + /** @var ISecureRandom */ + private $secureRandom; + /** @var IJobList */ + private $jobList; + + public function __construct( + IConfig $config, + ICrypto $crypto, + ITimeFactory $timeFactory, + ISecureRandom $secureRandom, + IJobList $jobList + ) { + $this->config = $config; + $this->crypto = $crypto; + $this->timeFactory = $timeFactory; + $this->secureRandom = $secureRandom; + $this->jobList = $jobList; + } + + /** + * @throws InvalidTokenException + */ + protected function throwInvalidTokenException(int $code): void { + throw new InvalidTokenException($code); + } + + public function check(string $token, ?IUser $user, string $subject, string $passwordPrefix = '', bool $expiresWithLogin = false): void { + if ($user === null || !$user->isEnabled()) { + $this->throwInvalidTokenException(InvalidTokenException::USER_UNKNOWN); + } + + $encryptedToken = $this->config->getUserValue($user->getUID(), 'core', $subject, null); + if ($encryptedToken === null) { + $this->throwInvalidTokenException(InvalidTokenException::TOKEN_NOT_FOUND); + } + + try { + $decryptedToken = $this->crypto->decrypt($encryptedToken, $passwordPrefix.$this->config->getSystemValue('secret')); + } catch (\Exception $e) { + $this->throwInvalidTokenException(InvalidTokenException::TOKEN_DECRYPTION_ERROR); + } + + $splitToken = explode(':', $decryptedToken ?? ''); + if (count($splitToken) !== 2) { + $this->throwInvalidTokenException(InvalidTokenException::TOKEN_INVALID_FORMAT); + } + + if ($splitToken[0] < ($this->timeFactory->getTime() - self::TOKEN_LIFETIME) + || ($expiresWithLogin && $user->getLastLogin() > $splitToken[0])) { + $this->throwInvalidTokenException(InvalidTokenException::TOKEN_EXPIRED); + } + + if (!hash_equals($splitToken[1], $token)) { + $this->throwInvalidTokenException(InvalidTokenException::TOKEN_MISMATCH); + } + } + + public function create(IUser $user, string $subject, string $passwordPrefix = ''): string { + $token = $this->secureRandom->generate( + 21, + ISecureRandom::CHAR_DIGITS. + ISecureRandom::CHAR_LOWER. + ISecureRandom::CHAR_UPPER + ); + $tokenValue = $this->timeFactory->getTime() .':'. $token; + $encryptedValue = $this->crypto->encrypt($tokenValue, $passwordPrefix . $this->config->getSystemValue('secret')); + $this->config->setUserValue($user->getUID(), 'core', $subject, $encryptedValue); + $jobArgs = json_encode([ + 'userId' => $user->getUID(), + 'subject' => $subject, + 'pp' => $passwordPrefix, + 'notBefore' => $this->timeFactory->getTime() + self::TOKEN_LIFETIME * 2, // multiply to provide a grace period + ]); + $this->jobList->add(CleanUpJob::class, $jobArgs); + + return $token; + } + + public function delete(string $token, IUser $user, string $subject): void { + $this->config->deleteUserValue($user->getUID(), 'core', $subject); + } +} diff --git a/lib/private/Server.php b/lib/private/Server.php index c0d6afbaaf6..529e2eacfc3 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -16,7 +16,7 @@ * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Haertl <jus@bitgrid.net> * @author Julius Härtl <jus@bitgrid.net> @@ -50,7 +50,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use bantu\IniGetWrapper\IniGetWrapper; @@ -59,6 +58,7 @@ use OC\App\AppManager; use OC\App\AppStore\Bundles\BundleFetcher; use OC\App\AppStore\Fetcher\AppFetcher; use OC\App\AppStore\Fetcher\CategoryFetcher; +use OC\AppFramework\Bootstrap\Coordinator; use OC\AppFramework\Http\Request; use OC\AppFramework\Utility\TimeFactory; use OC\Authentication\Events\LoginFailed; @@ -100,10 +100,15 @@ use OC\Files\Type\Loader; use OC\Files\View; use OC\FullTextSearch\FullTextSearchManager; use OC\Http\Client\ClientService; +use OC\Http\Client\DnsPinMiddleware; +use OC\Http\Client\LocalAddressChecker; +use OC\Http\Client\NegativeDnsCache; use OC\IntegrityCheck\Checker; use OC\IntegrityCheck\Helpers\AppLocator; use OC\IntegrityCheck\Helpers\EnvironmentHelper; use OC\IntegrityCheck\Helpers\FileAccessHelper; +use OC\LDAP\NullLDAPProviderFactory; +use OC\KnownUser\KnownUserService; use OC\Lock\DBLockingProvider; use OC\Lock\MemcacheLockingProvider; use OC\Lock\NoopLockingProvider; @@ -131,6 +136,7 @@ use OC\Security\CSRF\TokenStorage\SessionStorage; use OC\Security\Hasher; use OC\Security\SecureRandom; use OC\Security\TrustedDomainHelper; +use OC\Security\VerificationToken\VerificationToken; use OC\Session\CryptoWrapper; use OC\Share20\ProviderFactory; use OC\Share20\ShareHelper; @@ -140,6 +146,7 @@ use OC\Template\JSCombiner; use OCA\Theming\ImageManager; use OCA\Theming\ThemingDefaults; use OCA\Theming\Util; +use OCA\WorkflowEngine\Service\Logger; use OCP\Accounts\IAccountManager; use OCP\App\IAppManager; use OCP\Authentication\LoginCredentials\IStore; @@ -205,6 +212,8 @@ use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; use OCP\L10N\IFactory; +use OCP\LDAP\ILDAPProvider; +use OCP\LDAP\ILDAPProviderFactory; use OCP\Lock\ILockingProvider; use OCP\Log\ILogFactory; use OCP\Mail\IMailer; @@ -217,6 +226,7 @@ use OCP\Security\ICredentialsManager; use OCP\Security\ICrypto; use OCP\Security\IHasher; use OCP\Security\ISecureRandom; +use OCP\Security\VerificationToken\IVerificationToken; use OCP\Share\IShareHelper; use OCP\SystemTag\ISystemTagManager; use OCP\SystemTag\ISystemTagObjectMapper; @@ -309,7 +319,9 @@ class Server extends ServerContainer implements IServerContainer { ), $c->get(SymfonyAdapter::class), $c->get(GeneratorHelper::class), - $c->get(ISession::class)->get('user_id') + $c->get(ISession::class)->get('user_id'), + $c->get(Coordinator::class), + $c->get(IServerContainer::class) ); }); /** @deprecated 19.0.0 */ @@ -720,11 +732,14 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService(AvatarManager::class, function (Server $c) { return new AvatarManager( + $c->get(IUserSession::class), $c->get(\OC\User\Manager::class), $c->getAppDataDir('avatar'), $c->getL10N('lib'), - $c->get(ILogger::class), - $c->get(\OCP\IConfig::class) + $c->get(LoggerInterface::class), + $c->get(\OCP\IConfig::class), + $c->get(IAccountManager::class), + $c->get(KnownUserService::class) ); }); $this->registerAlias(IAvatarManager::class, AvatarManager::class); @@ -775,16 +790,28 @@ class Server extends ServerContainer implements IServerContainer { $this->registerDeprecatedAlias('Search', ISearch::class); $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { - return new \OC\Security\RateLimiting\Backend\MemoryCache( - $this->get(ICacheFactory::class), - new \OC\AppFramework\Utility\TimeFactory() - ); + $cacheFactory = $c->get(ICacheFactory::class); + if ($cacheFactory->isAvailable()) { + $backend = new \OC\Security\RateLimiting\Backend\MemoryCacheBackend( + $this->get(ICacheFactory::class), + new \OC\AppFramework\Utility\TimeFactory() + ); + } else { + $backend = new \OC\Security\RateLimiting\Backend\DatabaseBackend( + $c->get(IDBConnection::class), + new \OC\AppFramework\Utility\TimeFactory() + ); + } + + return $backend; }); $this->registerAlias(\OCP\Security\ISecureRandom::class, SecureRandom::class); /** @deprecated 19.0.0 */ $this->registerDeprecatedAlias('SecureRandom', \OCP\Security\ISecureRandom::class); + $this->registerAlias(IVerificationToken::class, VerificationToken::class); + $this->registerAlias(ICrypto::class, Crypto::class); /** @deprecated 19.0.0 */ $this->registerDeprecatedAlias('Crypto', ICrypto::class); @@ -815,6 +842,22 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias(ICertificateManager::class, CertificateManager::class); $this->registerAlias(IClientService::class, ClientService::class); + $this->registerService(LocalAddressChecker::class, function (ContainerInterface $c) { + return new LocalAddressChecker( + $c->get(ILogger::class), + ); + }); + $this->registerService(NegativeDnsCache::class, function (ContainerInterface $c) { + return new NegativeDnsCache( + $c->get(ICacheFactory::class), + ); + }); + $this->registerService(DnsPinMiddleware::class, function (ContainerInterface $c) { + return new DnsPinMiddleware( + $c->get(NegativeDnsCache::class), + $c->get(LocalAddressChecker::class) + ); + }); $this->registerDeprecatedAlias('HttpClientService', IClientService::class); $this->registerService(IEventLogger::class, function (ContainerInterface $c) { $eventLogger = new EventLogger(); @@ -851,7 +894,7 @@ class Server extends ServerContainer implements IServerContainer { $c->get(IGroupManager::class), $c->get(ICacheFactory::class), $c->get(SymfonyAdapter::class), - $c->get(ILogger::class) + $c->get(LoggerInterface::class) ); }); /** @deprecated 19.0.0 */ @@ -999,14 +1042,20 @@ class Server extends ServerContainer implements IServerContainer { /** @deprecated 19.0.0 */ $this->registerDeprecatedAlias('Mailer', IMailer::class); - $this->registerService('LDAPProvider', function (ContainerInterface $c) { + /** @deprecated 21.0.0 */ + $this->registerDeprecatedAlias('LDAPProvider', ILDAPProvider::class); + + $this->registerService(ILDAPProviderFactory::class, function (ContainerInterface $c) { $config = $c->get(\OCP\IConfig::class); $factoryClass = $config->getSystemValue('ldapProviderFactory', null); - if (is_null($factoryClass)) { - throw new \Exception('ldapProviderFactory not set'); + if (is_null($factoryClass) || !class_exists($factoryClass)) { + return new NullLDAPProviderFactory($this); } /** @var \OCP\LDAP\ILDAPProviderFactory $factory */ - $factory = new $factoryClass($this); + return new $factoryClass($this); + }); + $this->registerService(ILDAPProvider::class, function (ContainerInterface $c) { + $factory = $c->get(ILDAPProviderFactory::class); return $factory->getLDAPProvider(); }); $this->registerService(ILockingProvider::class, function (ContainerInterface $c) { @@ -1059,7 +1108,7 @@ class Server extends ServerContainer implements IServerContainer { $this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class); $this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) { - $manager = new CapabilitiesManager($c->get(ILogger::class)); + $manager = new CapabilitiesManager($c->get(LoggerInterface::class)); $manager->registerCapability(function () use ($c) { return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class)); }); @@ -1201,7 +1250,8 @@ class Server extends ServerContainer implements IServerContainer { $c->get(IMailer::class), $c->get(IURLGenerator::class), $c->get('ThemingDefaults'), - $c->get(IEventDispatcher::class) + $c->get(IEventDispatcher::class), + $c->get(IUserSession::class) ); return $manager; @@ -1253,7 +1303,7 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerService(ICloudIdManager::class, function (ContainerInterface $c) { - return new CloudIdManager($c->get(\OCP\Contacts\IManager::class)); + return new CloudIdManager($c->get(\OCP\Contacts\IManager::class), $c->get(IURLGenerator::class), $c->get(IUserManager::class)); }); $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); @@ -1302,7 +1352,7 @@ class Server extends ServerContainer implements IServerContainer { $c->get(AppFetcher::class), $c->get(IClientService::class), $c->get(ITempManager::class), - $c->get(ILogger::class), + $c->get(LoggerInterface::class), $c->get(\OCP\IConfig::class), \OC::$CLI ); diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index 50592f36ada..d6bec7526b7 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\AppFramework\App; diff --git a/lib/private/ServerNotAvailableException.php b/lib/private/ServerNotAvailableException.php index d0618883107..89a9300e50e 100644 --- a/lib/private/ServerNotAvailableException.php +++ b/lib/private/ServerNotAvailableException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class ServerNotAvailableException extends \Exception { diff --git a/lib/private/ServiceUnavailableException.php b/lib/private/ServiceUnavailableException.php index 0598ca43d11..8c52dd9b74c 100644 --- a/lib/private/ServiceUnavailableException.php +++ b/lib/private/ServiceUnavailableException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; class ServiceUnavailableException extends \Exception { diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php index 2b5b5c7b5e7..94ad8f90dcf 100644 --- a/lib/private/Session/CryptoSessionData.php +++ b/lib/private/Session/CryptoSessionData.php @@ -27,7 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Session; use OCP\ISession; diff --git a/lib/private/Session/CryptoWrapper.php b/lib/private/Session/CryptoWrapper.php index 0f791a865d8..e98aac3b8bf 100644 --- a/lib/private/Session/CryptoWrapper.php +++ b/lib/private/Session/CryptoWrapper.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Session; use OCP\IConfig; diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index b7e1c7b7bf8..285b6fd7960 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -31,7 +31,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Session; use OC\Authentication\Exceptions\InvalidTokenException; @@ -182,7 +181,9 @@ class Internal extends Session { * @throws \ErrorException */ public function trapError(int $errorNumber, string $errorString) { - throw new \ErrorException($errorString); + if ($errorNumber & E_ERROR) { + throw new \ErrorException($errorString); + } } /** diff --git a/lib/private/Session/Memory.php b/lib/private/Session/Memory.php index abbf026899b..0afd3703366 100644 --- a/lib/private/Session/Memory.php +++ b/lib/private/Session/Memory.php @@ -28,7 +28,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Session; use Exception; diff --git a/lib/private/Session/Session.php b/lib/private/Session/Session.php index fd6edd5183c..b9497983fbb 100644 --- a/lib/private/Session/Session.php +++ b/lib/private/Session/Session.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Session; use OCP\ISession; diff --git a/lib/private/Settings/AuthorizedGroup.php b/lib/private/Settings/AuthorizedGroup.php new file mode 100644 index 00000000000..d549e3d48f3 --- /dev/null +++ b/lib/private/Settings/AuthorizedGroup.php @@ -0,0 +1,50 @@ +<?php + +/** + * @copyright Copyright (c) 2021 Carl Schwan <carl@carlschwan.eu> + * + * @author Carl Schwan <carl@carlschwan.eu> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OC\Settings; + +use OCP\AppFramework\Db\Entity; + +/** + * @method setGroupId(string $groupId) + * @method setClass(string $class) + * @method getGroupId(): string + * @method getClass(): string + */ +class AuthorizedGroup extends Entity implements \JsonSerializable { + + /** @var string $group_id */ + protected $groupId; + + /** @var string $class */ + protected $class; + + public function jsonSerialize(): array { + return [ + 'id' => $this->id, + 'group_id' => $this->groupId, + 'class' => $this->class + ]; + } +} diff --git a/lib/private/Settings/AuthorizedGroupMapper.php b/lib/private/Settings/AuthorizedGroupMapper.php new file mode 100644 index 00000000000..4313ce60580 --- /dev/null +++ b/lib/private/Settings/AuthorizedGroupMapper.php @@ -0,0 +1,125 @@ +<?php +/** + * @copyright Copyright (c) 2021 Carl Schwan <carl@carlschwan.eu> + * + * @author Carl Schwan <carl@carlschwan.eu> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OC\Settings; + +use OCP\AppFramework\Db\Entity; +use OCP\AppFramework\Db\QBMapper; +use OCP\DB\Exception; +use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\IDBConnection; +use OCP\IGroup; +use OCP\IGroupManager; +use OCP\IUser; + +class AuthorizedGroupMapper extends QBMapper { + public function __construct(IDBConnection $db) { + parent::__construct($db, 'authorized_groups', AuthorizedGroup::class); + } + + /** + * @throws Exception + */ + public function findAllClassesForUser(IUser $user): array { + $qb = $this->db->getQueryBuilder(); + + /** @var IGroupManager $groupManager */ + $groupManager = \OC::$server->get(IGroupManager::class); + $groups = $groupManager->getUserGroups($user); + if (count($groups) === 0) { + return []; + } + + $result = $qb->select('class') + ->from($this->getTableName(), 'auth') + ->where($qb->expr()->in('group_id', array_map(function (IGroup $group) use ($qb) { + return $qb->createNamedParameter($group->getGID()); + }, $groups), IQueryBuilder::PARAM_STR)) + ->executeQuery(); + + $classes = []; + while ($row = $result->fetch()) { + $classes[] = $row['class']; + } + $result->closeCursor(); + return $classes; + } + + /** + * @throws \OCP\AppFramework\Db\DoesNotExistException + * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException + * @throws \OCP\DB\Exception + */ + public function find(int $id): AuthorizedGroup { + $queryBuilder = $this->db->getQueryBuilder(); + $queryBuilder->select('*') + ->from($this->getTableName()) + ->where($queryBuilder->expr()->eq('id', $queryBuilder->createNamedParameter($id))); + /** @var AuthorizedGroup $authorizedGroup */ + $authorizedGroup = $this->findEntity($queryBuilder); + return $authorizedGroup; + } + + /** + * Get all the authorizations stored in the database. + * + * @return AuthorizedGroup[] + * @throws \OCP\DB\Exception + */ + public function findAll(): array { + $qb = $this->db->getQueryBuilder(); + $qb->select('*')->from($this->getTableName()); + return $this->findEntities($qb); + } + + public function findByGroupIdAndClass(string $groupId, string $class) { + $qb = $this->db->getQueryBuilder(); + $qb->select('*') + ->from($this->getTableName()) + ->where($qb->expr()->eq('group_id', $qb->createNamedParameter($groupId))) + ->andWhere($qb->expr()->eq('class', $qb->createNamedParameter($class))); + return $this->findEntity($qb); + } + + /** + * @return Entity[] + * @throws \OCP\DB\Exception + */ + public function findExistingGroupsForClass(string $class): array { + $qb = $this->db->getQueryBuilder(); + $qb->select('*') + ->from($this->getTableName()) + ->where($qb->expr()->eq('class', $qb->createNamedParameter($class))); + return $this->findEntities($qb); + } + + /** + * @throws Exception + */ + public function removeGroup(string $gid) { + $qb = $this->db->getQueryBuilder(); + $qb->delete($this->getTableName()) + ->where($qb->expr()->eq('group_id', $qb->createNamedParameter($gid))) + ->executeStatement(); + } +} diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 37a87a40725..ebda3fe021d 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -11,6 +11,7 @@ * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author sualko <klaus@jsxc.org> + * @author Carl Schwan <carl@carlschwan.eu> * * @license GNU AGPL version 3 or any later version * @@ -21,7 +22,7 @@ * * 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 + * 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 @@ -33,19 +34,22 @@ namespace OC\Settings; use Closure; use OCP\AppFramework\QueryException; +use OCP\Group\ISubAdmin; +use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IServerContainer; use OCP\IURLGenerator; +use OCP\IUser; use OCP\L10N\IFactory; use OCP\Settings\IIconSection; use OCP\Settings\IManager; use OCP\Settings\ISettings; use OCP\Settings\ISubAdminSettings; +use Psr\Log\LoggerInterface; class Manager implements IManager { - /** @var ILogger */ + /** @var LoggerInterface */ private $log; /** @var IL10N */ @@ -60,16 +64,31 @@ class Manager implements IManager { /** @var IServerContainer */ private $container; + /** @var AuthorizedGroupMapper $mapper */ + private $mapper; + + /** @var IGroupManager $groupManager */ + private $groupManager; + + /** @var ISubAdmin $subAdmin */ + private $subAdmin; + public function __construct( - ILogger $log, + LoggerInterface $log, IFactory $l10nFactory, IURLGenerator $url, - IServerContainer $container + IServerContainer $container, + AuthorizedGroupMapper $mapper, + IGroupManager $groupManager, + ISubAdmin $subAdmin ) { $this->log = $log; $this->l10nFactory = $l10nFactory; $this->url = $url; $this->container = $container; + $this->mapper = $mapper; + $this->groupManager = $groupManager; + $this->subAdmin = $subAdmin; } /** @var array */ @@ -107,18 +126,14 @@ class Manager implements IManager { } foreach (array_unique($this->sectionClasses[$type]) as $index => $class) { - try { - /** @var IIconSection $section */ - $section = \OC::$server->query($class); - } catch (QueryException $e) { - $this->log->logException($e, ['level' => ILogger::INFO]); - continue; - } + /** @var IIconSection $section */ + $section = \OC::$server->get($class); $sectionID = $section->getID(); - if ($sectionID !== 'connected-accounts' && isset($this->sections[$type][$sectionID])) { - $this->log->logException(new \InvalidArgumentException('Section with the same ID already registered: ' . $sectionID . ', class: ' . $class), ['level' => ILogger::INFO]); + if (!$this->isKnownDuplicateSectionId($sectionID) && isset($this->sections[$type][$sectionID])) { + $e = new \InvalidArgumentException('Section with the same ID already registered: ' . $sectionID . ', class: ' . $class); + $this->log->info($e->getMessage(), ['exception' => $e]); continue; } @@ -130,6 +145,13 @@ class Manager implements IManager { return $this->sections[$type]; } + protected function isKnownDuplicateSectionId(string $sectionID): bool { + return in_array($sectionID, [ + 'connected-accounts', + 'notifications', + ], true); + } + /** @var array */ protected $settingClasses = []; @@ -137,8 +159,9 @@ class Manager implements IManager { protected $settings = []; /** - * @param string $type 'admin' or 'personal' - * @param string $setting Class must implement OCP\Settings\ISetting + * @psam-param 'admin'|'personal' $type The type of the setting. + * @param string $setting Class must implement OCP\Settings\ISettings + * @param bool $allowedDelegation * * @return void */ @@ -168,14 +191,15 @@ class Manager implements IManager { try { /** @var ISettings $setting */ - $setting = $this->container->query($class); + $setting = $this->container->get($class); } catch (QueryException $e) { - $this->log->logException($e, ['level' => ILogger::INFO]); + $this->log->info($e->getMessage(), ['exception' => $e]); continue; } if (!$setting instanceof ISettings) { - $this->log->logException(new \InvalidArgumentException('Invalid settings setting registered (' . $class . ')'), ['level' => ILogger::INFO]); + $e = new \InvalidArgumentException('Invalid settings setting registered (' . $class . ')'); + $this->log->info($e->getMessage(), ['exception' => $e]); continue; } @@ -308,4 +332,52 @@ class Manager implements IManager { ksort($settings); return $settings; } + + public function getAllowedAdminSettings(string $section, IUser $user): array { + $isAdmin = $this->groupManager->isAdmin($user->getUID()); + $isSubAdmin = $this->subAdmin->isSubAdmin($user); + $subAdminOnly = !$isAdmin && $isSubAdmin; + + if ($subAdminOnly) { + // not an admin => look if the user is still authorized to access some + // settings + $subAdminSettingsFilter = function (ISettings $settings) { + return $settings instanceof ISubAdminSettings; + }; + $appSettings = $this->getSettings('admin', $section, $subAdminSettingsFilter); + } elseif ($isAdmin) { + $appSettings = $this->getSettings('admin', $section); + } else { + $authorizedSettingsClasses = $this->mapper->findAllClassesForUser($user); + $authorizedGroupFilter = function (ISettings $settings) use ($authorizedSettingsClasses) { + return in_array(get_class($settings), $authorizedSettingsClasses) === true; + }; + $appSettings = $this->getSettings('admin', $section, $authorizedGroupFilter); + } + + $settings = []; + foreach ($appSettings as $setting) { + if (!isset($settings[$setting->getPriority()])) { + $settings[$setting->getPriority()] = []; + } + $settings[$setting->getPriority()][] = $setting; + } + + ksort($settings); + return $settings; + } + + public function getAllAllowedAdminSettings(IUser $user): array { + $this->getSettings('admin', ''); // Make sure all the settings are loaded + $settings = []; + $authorizedSettingsClasses = $this->mapper->findAllClassesForUser($user); + foreach ($this->settings['admin'] as $section) { + foreach ($section as $setting) { + if (in_array(get_class($setting), $authorizedSettingsClasses) === true) { + $settings[] = $setting; + } + } + } + return $settings; + } } diff --git a/lib/private/Settings/Section.php b/lib/private/Settings/Section.php index 5e0c772cb8d..6ec0d5ee04a 100644 --- a/lib/private/Settings/Section.php +++ b/lib/private/Settings/Section.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OC\Settings; use OCP\Settings\IIconSection; diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 98cf11e3a87..a7f0f190fa2 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -28,6 +28,7 @@ * @author Serge Martin <edb@sigluy.net> * @author Simounet <contact@simounet.net> * @author Thomas Müller <thomas.mueller@tmit.eu> + * @author Valdnet <47037905+Valdnet@users.noreply.github.com> * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 @@ -45,7 +46,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use bantu\IniGetWrapper\IniGetWrapper; @@ -60,8 +60,8 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Defaults; use OCP\IGroup; use OCP\IL10N; -use OCP\ILogger; use OCP\Security\ISecureRandom; +use Psr\Log\LoggerInterface; class Setup { /** @var SystemConfig */ @@ -72,28 +72,19 @@ class Setup { protected $l10n; /** @var Defaults */ protected $defaults; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @var ISecureRandom */ protected $random; /** @var Installer */ protected $installer; - /** - * @param SystemConfig $config - * @param IniGetWrapper $iniWrapper - * @param IL10N $l10n - * @param Defaults $defaults - * @param ILogger $logger - * @param ISecureRandom $random - * @param Installer $installer - */ public function __construct( SystemConfig $config, IniGetWrapper $iniWrapper, IL10N $l10n, Defaults $defaults, - ILogger $logger, + LoggerInterface $logger, ISecureRandom $random, Installer $installer ) { @@ -140,7 +131,10 @@ class Setup { * @return array */ protected function getAvailableDbDriversForPdo() { - return \PDO::getAvailableDrivers(); + if (class_exists(\PDO::class)) { + return \PDO::getAvailableDrivers(); + } + return []; } /** @@ -233,7 +227,7 @@ class Setup { try { $util = new \OC_Util(); $htAccessWorking = $util->isHtaccessWorking(\OC::$server->getConfig()); - } catch (\OC\HintException $e) { + } catch (\OCP\HintException $e) { $errors[] = [ 'error' => $e->getMessage(), 'exception' => $e, @@ -248,7 +242,7 @@ class Setup { 'error' => $this->l10n->t( 'Mac OS X is not supported and %s will not work properly on this platform. ' . 'Use it at your own risk! ', - [$this->defaults->getName()] + [$this->defaults->getProductName()] ), 'hint' => $this->l10n->t('For the best results, please consider using a GNU/Linux server instead.'), ]; @@ -259,7 +253,7 @@ class Setup { 'error' => $this->l10n->t( 'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' . 'This will lead to problems with files over 4 GB and is highly discouraged.', - [$this->defaults->getName()] + [$this->defaults->getProductName()] ), 'hint' => $this->l10n->t('Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.'), ]; @@ -312,7 +306,7 @@ class Setup { // validate the data directory if ((!is_dir($dataDir) && !mkdir($dataDir)) || !is_writable($dataDir)) { - $error[] = $l->t("Can't create or write into the data directory %s", [$dataDir]); + $error[] = $l->t("Cannot create or write into the data directory %s", [$dataDir]); } if (!empty($error)) { @@ -431,6 +425,9 @@ class Setup { //and we are done $config->setSystemValue('installed', true); + $bootstrapCoordinator = \OC::$server->query(\OC\AppFramework\Bootstrap\Coordinator::class); + $bootstrapCoordinator->runInitialRegistration(); + // Create a session token for the newly created user // The token provider requires a working db, so it's not injected on setup /* @var $userSession User\Session */ @@ -445,7 +442,7 @@ class Setup { // Set email for admin if (!empty($options['adminemail'])) { - $config->setUserValue($user->getUID(), 'settings', 'email', $options['adminemail']); + $user->setSystemEMailAddress($options['adminemail']); } } @@ -511,7 +508,7 @@ class Setup { \OC::$server->get(IniGetWrapper::class), \OC::$server->getL10N('lib'), \OC::$server->query(Defaults::class), - \OC::$server->getLogger(), + \OC::$server->get(LoggerInterface::class), \OC::$server->getSecureRandom(), \OC::$server->query(Installer::class) ); @@ -534,19 +531,12 @@ class Setup { $content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav)$"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/remote.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/public.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/cron.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/status.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/robots.txt"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/updater/"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs-provider/"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocm-provider/"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/ajax/update\\.php"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/img/(favicon\\.ico|manifest\\.json)$"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(cron|public|remote|status)\\.php"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v(1|2)\\.php"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/robots\\.txt"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(ocm-provider|ocs-provider|updater)/"; $content .= "\n RewriteCond %{REQUEST_URI} !^/\\.well-known/(acme-challenge|pki-validation)/.*"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$"; $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]"; diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index 77f3c02f9f6..8690e7c1c66 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Setup; use OC\DB\Connection; @@ -34,8 +33,8 @@ use OC\DB\ConnectionFactory; use OC\DB\MigrationService; use OC\SystemConfig; use OCP\IL10N; -use OCP\ILogger; use OCP\Security\ISecureRandom; +use Psr\Log\LoggerInterface; abstract class AbstractDatabase { @@ -55,12 +54,12 @@ abstract class AbstractDatabase { protected $tablePrefix; /** @var SystemConfig */ protected $config; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @var ISecureRandom */ protected $random; - public function __construct(IL10N $trans, SystemConfig $config, ILogger $logger, ISecureRandom $random) { + public function __construct(IL10N $trans, SystemConfig $config, LoggerInterface $logger, ISecureRandom $random) { $this->trans = $trans; $this->config = $config; $this->logger = $logger; diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php index 229d47160f5..8a12465fd8d 100644 --- a/lib/private/Setup/MySQL.php +++ b/lib/private/Setup/MySQL.php @@ -9,7 +9,6 @@ * @author Joas Schilling <coding@schilljs.com> * @author Michael Göhler <somebody.here@gmx.de> * @author Morris Jobke <hey@morrisjobke.de> - * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Vincent Petry <vincent@nextcloud.com> * @@ -28,13 +27,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Setup; use OC\DB\ConnectionAdapter; use OC\DB\MySqlTools; use OCP\IDBConnection; -use OCP\ILogger; use Doctrine\DBAL\Platforms\MySQL80Platform; use OCP\Security\ISecureRandom; @@ -66,7 +63,9 @@ class MySQL extends AbstractDatabase { try { $connection->connect(); } catch (\Exception $e) { - $this->logger->logException($e); + $this->logger->error($e->getMessage(), [ + 'exception' => $e, + ]); throw new \OC\DatabaseSetupException($this->trans->t('MySQL username and/or password not valid'), $this->trans->t('You need to enter details of an existing account.'), 0, $e); } @@ -84,9 +83,8 @@ class MySQL extends AbstractDatabase { $query = "CREATE DATABASE IF NOT EXISTS `$name` CHARACTER SET $characterSet COLLATE ${characterSet}_bin;"; $connection->executeUpdate($query); } catch (\Exception $ex) { - $this->logger->logException($ex, [ - 'message' => 'Database creation failed.', - 'level' => ILogger::ERROR, + $this->logger->error('Database creation failed.', [ + 'exception' => $ex, 'app' => 'mysql.setup', ]); return; @@ -97,9 +95,8 @@ class MySQL extends AbstractDatabase { $query = "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `$name` . * TO '$user'"; $connection->executeUpdate($query); } catch (\Exception $ex) { - $this->logger->logException($ex, [ - 'message' => 'Could not automatically grant privileges, this can be ignored if database user already had privileges.', - 'level' => ILogger::DEBUG, + $this->logger->debug('Could not automatically grant privileges, this can be ignored if database user already had privileges.', [ + 'exception' => $ex, 'app' => 'mysql.setup', ]); } @@ -128,9 +125,8 @@ class MySQL extends AbstractDatabase { $connection->executeUpdate($query); } } catch (\Exception $ex) { - $this->logger->logException($ex, [ - 'message' => 'Database user creation failed.', - 'level' => ILogger::ERROR, + $this->logger->error('Database user creation failed.',[ + 'exception' => $ex, 'app' => 'mysql.setup', ]); } @@ -166,7 +162,7 @@ class MySQL extends AbstractDatabase { $this->dbUser = $adminUser; //create a random password so we don't need to store the admin password in the config file - $this->dbPassword = $this->random->generate(30, ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER); + $this->dbPassword = $this->random->generate(30, ISecureRandom::CHAR_ALPHANUMERIC); $this->createDBUser($connection); @@ -180,9 +176,8 @@ class MySQL extends AbstractDatabase { } } } catch (\Exception $ex) { - $this->logger->logException($ex, [ - 'message' => 'Can not create a new MySQL user, will continue with the provided user.', - 'level' => ILogger::INFO, + $this->logger->info('Can not create a new MySQL user, will continue with the provided user.', [ + 'exception' => $ex, 'app' => 'mysql.setup', ]); } diff --git a/lib/private/Setup/OCI.php b/lib/private/Setup/OCI.php index ed05e0bf14c..2348aa8d47d 100644 --- a/lib/private/Setup/OCI.php +++ b/lib/private/Setup/OCI.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Setup; class OCI extends AbstractDatabase { diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index 7e59bf297f1..bc24909dc3d 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -3,12 +3,12 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Bart Visscher <bartv@thisnet.nl> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author eduardo <eduardo@vnexu.net> * @author Joas Schilling <coding@schilljs.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Vitor Mattos <vitor@php.rio> * * @license AGPL-3.0 @@ -26,12 +26,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Setup; use OC\DatabaseException; use OC\DB\Connection; use OC\DB\QueryBuilder\Literal; +use OCP\Security\ISecureRandom; class PostgreSQL extends AbstractDatabase { public $dbprettyname = 'PostgreSQL'; @@ -67,7 +67,7 @@ class PostgreSQL extends AbstractDatabase { //add prefix to the postgresql user name to prevent collisions $this->dbUser = 'oc_' . strtolower($username); //create a new password so we don't need to store the admin config in the config file - $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, \OCP\Security\ISecureRandom::CHAR_LOWER . \OCP\Security\ISecureRandom::CHAR_DIGITS); + $this->dbPassword = \OC::$server->getSecureRandom()->generate(30, ISecureRandom::CHAR_ALPHANUMERIC); $this->createDBUser($connection); } @@ -82,8 +82,9 @@ class PostgreSQL extends AbstractDatabase { // the connection to dbname=postgres is not needed anymore $connection->close(); } catch (\Exception $e) { - $this->logger->logException($e); - $this->logger->warning('Error trying to connect as "postgres", assuming database is setup and tables need to be created'); + $this->logger->warning('Error trying to connect as "postgres", assuming database is setup and tables need to be created', [ + 'exception' => $e, + ]); $this->config->setValues([ 'dbuser' => $this->dbUser, 'dbpassword' => $this->dbPassword, @@ -97,7 +98,9 @@ class PostgreSQL extends AbstractDatabase { try { $connection->connect(); } catch (\Exception $e) { - $this->logger->logException($e); + $this->logger->error($e->getMessage(), [ + 'exception' => $e, + ]); throw new \OC\DatabaseSetupException($this->trans->t('PostgreSQL username and/or password not valid'), $this->trans->t('You need to enter details of an existing account.'), 0, $e); } @@ -110,16 +113,18 @@ class PostgreSQL extends AbstractDatabase { try { $query->execute(); } catch (DatabaseException $e) { - $this->logger->error('Error while trying to create database'); - $this->logger->logException($e); + $this->logger->error('Error while trying to create database', [ + 'exception' => $e, + ]); } } else { $query = $connection->prepare("REVOKE ALL PRIVILEGES ON DATABASE " . addslashes($this->dbName) . " FROM PUBLIC"); try { $query->execute(); } catch (DatabaseException $e) { - $this->logger->error('Error while trying to restrict database permissions'); - $this->logger->logException($e); + $this->logger->error('Error while trying to restrict database permissions', [ + 'exception' => $e, + ]); } } } @@ -161,8 +166,9 @@ class PostgreSQL extends AbstractDatabase { $query->execute(); } } catch (DatabaseException $e) { - $this->logger->error('Error while trying to create database user'); - $this->logger->logException($e); + $this->logger->error('Error while trying to create database user', [ + 'exception' => $e, + ]); } } } diff --git a/lib/private/Setup/Sqlite.php b/lib/private/Setup/Sqlite.php index b7d985786a3..8ed432b039a 100644 --- a/lib/private/Setup/Sqlite.php +++ b/lib/private/Setup/Sqlite.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Setup; use OC\DB\ConnectionFactory; diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php index 0a705366283..31c734f94aa 100644 --- a/lib/private/Share/Constants.php +++ b/lib/private/Share/Constants.php @@ -8,7 +8,6 @@ * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> - * @author Morris Jobke <hey@morrisjobke.de> * * @license AGPL-3.0 * @@ -25,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share; use OCP\Share\IShare; diff --git a/lib/private/Share/Helper.php b/lib/private/Share/Helper.php index 6c92661fa76..8f2cfa4e197 100644 --- a/lib/private/Share/Helper.php +++ b/lib/private/Share/Helper.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share; class Helper extends \OC\Share\Constants { diff --git a/lib/private/Share/SearchResultSorter.php b/lib/private/Share/SearchResultSorter.php index a23e20b802d..edea3b59f2f 100644 --- a/lib/private/Share/SearchResultSorter.php +++ b/lib/private/Share/SearchResultSorter.php @@ -7,7 +7,6 @@ * @author J0WI <J0WI@users.noreply.github.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin McCorkell <robin@mccorkell.me.uk> - * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license AGPL-3.0 * @@ -24,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share; use OCP\ILogger; diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 2d0d4f1cf87..a857a850f9b 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -32,7 +32,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -614,7 +613,7 @@ class Share extends Constants { } // group items if we are looking for items shared with the current user - if (isset($shareWith) && $shareWith === \OCP\User::getUser()) { + if (isset($shareWith) && $shareWith === \OC_User::getUser()) { $items = self::groupItems($items, $itemType); } diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index cf05e9bfbc3..85655c4e379 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -32,7 +32,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20; use OC\Files\Cache\Cache; @@ -223,7 +222,7 @@ class DefaultShareProvider implements IShareProvider { $cursor->closeCursor(); if ($data === false) { - throw new ShareNotFound(); + throw new ShareNotFound('Newly created share could not be found'); } $mailSendValue = $share->getMailSend(); @@ -470,7 +469,8 @@ class DefaultShareProvider implements IShareProvider { } if (!$group->inGroup($user)) { - throw new ProviderException('Recipient not in receiving group'); + // nothing left to do + return; } // Try to fetch user specific share diff --git a/lib/private/Share20/Exception/BackendError.php b/lib/private/Share20/Exception/BackendError.php index 5ba17b7a458..b3e07495378 100644 --- a/lib/private/Share20/Exception/BackendError.php +++ b/lib/private/Share20/Exception/BackendError.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20\Exception; class BackendError extends \Exception { diff --git a/lib/private/Share20/Exception/InvalidShare.php b/lib/private/Share20/Exception/InvalidShare.php index 1216bfa9aea..464dc15a9f1 100644 --- a/lib/private/Share20/Exception/InvalidShare.php +++ b/lib/private/Share20/Exception/InvalidShare.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20\Exception; class InvalidShare extends \Exception { diff --git a/lib/private/Share20/Exception/ProviderException.php b/lib/private/Share20/Exception/ProviderException.php index f60f5a8f385..b8e15dd9db8 100644 --- a/lib/private/Share20/Exception/ProviderException.php +++ b/lib/private/Share20/Exception/ProviderException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20\Exception; class ProviderException extends \Exception { diff --git a/lib/private/Share20/Hooks.php b/lib/private/Share20/Hooks.php index b596123bbe0..ae08b20fde6 100644 --- a/lib/private/Share20/Hooks.php +++ b/lib/private/Share20/Hooks.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20; class Hooks { diff --git a/lib/private/Share20/LegacyHooks.php b/lib/private/Share20/LegacyHooks.php index f657b832b5a..94cfa6636d7 100644 --- a/lib/private/Share20/LegacyHooks.php +++ b/lib/private/Share20/LegacyHooks.php @@ -17,14 +17,13 @@ * * 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 + * 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/>. * */ - namespace OC\Share20; use OCP\Files\File; @@ -171,6 +170,7 @@ class LegacyHooks { 'shareWith' => $share->getSharedWith(), 'itemTarget' => $share->getTarget(), 'fileTarget' => $share->getTarget(), + 'path' => $share->getNode()->getPath(), ]; \OC_Hook::emit(Share::class, 'post_shared', $postHookData); diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 49a716e3216..ccc2d454a94 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -10,7 +10,7 @@ * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Jan-Christoph Borchardt <hey@jancborchardt.net> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Maxence Lange <maxence@artificial-owl.com> @@ -19,6 +19,9 @@ * @author Pauli Järvinen <pauli.jarvinen@gmail.com> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Samuel <faust64@gmail.com> + * @author szaimen <szaimen@e.mail.de> + * @author Valdnet <47037905+Valdnet@users.noreply.github.com> * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 @@ -36,13 +39,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20; use OC\Cache\CappedMemoryCache; use OC\Files\Mount\MoveableMount; -use OC\HintException; use OC\Share20\Exception\ProviderException; +use OCA\Files_Sharing\AppInfo\Application; use OCA\Files_Sharing\ISharedStorage; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\File; @@ -50,6 +52,7 @@ use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountManager; use OCP\Files\Node; +use OCP\HintException; use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; @@ -57,6 +60,7 @@ use OCP\ILogger; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Mail\IMailer; use OCP\Security\Events\ValidatePasswordPolicyEvent; @@ -114,44 +118,26 @@ class Manager implements IManager { private $defaults; /** @var IEventDispatcher */ private $dispatcher; + private $userSession; - - /** - * Manager constructor. - * - * @param ILogger $logger - * @param IConfig $config - * @param ISecureRandom $secureRandom - * @param IHasher $hasher - * @param IMountManager $mountManager - * @param IGroupManager $groupManager - * @param IL10N $l - * @param IFactory $l10nFactory - * @param IProviderFactory $factory - * @param IUserManager $userManager - * @param IRootFolder $rootFolder - * @param EventDispatcherInterface $eventDispatcher - * @param IMailer $mailer - * @param IURLGenerator $urlGenerator - * @param \OC_Defaults $defaults - */ public function __construct( - ILogger $logger, - IConfig $config, - ISecureRandom $secureRandom, - IHasher $hasher, - IMountManager $mountManager, - IGroupManager $groupManager, - IL10N $l, - IFactory $l10nFactory, - IProviderFactory $factory, - IUserManager $userManager, - IRootFolder $rootFolder, - EventDispatcherInterface $legacyDispatcher, - IMailer $mailer, - IURLGenerator $urlGenerator, - \OC_Defaults $defaults, - IEventDispatcher $dispatcher + ILogger $logger, + IConfig $config, + ISecureRandom $secureRandom, + IHasher $hasher, + IMountManager $mountManager, + IGroupManager $groupManager, + IL10N $l, + IFactory $l10nFactory, + IProviderFactory $factory, + IUserManager $userManager, + IRootFolder $rootFolder, + EventDispatcherInterface $legacyDispatcher, + IMailer $mailer, + IURLGenerator $urlGenerator, + \OC_Defaults $defaults, + IEventDispatcher $dispatcher, + IUserSession $userSession ) { $this->logger = $logger; $this->config = $config; @@ -166,11 +152,14 @@ class Manager implements IManager { $this->rootFolder = $rootFolder; $this->legacyDispatcher = $legacyDispatcher; $this->sharingDisabledForUsersCache = new CappedMemoryCache(); + // The constructor of LegacyHooks registers the listeners of share events + // do not remove if those are not properly migrated $this->legacyHooks = new LegacyHooks($this->legacyDispatcher); $this->mailer = $mailer; $this->urlGenerator = $urlGenerator; $this->defaults = $defaults; $this->dispatcher = $dispatcher; + $this->userSession = $userSession; } /** @@ -252,7 +241,7 @@ class Manager implements IManager { } elseif ($share->getShareType() === IShare::TYPE_ROOM) { } elseif ($share->getShareType() === IShare::TYPE_DECK) { } else { - // We can't handle other types yet + // We cannot handle other types yet throw new \InvalidArgumentException('unknown share type'); } @@ -264,7 +253,7 @@ class Manager implements IManager { // Cannot share with yourself if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() === $share->getSharedBy()) { - throw new \InvalidArgumentException('Can’t share with yourself'); + throw new \InvalidArgumentException('Cannot share with yourself'); } // The path should be set @@ -274,18 +263,18 @@ class Manager implements IManager { // And it should be a file or a folder if (!($share->getNode() instanceof \OCP\Files\File) && - !($share->getNode() instanceof \OCP\Files\Folder)) { + !($share->getNode() instanceof \OCP\Files\Folder)) { throw new \InvalidArgumentException('Path should be either a file or a folder'); } - // And you can't share your rootfolder + // And you cannot share your rootfolder if ($this->userManager->userExists($share->getSharedBy())) { $userFolder = $this->rootFolder->getUserFolder($share->getSharedBy()); } else { $userFolder = $this->rootFolder->getUserFolder($share->getShareOwner()); } if ($userFolder->getId() === $share->getNode()->getId()) { - throw new \InvalidArgumentException('You can’t share your root folder'); + throw new \InvalidArgumentException('You cannot share your root folder'); } // Check if we actually have share permissions @@ -349,7 +338,7 @@ class Manager implements IManager { // Check that we do not share with more permissions than we have if ($share->getPermissions() & ~$permissions) { $path = $userFolder->getRelativePath($share->getNode()->getPath()); - $message_t = $this->l->t('Can’t increase permissions of %s', [$path]); + $message_t = $this->l->t('Cannot increase permissions of %s', [$path]); throw new GenericShareException($message_t, $message_t, 404); } @@ -365,11 +354,11 @@ class Manager implements IManager { if ($share->getNode() instanceof \OCP\Files\File) { if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) { - $message_t = $this->l->t('Files can’t be shared with delete permissions'); + $message_t = $this->l->t('Files cannot be shared with delete permissions'); throw new GenericShareException($message_t); } if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) { - $message_t = $this->l->t('Files can’t be shared with create permissions'); + $message_t = $this->l->t('Files cannot be shared with create permissions'); throw new GenericShareException($message_t); } } @@ -385,6 +374,8 @@ class Manager implements IManager { * @throws \Exception */ protected function validateExpirationDateInternal(IShare $share) { + $isRemote = $share->getShareType() === IShare::TYPE_REMOTE || $share->getShareType() === IShare::TYPE_REMOTE_GROUP; + $expirationDate = $share->getExpirationDate(); if ($expirationDate !== null) { @@ -407,28 +398,39 @@ class Manager implements IManager { // This is a new share } - if ($fullId === null && $expirationDate === null && $this->shareApiInternalDefaultExpireDate()) { + if ($isRemote) { + $defaultExpireDate = $this->shareApiRemoteDefaultExpireDate(); + $defaultExpireDays = $this->shareApiRemoteDefaultExpireDays(); + $configProp = 'remote_defaultExpDays'; + $isEnforced = $this->shareApiRemoteDefaultExpireDateEnforced(); + } else { + $defaultExpireDate = $this->shareApiInternalDefaultExpireDate(); + $defaultExpireDays = $this->shareApiInternalDefaultExpireDays(); + $configProp = 'internal_defaultExpDays'; + $isEnforced = $this->shareApiInternalDefaultExpireDateEnforced(); + } + if ($fullId === null && $expirationDate === null && $defaultExpireDate) { $expirationDate = new \DateTime(); - $expirationDate->setTime(0,0,0); + $expirationDate->setTime(0, 0, 0); - $days = (int)$this->config->getAppValue('core', 'internal_defaultExpDays', (string)$this->shareApiInternalDefaultExpireDays()); - if ($days > $this->shareApiInternalDefaultExpireDays()) { - $days = $this->shareApiInternalDefaultExpireDays(); + $days = (int)$this->config->getAppValue('core', $configProp, (string)$defaultExpireDays); + if ($days > $defaultExpireDays) { + $days = $defaultExpireDays; } - $expirationDate->add(new \DateInterval('P'.$days.'D')); + $expirationDate->add(new \DateInterval('P' . $days . 'D')); } // If we enforce the expiration date check that is does not exceed - if ($this->shareApiInternalDefaultExpireDateEnforced()) { + if ($isEnforced) { if ($expirationDate === null) { throw new \InvalidArgumentException('Expiration date is enforced'); } $date = new \DateTime(); $date->setTime(0, 0, 0); - $date->add(new \DateInterval('P' . $this->shareApiInternalDefaultExpireDays() . 'D')); + $date->add(new \DateInterval('P' . $defaultExpireDays . 'D')); if ($date < $expirationDate) { - $message = $this->l->t('Can’t set expiration date more than %s days in the future', [$this->shareApiInternalDefaultExpireDays()]); + $message = $this->l->n('Cannot set expiration date more than %n day in the future', 'Cannot set expiration date more than %n days in the future', $defaultExpireDays); throw new GenericShareException($message, $message, 404); } } @@ -485,13 +487,13 @@ class Manager implements IManager { if ($fullId === null && $expirationDate === null && $this->shareApiLinkDefaultExpireDate()) { $expirationDate = new \DateTime(); - $expirationDate->setTime(0,0,0); + $expirationDate->setTime(0, 0, 0); $days = (int)$this->config->getAppValue('core', 'link_defaultExpDays', $this->shareApiLinkDefaultExpireDays()); if ($days > $this->shareApiLinkDefaultExpireDays()) { $days = $this->shareApiLinkDefaultExpireDays(); } - $expirationDate->add(new \DateInterval('P'.$days.'D')); + $expirationDate->add(new \DateInterval('P' . $days . 'D')); } // If we enforce the expiration date check that is does not exceed @@ -504,7 +506,7 @@ class Manager implements IManager { $date->setTime(0, 0, 0); $date->add(new \DateInterval('P' . $this->shareApiLinkDefaultExpireDays() . 'D')); if ($date < $expirationDate) { - $message = $this->l->t('Can’t set expiration date more than %s days in the future', [$this->shareApiLinkDefaultExpireDays()]); + $message = $this->l->n('Cannot set expiration date more than %n day in the future', 'Cannot set expiration date more than %n days in the future', $this->shareApiLinkDefaultExpireDays()); throw new GenericShareException($message, $message, 404); } } @@ -540,8 +542,8 @@ class Manager implements IManager { $sharedWith = $this->userManager->get($share->getSharedWith()); // Verify we can share with this user $groups = array_intersect( - $this->groupManager->getUserGroupIds($sharedBy), - $this->groupManager->getUserGroupIds($sharedWith) + $this->groupManager->getUserGroupIds($sharedBy), + $this->groupManager->getUserGroupIds($sharedWith) ); if (empty($groups)) { $message_t = $this->l->t('Sharing is only allowed with group members'); @@ -751,6 +753,9 @@ class Manager implements IManager { // Verify the expiration date $share = $this->validateExpirationDateInternal($share); + } elseif ($share->getShareType() === IShare::TYPE_REMOTE || $share->getShareType() === IShare::TYPE_REMOTE_GROUP) { + //Verify the expiration date + $share = $this->validateExpirationDateInternal($share); } elseif ($share->getShareType() === IShare::TYPE_LINK || $share->getShareType() === IShare::TYPE_EMAIL) { $this->linkCreateChecks($share); @@ -780,11 +785,19 @@ class Manager implements IManager { // Cannot share with the owner if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() === $share->getShareOwner()) { - throw new \InvalidArgumentException('Can’t share with the share owner'); + throw new \InvalidArgumentException('Cannot share with the share owner'); } // Generate the target - $target = $this->config->getSystemValue('share_folder', '/') . '/' . $share->getNode()->getName(); + $defaultShareFolder = $this->config->getSystemValue('share_folder', '/'); + $allowCustomShareFolder = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true); + if ($allowCustomShareFolder) { + $shareFolder = $this->config->getUserValue($share->getSharedWith(), Application::APP_ID, 'share_folder', $defaultShareFolder); + } else { + $shareFolder = $defaultShareFolder; + } + + $target = $shareFolder . '/' . $share->getNode()->getName(); $target = \OC\Files\Filesystem::normalizePath($target); $share->setTarget($target); @@ -903,10 +916,10 @@ class Manager implements IManager { '%1$s via %2$s', [ $initiatorDisplayName, - $instanceName + $instanceName, ] ); - $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); + $message->setFrom([\OCP\Util::getDefaultEmailAddress('noreply') => $senderName]); // The "Reply-To" is set to the sharer if an mail address is configured // also the default footer contains a "Do not reply" which needs to be adjusted. @@ -948,9 +961,9 @@ class Manager implements IManager { throw new \InvalidArgumentException('Share does not have a full id'); } - // We can't change the share type! + // We cannot change the share type! if ($share->getShareType() !== $originalShare->getShareType()) { - throw new \InvalidArgumentException('Can’t change share type'); + throw new \InvalidArgumentException('Cannot change share type'); } // We can only change the recipient on user shares @@ -962,7 +975,7 @@ class Manager implements IManager { // Cannot share with the owner if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() === $share->getShareOwner()) { - throw new \InvalidArgumentException('Can’t share with the share owner'); + throw new \InvalidArgumentException('Cannot share with the share owner'); } $this->generalCreateChecks($share); @@ -997,9 +1010,9 @@ class Manager implements IManager { * Cannot enable the getSendPasswordByTalk if there is no password set */ if (empty($plainTextPassword) && $share->getSendPasswordByTalk()) { - throw new \InvalidArgumentException('Can’t enable sending the password by Talk with an empty password'); + throw new \InvalidArgumentException('Cannot enable sending the password by Talk with an empty password'); } - + /** * If we're in a mail share, we need to force a password change * as either the user is not aware of the password or is already (received by mail) @@ -1007,10 +1020,10 @@ class Manager implements IManager { */ if (!$updatedPassword && $share->getShareType() === IShare::TYPE_EMAIL) { if (!$originalShare->getSendPasswordByTalk() && $share->getSendPasswordByTalk()) { - throw new \InvalidArgumentException('Can’t enable sending the password by Talk without setting a new password'); + throw new \InvalidArgumentException('Cannot enable sending the password by Talk without setting a new password'); } if ($originalShare->getSendPasswordByTalk() && !$share->getSendPasswordByTalk()) { - throw new \InvalidArgumentException('Can’t disable sending the password by Talk without setting a new password'); + throw new \InvalidArgumentException('Cannot disable sending the password by Talk without setting a new password'); } } @@ -1019,6 +1032,12 @@ class Manager implements IManager { $this->validateExpirationDateLink($share); $expirationDateUpdated = true; } + } elseif ($share->getShareType() === IShare::TYPE_REMOTE || $share->getShareType() === IShare::TYPE_REMOTE_GROUP) { + if ($share->getExpirationDate() != $originalShare->getExpirationDate()) { + //Verify the expiration date + $this->validateExpirationDateInternal($share); + $expirationDateUpdated = true; + } } $this->pathCreateChecks($share->getNode()); @@ -1080,7 +1099,7 @@ class Manager implements IManager { * @since 9.0.0 */ public function acceptShare(IShare $share, string $recipientId): IShare { - [$providerId, ] = $this->splitFullId($share->getFullId()); + [$providerId,] = $this->splitFullId($share->getFullId()); $provider = $this->factory->getProvider($providerId); if (!method_exists($provider, 'acceptShare')) { @@ -1105,10 +1124,10 @@ class Manager implements IManager { */ private function updateSharePasswordIfNeeded(IShare $share, IShare $originalShare) { $passwordsAreDifferent = ($share->getPassword() !== $originalShare->getPassword()) && - (($share->getPassword() !== null && $originalShare->getPassword() === null) || - ($share->getPassword() === null && $originalShare->getPassword() !== null) || - ($share->getPassword() !== null && $originalShare->getPassword() !== null && - !$this->hasher->verify($share->getPassword(), $originalShare->getPassword()))); + (($share->getPassword() !== null && $originalShare->getPassword() === null) || + ($share->getPassword() === null && $originalShare->getPassword() !== null) || + ($share->getPassword() !== null && $originalShare->getPassword() !== null && + !$this->hasher->verify($share->getPassword(), $originalShare->getPassword()))); // Password updated. if ($passwordsAreDifferent) { @@ -1203,7 +1222,7 @@ class Manager implements IManager { * @param string $recipientId */ public function deleteFromSelf(IShare $share, $recipientId) { - [$providerId, ] = $this->splitFullId($share->getFullId()); + [$providerId,] = $this->splitFullId($share->getFullId()); $provider = $this->factory->getProvider($providerId); $provider->deleteFromSelf($share, $recipientId); @@ -1212,7 +1231,7 @@ class Manager implements IManager { } public function restoreShare(IShare $share, string $recipientId): IShare { - [$providerId, ] = $this->splitFullId($share->getFullId()); + [$providerId,] = $this->splitFullId($share->getFullId()); $provider = $this->factory->getProvider($providerId); return $provider->restore($share, $recipientId); @@ -1224,7 +1243,7 @@ class Manager implements IManager { public function moveShare(IShare $share, $recipientId) { if ($share->getShareType() === IShare::TYPE_LINK || $share->getShareType() === IShare::TYPE_EMAIL) { - throw new \InvalidArgumentException('Can’t change target of link share'); + throw new \InvalidArgumentException('Cannot change target of link share'); } if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() !== $recipientId) { @@ -1242,7 +1261,7 @@ class Manager implements IManager { } } - [$providerId, ] = $this->splitFullId($share->getFullId()); + [$providerId,] = $this->splitFullId($share->getFullId()); $provider = $this->factory->getProvider($providerId); return $provider->move($share, $recipientId); @@ -1269,8 +1288,8 @@ class Manager implements IManager { */ public function getSharesBy($userId, $shareType, $path = null, $reshares = false, $limit = 50, $offset = 0) { if ($path !== null && - !($path instanceof \OCP\Files\File) && - !($path instanceof \OCP\Files\Folder)) { + !($path instanceof \OCP\Files\File) && + !($path instanceof \OCP\Files\Folder)) { throw new \InvalidArgumentException('invalid path'); } @@ -1425,7 +1444,7 @@ class Manager implements IManager { * @throws ShareNotFound */ public function getShareByToken($token) { - // tokens can't be valid local user names + // tokens cannot be valid local user names if ($this->userManager->userExists($token)) { throw new ShareNotFound(); } @@ -1511,8 +1530,8 @@ class Manager implements IManager { */ public function checkPassword(IShare $share, $password) { $passwordProtected = $share->getShareType() !== IShare::TYPE_LINK - || $share->getShareType() !== IShare::TYPE_EMAIL - || $share->getShareType() !== IShare::TYPE_CIRCLE; + || $share->getShareType() !== IShare::TYPE_EMAIL + || $share->getShareType() !== IShare::TYPE_CIRCLE; if (!$passwordProtected) { //TODO maybe exception? return false; @@ -1643,12 +1662,12 @@ class Manager implements IManager { return $al; } - //Get node for the owner and correct the owner in case of external storages + //Get node for the owner and correct the owner in case of external storage $userFolder = $this->rootFolder->getUserFolder($owner); if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) { $nodes = $userFolder->getById($path->getId()); $path = array_shift($nodes); - if ($path->getOwner() === null) { + if ($path === null || $path->getOwner() === null) { return []; } $owner = $path->getOwner()->getUID(); @@ -1734,7 +1753,20 @@ class Manager implements IManager { * @return bool */ public function shareApiAllowLinks() { - return $this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes'; + if ($this->config->getAppValue('core', 'shareapi_allow_links', 'yes') !== 'yes') { + return false; + } + + $user = $this->userSession->getUser(); + if ($user) { + $excludedGroups = json_decode($this->config->getAppValue('core', 'shareapi_allow_links_exclude_groups', '[]')); + if ($excludedGroups) { + $userGroups = $this->groupManager->getUserGroupIds($user); + return !(bool)array_intersect($excludedGroups, $userGroups); + } + } + + return true; } /** @@ -1758,6 +1790,7 @@ class Manager implements IManager { /** * Is default link expire date enforced *` + * * @return bool */ public function shareApiLinkDefaultExpireDateEnforced() { @@ -1768,6 +1801,7 @@ class Manager implements IManager { /** * Number of default link expire days + * * @return int */ public function shareApiLinkDefaultExpireDays() { @@ -1784,8 +1818,17 @@ class Manager implements IManager { } /** + * Is default remote expire date enabled + * + * @return bool + */ + public function shareApiRemoteDefaultExpireDate(): bool { + return $this->config->getAppValue('core', 'shareapi_default_remote_expire_date', 'no') === 'yes'; + } + + /** * Is default expire date enforced - *` + * * @return bool */ public function shareApiInternalDefaultExpireDateEnforced(): bool { @@ -1793,9 +1836,19 @@ class Manager implements IManager { $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no') === 'yes'; } + /** + * Is default expire date enforced for remote shares + * + * @return bool + */ + public function shareApiRemoteDefaultExpireDateEnforced(): bool { + return $this->shareApiRemoteDefaultExpireDate() && + $this->config->getAppValue('core', 'shareapi_enforce_remote_expire_date', 'no') === 'yes'; + } /** * Number of default expire days + * * @return int */ public function shareApiInternalDefaultExpireDays(): int { @@ -1803,6 +1856,15 @@ class Manager implements IManager { } /** + * Number of default expire days for remote shares + * + * @return int + */ + public function shareApiRemoteDefaultExpireDays(): int { + return (int)$this->config->getAppValue('core', 'shareapi_remote_expire_after_n_days', '7'); + } + + /** * Allow public upload on link shares * * @return bool @@ -1813,6 +1875,7 @@ class Manager implements IManager { /** * check if user can only share with group members + * * @return bool */ public function shareWithGroupMembersOnly() { @@ -1821,6 +1884,7 @@ class Manager implements IManager { /** * Check if users can share with groups + * * @return bool */ public function allowGroupSharing() { diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php index 0c59d39d6bc..42677d6bcf7 100644 --- a/lib/private/Share20/ProviderFactory.php +++ b/lib/private/Share20/ProviderFactory.php @@ -6,14 +6,15 @@ * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Calviño Sánchez <danxuliu@gmail.com> - * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Maxence Lange <maxence@nextcloud.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Samuel <faust64@gmail.com> * * @license AGPL-3.0 * @@ -30,7 +31,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20; use OC\Share20\Exception\ProviderException; diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php index 2add82c4353..f1df71b1143 100644 --- a/lib/private/Share20/Share.php +++ b/lib/private/Share20/Share.php @@ -7,7 +7,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Maxence Lange <maxence@nextcloud.com> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Share20; use OCP\Files\File; diff --git a/lib/private/Share20/ShareHelper.php b/lib/private/Share20/ShareHelper.php index c7f1600e156..329e4470cb4 100644 --- a/lib/private/Share20/ShareHelper.php +++ b/lib/private/Share20/ShareHelper.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OC\Share20; use OCP\Files\InvalidPathException; diff --git a/lib/private/Share20/UserRemovedListener.php b/lib/private/Share20/UserRemovedListener.php index 0a81d049494..6bf184a9309 100644 --- a/lib/private/Share20/UserRemovedListener.php +++ b/lib/private/Share20/UserRemovedListener.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Share20; use OCP\EventDispatcher\Event; diff --git a/lib/private/Streamer.php b/lib/private/Streamer.php index 0e3018f77b7..176334b971d 100644 --- a/lib/private/Streamer.php +++ b/lib/private/Streamer.php @@ -7,6 +7,7 @@ * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Joas Schilling <coding@schilljs.com> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author szaimen <szaimen@e.mail.de> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Victor Dubiniuk <dubiniuk@owncloud.com> * @@ -25,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\Files\Filesystem; @@ -78,7 +78,7 @@ class Streamer { * larger than 4GiB), but it should not happen in the real world. * * We also have to check for a size above 0. As negative sizes could be - * from not fully scanned external storages. And then things fall apart + * from not fully scanned external storage. And then things fall apart * if somebody tries to package to much. */ if ($size > 0 && $size < 4 * 1000 * 1000 * 1000 && $numberOfFiles < 65536) { diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php index a8769f28023..10eff9ffad5 100644 --- a/lib/private/SubAdmin.php +++ b/lib/private/SubAdmin.php @@ -7,7 +7,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Mikael Hammarin <mikael@try2.se> * @author Morris Jobke <hey@morrisjobke.de> @@ -28,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Support/CrashReport/Registry.php b/lib/private/Support/CrashReport/Registry.php index bff62705ceb..96796d6370f 100644 --- a/lib/private/Support/CrashReport/Registry.php +++ b/lib/private/Support/CrashReport/Registry.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Morris Jobke <hey@morrisjobke.de> @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Support\CrashReport; use Exception; @@ -36,6 +35,7 @@ use OCP\Support\CrashReport\IMessageReporter; use OCP\Support\CrashReport\IRegistry; use OCP\Support\CrashReport\IReporter; use Throwable; +use function array_shift; class Registry implements IRegistry { @@ -120,8 +120,7 @@ class Registry implements IRegistry { } private function loadLazyProviders(): void { - $classes = $this->lazyReporters; - foreach ($classes as $class) { + while (($class = array_shift($this->lazyReporters)) !== null) { try { /** @var IReporter $reporter */ $reporter = $this->serverContainer->query($class); @@ -152,6 +151,5 @@ class Registry implements IRegistry { ]); } } - $this->lazyReporters = []; } } diff --git a/lib/private/Support/Subscription/Registry.php b/lib/private/Support/Subscription/Registry.php index 72bae2adc8e..e64eaac1fa2 100644 --- a/lib/private/Support/Subscription/Registry.php +++ b/lib/private/Support/Subscription/Registry.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> * * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Support\Subscription; use OC\User\Backend; diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php index 7f0114ec821..c435b9180b9 100644 --- a/lib/private/SystemConfig.php +++ b/lib/private/SystemConfig.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OCP\IConfig; @@ -84,6 +83,27 @@ class SystemConfig { ], ], ], + 'objectstore_multibucket' => [ + 'arguments' => [ + 'options' => [ + 'credentials' => [ + 'key' => true, + 'secret' => true, + ] + ], + // S3 + 'key' => true, + 'secret' => true, + // Swift v2 + 'username' => true, + 'password' => true, + // Swift v3 + 'user' => [ + 'name' => true, + 'password' => true, + ], + ], + ], ]; /** @var Config */ diff --git a/lib/private/SystemTag/ManagerFactory.php b/lib/private/SystemTag/ManagerFactory.php index f894a8fe3ed..f878cbf07c3 100644 --- a/lib/private/SystemTag/ManagerFactory.php +++ b/lib/private/SystemTag/ManagerFactory.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\SystemTag; use OCP\IServerContainer; diff --git a/lib/private/SystemTag/SystemTag.php b/lib/private/SystemTag/SystemTag.php index 8a48e048d39..e6b84c9916e 100644 --- a/lib/private/SystemTag/SystemTag.php +++ b/lib/private/SystemTag/SystemTag.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Joas Schilling <coding@schilljs.com> + * @author Johannes Leuker <j.leuker@hosting.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Vincent Petry <vincent@nextcloud.com> * @@ -24,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\SystemTag; use OCP\SystemTag\ISystemTag; @@ -93,4 +93,19 @@ class SystemTag implements ISystemTag { public function isUserAssignable(): bool { return $this->userAssignable; } + + /** + * {@inheritdoc} + */ + public function getAccessLevel(): int { + if ($this->userVisible) { + if ($this->userAssignable) { + return self::ACCESS_LEVEL_PUBLIC; + } else { + return self::ACCESS_LEVEL_RESTRICTED; + } + } else { + return self::ACCESS_LEVEL_INVISIBLE; + } + } } diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php index 0f700a83490..4524aeaf7bc 100644 --- a/lib/private/SystemTag/SystemTagManager.php +++ b/lib/private/SystemTag/SystemTagManager.php @@ -27,7 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\SystemTag; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php index c07b1726c68..5a09a1754f2 100644 --- a/lib/private/SystemTag/SystemTagObjectMapper.php +++ b/lib/private/SystemTag/SystemTagObjectMapper.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\SystemTag; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/TagManager.php b/lib/private/TagManager.php index f283a5d5ada..8c9dca98c92 100644 --- a/lib/private/TagManager.php +++ b/lib/private/TagManager.php @@ -24,18 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Factory class creating instances of \OCP\ITags - * - * A tag can be e.g. 'Family', 'Work', 'Chore', 'Special Occation' or - * anything else that is either parsed from a vobject or that the user chooses - * to add. - * Tag names are not case-sensitive, but will be saved with the case they - * are entered in. If a user already has a tag 'family' for a type, and - * tries to add a tag named 'Family' it will be silently ignored. - */ - namespace OC; use OC\Tagging\TagMapper; diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php index 55fa996013c..17af385418d 100644 --- a/lib/private/Tagging/Tag.php +++ b/lib/private/Tagging/Tag.php @@ -4,7 +4,6 @@ * * @author Bernhard Reiter <ockham@raz.or.at> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license AGPL-3.0 @@ -22,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Tagging; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/Tagging/TagMapper.php b/lib/private/Tagging/TagMapper.php index cf1d93e3d26..f6179331e11 100644 --- a/lib/private/Tagging/TagMapper.php +++ b/lib/private/Tagging/TagMapper.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Tagging; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Tags.php b/lib/private/Tags.php index 8e32f3925e3..c11d83e41cf 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -6,7 +6,6 @@ * @author Bernhard Reiter <ockham@raz.or.at> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> - * @author derkostka <sebastian.kostka@gmail.com> * @author Joas Schilling <coding@schilljs.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -29,18 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Class for easily tagging objects by their id - * - * A tag can be e.g. 'Family', 'Work', 'Chore', 'Special Occation' or - * anything else that is either parsed from a vobject or that the user chooses - * to add. - * Tag names are not case-sensitive, but will be saved with the case they - * are entered in. If a user already has a tag 'family' for a type, and - * tries to add a tag named 'Family' it will be silently ignored. - */ - namespace OC; use OC\Tagging\Tag; diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php index e49955622c8..0df31dce3ff 100644 --- a/lib/private/TempManager.php +++ b/lib/private/TempManager.php @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php index c95958ceea1..2de8c7ad5b1 100644 --- a/lib/private/Template/Base.php +++ b/lib/private/Template/Base.php @@ -5,6 +5,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> @@ -26,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Template; use OCP\Defaults; @@ -65,7 +65,7 @@ class Base { */ protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) { // Check if the app is in the app folder or in the root - if (file_exists($app_dir.'/templates/')) { + if ($app_dir !== false && file_exists($app_dir.'/templates/')) { return [ $serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/', $app_dir.'/templates/', @@ -168,7 +168,9 @@ class Base { if (!is_null($additionalParams)) { $_ = array_merge($additionalParams, $this->vars); foreach ($_ as $var => $value) { - ${$var} = $value; + if (!isset(${$var})) { + ${$var} = $value; + } } } diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php index 7b33e181f76..9ee11e723e5 100644 --- a/lib/private/Template/CSSResourceLocator.php +++ b/lib/private/Template/CSSResourceLocator.php @@ -6,7 +6,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Kyle Fazzari <kyrofa@ubuntu.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -29,7 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Template; use OCP\ILogger; diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php index 25f990beff1..01500aa2e9c 100644 --- a/lib/private/Template/IconsCacher.php +++ b/lib/private/Template/IconsCacher.php @@ -7,7 +7,7 @@ declare(strict_types=1); * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -21,14 +21,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Template; use OC\Files\AppData\Factory; @@ -171,7 +170,10 @@ class IconsCacher { } elseif (\strpos($url, $base) === 0) { if (\preg_match('/([A-z0-9\_\-]+)\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) { [,$app,$cleanUrl, $color] = $matches; - $location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg'; + $appPath = \OC_App::getAppPath($app); + if ($appPath !== false) { + $location = $appPath . '/img/' . $cleanUrl . '.svg'; + } if ($app === 'settings') { $location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg'; } diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index 89ef9787f17..d2073fbbb83 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -17,14 +17,13 @@ * * 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 + * 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/>. * */ - namespace OC\Template; use OC\SystemConfig; diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index cd466575601..2cc8f6ca3fd 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -11,6 +11,7 @@ * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Vincent Petry <vincent@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -21,14 +22,13 @@ * * 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 + * 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/>. * */ - namespace OC\Template; use bantu\IniGetWrapper\IniGetWrapper; @@ -165,6 +165,13 @@ class JSConfigHelper { $defaultInternalExpireDateEnforced = $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no') === 'yes'; } + $defaultRemoteExpireDateEnabled = $this->config->getAppValue('core', 'shareapi_default_remote_expire_date', 'no') === 'yes'; + $defaultRemoteExpireDate = $defaultRemoteExpireDateEnforced = null; + if ($defaultRemoteExpireDateEnabled) { + $defaultRemoteExpireDate = (int)$this->config->getAppValue('core', 'shareapi_remote_expire_after_n_days', '7'); + $defaultRemoteExpireDateEnforced = $this->config->getAppValue('core', 'shareapi_enforce_remote_expire_date', 'no') === 'yes'; + } + $countOfDataLocation = 0; $dataLocation = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValue('datadirectory', ''), $countOfDataLocation); if ($countOfDataLocation !== 1 || $uid === null || !$this->groupManager->isAdmin($uid)) { @@ -278,11 +285,15 @@ class JSConfigHelper { 'defaultInternalExpireDateEnabled' => $defaultInternalExpireDateEnabled, 'defaultInternalExpireDate' => $defaultInternalExpireDate, 'defaultInternalExpireDateEnforced' => $defaultInternalExpireDateEnforced, + 'defaultRemoteExpireDateEnabled' => $defaultRemoteExpireDateEnabled, + 'defaultRemoteExpireDate' => $defaultRemoteExpireDate, + 'defaultRemoteExpireDateEnforced' => $defaultRemoteExpireDateEnforced, ] ]), "_theme" => json_encode([ 'entity' => $this->defaults->getEntity(), 'name' => $this->defaults->getName(), + 'productName' => $this->defaults->getProductName(), 'title' => $this->defaults->getTitle(), 'baseUrl' => $this->defaults->getBaseUrl(), 'syncClientUrl' => $this->defaults->getSyncClientUrl(), diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php index 2f0fe16f491..3f6b2b49e10 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Template; class JSResourceLocator extends ResourceLocator { diff --git a/lib/private/Template/ResourceLocator.php b/lib/private/Template/ResourceLocator.php index 1d9f60cf5dd..3ca34259907 100755 --- a/lib/private/Template/ResourceLocator.php +++ b/lib/private/Template/ResourceLocator.php @@ -5,7 +5,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Template; abstract class ResourceLocator { @@ -103,7 +102,7 @@ abstract class ResourceLocator { * @return bool True if the resource was found, false otherwise */ protected function appendIfExist($root, $file, $webRoot = null) { - if (is_file($root.'/'.$file)) { + if ($root !== false && is_file($root.'/'.$file)) { $this->append($root, $file, $webRoot, false); return true; } diff --git a/lib/private/Template/ResourceNotFoundException.php b/lib/private/Template/ResourceNotFoundException.php index 4de9a6b40ce..c8ed33f569c 100644 --- a/lib/private/Template/ResourceNotFoundException.php +++ b/lib/private/Template/ResourceNotFoundException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Template; class ResourceNotFoundException extends \LogicException { diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index 72685a5117c..c1bd556de60 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2016, John Molakvoæ (skjnldsv@protonmail.com) * * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Haertl <jus@bitgrid.net> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> @@ -20,19 +20,19 @@ * * 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 + * 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/>. * */ - namespace OC\Template; use OC\AppConfig; use OC\Files\AppData\Factory; use OC\Memcache\NullCache; +use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; use OCP\Files\NotFoundException; @@ -63,7 +63,7 @@ class SCSSCacher { /** @var IConfig */ protected $config; - /** @var \OC_Defaults */ + /** @var ThemingDefaults */ private $defaults; /** @var string */ @@ -97,7 +97,7 @@ class SCSSCacher { * @param Factory $appDataFactory * @param IURLGenerator $urlGenerator * @param IConfig $config - * @param \OC_Defaults $defaults + * @param ThemingDefaults $defaults * @param string $serverRoot * @param ICacheFactory $cacheFactory * @param IconsCacher $iconsCacher @@ -107,7 +107,7 @@ class SCSSCacher { Factory $appDataFactory, IURLGenerator $urlGenerator, IConfig $config, - \OC_Defaults $defaults, + ThemingDefaults $defaults, $serverRoot, ICacheFactory $cacheFactory, IconsCacher $iconsCacher, @@ -407,7 +407,7 @@ class SCSSCacher { } /** - * @return string SCSS code for variables from OC_Defaults + * @return string SCSS code for variables from ThemingDefaults */ private function getInjectedVariables(string $cache = ''): string { if ($this->injectedVariables !== null) { diff --git a/lib/private/Template/TemplateFileLocator.php b/lib/private/Template/TemplateFileLocator.php index ae73b4d0dde..027144e2f43 100644 --- a/lib/private/Template/TemplateFileLocator.php +++ b/lib/private/Template/TemplateFileLocator.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Template; class TemplateFileLocator { diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 17627f81369..a620b9fdac3 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -10,7 +10,7 @@ * @author Guillaume COMPAGNON <gcompagnon@outlook.com> * @author Hendrik Leppelsack <hendrik@leppelsack.de> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Haertl <jus@bitgrid.net> * @author Julius Härtl <jus@bitgrid.net> @@ -40,7 +40,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use bantu\IniGetWrapper\IniGetWrapper; @@ -48,12 +47,15 @@ use OC\Search\SearchQuery; use OC\Template\JSCombiner; use OC\Template\JSConfigHelper; use OC\Template\SCSSCacher; +use OCP\App\IAppManager; use OCP\AppFramework\Http\TemplateResponse; use OCP\Defaults; use OCP\IConfig; use OCP\IInitialStateService; use OCP\INavigationManager; +use OCP\IUserSession; use OCP\Support\Subscription\IRegistry; +use OCP\UserStatus\IManager as IUserStatusManager; use OCP\Util; class TemplateLayout extends \OC_Template { @@ -122,15 +124,32 @@ class TemplateLayout extends \OC_Template { break; } } - $userDisplayName = \OC_User::getDisplayName(); + + $userDisplayName = false; + $user = \OC::$server->get(IUserSession::class)->getUser(); + if ($user) { + $userDisplayName = $user->getDisplayName(); + } $this->assign('user_displayname', $userDisplayName); $this->assign('user_uid', \OC_User::getUser()); - if (\OC_User::getUser() === false) { + if ($user === null) { $this->assign('userAvatarSet', false); + $this->assign('userStatus', false); } else { $this->assign('userAvatarSet', true); $this->assign('userAvatarVersion', $this->config->getUserValue(\OC_User::getUser(), 'avatar', 'version', 0)); + if (\OC::$server->get(IAppManager::class)->isEnabledForUser('user_status')) { + $userStatusManager = \OC::$server->get(IUserStatusManager::class); + $userStatuses = $userStatusManager->getUserStatuses([$user->getUID()]); + if (array_key_exists($user->getUID(), $userStatuses)) { + $this->assign('userStatus', $userStatuses[$user->getUID()]); + } else { + $this->assign('userStatus', false); + } + } else { + $this->assign('userStatus', false); + } } // check if app menu icons should be inverted @@ -153,7 +172,11 @@ class TemplateLayout extends \OC_Template { \OC_Util::addStyle('guest'); $this->assign('bodyid', 'body-login'); - $userDisplayName = \OC_User::getDisplayName(); + $userDisplayName = false; + $user = \OC::$server->get(IUserSession::class)->getUser(); + if ($user) { + $userDisplayName = $user->getDisplayName(); + } $this->assign('user_displayname', $userDisplayName); $this->assign('user_uid', \OC_User::getUser()); } elseif ($renderAs === TemplateResponse::RENDER_AS_PUBLIC) { diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index 6c68f5d805f..382179b23e0 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -8,6 +8,7 @@ declare(strict_types=1); * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Daniel Rudolf <github.com@daniel-rudolf.de> * @author Felix Epp <work@felixepp.de> * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> @@ -16,6 +17,7 @@ declare(strict_types=1); * @author Lukas Reschke <lukas@statuscode.ch> * @author mmccarn <mmccarn-github@mmsionline.us> * @author Morris Jobke <hey@morrisjobke.de> + * @author Robin Appelman <robin@icewind.nl> * @author Robin McCorkell <robin@mccorkell.me.uk> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> @@ -36,7 +38,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; use OC\Route\Router; @@ -45,6 +46,7 @@ use OCP\ICacheFactory; use OCP\IConfig; use OCP\IRequest; use OCP\IURLGenerator; +use OCP\IUserSession; use RuntimeException; /** @@ -53,6 +55,8 @@ use RuntimeException; class URLGenerator implements IURLGenerator { /** @var IConfig */ private $config; + /** @var IUserSession */ + public $userSession; /** @var ICacheFactory */ private $cacheFactory; /** @var IRequest */ @@ -63,10 +67,12 @@ class URLGenerator implements IURLGenerator { private $baseUrl = null; public function __construct(IConfig $config, + IUserSession $userSession, ICacheFactory $cacheFactory, IRequest $request, Router $router) { $this->config = $config; + $this->userSession = $userSession; $this->cacheFactory = $cacheFactory; $this->request = $request; $this->router = $router; @@ -268,12 +274,63 @@ class URLGenerator implements IURLGenerator { } /** + * Returns the URL of the default page based on the system configuration + * and the apps visible for the current user + * @return string + */ + public function linkToDefaultPageUrl(): string { + // Deny the redirect if the URL contains a @ + // This prevents unvalidated redirects like ?redirect_url=:user@domain.com + if (isset($_REQUEST['redirect_url']) && strpos($_REQUEST['redirect_url'], '@') === false) { + return $this->getAbsoluteURL(urldecode($_REQUEST['redirect_url'])); + } + + $defaultPage = $this->config->getAppValue('core', 'defaultpage'); + if ($defaultPage) { + return $this->getAbsoluteURL($defaultPage); + } + + $appId = 'files'; + $defaultApps = explode(',', $this->config->getSystemValue('defaultapp', 'dashboard,files')); + + $userId = $this->userSession->isLoggedIn() ? $this->userSession->getUser()->getUID() : null; + if ($userId !== null) { + $userDefaultApps = explode(',', $this->config->getUserValue($userId, 'core', 'defaultapp')); + $defaultApps = array_filter(array_merge($userDefaultApps, $defaultApps)); + } + + // find the first app that is enabled for the current user + foreach ($defaultApps as $defaultApp) { + $defaultApp = \OC_App::cleanAppId(strip_tags($defaultApp)); + if (\OC::$server->getAppManager()->isEnabledForUser($defaultApp)) { + $appId = $defaultApp; + break; + } + } + + if ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true + || getenv('front_controller_active') === 'true') { + return $this->getAbsoluteURL('/apps/' . $appId . '/'); + } + + return $this->getAbsoluteURL('/index.php/apps/' . $appId . '/'); + } + + /** * @return string base url of the current request */ public function getBaseUrl(): string { - if ($this->baseUrl === null) { + // BaseUrl can be equal to 'http(s)://' during the first steps of the intial setup. + if ($this->baseUrl === null || $this->baseUrl === "http://" || $this->baseUrl === "https://") { $this->baseUrl = $this->request->getServerProtocol() . '://' . $this->request->getServerHost() . \OC::$WEBROOT; } return $this->baseUrl; } + + /** + * @return string webroot part of the base url + */ + public function getWebroot(): string { + return \OC::$WEBROOT; + } } diff --git a/lib/private/Updater.php b/lib/private/Updater.php index f6ba27991e7..2c5820fdd8b 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @copyright Copyright (c) 2016, Lukas Reschke <lukas@statuscode.ch> @@ -8,6 +11,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Frank Karlitschek <frank@karlitschek.de> * @author Georg Ehrke <oc.list@georgehrke.com> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> @@ -34,14 +38,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC; +use OC\App\AppManager; use OC\DB\Connection; use OC\DB\MigrationService; use OC\Hooks\BasicEmitter; use OC\IntegrityCheck\Checker; use OC_App; +use OCP\App\IAppManager; +use OCP\HintException; use OCP\IConfig; use OCP\ILogger; use OCP\Util; @@ -59,7 +65,7 @@ use Symfony\Component\EventDispatcher\GenericEvent; */ class Updater extends BasicEmitter { - /** @var ILogger $log */ + /** @var LoggerInterface */ private $log; /** @var IConfig */ @@ -79,15 +85,9 @@ class Updater extends BasicEmitter { 4 => 'Fatal', ]; - /** - * @param IConfig $config - * @param Checker $checker - * @param ILogger $log - * @param Installer $installer - */ public function __construct(IConfig $config, Checker $checker, - ILogger $log = null, + ?LoggerInterface $log, Installer $installer) { $this->log = $log; $this->config = $config; @@ -101,7 +101,7 @@ class Updater extends BasicEmitter { * * @return bool true if the operation succeeded, false otherwise */ - public function upgrade() { + public function upgrade(): bool { $this->emitRepairEvents(); $this->logAllEvents(); @@ -132,11 +132,15 @@ class Updater extends BasicEmitter { try { $this->doUpgrade($currentVersion, $installedVersion); } catch (HintException $exception) { - $this->log->logException($exception, ['app' => 'core']); + $this->log->error($exception->getMessage(), [ + 'exception' => $exception, + ]); $this->emit('\OC\Updater', 'failure', [$exception->getMessage() . ': ' .$exception->getHint()]); $success = false; } catch (\Exception $exception) { - $this->log->logException($exception, ['app' => 'core']); + $this->log->error($exception->getMessage(), [ + 'exception' => $exception, + ]); $this->emit('\OC\Updater', 'failure', [get_class($exception) . ': ' .$exception->getMessage()]); $success = false; } @@ -162,7 +166,7 @@ class Updater extends BasicEmitter { * * @return array allowed previous versions per vendor */ - private function getAllowedPreviousVersions() { + private function getAllowedPreviousVersions(): array { // this should really be a JSON file require \OC::$SERVERROOT . '/version.php'; /** @var array $OC_VersionCanBeUpgradedFrom */ @@ -174,7 +178,7 @@ class Updater extends BasicEmitter { * * @return string Get the vendor */ - private function getVendor() { + private function getVendor(): string { // this should really be a JSON file require \OC::$SERVERROOT . '/version.php'; /** @var string $vendor */ @@ -188,7 +192,7 @@ class Updater extends BasicEmitter { * @param array $allowedPreviousVersions * @return bool */ - public function isUpgradePossible($oldVersion, $newVersion, array $allowedPreviousVersions) { + public function isUpgradePossible(string $oldVersion, string $newVersion, array $allowedPreviousVersions): bool { $version = explode('.', $oldVersion); $majorMinor = $version[0] . '.' . $version[1]; @@ -223,7 +227,7 @@ class Updater extends BasicEmitter { * * @throws \Exception */ - private function doUpgrade($currentVersion, $installedVersion) { + private function doUpgrade(string $currentVersion, string $installedVersion): void { // Stop update if the update is over several major versions $allowedPreviousVersions = $this->getAllowedPreviousVersions(); if (!$this->isUpgradePossible($installedVersion, $currentVersion, $allowedPreviousVersions)) { @@ -263,16 +267,24 @@ class Updater extends BasicEmitter { // Update the appfetchers version so it downloads the correct list from the appstore \OC::$server->getAppFetcher()->setVersion($currentVersion); + /** @var IAppManager|AppManager $appManager */ + $appManager = \OC::$server->getAppManager(); + // upgrade appstore apps - $this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps()); - $autoDisabledApps = \OC::$server->getAppManager()->getAutoDisabledApps(); - $this->upgradeAppStoreApps($autoDisabledApps, true); + $this->upgradeAppStoreApps($appManager->getInstalledApps()); + $autoDisabledApps = $appManager->getAutoDisabledApps(); + if (!empty($autoDisabledApps)) { + $this->upgradeAppStoreApps(array_keys($autoDisabledApps), $autoDisabledApps); + } // install new shipped apps on upgrade $errors = Installer::installShippedApps(true); foreach ($errors as $appId => $exception) { /** @var \Exception $exception */ - $this->log->logException($exception, ['app' => $appId]); + $this->log->error($exception->getMessage(), [ + 'exception' => $exception, + 'app' => $appId, + ]); $this->emit('\OC\Updater', 'failure', [$appId . ': ' . $exception->getMessage()]); } @@ -295,7 +307,7 @@ class Updater extends BasicEmitter { $this->config->setAppValue('core', 'vendor', $this->getVendor()); } - protected function doCoreUpgrade() { + protected function doCoreUpgrade(): void { $this->emit('\OC\Updater', 'dbUpgradeBefore'); // execute core migrations @@ -311,7 +323,7 @@ class Updater extends BasicEmitter { * * @throws NeedsUpdateException */ - protected function doAppUpgrade() { + protected function doAppUpgrade(): void { $apps = \OC_App::getEnabledApps(); $priorityTypes = ['authentication', 'filesystem', 'logging']; $pseudoOtherType = 'other'; @@ -357,14 +369,12 @@ class Updater extends BasicEmitter { * This is important if you upgrade ownCloud and have non ported 3rd * party apps installed. * - * @return array * @throws \Exception */ - private function checkAppsRequirements() { + private function checkAppsRequirements(): void { $isCoreUpgrade = $this->isCodeUpgrade(); $apps = OC_App::getEnabledApps(); $version = implode('.', Util::getVersion()); - $disabledApps = []; $appManager = \OC::$server->getAppManager(); foreach ($apps as $app) { // check if the app is compatible with this version of Nextcloud @@ -373,29 +383,16 @@ class Updater extends BasicEmitter { if ($appManager->isShipped($app)) { throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update'); } - \OC::$server->getAppManager()->disableApp($app, true); + $appManager->disableApp($app, true); $this->emit('\OC\Updater', 'incompatibleAppDisabled', [$app]); } - // no need to disable any app in case this is a non-core upgrade - if (!$isCoreUpgrade) { - continue; - } - // shipped apps will remain enabled - if ($appManager->isShipped($app)) { - continue; - } - // authentication and session apps will remain enabled as well - if (OC_App::isType($app, ['session', 'authentication'])) { - continue; - } } - return $disabledApps; } /** * @return bool */ - private function isCodeUpgrade() { + private function isCodeUpgrade(): bool { $installedVersion = $this->config->getSystemValue('version', '0.0.0'); $currentVersion = implode('.', Util::getVersion()); if (version_compare($currentVersion, $installedVersion, '>')) { @@ -405,12 +402,12 @@ class Updater extends BasicEmitter { } /** - * @param array $disabledApps - * @param bool $reenable + * @param array $apps + * @param array $previousEnableStates * @throws \Exception */ - private function upgradeAppStoreApps(array $disabledApps, $reenable = false) { - foreach ($disabledApps as $app) { + private function upgradeAppStoreApps(array $apps, array $previousEnableStates = []): void { + foreach ($apps as $app) { try { $this->emit('\OC\Updater', 'checkAppStoreAppBefore', [$app]); if ($this->installer->isUpdateAvailable($app)) { @@ -419,12 +416,18 @@ class Updater extends BasicEmitter { } $this->emit('\OC\Updater', 'checkAppStoreApp', [$app]); - if ($reenable) { + if (!empty($previousEnableStates)) { $ocApp = new \OC_App(); - $ocApp->enable($app); + if (!empty($previousEnableStates[$app])) { + $ocApp->enable($app, $previousEnableStates[$app]); + } else { + $ocApp->enable($app); + } } } catch (\Exception $ex) { - $this->log->logException($ex, ['app' => 'core']); + $this->log->error($ex->getMessage(), [ + 'exception' => $ex, + ]); } } } @@ -432,7 +435,7 @@ class Updater extends BasicEmitter { /** * Forward messages emitted by the repair routine */ - private function emitRepairEvents() { + private function emitRepairEvents(): void { $dispatcher = \OC::$server->getEventDispatcher(); $dispatcher->addListener('\OC\Repair::warning', function ($event) { if ($event instanceof GenericEvent) { @@ -456,7 +459,7 @@ class Updater extends BasicEmitter { }); } - private function logAllEvents() { + private function logAllEvents(): void { $log = $this->log; $dispatcher = \OC::$server->getEventDispatcher(); @@ -538,12 +541,6 @@ class Updater extends BasicEmitter { $this->listen('\OC\Updater', 'dbUpgrade', function () use ($log) { $log->info('\OC\Updater::dbUpgrade: Updated database', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($log) { - $log->info('\OC\Updater::dbSimulateUpgradeBefore: Checking whether the database schema can be updated (this can take a long time depending on the database size)', ['app' => 'updater']); - }); - $this->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($log) { - $log->info('\OC\Updater::dbSimulateUpgrade: Checked database schema update', ['app' => 'updater']); - }); $this->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($log) { $log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: ' . $app, ['app' => 'updater']); }); @@ -556,15 +553,9 @@ class Updater extends BasicEmitter { $this->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($log) { $log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "' . $app . '" in appstore', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($log) { - $log->info('\OC\Updater::appUpgradeCheckBefore: Checking updates of apps', ['app' => 'updater']); - }); $this->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($log) { $log->info('\OC\Updater::appSimulateUpdate: Checking whether the database schema for <' . $app . '> can be updated (this can take a long time depending on the database size)', ['app' => 'updater']); }); - $this->listen('\OC\Updater', 'appUpgradeCheck', function () use ($log) { - $log->info('\OC\Updater::appUpgradeCheck: Checked database schema update for apps', ['app' => 'updater']); - }); $this->listen('\OC\Updater', 'appUpgradeStarted', function ($app) use ($log) { $log->info('\OC\Updater::appUpgradeStarted: Updating <' . $app . '> ...', ['app' => 'updater']); }); diff --git a/lib/private/Updater/ChangesCheck.php b/lib/private/Updater/ChangesCheck.php index 62b1e04aae8..600c8db9a3c 100644 --- a/lib/private/Updater/ChangesCheck.php +++ b/lib/private/Updater/ChangesCheck.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Updater; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Updater/ChangesMapper.php b/lib/private/Updater/ChangesMapper.php index 83a695b571f..03e1ae3c2c1 100644 --- a/lib/private/Updater/ChangesMapper.php +++ b/lib/private/Updater/ChangesMapper.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Updater; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Updater/ChangesResult.php b/lib/private/Updater/ChangesResult.php index dfd3aaa1cd8..db2f730aa6a 100644 --- a/lib/private/Updater/ChangesResult.php +++ b/lib/private/Updater/ChangesResult.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\Updater; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index 7b1f1344e66..ffa707d8990 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\Updater; use OCP\Http\Client\IClientService; diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php index d70d13673cb..b68e4c2e541 100644 --- a/lib/private/User/Backend.php +++ b/lib/private/User/Backend.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -21,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\User; use OCP\UserInterface; diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 6c04a1b900e..5dfc74163a7 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -43,20 +43,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/* - * - * The following SQL statement is just a help for developers and will not be - * executed! - * - * CREATE TABLE `users` ( - * `uid` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - * `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - * PRIMARY KEY (`uid`) - * ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - * - */ - namespace OC\User; use OC\Cache\CappedMemoryCache; diff --git a/lib/private/User/LoginException.php b/lib/private/User/LoginException.php index 77e70d07075..7133b7b76dc 100644 --- a/lib/private/User/LoginException.php +++ b/lib/private/User/LoginException.php @@ -2,7 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * * @license AGPL-3.0 @@ -20,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\User; class LoginException extends \Exception { diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 59c007b6b59..dbbfc2b53a2 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -7,7 +7,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -31,13 +31,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\User; -use OC\HintException; use OC\Hooks\PublicEmitter; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; +use OCP\HintException; use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; @@ -159,7 +158,7 @@ class Manager extends PublicEmitter implements IUserManager { return $this->cachedUsers[$uid]; } - $cachedBackend = $this->cache->get($uid); + $cachedBackend = $this->cache->get(sha1($uid)); if ($cachedBackend !== null && isset($this->backends[$cachedBackend])) { // Cache has the info of the user backend already, so ask that one directly $backend = $this->backends[$cachedBackend]; @@ -175,7 +174,8 @@ class Manager extends PublicEmitter implements IUserManager { } if ($backend->userExists($uid)) { - $this->cache->set($uid, $i, 300); + // Hash $uid to ensure that only valid characters are used for the cache key + $this->cache->set(sha1($uid), $i, 300); return $this->getUserObject($uid, $backend); } } @@ -246,7 +246,13 @@ class Manager extends PublicEmitter implements IUserManager { $loginName = str_replace("\0", '', $loginName); $password = str_replace("\0", '', $password); - foreach ($this->backends as $backend) { + $cachedBackend = $this->cache->get($loginName); + if ($cachedBackend !== null && isset($this->backends[$cachedBackend])) { + $backends = [$this->backends[$cachedBackend]]; + } else { + $backends = $this->backends; + } + foreach ($backends as $backend) { if ($backend->implementsActions(Backend::CHECK_PASSWORD)) { $uid = $backend->checkPassword($loginName, $password); if ($uid !== false) { @@ -257,10 +263,10 @@ class Manager extends PublicEmitter implements IUserManager { // since http basic auth doesn't provide a standard way of handling non ascii password we allow password to be urlencoded // we only do this decoding after using the plain password fails to maintain compatibility with any password that happens - // to contains urlencoded patterns by "accident". + // to contain urlencoded patterns by "accident". $password = urldecode($password); - foreach ($this->backends as $backend) { + foreach ($backends as $backend) { if ($backend->implementsActions(Backend::CHECK_PASSWORD)) { $uid = $backend->checkPassword($loginName, $password); if ($uid !== false) { @@ -700,6 +706,7 @@ class Manager extends PublicEmitter implements IUserManager { * @since 9.1.0 */ public function getByEmail($email) { + // looking for 'email' only (and not primary_mail) is intentional $userIds = $this->config->getUsersForUserValueCaseInsensitive('settings', 'email', $email); $users = array_map(function ($uid) { diff --git a/lib/private/User/NoUserException.php b/lib/private/User/NoUserException.php index 57bb47109f1..d9149318467 100644 --- a/lib/private/User/NoUserException.php +++ b/lib/private/User/NoUserException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\User; class NoUserException extends \Exception { diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index c33d79b83cf..fa6f14fd3ec 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -36,7 +36,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\User; use OC; @@ -599,6 +598,8 @@ class Session implements IUserSession, Emitter { return true; } + // If credentials were provided, they need to be valid, otherwise we do boom + throw new LoginException(); } catch (PasswordLoginForbiddenException $ex) { // Nothing to do } @@ -787,9 +788,14 @@ class Session implements IUserSession, Emitter { // Check if login names match if (!is_null($user) && $dbToken->getLoginName() !== $user) { - // TODO: this makes it imposssible to use different login names on browser and client + // TODO: this makes it impossible to use different login names on browser and client // e.g. login by e-mail 'user@example.com' on browser for generating the token will not // allow to use the client token with the login name 'user'. + $this->logger->error('App token login name does not match', [ + 'tokenLoginName' => $dbToken->getLoginName(), + 'sessionLoginName' => $user, + ]); + return false; } diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 5bc42a469d7..5fa1272f95c 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -7,7 +7,7 @@ * @author Björn Schießle <bjoern@schiessle.org> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Härtl <jus@bitgrid.net> * @author Leon Klingele <leon@struktur.de> @@ -16,7 +16,6 @@ * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Vincent Petry <vincent@nextcloud.com> * * @license AGPL-3.0 * @@ -33,14 +32,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OC\User; +use InvalidArgumentException; use OC\Accounts\AccountManager; use OC\Avatar\AvatarManager; -use OC\Files\Cache\Storage; use OC\Hooks\Emitter; use OC_Helper; +use OCP\Accounts\IAccountManager; use OCP\EventDispatcher\IEventDispatcher; use OCP\Group\Events\BeforeUserRemovedEvent; use OCP\Group\Events\UserRemovedEvent; @@ -58,6 +57,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; class User implements IUser { + /** @var IAccountManager */ + protected $accountManager; /** @var string */ private $uid; @@ -168,25 +169,62 @@ class User implements IUser { } /** - * set the email address of the user - * - * @param string|null $mailAddress - * @return void - * @since 9.0.0 + * @inheritDoc */ public function setEMailAddress($mailAddress) { - $oldMailAddress = $this->getEMailAddress(); + $this->setSystemEMailAddress($mailAddress); + } + + /** + * @inheritDoc + */ + public function setSystemEMailAddress(string $mailAddress): void { + $oldMailAddress = $this->getSystemEMailAddress(); + + if ($mailAddress === '') { + $this->config->deleteUserValue($this->uid, 'settings', 'email'); + } else { + $this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress); + } + + $primaryAddress = $this->getPrimaryEMailAddress(); + if ($primaryAddress === $mailAddress) { + // on match no dedicated primary settings is necessary + $this->setPrimaryEMailAddress(''); + } + if ($oldMailAddress !== $mailAddress) { - if ($mailAddress === '') { - $this->config->deleteUserValue($this->uid, 'settings', 'email'); - } else { - $this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress); - } $this->triggerChange('eMailAddress', $mailAddress, $oldMailAddress); } } /** + * @inheritDoc + */ + public function setPrimaryEMailAddress(string $mailAddress): void { + if ($mailAddress === '') { + $this->config->deleteUserValue($this->uid, 'settings', 'primary_email'); + return; + } + + $this->ensureAccountManager(); + $account = $this->accountManager->getAccount($this); + $property = $account->getPropertyCollection(IAccountManager::COLLECTION_EMAIL) + ->getPropertyByValue($mailAddress); + + if ($property === null || $property->getLocallyVerified() !== IAccountManager::VERIFIED) { + throw new InvalidArgumentException('Only verified emails can be set as primary'); + } + $this->config->setUserValue($this->uid, 'settings', 'primary_email', $mailAddress); + } + + private function ensureAccountManager() { + if (!$this->accountManager instanceof IAccountManager) { + $this->accountManager = \OC::$server->get(IAccountManager::class); + } + } + + /** * returns the timestamp of the user's last login or 0 if the user did never * login * @@ -221,8 +259,6 @@ class User implements IUser { $this->emitter->emit('\OC\User', 'preDelete', [$this]); } $this->dispatcher->dispatchTyped(new BeforeUserDeletedEvent($this)); - // get the home now because it won't return it after user deletion - $homePath = $this->getHome(); $result = $this->backend->deleteUser($this->uid); if ($result) { @@ -241,16 +277,6 @@ class User implements IUser { // Delete the user's keys in preferences \OC::$server->getConfig()->deleteAllUserValues($this->uid); - // Delete user files in /data/ - if ($homePath !== false) { - // FIXME: this operates directly on FS, should use View instead... - // also this is not testable/mockable... - \OC_Helper::rmdirr($homePath); - } - - // Delete the users entry in the storage table - Storage::remove('home::' . $this->uid); - \OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid); \OC::$server->getCommentsManager()->deleteReadMarksFromUser($this); @@ -405,10 +431,24 @@ class User implements IUser { * @since 9.0.0 */ public function getEMailAddress() { + return $this->getPrimaryEMailAddress() ?? $this->getSystemEMailAddress(); + } + + /** + * @inheritDoc + */ + public function getSystemEMailAddress(): ?string { return $this->config->getUserValue($this->uid, 'settings', 'email', null); } /** + * @inheritDoc + */ + public function getPrimaryEMailAddress(): ?string { + return $this->config->getUserValue($this->uid, 'settings', 'primary_email', null); + } + + /** * get the users' quota * * @return string @@ -426,6 +466,18 @@ class User implements IUser { } if ($quota === 'default') { $quota = $this->config->getAppValue('files', 'default_quota', 'none'); + + // if unlimited quota is not allowed => avoid getting 'unlimited' as default_quota fallback value + // use the first preset instead + $allowUnlimitedQuota = $this->config->getAppValue('files', 'allow_unlimited_quota', '1') === '1'; + if (!$allowUnlimitedQuota) { + $presets = $this->config->getAppValue('files', 'quota_preset', '1 GB, 5 GB, 10 GB'); + $presets = array_filter(array_map('trim', explode(',', $presets))); + $quotaPreset = array_values(array_diff($presets, ['default', 'none'])); + if (count($quotaPreset) > 0) { + $quota = $this->config->getAppValue('files', 'default_quota', $quotaPreset[0]); + } + } } return $quota; } @@ -481,7 +533,7 @@ class User implements IUser { $uid = $this->getUID(); $server = $this->urlGenerator->getAbsoluteURL('/'); $server = rtrim($this->removeProtocolFromUrl($server), '/'); - return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId(); + return $uid . '@' . $server; } /** diff --git a/lib/private/UserStatus/ISettableProvider.php b/lib/private/UserStatus/ISettableProvider.php new file mode 100644 index 00000000000..fc0d502845e --- /dev/null +++ b/lib/private/UserStatus/ISettableProvider.php @@ -0,0 +1,55 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Carl Schwan <carl@carlschwan.eu> + * + * @author Carl Schwan <carl@carlschwan.eu> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OC\UserStatus; + +use OCP\UserStatus\IProvider; + +/** + * Interface ISettableProvider + * @package OC\UserStatus + */ +interface ISettableProvider extends IProvider { + /** + * Set a new status for the selected user. + * + * @param string $userId The user for which we want to update the status. + * @param string $messageId The new message id. + * @param string $status The new status. + * @param bool $createBackup If true, this will store the old status so that it is possible to revert it later (e.g. after a call). + */ + public function setUserStatus(string $userId, string $messageId, string $status, bool $createBackup): void; + + /** + * Revert an automatically set user status. For example after leaving a call, + * change back to the previously set status. If the user has already updated + * their status, this method does nothing. + * + * @param string $userId The user for which we want to update the status. + * @param string $messageId The expected current messageId. + * @param string $status The expected current status. + */ + public function revertUserStatus(string $userId, string $messageId, string $status): void; +} diff --git a/lib/private/UserStatus/Manager.php b/lib/private/UserStatus/Manager.php index aeef8df27f9..bca80bc5b03 100644 --- a/lib/private/UserStatus/Manager.php +++ b/lib/private/UserStatus/Manager.php @@ -16,31 +16,30 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OC\UserStatus; -use OCP\ILogger; use OCP\IServerContainer; use OCP\UserStatus\IManager; use OCP\UserStatus\IProvider; use Psr\Container\ContainerExceptionInterface; +use Psr\Log\LoggerInterface; class Manager implements IManager { /** @var IServerContainer */ private $container; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; - /** @var null */ + /** @var class-string */ private $providerClass; /** @var IProvider */ @@ -50,10 +49,10 @@ class Manager implements IManager { * Manager constructor. * * @param IServerContainer $container - * @param ILogger $logger + * @param LoggerInterface $logger */ public function __construct(IServerContainer $container, - ILogger $logger) { + LoggerInterface $logger) { $this->container = $container; $this->logger = $logger; } @@ -91,16 +90,35 @@ class Manager implements IManager { return; } + /** + * @psalm-suppress InvalidCatch + */ try { $provider = $this->container->get($this->providerClass); } catch (ContainerExceptionInterface $e) { - $this->logger->logException($e, [ - 'message' => 'Could not load user-status provider dynamically: ' . $e->getMessage(), - 'level' => ILogger::ERROR, + $this->logger->error('Could not load user-status "' . $this->providerClass . '" provider dynamically: ' . $e->getMessage(), [ + 'exception' => $e, ]); return; } $this->provider = $provider; } + + public function setUserStatus(string $userId, string $messageId, string $status, bool $createBackup = false): void { + $this->setupProvider(); + if (!$this->provider || !($this->provider instanceof ISettableProvider)) { + return; + } + + $this->provider->setUserStatus($userId, $messageId, $status, $createBackup); + } + + public function revertUserStatus(string $userId, string $messageId, string $status): void { + $this->setupProvider(); + if (!$this->provider || !($this->provider instanceof ISettableProvider)) { + return; + } + $this->provider->revertUserStatus($userId, $messageId, $status); + } } diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index aeaaf3bf1ea..1ce3662000e 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -61,6 +61,7 @@ use OCP\App\ManagerEvent; use OCP\AppFramework\QueryException; use OCP\Authentication\IAlternativeLogin; use OCP\ILogger; +use OCP\Settings\IManager as ISettingsManager; use Psr\Log\LoggerInterface; /** @@ -135,7 +136,14 @@ class OC_App { ob_start(); foreach ($apps as $app) { if (!isset(self::$loadedApps[$app]) && ($types === [] || self::isType($app, $types))) { - self::loadApp($app); + try { + self::loadApp($app); + } catch (\Throwable $e) { + \OC::$server->get(LoggerInterface::class)->emergency('Error during app loading: ' . $e->getMessage(), [ + 'exception' => $e, + 'app' => $app, + ]); + } } } ob_end_clean(); @@ -216,22 +224,22 @@ class OC_App { if (!empty($info['settings']['admin'])) { foreach ($info['settings']['admin'] as $setting) { - \OC::$server->getSettingsManager()->registerSetting('admin', $setting); + \OC::$server->get(ISettingsManager::class)->registerSetting('admin', $setting); } } if (!empty($info['settings']['admin-section'])) { foreach ($info['settings']['admin-section'] as $section) { - \OC::$server->getSettingsManager()->registerSection('admin', $section); + \OC::$server->get(ISettingsManager::class)->registerSection('admin', $section); } } if (!empty($info['settings']['personal'])) { foreach ($info['settings']['personal'] as $setting) { - \OC::$server->getSettingsManager()->registerSetting('personal', $setting); + \OC::$server->get(ISettingsManager::class)->registerSetting('personal', $setting); } } if (!empty($info['settings']['personal-section'])) { foreach ($info['settings']['personal-section'] as $section) { - \OC::$server->getSettingsManager()->registerSection('personal', $section); + \OC::$server->get(ISettingsManager::class)->registerSection('personal', $section); } } @@ -453,10 +461,6 @@ class OC_App { * @return string|false */ public static function getInstallPath() { - if (\OC::$server->getSystemConfig()->getValue('appstoreenabled', true) == false) { - return false; - } - foreach (OC::$APPSROOTS as $dir) { if (isset($dir['writable']) && $dir['writable'] === true) { return $dir['path']; @@ -770,6 +774,18 @@ class OC_App { } /** + * List all supported apps + * + * @return array + */ + public function getSupportedApps(): array { + /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */ + $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class); + $supportedApps = $subscriptionRegistry->delegateGetSupportedApps(); + return $supportedApps; + } + + /** * List all apps, this is used in apps.php * * @return array @@ -783,9 +799,7 @@ class OC_App { $appList = []; $langCode = \OC::$server->getL10N('core')->getLanguageCode(); $urlGenerator = \OC::$server->getURLGenerator(); - /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */ - $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class); - $supportedApps = $subscriptionRegistry->delegateGetSupportedApps(); + $supportedApps = $this->getSupportedApps(); foreach ($installedApps as $app) { if (array_search($app, $blacklist) === false) { @@ -972,14 +986,20 @@ class OC_App { return false; } + if (is_file($appPath . '/appinfo/database.xml')) { + \OC::$server->getLogger()->error('The appinfo/database.xml file is not longer supported. Used in ' . $appId); + return false; + } + \OC::$server->getAppManager()->clearAppsCache(); - $appData = self::getAppInfo($appId); + $l = \OC::$server->getL10N('core'); + $appData = self::getAppInfo($appId, false, $l->getLanguageCode()); $ignoreMaxApps = \OC::$server->getConfig()->getSystemValue('app_install_overwrite', []); $ignoreMax = in_array($appId, $ignoreMaxApps, true); \OC_App::checkAppDependencies( \OC::$server->getConfig(), - \OC::$server->getL10N('core'), + $l, $appData, $ignoreMax ); @@ -987,12 +1007,8 @@ class OC_App { self::registerAutoloading($appId, $appPath, true); self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']); - if (file_exists($appPath . '/appinfo/database.xml')) { - OC_DB::updateDbFromStructure($appPath . '/appinfo/database.xml'); - } else { - $ms = new MigrationService($appId, \OC::$server->get(\OC\DB\Connection::class)); - $ms->migrate(); - } + $ms = new MigrationService($appId, \OC::$server->get(\OC\DB\Connection::class)); + $ms->migrate(); self::executeRepairSteps($appId, $appData['repair-steps']['post-migration']); self::setupLiveMigrations($appId, $appData['repair-steps']['live-migration']); diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php index b5b6c737046..1fbc233f535 100644 --- a/lib/private/legacy/OC_DB.php +++ b/lib/private/legacy/OC_DB.php @@ -3,7 +3,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Andreas Fischer <bantu@owncloud.com> - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> @@ -29,25 +28,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -use OCP\ILogger; - -/** - * This class manages the access to the database. It basically is a wrapper for - * Doctrine with some adaptions. - */ class OC_DB { /** - * get MDB2 schema manager - * - * @return \OC\DB\MDB2SchemaManager - */ - private static function getMDB2SchemaManager() { - return new \OC\DB\MDB2SchemaManager(\OC::$server->get(\OC\DB\Connection::class)); - } - - /** * Prepare a SQL query * @param string $query Query string * @param int|null $limit @@ -160,45 +143,6 @@ class OC_DB { } /** - * Creates tables from XML file - * @param string $file file to read structure from - * @return bool - * - * TODO: write more documentation - */ - public static function createDbFromStructure($file) { - $schemaManager = self::getMDB2SchemaManager(); - return $schemaManager->createDbFromStructure($file); - } - - /** - * update the database schema - * @param string $file file to read structure from - * @throws Exception - * @return string|boolean - * @suppress PhanDeprecatedFunction - */ - public static function updateDbFromStructure($file) { - $schemaManager = self::getMDB2SchemaManager(); - try { - $result = $schemaManager->updateDbFromStructure($file); - } catch (Exception $e) { - \OCP\Util::writeLog('core', 'Failed to update database structure ('.$e.')', ILogger::FATAL); - throw $e; - } - return $result; - } - - /** - * remove all tables defined in a database structure xml file - * @param string $file the xml file describing the tables - */ - public static function removeDBStructure($file) { - $schemaManager = self::getMDB2SchemaManager(); - $schemaManager->removeDBStructure($file); - } - - /** * check if a result is an error and throws an exception, works with \Doctrine\DBAL\Exception * @param mixed $result * @param string $message diff --git a/lib/private/legacy/OC_DB_StatementWrapper.php b/lib/private/legacy/OC_DB_StatementWrapper.php index cc2320015a3..d8e8f0ae37f 100644 --- a/lib/private/legacy/OC_DB_StatementWrapper.php +++ b/lib/private/legacy/OC_DB_StatementWrapper.php @@ -2,7 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> @@ -27,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - use OCP\DB\IPreparedStatement; /** diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php index a9f588eb6e9..707df7279bb 100644 --- a/lib/private/legacy/OC_Defaults.php +++ b/lib/private/legacy/OC_Defaults.php @@ -36,6 +36,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + class OC_Defaults { private $theme; @@ -47,11 +48,13 @@ class OC_Defaults { private $defaultiOSClientUrl; private $defaultiTunesAppId; private $defaultAndroidClientUrl; + private $defaultFDroidClientUrl; private $defaultDocBaseUrl; private $defaultDocVersion; private $defaultSlogan; private $defaultColorPrimary; private $defaultTextColorPrimary; + private $defaultProductName; public function __construct() { $config = \OC::$server->getConfig(); @@ -64,10 +67,12 @@ class OC_Defaults { $this->defaultiOSClientUrl = $config->getSystemValue('customclient_ios', 'https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'); $this->defaultiTunesAppId = $config->getSystemValue('customclient_ios_appid', '1125420102'); $this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client'); + $this->defaultFDroidClientUrl = $config->getSystemValue('customclient_fdroid', 'https://f-droid.org/packages/com.nextcloud.client/'); $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; $this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links $this->defaultColorPrimary = '#0082c9'; $this->defaultTextColorPrimary = '#ffffff'; + $this->defaultProductName = 'Nextcloud'; $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; if (file_exists($themePath)) { @@ -152,6 +157,18 @@ class OC_Defaults { } /** + * Returns the URL to Google Play for the Android Client + * @return string URL + */ + public function getFDroidClientUrl() { + if ($this->themeExist('getFDroidClientUrl')) { + return $this->theme->getFDroidClientUrl(); + } else { + return $this->defaultFDroidClientUrl; + } + } + + /** * Returns the documentation URL * @return string URL */ @@ -330,4 +347,11 @@ class OC_Defaults { } return $this->defaultTextColorPrimary; } + + public function getProductName() { + if ($this->themeExist('getProductName')) { + return $this->theme->getProductName(); + } + return $this->defaultProductName; + } } diff --git a/lib/private/legacy/OC_EventSource.php b/lib/private/legacy/OC_EventSource.php index 2d29f3109cf..c733316050f 100644 --- a/lib/private/legacy/OC_EventSource.php +++ b/lib/private/legacy/OC_EventSource.php @@ -26,13 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * wrapper for server side events (https://en.wikipedia.org/wiki/Server-sent_events) - * includes a fallback for older browsers and IE - * - * use server side events with caution, to many open requests can hang the server - */ class OC_EventSource implements \OCP\IEventSource { /** * @var bool diff --git a/lib/private/legacy/OC_FileChunking.php b/lib/private/legacy/OC_FileChunking.php index 1c24f0d8067..e3782cabb4a 100644 --- a/lib/private/legacy/OC_FileChunking.php +++ b/lib/private/legacy/OC_FileChunking.php @@ -28,8 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - - class OC_FileChunking { protected $info; protected $cache; diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index addee2358dd..d1af5b24bdd 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -21,6 +21,7 @@ * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thibaut GRIDEL <tgridel@free.fr> * @author Thomas Müller <thomas.mueller@tmit.eu> + * @author Valdnet <47037905+Valdnet@users.noreply.github.com> * @author Victor Dubiniuk <dubiniuk@owncloud.com> * @author Vincent Petry <vincent@nextcloud.com> * @@ -39,7 +40,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - use bantu\IniGetWrapper\IniGetWrapper; use OC\Files\View; use OC\Streamer; @@ -216,13 +216,13 @@ class OC_Files { self::unlockAllTheFiles($dir, $files, $getType, $view, $filename); OC::$server->getLogger()->logException($ex); $l = \OC::$server->getL10N('lib'); - \OC_Template::printErrorPage($l->t('Can\'t read file'), $ex->getMessage(), 200); + \OC_Template::printErrorPage($l->t('Cannot read file'), $ex->getMessage(), 200); } catch (\Exception $ex) { self::unlockAllTheFiles($dir, $files, $getType, $view, $filename); OC::$server->getLogger()->logException($ex); $l = \OC::$server->getL10N('lib'); $hint = method_exists($ex, 'getHint') ? $ex->getHint() : ''; - \OC_Template::printErrorPage($l->t('Can\'t read file'), $hint, 200); + \OC_Template::printErrorPage($l->t('Cannot read file'), $hint, 200); } } diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 5249416654e..52c49f1d795 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -43,8 +43,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - use bantu\IniGetWrapper\IniGetWrapper; +use OCP\Files\Mount\IMountPoint; +use OCP\IUser; use Symfony\Component\Process\ExecutableFinder; /** @@ -518,7 +519,7 @@ class OC_Helper { $quota = OC_Util::getUserQuota($user); if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) { // always get free space / total space from root + mount points - return self::getGlobalStorageInfo($quota); + return self::getGlobalStorageInfo($quota, $user, $mount); } } @@ -570,11 +571,8 @@ class OC_Helper { /** * Get storage info including all mount points and quota - * - * @param int $quota - * @return array */ - private static function getGlobalStorageInfo($quota) { + private static function getGlobalStorageInfo(int $quota, IUser $user, IMountPoint $mount): array { $rootInfo = \OC\Files\Filesystem::getFileInfo('', 'ext'); $used = $rootInfo['size']; if ($used < 0) { @@ -594,12 +592,22 @@ class OC_Helper { $relative = 0; } + if (substr_count($mount->getMountPoint(), '/') < 3) { + $mountPoint = ''; + } else { + [,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4); + } + return [ 'free' => $free, 'used' => $used, 'total' => $total, 'relative' => $relative, - 'quota' => $quota + 'quota' => $quota, + 'owner' => $user->getUID(), + 'ownerDisplayName' => $user->getDisplayName(), + 'mountType' => $mount->getMountType(), + 'mountPoint' => trim($mountPoint, '/'), ]; } diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index cf0e9881e4c..b223b0fa6d6 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -28,10 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service - */ class OC_Hook { public static $thrownExceptions = []; @@ -85,7 +81,7 @@ class OC_Hook { * @param string $signalName name of signal * @param mixed $params default: array() array with additional data * @return bool true if slots exists or false if not - * @throws \OC\HintException + * @throws \OCP\HintException * @throws \OC\ServerNotAvailableException Emits a signal. To get data from the slot use references! * * TODO: write example @@ -111,7 +107,7 @@ class OC_Hook { } catch (Exception $e) { self::$thrownExceptions[] = $e; \OC::$server->getLogger()->logException($e); - if ($e instanceof \OC\HintException) { + if ($e instanceof \OCP\HintException) { throw $e; } if ($e instanceof \OC\ServerNotAvailableException) { diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index f1b9101045a..1e00b606ea0 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -39,7 +39,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - use OCP\IImage; /** @@ -563,9 +562,13 @@ class OC_Image implements \OCP\IImage { case IMAGETYPE_GIF: if (imagetypes() & IMG_GIF) { $this->resource = imagecreatefromgif($imagePath); - // Preserve transparency - imagealphablending($this->resource, true); - imagesavealpha($this->resource, true); + if ($this->resource) { + // Preserve transparency + imagealphablending($this->resource, true); + imagesavealpha($this->resource, true); + } else { + $this->logger->debug('OC_Image->loadFromFile, GIF image not valid: ' . $imagePath, ['app' => 'core']); + } } else { $this->logger->debug('OC_Image->loadFromFile, GIF images not supported: ' . $imagePath, ['app' => 'core']); } @@ -584,9 +587,13 @@ class OC_Image implements \OCP\IImage { case IMAGETYPE_PNG: if (imagetypes() & IMG_PNG) { $this->resource = @imagecreatefrompng($imagePath); - // Preserve transparency - imagealphablending($this->resource, true); - imagesavealpha($this->resource, true); + if ($this->resource) { + // Preserve transparency + imagealphablending($this->resource, true); + imagesavealpha($this->resource, true); + } else { + $this->logger->debug('OC_Image->loadFromFile, PNG image not valid: ' . $imagePath, ['app' => 'core']); + } } else { $this->logger->debug('OC_Image->loadFromFile, PNG images not supported: ' . $imagePath, ['app' => 'core']); } @@ -642,7 +649,7 @@ class OC_Image implements \OCP\IImage { default: // this is mostly file created from encrypted file - $this->resource = imagecreatefromstring(\OC\Files\Filesystem::file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath))); + $this->resource = imagecreatefromstring(file_get_contents($imagePath)); $iType = IMAGETYPE_PNG; $this->logger->debug('OC_Image->loadFromFile, Default', ['app' => 'core']); break; @@ -1150,16 +1157,6 @@ class OC_Image implements \OCP\IImage { return $image; } - - /** - * Resizes the image preserving ratio, returning a new copy - * - * @param integer $maxSize The maximum size of either the width or height. - * @return bool - */ - public function copyResize($maxSize): IImage { - } - /** * Destroys the current image and resets the object */ diff --git a/lib/private/legacy/OC_JSON.php b/lib/private/legacy/OC_JSON.php index 3094879af38..7734e29c545 100644 --- a/lib/private/legacy/OC_JSON.php +++ b/lib/private/legacy/OC_JSON.php @@ -27,11 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Class OC_JSON - * @deprecated Use a AppFramework JSONResponse instead - */ class OC_JSON { /** diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php index f4c2356aecd..6cfd53d2651 100644 --- a/lib/private/legacy/OC_Response.php +++ b/lib/private/legacy/OC_Response.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - class OC_Response { /** * Sets the content disposition header (with possible workarounds) diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php index 468f6acad44..b4bc290429a 100644 --- a/lib/private/legacy/OC_Template.php +++ b/lib/private/legacy/OC_Template.php @@ -10,7 +10,7 @@ * @author Jakob Sack <mail@jakobsack.de> * @author Jan-Christoph Borchardt <hey@jancborchardt.net> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> @@ -37,7 +37,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - use OC\TemplateLayout; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php index c8d9b51eaba..27c4f6b2857 100644 --- a/lib/private/legacy/OC_User.php +++ b/lib/private/legacy/OC_User.php @@ -36,7 +36,11 @@ * */ +use OC\User\LoginException; +use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; +use OCP\IUserManager; +use OCP\User\Events\UserLoggedInEvent; /** * This class provides wrapper methods for user management. Multiple backends are @@ -168,6 +172,10 @@ class OC_User { if (self::getUser() !== $uid) { self::setUserId($uid); $userSession = \OC::$server->getUserSession(); + if ($userSession->getUser() && !$userSession->getUser()->isEnabled()) { + $message = \OC::$server->getL10N('lib')->t('User disabled'); + throw new LoginException($message); + } $userSession->setLoginName($uid); $request = OC::$server->getRequest(); $userSession->createSessionToken($request, $uid, $uid); @@ -182,10 +190,19 @@ class OC_User { 'post_login', [ 'uid' => $uid, - 'password' => '', + 'password' => null, 'isTokenLogin' => false, ] ); + /** @var IEventDispatcher $dispatcher */ + $dispatcher = \OC::$server->get(IEventDispatcher::class); + $dispatcher->dispatchTyped(new UserLoggedInEvent( + \OC::$server->get(IUserManager::class)->get($uid), + $uid, + null, + false) + ); + //trigger creation of user home and /files folder \OC::$server->getUserFolder($uid); } @@ -318,32 +335,6 @@ class OC_User { } /** - * get the display name of the user currently logged in. - * - * @param string $uid - * @return string|bool uid or false - * @deprecated 8.1.0 fetch \OCP\IUser (has getDisplayName()) by using method - * get() of \OCP\IUserManager - \OC::$server->getUserManager() - */ - public static function getDisplayName($uid = null) { - if ($uid) { - $user = \OC::$server->getUserManager()->get($uid); - if ($user) { - return $user->getDisplayName(); - } else { - return $uid; - } - } else { - $user = \OC::$server->getUserSession()->getUser(); - if ($user) { - return $user->getDisplayName(); - } else { - return false; - } - } - } - - /** * Set password * * @param string $uid The username diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index f1e88166e97..35c81dd34e6 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -23,7 +23,7 @@ * @author Individual IT Services <info@individual-it.net> * @author Jakob Sack <mail@jakobsack.de> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Härtl <jus@bitgrid.net> * @author Kawohl <john@owncloud.com> @@ -43,6 +43,7 @@ * @author Stefan Weil <sw@weilnetz.de> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Thomas Tanghus <thomas@tanghus.net> + * @author Valdnet <47037905+Valdnet@users.noreply.github.com> * @author Victor Dubiniuk <dubiniuk@owncloud.com> * @author Vincent Petry <vincent@nextcloud.com> * @author Volkan Gezer <volkangezer@gmail.com> @@ -70,8 +71,9 @@ use OCP\Files\Template\ITemplateManager; use OCP\IConfig; use OCP\IGroupManager; use OCP\ILogger; +use OCP\IURLGenerator; use OCP\IUser; -use OCP\IUserSession; +use OCP\Share\IManager; use Psr\Log\LoggerInterface; class OC_Util { @@ -336,8 +338,9 @@ class OC_Util { * @suppress PhanDeprecatedFunction */ public static function isPublicLinkPasswordRequired() { - $enforcePassword = \OC::$server->getConfig()->getAppValue('core', 'shareapi_enforce_links_password', 'no'); - return $enforcePassword === 'yes'; + /** @var IManager $shareManager */ + $shareManager = \OC::$server->get(IManager::class); + return $shareManager->shareApiLinkEnforcePassword(); } /** @@ -348,25 +351,10 @@ class OC_Util { * @return bool */ public static function isSharingDisabledForUser(IConfig $config, IGroupManager $groupManager, $user) { - if ($config->getAppValue('core', 'shareapi_exclude_groups', 'no') === 'yes') { - $groupsList = $config->getAppValue('core', 'shareapi_exclude_groups_list', ''); - $excludedGroups = json_decode($groupsList); - if (is_null($excludedGroups)) { - $excludedGroups = explode(',', $groupsList); - $newValue = json_encode($excludedGroups); - $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); - } - $usersGroups = $groupManager->getUserGroupIds($user); - if (!empty($usersGroups)) { - $remainingGroups = array_diff($usersGroups, $excludedGroups); - // if the user is only in groups which are disabled for sharing then - // sharing is also disabled for the user - if (empty($remainingGroups)) { - return true; - } - } - } - return false; + /** @var IManager $shareManager */ + $shareManager = \OC::$server->get(IManager::class); + $userId = $user ? $user->getUID() : null; + return $shareManager->sharingDisabledForUser($userId); } /** @@ -376,14 +364,9 @@ class OC_Util { * @suppress PhanDeprecatedFunction */ public static function isDefaultExpireDateEnforced() { - $isDefaultExpireDateEnabled = \OC::$server->getConfig()->getAppValue('core', 'shareapi_default_expire_date', 'no'); - $enforceDefaultExpireDate = false; - if ($isDefaultExpireDateEnabled === 'yes') { - $value = \OC::$server->getConfig()->getAppValue('core', 'shareapi_enforce_expire_date', 'no'); - $enforceDefaultExpireDate = $value === 'yes'; - } - - return $enforceDefaultExpireDate; + /** @var IManager $shareManager */ + $shareManager = \OC::$server->get(IManager::class); + return $shareManager->shareApiLinkDefaultExpireDateEnforced(); } /** @@ -747,10 +730,10 @@ class OC_Util { $config, \OC::$server->get(IniGetWrapper::class), \OC::$server->getL10N('lib'), - \OC::$server->query(\OCP\Defaults::class), - \OC::$server->getLogger(), + \OC::$server->get(\OCP\Defaults::class), + \OC::$server->get(LoggerInterface::class), \OC::$server->getSecureRandom(), - \OC::$server->query(\OC\Installer::class) + \OC::$server->get(\OC\Installer::class) ); $urlGenerator = \OC::$server->getURLGenerator(); @@ -786,7 +769,7 @@ class OC_Util { $errors[] = [ 'error' => $l->t('Cannot write into "apps" directory'), 'hint' => $l->t('This can usually be fixed by giving the webserver write access to the apps directory' - . ' or disabling the appstore in the config file.') + . ' or disabling the App Store in the config file.') ]; } } @@ -1107,46 +1090,9 @@ class OC_Util { * @suppress PhanDeprecatedFunction */ public static function getDefaultPageUrl() { - /** @var IConfig $config */ - $config = \OC::$server->get(IConfig::class); - $urlGenerator = \OC::$server->getURLGenerator(); - // Deny the redirect if the URL contains a @ - // This prevents unvalidated redirects like ?redirect_url=:user@domain.com - if (isset($_REQUEST['redirect_url']) && strpos($_REQUEST['redirect_url'], '@') === false) { - $location = $urlGenerator->getAbsoluteURL(urldecode($_REQUEST['redirect_url'])); - } else { - $defaultPage = \OC::$server->getConfig()->getAppValue('core', 'defaultpage'); - if ($defaultPage) { - $location = $urlGenerator->getAbsoluteURL($defaultPage); - } else { - $appId = 'files'; - $defaultApps = explode(',', $config->getSystemValue('defaultapp', 'dashboard,files')); - - /** @var IUserSession $userSession */ - $userSession = \OC::$server->get(IUserSession::class); - $user = $userSession->getUser(); - if ($user) { - $userDefaultApps = explode(',', $config->getUserValue($user->getUID(), 'core', 'defaultapp')); - $defaultApps = array_filter(array_merge($userDefaultApps, $defaultApps)); - } - - // find the first app that is enabled for the current user - foreach ($defaultApps as $defaultApp) { - $defaultApp = OC_App::cleanAppId(strip_tags($defaultApp)); - if (static::getAppManager()->isEnabledForUser($defaultApp)) { - $appId = $defaultApp; - break; - } - } - - if ($config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') { - $location = $urlGenerator->getAbsoluteURL('/apps/' . $appId . '/'); - } else { - $location = $urlGenerator->getAbsoluteURL('/index.php/apps/' . $appId . '/'); - } - } - } - return $location; + /** @var IURLGenerator $urlGenerator */ + $urlGenerator = \OC::$server->get(IURLGenerator::class); + return $urlGenerator->linkToDefaultPageUrl(); } /** @@ -1232,7 +1178,7 @@ class OC_Util { $fp = @fopen($testFile, 'w'); if (!$fp) { - throw new OC\HintException('Can\'t create test file to check for working .htaccess file.', + throw new \OCP\HintException('Can\'t create test file to check for working .htaccess file.', 'Make sure it is possible for the webserver to write to ' . $testFile); } fwrite($fp, $testContent); @@ -1243,10 +1189,11 @@ class OC_Util { /** * Check if the .htaccess file is working + * * @param \OCP\IConfig $config * @return bool * @throws Exception - * @throws \OC\HintException If the test file can't get written. + * @throws \OCP\HintException If the test file can't get written. */ public function isHtaccessWorking(\OCP\IConfig $config) { if (\OC::$CLI || !$config->getSystemValue('check_for_working_htaccess', true)) { @@ -1440,7 +1387,7 @@ class OC_Util { * * @param \OC\SystemConfig $config * @return bool whether the core or any app needs an upgrade - * @throws \OC\HintException When the upgrade from the given version is not allowed + * @throws \OCP\HintException When the upgrade from the given version is not allowed */ public static function needUpgrade(\OC\SystemConfig $config) { if ($config->getValue('installed', false)) { @@ -1460,11 +1407,11 @@ class OC_Util { return true; } else { // downgrade attempt, throw exception - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); + throw new \OCP\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } } elseif ($versionDiff < 0) { // downgrade attempt, throw exception - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); + throw new \OCP\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } // also check for upgrades for apps (independently from the user) diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index 4613e36f9f2..6b18c9476b4 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -31,11 +31,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Prints a sanitized string - * @param string $string the string which will be escaped and printed - */ function p($string) { print(\OCP\Util::sanitizeHTML($string)); } diff --git a/lib/public/Accounts/IAccount.php b/lib/public/Accounts/IAccount.php index 3f8c86cbc1a..8d4d8b5c023 100644 --- a/lib/public/Accounts/IAccount.php +++ b/lib/public/Accounts/IAccount.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -16,16 +17,16 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Accounts; +use Generator; use OCP\IUser; /** @@ -44,9 +45,10 @@ interface IAccount extends \JsonSerializable { * @param string $value * @param string $scope Must be one of the VISIBILITY_ prefixed constants of \OCP\Accounts\IAccountManager * @param string $verified \OCP\Accounts\IAccountManager::NOT_VERIFIED | \OCP\Accounts\IAccountManager::VERIFICATION_IN_PROGRESS | \OCP\Accounts\IAccountManager::VERIFIED + * @param string $verificationData Optional, defaults to empty string. Since @22.0.0. * @return IAccount */ - public function setProperty(string $property, string $value, string $scope, string $verified): IAccount; + public function setProperty(string $property, string $value, string $scope, string $verified, string $verificationData = ''): IAccount; /** * Get a property by its key @@ -60,17 +62,50 @@ interface IAccount extends \JsonSerializable { public function getProperty(string $property): IAccountProperty; /** - * Get all properties of an account + * Get all properties of an account. Array indices are property names. + * Values from IAccountPropertyCollections are not included in the return + * array. * * @since 15.0.0 - * - * @return IAccountProperty[] + * @deprecated 22.0.0 use getAllProperties() */ public function getProperties(): array; /** + * Get all properties of an account. Array indices are numeric. To get + * the property name, call getName() against the value. + * + * IAccountPropertyCollections are being flattened into an IAccountProperty + * for each value. + * + * @since 22.0.0 + * + * @return Generator<int, IAccountProperty> + */ + public function getAllProperties(): Generator; + + /** + * Set a property collection (multi-value properties) + * + * @since 22.0.0 + */ + public function setPropertyCollection(IAccountPropertyCollection $propertyCollection): IAccount; + + /** + * Returns the requestes propery collection (multi-value properties) + * + * @throws PropertyDoesNotExistException against invalid collection name + * @since 22.0.0 + */ + public function getPropertyCollection(string $propertyCollectionName): IAccountPropertyCollection; + + /** * Get all properties that match the provided filters for scope and verification status * + * Since 22.0.0 values from IAccountPropertyCollection are included, but also + * as IAccountProperty instances. They for properties of IAccountPropertyCollection are + * suffixed incrementally, i.e. #0, #1 ... #n – the numbers have no further meaning. + * * @since 15.0.0 * * @param string $scope Must be one of the VISIBILITY_ prefixed constants of \OCP\Accounts\IAccountManager diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php index ae70d8963b4..ae5f6b1e542 100644 --- a/lib/public/Accounts/IAccountManager.php +++ b/lib/public/Accounts/IAccountManager.php @@ -8,6 +8,7 @@ declare(strict_types=1); * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Julius Härtl <jus@bitgrid.net> + * @author Vincent Petry <vincent@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -18,7 +19,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -38,11 +39,54 @@ use OCP\IUser; */ interface IAccountManager { - /** nobody can see my account details */ + /** + * Contact details visible locally only + * + * @since 21.0.1 + */ + public const SCOPE_PRIVATE = 'v2-private'; + + /** + * Contact details visible locally and through public link access on local instance + * + * @since 21.0.1 + */ + public const SCOPE_LOCAL = 'v2-local'; + + /** + * Contact details visible locally, through public link access and on trusted federated servers. + * + * @since 21.0.1 + */ + public const SCOPE_FEDERATED = 'v2-federated'; + + /** + * Contact details visible locally, through public link access, on trusted federated servers + * and published to the public lookup server. + * + * @since 21.0.1 + */ + public const SCOPE_PUBLISHED = 'v2-published'; + + /** + * Contact details only visible locally + * + * @deprecated 21.0.1 + */ public const VISIBILITY_PRIVATE = 'private'; - /** only contacts, especially trusted servers can see my contact details */ + + /** + * Contact details visible on trusted federated servers. + * + * @deprecated 21.0.1 + */ public const VISIBILITY_CONTACTS_ONLY = 'contacts'; - /** every body ca see my contact detail, will be published to the lookup server */ + + /** + * Contact details visible on trusted federated servers and in the public lookup server. + * + * @deprecated 21.0.1 + */ public const VISIBILITY_PUBLIC = 'public'; public const PROPERTY_AVATAR = 'avatar'; @@ -53,6 +97,33 @@ interface IAccountManager { public const PROPERTY_ADDRESS = 'address'; public const PROPERTY_TWITTER = 'twitter'; + /** + * @since 23.0.0 + */ + public const PROPERTY_ORGANISATION = 'organisation'; + + /** + * @since 23.0.0 + */ + public const PROPERTY_ROLE = 'role'; + + /** + * @since 23.0.0 + */ + public const PROPERTY_HEADLINE = 'headline'; + + /** + * @since 23.0.0 + */ + public const PROPERTY_BIOGRAPHY = 'biography'; + + /** + * @since 23.0.0 + */ + public const PROPERTY_PROFILE_ENABLED = 'profile_enabled'; + + public const COLLECTION_EMAIL = 'additional_mail'; + public const NOT_VERIFIED = '0'; public const VERIFICATION_IN_PROGRESS = '1'; public const VERIFIED = '2'; @@ -68,9 +139,22 @@ interface IAccountManager { public function getAccount(IUser $user): IAccount; /** + * Update the account data with for the user + * + * @since 21.0.1 + * + * @param IAccount $account + * @throws \InvalidArgumentException Message is the property that was invalid + */ + public function updateAccount(IAccount $account): void; + + /** * Search for users based on account data * - * @param string $property + * @param string $property - property or property collection name – since + * NC 22 the implementation MAY add a fitting property collection into the + * search even if a property name was given e.g. email property and email + * collection) * @param string[] $values * @return array * diff --git a/lib/public/Accounts/IAccountProperty.php b/lib/public/Accounts/IAccountProperty.php index 657121a27e8..94866fc4807 100644 --- a/lib/public/Accounts/IAccountProperty.php +++ b/lib/public/Accounts/IAccountProperty.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -16,16 +17,17 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Accounts; +use InvalidArgumentException; + /** * Interface IAccountProperty * @@ -50,6 +52,7 @@ interface IAccountProperty extends \JsonSerializable { * * @param string $scope * @return IAccountProperty + * @throws InvalidArgumentException (since 22.0.0) */ public function setScope(string $scope): IAccountProperty; @@ -98,4 +101,38 @@ interface IAccountProperty extends \JsonSerializable { * @return string */ public function getVerified(): string; + + /** + * Sets data for verification purposes. + * + * @since 22.0.0 + */ + public function setVerificationData(string $verificationData): IAccountProperty; + + /** + * Retrieves data for verification purposes. + * + * @since 22.0.0 + */ + public function getVerificationData(): string; + + /** + * Set the instance-based verification status of a property + * + * @since 23.0.0 + * + * @param string $verified must be one of the verification constants of IAccountManager + * @return IAccountProperty + * @throws InvalidArgumentException + */ + public function setLocallyVerified(string $verified): IAccountProperty; + + /** + * Get the instance-based verification status of a property + * + * @since 23.0.0 + * + * @return string + */ + public function getLocallyVerified(): string; } diff --git a/lib/public/Accounts/IAccountPropertyCollection.php b/lib/public/Accounts/IAccountPropertyCollection.php new file mode 100644 index 00000000000..0d4c416cbaa --- /dev/null +++ b/lib/public/Accounts/IAccountPropertyCollection.php @@ -0,0 +1,101 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Accounts; + +use InvalidArgumentException; +use JsonSerializable; + +/** + * Interface IAccountPropertyCollection + * + * @package OCP\Accounts + * + * @since 22.0.0 + */ +interface IAccountPropertyCollection extends JsonSerializable { + + /** + * retuns the collection name + * + * @since 22.0.0 + */ + public function getName(): string; + + /** + * set properties of this collection + * + * @param IAccountProperty[] $properties + * @throws InvalidArgumentException + * @since 22.0.0 + */ + public function setProperties(array $properties): IAccountPropertyCollection; + + /** + * @return IAccountProperty[] + * @since 22.0.0 + */ + public function getProperties(): array; + + /** + * adds a property to this collection + * + * @throws InvalidArgumentException + * @since 22.0.0 + */ + public function addProperty(IAccountProperty $property): IAccountPropertyCollection; + + /** + * adds a property to this collection with only specifying the value + * + * @throws InvalidArgumentException + * @since 22.0.0 + */ + public function addPropertyWithDefaults(string $value): IAccountPropertyCollection; + + /** + * removes a property of this collection + * + * @since 22.0.0 + */ + public function removeProperty(IAccountProperty $property): IAccountPropertyCollection; + + /** + * removes a property identified by its value + * + * @since 22.0.0 + */ + public function removePropertyByValue(string $value): IAccountPropertyCollection; + + /** + * retrieves a property identified by its value. null, if none was found. + * + * Returns only the first property if there are more with the same value. + * + * @since 23.0.0 + */ + public function getPropertyByValue(string $value): ?IAccountProperty; +} diff --git a/lib/public/Accounts/PropertyDoesNotExistException.php b/lib/public/Accounts/PropertyDoesNotExistException.php index c38487ea928..17c629fdc3e 100644 --- a/lib/public/Accounts/PropertyDoesNotExistException.php +++ b/lib/public/Accounts/PropertyDoesNotExistException.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Accounts; /** diff --git a/lib/public/Activity/ActivitySettings.php b/lib/public/Activity/ActivitySettings.php index 852f96fe003..44e20c5396a 100644 --- a/lib/public/Activity/ActivitySettings.php +++ b/lib/public/Activity/ActivitySettings.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Activity; /** diff --git a/lib/public/Activity/IConsumer.php b/lib/public/Activity/IConsumer.php index 00a56a87dcd..69261d7e3ad 100644 --- a/lib/public/Activity/IConsumer.php +++ b/lib/public/Activity/IConsumer.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Activity/IConsumer interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Activity/IEvent.php b/lib/public/Activity/IEvent.php index 3fbdc4e7dde..1e3c1deef26 100644 --- a/lib/public/Activity/IEvent.php +++ b/lib/public/Activity/IEvent.php @@ -25,12 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Activity/IEvent interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Activity/IEventMerger.php b/lib/public/Activity/IEventMerger.php index 52037abcddf..a093a52744c 100644 --- a/lib/public/Activity/IEventMerger.php +++ b/lib/public/Activity/IEventMerger.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Activity; /** diff --git a/lib/public/Activity/IExtension.php b/lib/public/Activity/IExtension.php index 4cddbc734b5..e02347f0373 100644 --- a/lib/public/Activity/IExtension.php +++ b/lib/public/Activity/IExtension.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Activity; /** diff --git a/lib/public/Activity/IFilter.php b/lib/public/Activity/IFilter.php index d6bc6ba2ec7..967a739726c 100644 --- a/lib/public/Activity/IFilter.php +++ b/lib/public/Activity/IFilter.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Activity; /** diff --git a/lib/public/Activity/IManager.php b/lib/public/Activity/IManager.php index 63cf606da3d..9130c6b6b90 100644 --- a/lib/public/Activity/IManager.php +++ b/lib/public/Activity/IManager.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Activity; /** diff --git a/lib/public/Activity/IProvider.php b/lib/public/Activity/IProvider.php index b9dd7733605..657ffdeadbc 100644 --- a/lib/public/Activity/IProvider.php +++ b/lib/public/Activity/IProvider.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Activity; /** diff --git a/lib/public/Activity/ISetting.php b/lib/public/Activity/ISetting.php index c21d52c1648..53e01d42868 100644 --- a/lib/public/Activity/ISetting.php +++ b/lib/public/Activity/ISetting.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Activity; /** diff --git a/lib/public/App.php b/lib/public/App.php index 5c9254a59ed..5103e624316 100644 --- a/lib/public/App.php +++ b/lib/public/App.php @@ -29,13 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * App Class - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/App/AppPathNotFoundException.php b/lib/public/App/AppPathNotFoundException.php index 828e0f851fd..29475fce216 100644 --- a/lib/public/App/AppPathNotFoundException.php +++ b/lib/public/App/AppPathNotFoundException.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\App; /** diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php index 9ead8089c7d..7473b229427 100644 --- a/lib/public/App/IAppManager.php +++ b/lib/public/App/IAppManager.php @@ -28,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\App; use OCP\IGroup; @@ -184,12 +183,6 @@ interface IAppManager { public function getEnabledAppsForGroup(IGroup $group): array; /** - * @return array - * @since 17.0.0 - */ - public function getAutoDisabledApps(): array; - - /** * @param String $appId * @return string[] * @since 17.0.0 diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php index 58cbdc3d117..0069e57db42 100644 --- a/lib/public/App/ManagerEvent.php +++ b/lib/public/App/ManagerEvent.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\App; use OCP\EventDispatcher\Event; diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index 67f0d1fe38e..83dfaf93bc6 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\Controller class - */ - namespace OCP\AppFramework; use OCP\AppFramework\Http\Response; diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index 4cbd1f8d32c..88045c73df5 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -32,12 +32,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework/App class - */ - namespace OCP\AppFramework; use OC\AppFramework\Routing\RouteConfig; diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php index 0ee8e7a7570..33adf7b5fe4 100644 --- a/lib/public/AppFramework/AuthPublicShareController.php +++ b/lib/public/AppFramework/AuthPublicShareController.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl> * @@ -16,15 +19,13 @@ * * 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 + * 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/>. * */ -declare(strict_types=1); - namespace OCP\AppFramework; use OCP\AppFramework\Http\RedirectResponse; diff --git a/lib/public/AppFramework/Bootstrap/IBootContext.php b/lib/public/AppFramework/Bootstrap/IBootContext.php index 14a18501082..a69c9423a98 100644 --- a/lib/public/AppFramework/Bootstrap/IBootContext.php +++ b/lib/public/AppFramework/Bootstrap/IBootContext.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Bootstrap; use OCP\AppFramework\IAppContainer; diff --git a/lib/public/AppFramework/Bootstrap/IBootstrap.php b/lib/public/AppFramework/Bootstrap/IBootstrap.php index 1c509876bfe..bdb739e0cfa 100644 --- a/lib/public/AppFramework/Bootstrap/IBootstrap.php +++ b/lib/public/AppFramework/Bootstrap/IBootstrap.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Bootstrap; /** diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index a53a4d2a6e4..de391050ec1 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -19,7 +19,7 @@ declare(strict_types=1); * * 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 + * 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 @@ -30,10 +30,13 @@ declare(strict_types=1); namespace OCP\AppFramework\Bootstrap; use OCP\AppFramework\IAppContainer; +use OCP\Authentication\TwoFactorAuth\IProvider; use OCP\Capabilities\ICapability; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Template\ICustomTemplateProvider; use OCP\IContainer; +use OCP\Notification\INotifier; +use OCP\Preview\IProviderV2; /** * The context object passed to IBootstrap::register @@ -73,6 +76,7 @@ interface IRegistrationContext { * @since 20.0.0 */ public function registerDashboardWidget(string $widgetClass): void; + /** * Register a service * @@ -209,4 +213,54 @@ interface IRegistrationContext { * @since 21.0.0 */ public function registerTemplateProvider(string $providerClass): void; + + /** + * Register an INotifier class + * + * @param string $notifierClass + * @psalm-param class-string<INotifier> $notifierClass + * @since 22.0.0 + */ + public function registerNotifierService(string $notifierClass): void; + + /** + * Register a two-factor provider + * + * @param string $twoFactorProviderClass + * @psalm-param class-string<IProvider> $twoFactorProviderClass + * @since 22.0.0 + */ + public function registerTwoFactorProvider(string $twoFactorProviderClass): void; + + /** + * Register a preview provider + * + * It is allowed to register more than one provider per app. + * + * @param string $previewProviderClass + * @param string $mimeTypeRegex + * @psalm-param class-string<IProviderV2> $previewProviderClass + * @since 23.0.0 + */ + public function registerPreviewProvider(string $previewProviderClass, string $mimeTypeRegex): void; + + /** + * Register a calendar provider + * + * @param string $class + * @psalm-param class-string<IProvider> $class + * @since 23.0.0 + */ + public function registerCalendarProvider(string $class): void; + + /** + * Register an implementation of \OCP\Profile\ILinkAction that + * will handle the implementation of a profile action + * + * @param string $actionClass + * @psalm-param class-string<\OCP\Profile\ILinkAction> $actionClass + * @return void + * @since 23.0.0 + */ + public function registerProfileAction(string $actionClass): void; } diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index 31b5ed6a4a2..12a6a75cf0f 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -26,12 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\Controller class - */ - namespace OCP\AppFramework; use OCP\AppFramework\Http\DataResponse; diff --git a/lib/public/AppFramework/Db/DoesNotExistException.php b/lib/public/AppFramework/Db/DoesNotExistException.php index 6969e1016c5..eb0a8437a64 100644 --- a/lib/public/AppFramework/Db/DoesNotExistException.php +++ b/lib/public/AppFramework/Db/DoesNotExistException.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Db; /** diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index 34719c82aea..b7ddc6dc5f7 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -5,6 +5,7 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> + * @author Joas Schilling <coding@schilljs.com> * @author Morris Jobke <hey@morrisjobke.de> * * @license AGPL-3.0 @@ -22,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Db; use function lcfirst; @@ -115,7 +115,14 @@ abstract class Entity { // (B)LOB is treated as string when we read from the DB $type = 'string'; } - settype($args[0], $type); + + if ($type === 'datetime') { + if (!$args[0] instanceof \DateTime) { + $args[0] = new \DateTime($args[0]); + } + } else { + settype($args[0], $type); + } } $this->$name = $args[0]; } else { diff --git a/lib/public/AppFramework/Db/IMapperException.php b/lib/public/AppFramework/Db/IMapperException.php index 591bfda2e66..a4af3cfa925 100644 --- a/lib/public/AppFramework/Db/IMapperException.php +++ b/lib/public/AppFramework/Db/IMapperException.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Db; /** diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php index 1ee4fe80ca2..2d0dc87ebb3 100644 --- a/lib/public/AppFramework/Db/Mapper.php +++ b/lib/public/AppFramework/Db/Mapper.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Db; use OCP\IDBConnection; diff --git a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php index e82f7cb8eff..9281db75961 100644 --- a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php +++ b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Db; /** diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 3fc7942c0dd..5124650bc19 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl> * + * @author Anna Larch <anna@nextcloud.com> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> @@ -20,17 +21,16 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Db; -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; +use OCP\DB\Exception; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; @@ -86,10 +86,12 @@ abstract class QBMapper { /** * Deletes an entity from the table + * * @param Entity $entity the entity that should be deleted * @psalm-param T $entity the entity that should be deleted * @return Entity the deleted entity * @psalm-return T the deleted entity + * @throws Exception * @since 14.0.0 */ public function delete(Entity $entity): Entity { @@ -101,17 +103,19 @@ abstract class QBMapper { ->where( $qb->expr()->eq('id', $qb->createNamedParameter($entity->getId(), $idType)) ); - $qb->executeUpdate(); + $qb->executeStatement(); return $entity; } /** * Creates a new entry in the db from an entity + * * @param Entity $entity the entity that should be created * @psalm-param T $entity the entity that should be created * @return Entity the saved entity with the set id * @psalm-return T the saved entity with the set id + * @throws Exception * @since 14.0.0 */ public function insert(Entity $entity): Entity { @@ -132,7 +136,7 @@ abstract class QBMapper { $qb->setValue($column, $qb->createNamedParameter($value, $type)); } - $qb->executeUpdate(); + $qb->executeStatement(); if ($entity->id === null) { // When autoincrement is used id is always an int @@ -151,24 +155,30 @@ abstract class QBMapper { * @psalm-param T $entity the entity that should be created/updated * @return Entity the saved entity with the (new) id * @psalm-return T the saved entity with the (new) id + * @throws Exception * @throws \InvalidArgumentException if entity has no id * @since 15.0.0 */ public function insertOrUpdate(Entity $entity): Entity { try { return $this->insert($entity); - } catch (UniqueConstraintViolationException $ex) { - return $this->update($entity); + } catch (Exception $ex) { + if ($ex->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { + return $this->update($entity); + } + throw $ex; } } /** * Updates an entry in the db from an entity - * @throws \InvalidArgumentException if entity has no id + * * @param Entity $entity the entity that should be created * @psalm-param T $entity the entity that should be created * @return Entity the saved entity with the set id * @psalm-return T the saved entity with the set id + * @throws Exception + * @throws \InvalidArgumentException if entity has no id * @since 14.0.0 */ public function update(Entity $entity): Entity { @@ -208,7 +218,7 @@ abstract class QBMapper { $qb->where( $qb->expr()->eq('id', $qb->createNamedParameter($id, $idType)) ); - $qb->executeUpdate(); + $qb->executeStatement(); return $entity; } @@ -220,10 +230,10 @@ abstract class QBMapper { * @param Entity $entity The entity to get the types from * @psalm-param T $entity * @param string $property The property of $entity to get the type for - * @return int + * @return int|string * @since 16.0.0 */ - protected function getParameterTypeForProperty(Entity $entity, string $property): int { + protected function getParameterTypeForProperty(Entity $entity, string $property) { $types = $entity->getFieldTypes(); if (!isset($types[ $property ])) { @@ -241,6 +251,8 @@ abstract class QBMapper { return IQueryBuilder::PARAM_BOOL; case 'blob': return IQueryBuilder::PARAM_LOB; + case 'datetime': + return IQueryBuilder::PARAM_DATE; } return IQueryBuilder::PARAM_STR; @@ -250,12 +262,13 @@ abstract class QBMapper { * Returns an db result and throws exceptions when there are more or less * results * - * @see findEntity - * * @param IQueryBuilder $query - * @throws DoesNotExistException if the item does not exist - * @throws MultipleObjectsReturnedException if more than one item exist * @return array the result as row + * @throws Exception + * @throws MultipleObjectsReturnedException if more than one item exist + * @throws DoesNotExistException if the item does not exist + * @see findEntity + * * @since 14.0.0 */ protected function findOneQuery(IQueryBuilder $query): array { @@ -314,6 +327,7 @@ abstract class QBMapper { * @param IQueryBuilder $query * @return Entity[] all fetched entities * @psalm-return T[] all fetched entities + * @throws Exception * @since 14.0.0 */ protected function findEntities(IQueryBuilder $query): array { @@ -336,10 +350,11 @@ abstract class QBMapper { * results * * @param IQueryBuilder $query - * @throws DoesNotExistException if the item does not exist - * @throws MultipleObjectsReturnedException if more than one item exist * @return Entity the entity * @psalm-return T the entity + * @throws Exception + * @throws MultipleObjectsReturnedException if more than one item exist + * @throws DoesNotExistException if the item does not exist * @since 14.0.0 */ protected function findEntity(IQueryBuilder $query): Entity { diff --git a/lib/public/AppFramework/Http.php b/lib/public/AppFramework/Http.php index 1e501c87299..8b3cde6875e 100644 --- a/lib/public/AppFramework/Http.php +++ b/lib/public/AppFramework/Http.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\HTTP class - */ - namespace OCP\AppFramework; /** diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php index 20263769630..d30e3b50c7f 100644 --- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/DataDisplayResponse.php b/lib/public/AppFramework/Http/DataDisplayResponse.php index c0c304e0f4a..32c8d09b664 100644 --- a/lib/public/AppFramework/Http/DataDisplayResponse.php +++ b/lib/public/AppFramework/Http/DataDisplayResponse.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/DataDownloadResponse.php b/lib/public/AppFramework/Http/DataDownloadResponse.php index 98ee48a4b07..7f2bc73f6e2 100644 --- a/lib/public/AppFramework/Http/DataDownloadResponse.php +++ b/lib/public/AppFramework/Http/DataDownloadResponse.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php index d1b5a989221..ca0392e521c 100644 --- a/lib/public/AppFramework/Http/DataResponse.php +++ b/lib/public/AppFramework/Http/DataResponse.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\HTTP\DataResponse class - */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/DownloadResponse.php b/lib/public/AppFramework/Http/DownloadResponse.php index 78381f0f08f..b80f03958c0 100644 --- a/lib/public/AppFramework/Http/DownloadResponse.php +++ b/lib/public/AppFramework/Http/DownloadResponse.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> @@ -22,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** @@ -30,20 +30,16 @@ namespace OCP\AppFramework\Http; * @since 7.0.0 */ class DownloadResponse extends Response { - private $filename; - private $contentType; - /** * Creates a response that prompts the user to download the file * @param string $filename the name that the downloaded file should have * @param string $contentType the mimetype that the downloaded file should have * @since 7.0.0 */ - public function __construct($filename, $contentType) { + public function __construct(string $filename, string $contentType) { parent::__construct(); - $this->filename = $filename; - $this->contentType = $contentType; + $filename = strtr($filename, ['"' => '\\"', '\\' => '\\\\']); $this->addHeader('Content-Disposition', 'attachment; filename="' . $filename . '"'); $this->addHeader('Content-Type', $contentType); diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php index d4c3a022c13..e0ef79049a4 100644 --- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php @@ -24,12 +24,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** * Class EmptyContentSecurityPolicy is a simple helper which allows applications - * to modify the Content-Security-Policy sent by ownCloud. Per default the policy + * to modify the Content-Security-Policy sent by Nexcloud. Per default the policy * is forbidding everything. * * As alternative with sane exemptions look at ContentSecurityPolicy diff --git a/lib/public/AppFramework/Http/EmptyFeaturePolicy.php b/lib/public/AppFramework/Http/EmptyFeaturePolicy.php index 2e33d9ff31b..1cc6034963a 100644 --- a/lib/public/AppFramework/Http/EmptyFeaturePolicy.php +++ b/lib/public/AppFramework/Http/EmptyFeaturePolicy.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php b/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php index 96a9f00e8e3..65549eaf8df 100644 --- a/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php +++ b/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http\Events; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/public/AppFramework/Http/FeaturePolicy.php b/lib/public/AppFramework/Http/FeaturePolicy.php index 36315620ffe..d193dda546b 100644 --- a/lib/public/AppFramework/Http/FeaturePolicy.php +++ b/lib/public/AppFramework/Http/FeaturePolicy.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/FileDisplayResponse.php b/lib/public/AppFramework/Http/FileDisplayResponse.php index 86deb1cb7f7..90c18e85546 100644 --- a/lib/public/AppFramework/Http/FileDisplayResponse.php +++ b/lib/public/AppFramework/Http/FileDisplayResponse.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/ICallbackResponse.php b/lib/public/AppFramework/Http/ICallbackResponse.php index 767ec990c59..8bb32de4d58 100644 --- a/lib/public/AppFramework/Http/ICallbackResponse.php +++ b/lib/public/AppFramework/Http/ICallbackResponse.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/IOutput.php b/lib/public/AppFramework/Http/IOutput.php index 749e666b578..f9c0b7898d9 100644 --- a/lib/public/AppFramework/Http/IOutput.php +++ b/lib/public/AppFramework/Http/IOutput.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/JSONResponse.php b/lib/public/AppFramework/Http/JSONResponse.php index 647033e5fa1..f4b936435c8 100644 --- a/lib/public/AppFramework/Http/JSONResponse.php +++ b/lib/public/AppFramework/Http/JSONResponse.php @@ -25,12 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\HTTP\JSONResponse class - */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/NotFoundResponse.php b/lib/public/AppFramework/Http/NotFoundResponse.php index 885776d1b20..651e41735b9 100644 --- a/lib/public/AppFramework/Http/NotFoundResponse.php +++ b/lib/public/AppFramework/Http/NotFoundResponse.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/RedirectResponse.php b/lib/public/AppFramework/Http/RedirectResponse.php index 28344866c03..87853391e86 100644 --- a/lib/public/AppFramework/Http/RedirectResponse.php +++ b/lib/public/AppFramework/Http/RedirectResponse.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php index f4b8f54f892..e957b245e53 100644 --- a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php +++ b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php @@ -17,28 +17,33 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; +use OCP\IURLGenerator; + /** * Redirects to the default app + * * @since 16.0.0 + * @depreacted 23.0.0 Use RedirectResponse() with IURLGenerator::linkToDefaultPageUrl() instead */ class RedirectToDefaultAppResponse extends RedirectResponse { - - /** * Creates a response that redirects to the default app + * * @since 16.0.0 + * @depreacted 23.0.0 Use RedirectResponse() with IURLGenerator::linkToDefaultPageUrl() instead */ public function __construct() { - parent::__construct(\OC_Util::getDefaultPageUrl()); + /** @var IURLGenerator $urlGenerator */ + $urlGenerator = \OC::$server->get(IURLGenerator::class); + parent::__construct($urlGenerator->linkToDefaultPageUrl()); } } diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index fc3ee739773..ee10d483b25 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -28,12 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\HTTP\Response class - */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -121,7 +115,7 @@ class Response { $time = \OC::$server->query(ITimeFactory::class); $expires->setTimestamp($time->getTime()); $expires->add(new \DateInterval('PT'.$cacheSeconds.'S')); - $this->addHeader('Expires', $expires->format(\DateTime::RFC2822)); + $this->addHeader('Expires', $expires->format(\DateTimeInterface::RFC2822)); } else { $this->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate'); unset($this->headers['Expires'], $this->headers['Pragma']); @@ -211,9 +205,9 @@ class Response { $config = \OC::$server->get(IConfig::class); if ($config->getSystemValueBool('debug', false)) { - \OC::$server->get(LoggerInterface::class)->error( - 'Setting a custom header on a 204 or 304 is not supported' - ); + \OC::$server->get(LoggerInterface::class)->error('Setting custom header on a 204 or 304 is not supported (Header: {header})', [ + 'header' => $name, + ]); } } @@ -250,7 +244,7 @@ class Response { if ($this->lastModified) { $mergeWith['Last-Modified'] = - $this->lastModified->format(\DateTime::RFC2822); + $this->lastModified->format(\DateTimeInterface::RFC2822); } $this->headers['Content-Security-Policy'] = $this->getContentSecurityPolicy()->buildPolicy(); diff --git a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php index f07e82fc928..35a48481333 100644 --- a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php +++ b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/StreamResponse.php b/lib/public/AppFramework/Http/StreamResponse.php index d77d6586b71..25ad37e5d9a 100644 --- a/lib/public/AppFramework/Http/StreamResponse.php +++ b/lib/public/AppFramework/Http/StreamResponse.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/StrictContentSecurityPolicy.php b/lib/public/AppFramework/Http/StrictContentSecurityPolicy.php index 7e458eebeab..c62f79e8801 100644 --- a/lib/public/AppFramework/Http/StrictContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/StrictContentSecurityPolicy.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/StrictEvalContentSecurityPolicy.php b/lib/public/AppFramework/Http/StrictEvalContentSecurityPolicy.php index 1bd1b14f2bc..b0eb482f9f7 100644 --- a/lib/public/AppFramework/Http/StrictEvalContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/StrictEvalContentSecurityPolicy.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/StrictInlineContentSecurityPolicy.php b/lib/public/AppFramework/Http/StrictInlineContentSecurityPolicy.php index 4d9217e6171..7010862dc12 100644 --- a/lib/public/AppFramework/Http/StrictInlineContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/StrictInlineContentSecurityPolicy.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php index aaadfd59fe3..d4114c51c09 100644 --- a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php +++ b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * * @author Daniel Calviño Sánchez <danxuliu@gmail.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -16,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http\Template; use OCP\Util; diff --git a/lib/public/AppFramework/Http/Template/IMenuAction.php b/lib/public/AppFramework/Http/Template/IMenuAction.php index 0da955c1308..970211952b0 100644 --- a/lib/public/AppFramework/Http/Template/IMenuAction.php +++ b/lib/public/AppFramework/Http/Template/IMenuAction.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http\Template; /** diff --git a/lib/public/AppFramework/Http/Template/LinkMenuAction.php b/lib/public/AppFramework/Http/Template/LinkMenuAction.php index b4e71d5e710..61398f99374 100644 --- a/lib/public/AppFramework/Http/Template/LinkMenuAction.php +++ b/lib/public/AppFramework/Http/Template/LinkMenuAction.php @@ -2,7 +2,7 @@ /** * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http\Template; use OCP\Util; diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php index 84c940d4229..1196c90935d 100644 --- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php +++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http\Template; use InvalidArgumentException; @@ -97,7 +96,7 @@ class PublicTemplateResponse extends TemplateResponse { $this->headerActions[] = $action; } usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) { - return $a->getPriority() > $b->getPriority(); + return $a->getPriority() <=> $b->getPriority(); }); } diff --git a/lib/public/AppFramework/Http/Template/SimpleMenuAction.php b/lib/public/AppFramework/Http/Template/SimpleMenuAction.php index 9646c08f920..f8492eb2989 100644 --- a/lib/public/AppFramework/Http/Template/SimpleMenuAction.php +++ b/lib/public/AppFramework/Http/Template/SimpleMenuAction.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http\Template; use OCP\Util; diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index 837ada337b8..9b010d38bae 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -26,12 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\HTTP\TemplateResponse class - */ - namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/TextPlainResponse.php b/lib/public/AppFramework/Http/TextPlainResponse.php new file mode 100644 index 00000000000..93edf704863 --- /dev/null +++ b/lib/public/AppFramework/Http/TextPlainResponse.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Lukas Reschke <lukas@statuscode.ch> + * + * @author 2021 Lukas Reschke <lukas@statuscode.ch> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + */ + +namespace OCP\AppFramework\Http; + +use OCP\AppFramework\Http; + +/** + * A renderer for text responses + * @since 22.0.0 + */ +class TextPlainResponse extends Response { + /** @var string */ + private $text = ''; + + /** + * constructor of TextPlainResponse + * @param string $text The text body + * @param int $statusCode the Http status code, defaults to 200 + * @since 22.0.0 + */ + public function __construct(string $text = '', int $statusCode = Http::STATUS_OK) { + parent::__construct(); + + $this->text = $text; + $this->setStatus($statusCode); + $this->addHeader('Content-Type', 'text/plain'); + } + + + /** + * Returns the text + * @return string + * @since 22.0.0 + * @throws \Exception If data could not get encoded + */ + public function render() : string { + return $this->text; + } +} diff --git a/lib/public/AppFramework/Http/TooManyRequestsResponse.php b/lib/public/AppFramework/Http/TooManyRequestsResponse.php index db771d0ac4a..908a9c60fd8 100644 --- a/lib/public/AppFramework/Http/TooManyRequestsResponse.php +++ b/lib/public/AppFramework/Http/TooManyRequestsResponse.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; use OCP\Template; diff --git a/lib/public/AppFramework/Http/ZipResponse.php b/lib/public/AppFramework/Http/ZipResponse.php index a5cc82ebad8..c3a7e089bdc 100644 --- a/lib/public/AppFramework/Http/ZipResponse.php +++ b/lib/public/AppFramework/Http/ZipResponse.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Jakob Sack <mail@jakobsack.de> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -18,14 +19,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Http; use OC\Streamer; diff --git a/lib/public/AppFramework/IAppContainer.php b/lib/public/AppFramework/IAppContainer.php index f3497a6e0e1..626481de0e0 100644 --- a/lib/public/AppFramework/IAppContainer.php +++ b/lib/public/AppFramework/IAppContainer.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework; use OCP\IContainer; diff --git a/lib/public/AppFramework/Middleware.php b/lib/public/AppFramework/Middleware.php index d737c5e37fd..1e8e92964b0 100644 --- a/lib/public/AppFramework/Middleware.php +++ b/lib/public/AppFramework/Middleware.php @@ -23,12 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\Middleware class - */ - namespace OCP\AppFramework; use OCP\AppFramework\Http\Response; diff --git a/lib/public/AppFramework/OCS/OCSBadRequestException.php b/lib/public/AppFramework/OCS/OCSBadRequestException.php index c6f523b89c6..db146076f2a 100644 --- a/lib/public/AppFramework/OCS/OCSBadRequestException.php +++ b/lib/public/AppFramework/OCS/OCSBadRequestException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSException.php b/lib/public/AppFramework/OCS/OCSException.php index 0e4c5548dcf..b5dfdef3571 100644 --- a/lib/public/AppFramework/OCS/OCSException.php +++ b/lib/public/AppFramework/OCS/OCSException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSForbiddenException.php b/lib/public/AppFramework/OCS/OCSForbiddenException.php index 6b12c4dfa93..ecdccb05a6f 100644 --- a/lib/public/AppFramework/OCS/OCSForbiddenException.php +++ b/lib/public/AppFramework/OCS/OCSForbiddenException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSNotFoundException.php b/lib/public/AppFramework/OCS/OCSNotFoundException.php index 01ba7ffbbf7..7a2ffb5de91 100644 --- a/lib/public/AppFramework/OCS/OCSNotFoundException.php +++ b/lib/public/AppFramework/OCS/OCSNotFoundException.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index 422195f6b24..09c28667dcd 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -25,12 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * AppFramework\Controller class - */ - namespace OCP\AppFramework; use OCP\AppFramework\Http\DataResponse; diff --git a/lib/public/AppFramework/PublicShareController.php b/lib/public/AppFramework/PublicShareController.php index c7e0e75d0e2..ec3e8500d61 100644 --- a/lib/public/AppFramework/PublicShareController.php +++ b/lib/public/AppFramework/PublicShareController.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl> * @@ -13,15 +16,13 @@ * * 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 + * 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/>. * */ -declare(strict_types=1); - namespace OCP\AppFramework; use OCP\IRequest; diff --git a/lib/public/AppFramework/QueryException.php b/lib/public/AppFramework/QueryException.php index dd7ff16af13..3b73c92e7be 100644 --- a/lib/public/AppFramework/QueryException.php +++ b/lib/public/AppFramework/QueryException.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework; use Exception; diff --git a/lib/public/AppFramework/Services/IAppConfig.php b/lib/public/AppFramework/Services/IAppConfig.php index 0af937b7c6f..baac2946e3c 100644 --- a/lib/public/AppFramework/Services/IAppConfig.php +++ b/lib/public/AppFramework/Services/IAppConfig.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Services; /** diff --git a/lib/public/AppFramework/Services/IInitialState.php b/lib/public/AppFramework/Services/IInitialState.php index 9195fedd171..c0c363792fc 100644 --- a/lib/public/AppFramework/Services/IInitialState.php +++ b/lib/public/AppFramework/Services/IInitialState.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Services; use Closure; diff --git a/lib/public/AppFramework/Services/InitialStateProvider.php b/lib/public/AppFramework/Services/InitialStateProvider.php index b9dbd399d6b..c317fad3f5d 100644 --- a/lib/public/AppFramework/Services/InitialStateProvider.php +++ b/lib/public/AppFramework/Services/InitialStateProvider.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\AppFramework\Services; /** diff --git a/lib/public/AppFramework/Utility/IControllerMethodReflector.php b/lib/public/AppFramework/Utility/IControllerMethodReflector.php index 05851ad668f..fbeb14b1a35 100644 --- a/lib/public/AppFramework/Utility/IControllerMethodReflector.php +++ b/lib/public/AppFramework/Utility/IControllerMethodReflector.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Utility; /** @@ -34,6 +33,8 @@ namespace OCP\AppFramework\Utility; * Reads and parses annotations from doc comments * * @since 8.0.0 + * @deprecated 22.0.0 will be obsolete with native attributes in PHP8 + * @see https://help.nextcloud.com/t/how-should-we-use-php8-attributes/104278 */ interface IControllerMethodReflector { @@ -54,12 +55,14 @@ interface IControllerMethodReflector { * @return string|null type in the type parameters (@param int $something) * would return int or null if not existing * @since 8.0.0 + * @deprecated 22.0.0 this method is only used internally */ public function getType(string $parameter); /** * @return array the arguments of the method with key => default value * @since 8.0.0 + * @deprecated 22.0.0 this method is only used internally */ public function getParameters(): array; @@ -69,6 +72,8 @@ interface IControllerMethodReflector { * @param string $name the name of the annotation * @return bool true if the annotation is found * @since 8.0.0 + * @deprecated 22.0.0 will be obsolete with native attributes in PHP8 + * @see https://help.nextcloud.com/t/how-should-we-use-php8-attributes/104278 */ public function hasAnnotation(string $name): bool; } diff --git a/lib/public/AppFramework/Utility/ITimeFactory.php b/lib/public/AppFramework/Utility/ITimeFactory.php index ce09f10160f..63a87cf1b16 100644 --- a/lib/public/AppFramework/Utility/ITimeFactory.php +++ b/lib/public/AppFramework/Utility/ITimeFactory.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\AppFramework\Utility; /** diff --git a/lib/public/Authentication/Events/LoginFailedEvent.php b/lib/public/Authentication/Events/LoginFailedEvent.php index f6380d20966..b1a70e4dd55 100644 --- a/lib/public/Authentication/Events/LoginFailedEvent.php +++ b/lib/public/Authentication/Events/LoginFailedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php index d2a7d505767..7446c30d500 100644 --- a/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php +++ b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Authentication\Exceptions; use Exception; diff --git a/lib/public/Authentication/Exceptions/PasswordUnavailableException.php b/lib/public/Authentication/Exceptions/PasswordUnavailableException.php index 6b826966c87..d7c87ee28e9 100644 --- a/lib/public/Authentication/Exceptions/PasswordUnavailableException.php +++ b/lib/public/Authentication/Exceptions/PasswordUnavailableException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Authentication\Exceptions; use Exception; diff --git a/lib/public/Authentication/IAlternativeLogin.php b/lib/public/Authentication/IAlternativeLogin.php index d568cb6b5b5..837487f057e 100644 --- a/lib/public/Authentication/IAlternativeLogin.php +++ b/lib/public/Authentication/IAlternativeLogin.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication; /** diff --git a/lib/public/Authentication/IApacheBackend.php b/lib/public/Authentication/IApacheBackend.php index 806c71835a8..4528bef3479 100644 --- a/lib/public/Authentication/IApacheBackend.php +++ b/lib/public/Authentication/IApacheBackend.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Authentication/IApacheBackend interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Authentication/LoginCredentials/ICredentials.php b/lib/public/Authentication/LoginCredentials/ICredentials.php index a47e91f6802..9f708c37c37 100644 --- a/lib/public/Authentication/LoginCredentials/ICredentials.php +++ b/lib/public/Authentication/LoginCredentials/ICredentials.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Authentication\LoginCredentials; use OCP\Authentication\Exceptions\PasswordUnavailableException; diff --git a/lib/public/Authentication/LoginCredentials/IStore.php b/lib/public/Authentication/LoginCredentials/IStore.php index 22562103a72..33ffefe2344 100644 --- a/lib/public/Authentication/LoginCredentials/IStore.php +++ b/lib/public/Authentication/LoginCredentials/IStore.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\LoginCredentials; use OCP\Authentication\Exceptions\CredentialsUnavailableException; diff --git a/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php b/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php index d71150b3451..0ac23cc8915 100644 --- a/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php +++ b/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\AppFramework\Controller; diff --git a/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php b/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php index f1f67f3a4dc..e3ef7c62f40 100644 --- a/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php +++ b/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php b/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php index 98160d94647..d9fd8099235 100644 --- a/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php +++ b/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php b/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php index 0f8b527e34a..1acf3e575d8 100644 --- a/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php +++ b/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php index 7165588566a..9d07b11ebed 100644 --- a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php +++ b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\Template; diff --git a/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php b/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php index 5178792b3ae..23913b761b2 100644 --- a/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php +++ b/lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\Template; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvider.php b/lib/public/Authentication/TwoFactorAuth/IProvider.php index 83545fa4f6c..8f1c4ae2802 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvider.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php b/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php index 1611e0da73c..5d4c010fbdc 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\AppFramework\Http\ContentSecurityPolicy; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php b/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php index 60315dc8030..cd5205e5416 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; /** diff --git a/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php b/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php index 3668e60cd50..3a101764c94 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php index 2e5951aaf2d..1f1b82a4426 100644 --- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php +++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php b/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php index 570998b0ad4..830ce8e1c3b 100644 --- a/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php +++ b/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php index 95ec88de99a..e601f6c33d9 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Authentication\TwoFactorAuth; use Exception; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php index 925bd6914ba..539c5716bbd 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php new file mode 100644 index 00000000000..5a56adc3cc9 --- /dev/null +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php @@ -0,0 +1,64 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Roeland Jago Douma <roeland@famdouma.nl> + * + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OCP\Authentication\TwoFactorAuth; + +use OCP\EventDispatcher\Event; +use OCP\IUser; + +/** + * @since 22.0.0 + */ +class TwoFactorProviderForUserDisabled extends Event { + /** @var IProvider */ + private $provider; + + /** @var IUser */ + private $user; + + /** + * @since 22.0.0 + */ + public function __construct(IUser $user, IProvider $provider) { + $this->user = $user; + $this->provider = $provider; + } + + /** + * @return IUser + * @since 22.0.0 + */ + public function getUser(): IUser { + return $this->user; + } + + /** + * @return IProvider + * @since 22.0.0 + */ + public function getProvider(): IProvider { + return $this->provider; + } +} diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php new file mode 100644 index 00000000000..c577d1484a3 --- /dev/null +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php @@ -0,0 +1,64 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Roeland Jago Douma <roeland@famdouma.nl> + * + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OCP\Authentication\TwoFactorAuth; + +use OCP\EventDispatcher\Event; +use OCP\IUser; + +/** + * @since 22.0.0 + */ +class TwoFactorProviderForUserEnabled extends Event { + /** @var IProvider */ + private $provider; + + /** @var IUser */ + private $user; + + /** + * @since 22.0.0 + */ + public function __construct(IUser $user, IProvider $provider) { + $this->user = $user; + $this->provider = $provider; + } + + /** + * @return IUser + * @since 22.0.0 + */ + public function getUser(): IUser { + return $this->user; + } + + /** + * @return IProvider + * @since 22.0.0 + */ + public function getProvider(): IProvider { + return $this->provider; + } +} diff --git a/lib/public/AutoloadNotAllowedException.php b/lib/public/AutoloadNotAllowedException.php index 9d41315c323..110362ab608 100644 --- a/lib/public/AutoloadNotAllowedException.php +++ b/lib/public/AutoloadNotAllowedException.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -19,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/BackgroundJob.php b/lib/public/BackgroundJob.php index a698896fe1b..2be11ab0a6e 100644 --- a/lib/public/BackgroundJob.php +++ b/lib/public/BackgroundJob.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/BackgroundJob/IJob.php b/lib/public/BackgroundJob/IJob.php index 8e61c527e7d..341ae2ac545 100644 --- a/lib/public/BackgroundJob/IJob.php +++ b/lib/public/BackgroundJob/IJob.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\BackgroundJob; use OCP\ILogger; diff --git a/lib/public/BackgroundJob/IJobList.php b/lib/public/BackgroundJob/IJobList.php index 36f8cd68fea..9f3b485c280 100644 --- a/lib/public/BackgroundJob/IJobList.php +++ b/lib/public/BackgroundJob/IJobList.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\BackgroundJob; /** @@ -99,6 +98,13 @@ interface IJobList { public function getById($id); /** + * @param int $id + * @return array|null + * @since 23.0.0 + */ + public function getDetailsById(int $id): ?array; + + /** * set the job that was last ran to the current time * * @param \OCP\BackgroundJob\IJob $job @@ -130,4 +136,12 @@ interface IJobList { * @since 12.0.0 */ public function setExecutionTime(IJob $job, $timeTaken); + + /** + * Reset the $job so it executes on the next trigger + * + * @param IJob $job + * @since 23.0.0 + */ + public function resetBackgroundJob(IJob $job): void; } diff --git a/lib/public/BackgroundJob/Job.php b/lib/public/BackgroundJob/Job.php index 62b136c0cfb..5b20ac82684 100644 --- a/lib/public/BackgroundJob/Job.php +++ b/lib/public/BackgroundJob/Job.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/public/BackgroundJob/QueuedJob.php b/lib/public/BackgroundJob/QueuedJob.php index 593065affbf..e7e6e9a2939 100644 --- a/lib/public/BackgroundJob/QueuedJob.php +++ b/lib/public/BackgroundJob/QueuedJob.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\BackgroundJob; use OCP\ILogger; diff --git a/lib/public/BackgroundJob/TimedJob.php b/lib/public/BackgroundJob/TimedJob.php index 8797b8dd63b..2cc9ea8e293 100644 --- a/lib/public/BackgroundJob/TimedJob.php +++ b/lib/public/BackgroundJob/TimedJob.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl> * + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -16,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\BackgroundJob; use OC\BackgroundJob\JobList; @@ -42,10 +42,12 @@ abstract class TimedJob extends Job { /** * set the interval for the job * + * @param int $seconds the time to pass between two runs of the same job in seconds + * * @since 15.0.0 */ - public function setInterval(int $interval) { - $this->interval = $interval; + public function setInterval(int $seconds) { + $this->interval = $seconds; } /** diff --git a/lib/public/Broadcast/Events/IBroadcastEvent.php b/lib/public/Broadcast/Events/IBroadcastEvent.php index 95d52c5af8b..e7a0e70ba0a 100644 --- a/lib/public/Broadcast/Events/IBroadcastEvent.php +++ b/lib/public/Broadcast/Events/IBroadcastEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Broadcast\Events; use JsonSerializable; diff --git a/lib/public/Calendar/BackendTemporarilyUnavailableException.php b/lib/public/Calendar/BackendTemporarilyUnavailableException.php index 2655eea87de..5485c9e9e4e 100644 --- a/lib/public/Calendar/BackendTemporarilyUnavailableException.php +++ b/lib/public/Calendar/BackendTemporarilyUnavailableException.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/Exceptions/CalendarException.php b/lib/public/Calendar/Exceptions/CalendarException.php new file mode 100644 index 00000000000..834dd1a234a --- /dev/null +++ b/lib/public/Calendar/Exceptions/CalendarException.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Anna Larch <anna.larch@gmx.net> + * + * @author Anna Larch <anna.larch@gmx.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 library. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Calendar\Exceptions; + +use Exception; + +/** + * @since 23.0.0 + */ +class CalendarException extends Exception { +} diff --git a/lib/public/Calendar/ICalendar.php b/lib/public/Calendar/ICalendar.php index 93f5e572cf6..551870de20e 100644 --- a/lib/public/Calendar/ICalendar.php +++ b/lib/public/Calendar/ICalendar.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright 2017, Georg Ehrke <oc.list@georgehrke.com> * @@ -14,14 +17,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/ICalendarProvider.php b/lib/public/Calendar/ICalendarProvider.php new file mode 100644 index 00000000000..d135910b08c --- /dev/null +++ b/lib/public/Calendar/ICalendarProvider.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Anna Larch <anna.larch@gmx.net> + * + * @author Anna Larch <anna.larch@gmx.net> + * + * @license GNU AGPL version 3 or any later version + * + * + * + * 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/>. + * + */ +namespace OCP\Calendar; + +/** + * This interface defines a lazy loading mechanism for + * calendars for Public Consumption + * + * @since 23.0.0 + */ +interface ICalendarProvider { + + /** + * @param string $principalUri + * @param string[] $calendarUris + * @return ICalendar[] + * @since 23.0.0 + */ + public function getCalendars(string $principalUri, array $calendarUris = []): array; +} diff --git a/lib/public/Calendar/ICalendarQuery.php b/lib/public/Calendar/ICalendarQuery.php new file mode 100644 index 00000000000..142810d3fb9 --- /dev/null +++ b/lib/public/Calendar/ICalendarQuery.php @@ -0,0 +1,82 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Anna Larch <anna.larch@gmx.net> + * + * @author Anna Larch <anna.larch@gmx.net> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OCP\Calendar; + +use DateTimeImmutable; + +/** + * Build a flexible, extendable query to the CalDAV backend + * + * @since 23.0.0 + */ +interface ICalendarQuery { + + /** + * Limit the results to the calendar uri(s) + * + * @since 23.0.0 + */ + public function addSearchCalendar(string $calendarUri): void; + + /** + * Search the property values + * + * @since 23.0.0 + */ + public function setSearchPattern(string $pattern): void; + + /** + * Define the property name(s) to search for + * + * @since 23.0.0 + */ + public function addSearchProperty(string $value): void; + + /** + * @since 23.0.0 + */ + public function addType(string $value): void; + + /** + * @since 23.0.0 + */ + public function setTimerangeStart(DateTimeImmutable $startTime): void; + + /** + * @since 23.0.0 + */ + public function setTimerangeEnd(DateTimeImmutable $endTime): void; + + /** + * @since 23.0.0 + */ + public function setLimit(int $limit): void; + + /** + * @since 23.0.0 + */ + public function setOffset(int $offset): void; +} diff --git a/lib/public/Calendar/ICreateFromString.php b/lib/public/Calendar/ICreateFromString.php new file mode 100644 index 00000000000..343405e8ab6 --- /dev/null +++ b/lib/public/Calendar/ICreateFromString.php @@ -0,0 +1,41 @@ +<?php +/** + * @copyright 2021 Anna Larch <anna.larch@gmx.net> + * + * @author Anna Larch <anna.larch@gmx.net> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OCP\Calendar; + +use OCP\Calendar\Exceptions\CalendarException; + +/** + * Extends the current ICalendar interface + * to add a public write method + * + * @since 23.0.0 + */ +interface ICreateFromString extends ICalendar { + + /** + * @since 23.0.0 + * + * @throws CalendarException + */ + public function createFromString(string $name, string $calendarData): void; +} diff --git a/lib/public/Calendar/IManager.php b/lib/public/Calendar/IManager.php index 67762acdf9a..eb4113bba99 100644 --- a/lib/public/Calendar/IManager.php +++ b/lib/public/Calendar/IManager.php @@ -1,9 +1,13 @@ <?php + +declare(strict_types=1); + /** * @copyright 2017, Georg Ehrke <oc.list@georgehrke.com> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Georg Ehrke <oc.list@georgehrke.com> + * @author Anna Larch <anna.larch@gmx.net> * * @license GNU AGPL version 3 or any later version * @@ -14,14 +18,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar; /** @@ -68,6 +71,7 @@ interface IManager { * @param integer|null $offset - offset for paging of search results * @return array an array of events/journals/todos which are arrays of arrays of key-value-pairs * @since 13.0.0 + * @deprecated 23.0.0 use \OCP\Calendar\IManager::searchForPrincipal */ public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null); @@ -76,6 +80,7 @@ interface IManager { * * @return bool true if enabled, false if not * @since 13.0.0 + * @deprecated 23.0.0 */ public function isEnabled(); @@ -85,6 +90,7 @@ interface IManager { * @param ICalendar $calendar * @return void * @since 13.0.0 + * @deprecated 23.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarProvider */ public function registerCalendar(ICalendar $calendar); @@ -94,6 +100,7 @@ interface IManager { * @param ICalendar $calendar * @return void * @since 13.0.0 + * @deprecated 23.0.0 */ public function unregisterCalendar(ICalendar $calendar); @@ -104,19 +111,40 @@ interface IManager { * @param \Closure $callable * @return void * @since 13.0.0 + * @deprecated 23.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarProvider */ public function register(\Closure $callable); /** * @return ICalendar[] * @since 13.0.0 + * @deprecated 23.0.0 */ public function getCalendars(); /** * removes all registered calendar instances + * * @return void * @since 13.0.0 + * @deprecated 23.0.0 */ public function clear(); + + /** + * Query a principals calendar(s) + * + * @param ICalendarQuery $query + * @return array[] + * @since 23.0.0 + */ + public function searchForPrincipal(ICalendarQuery $query): array; + + /** + * Build a new query for searchForPrincipal + * + * @return ICalendarQuery + * @since 23.0.0 + */ + public function newQuery(string $principalUri) : ICalendarQuery; } diff --git a/lib/public/Calendar/IMetadataProvider.php b/lib/public/Calendar/IMetadataProvider.php index 2e1986e7a95..5d0770caabd 100644 --- a/lib/public/Calendar/IMetadataProvider.php +++ b/lib/public/Calendar/IMetadataProvider.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/Resource/IBackend.php b/lib/public/Calendar/Resource/IBackend.php index 261e2dda03a..a1e050df60a 100644 --- a/lib/public/Calendar/Resource/IBackend.php +++ b/lib/public/Calendar/Resource/IBackend.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Resource; use OCP\Calendar\BackendTemporarilyUnavailableException; diff --git a/lib/public/Calendar/Resource/IManager.php b/lib/public/Calendar/Resource/IManager.php index 095e72e2490..6910ecb164c 100644 --- a/lib/public/Calendar/Resource/IManager.php +++ b/lib/public/Calendar/Resource/IManager.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Resource; /** diff --git a/lib/public/Calendar/Resource/IResource.php b/lib/public/Calendar/Resource/IResource.php index 00ce98d64e0..f2c3d0a06f0 100644 --- a/lib/public/Calendar/Resource/IResource.php +++ b/lib/public/Calendar/Resource/IResource.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Resource; /** diff --git a/lib/public/Calendar/Resource/IResourceMetadata.php b/lib/public/Calendar/Resource/IResourceMetadata.php index 51ee659fb0d..4d2eaf72488 100644 --- a/lib/public/Calendar/Resource/IResourceMetadata.php +++ b/lib/public/Calendar/Resource/IResourceMetadata.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Resource; /** diff --git a/lib/public/Calendar/Room/IBackend.php b/lib/public/Calendar/Room/IBackend.php index f40c1fcf662..095240202bf 100644 --- a/lib/public/Calendar/Room/IBackend.php +++ b/lib/public/Calendar/Room/IBackend.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Room; use OCP\Calendar\BackendTemporarilyUnavailableException; diff --git a/lib/public/Calendar/Room/IManager.php b/lib/public/Calendar/Room/IManager.php index 925b48a8e4f..6529ad265b6 100644 --- a/lib/public/Calendar/Room/IManager.php +++ b/lib/public/Calendar/Room/IManager.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Room; /** diff --git a/lib/public/Calendar/Room/IRoom.php b/lib/public/Calendar/Room/IRoom.php index f1be218aba5..6402c02319b 100644 --- a/lib/public/Calendar/Room/IRoom.php +++ b/lib/public/Calendar/Room/IRoom.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Room; /** diff --git a/lib/public/Calendar/Room/IRoomMetadata.php b/lib/public/Calendar/Room/IRoomMetadata.php index b6233a486f2..ba0eba71311 100644 --- a/lib/public/Calendar/Room/IRoomMetadata.php +++ b/lib/public/Calendar/Room/IRoomMetadata.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Calendar\Room; /** @@ -37,7 +36,7 @@ interface IRoomMetadata { /** * Type of room * - * Allowed values for this key include: + * Allowed values for this key are: * - meeting-room * - lecture-hall * - seminar-room diff --git a/lib/public/Capabilities/ICapability.php b/lib/public/Capabilities/ICapability.php index 00f3f10a1bd..34cbe63973e 100644 --- a/lib/public/Capabilities/ICapability.php +++ b/lib/public/Capabilities/ICapability.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Capabilities; /** diff --git a/lib/public/Capabilities/IPublicCapability.php b/lib/public/Capabilities/IPublicCapability.php index 0dcb45d0198..2c632a8ed9b 100644 --- a/lib/public/Capabilities/IPublicCapability.php +++ b/lib/public/Capabilities/IPublicCapability.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Capabilities; /** diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php index 73128f618f0..503f31bfffb 100644 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php +++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\AutoComplete; use OCP\EventDispatcher\GenericEvent; diff --git a/lib/public/Collaboration/AutoComplete/IManager.php b/lib/public/Collaboration/AutoComplete/IManager.php index cec703edc99..c4ca499b618 100644 --- a/lib/public/Collaboration/AutoComplete/IManager.php +++ b/lib/public/Collaboration/AutoComplete/IManager.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Collaboration\AutoComplete; /** diff --git a/lib/public/Collaboration/AutoComplete/ISorter.php b/lib/public/Collaboration/AutoComplete/ISorter.php index 770bc4e0bf6..ddf39671d87 100644 --- a/lib/public/Collaboration/AutoComplete/ISorter.php +++ b/lib/public/Collaboration/AutoComplete/ISorter.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Collaboration\AutoComplete; /** diff --git a/lib/public/Collaboration/Collaborators/ISearch.php b/lib/public/Collaboration/Collaborators/ISearch.php index fbdeecff097..e6ef5ec894e 100644 --- a/lib/public/Collaboration/Collaborators/ISearch.php +++ b/lib/public/Collaboration/Collaborators/ISearch.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Collaborators/ISearchPlugin.php b/lib/public/Collaboration/Collaborators/ISearchPlugin.php index b240c270f5e..1965ef7d368 100644 --- a/lib/public/Collaboration/Collaborators/ISearchPlugin.php +++ b/lib/public/Collaboration/Collaborators/ISearchPlugin.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Collaborators/ISearchResult.php b/lib/public/Collaboration/Collaborators/ISearchResult.php index d0d61ccfb28..15d14d656ed 100644 --- a/lib/public/Collaboration/Collaborators/ISearchResult.php +++ b/lib/public/Collaboration/Collaborators/ISearchResult.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Collaborators; /** @@ -46,6 +45,14 @@ interface ISearchResult { public function hasResult(SearchResultType $type, $collaboratorId); /** + * Removes all result where $collaborationId exactly matches shareWith of + * any of wide and exact result matches of the given type. + * + * @since 22.0.0 + */ + public function removeCollaboratorResult(SearchResultType $type, string $collaboratorId): bool; + + /** * @param SearchResultType $type * @since 13.0.0 */ diff --git a/lib/public/Collaboration/Collaborators/SearchResultType.php b/lib/public/Collaboration/Collaborators/SearchResultType.php index d224942368c..74d10b02895 100644 --- a/lib/public/Collaboration/Collaborators/SearchResultType.php +++ b/lib/public/Collaboration/Collaborators/SearchResultType.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Resources/CollectionException.php b/lib/public/Collaboration/Resources/CollectionException.php index a7f05cdc939..e5fd8fd4d22 100644 --- a/lib/public/Collaboration/Resources/CollectionException.php +++ b/lib/public/Collaboration/Resources/CollectionException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; /** diff --git a/lib/public/Collaboration/Resources/ICollection.php b/lib/public/Collaboration/Resources/ICollection.php index 55f8014ca6a..5efae755f4d 100644 --- a/lib/public/Collaboration/Resources/ICollection.php +++ b/lib/public/Collaboration/Resources/ICollection.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/IManager.php b/lib/public/Collaboration/Resources/IManager.php index eba4c7becea..f220a9c489f 100644 --- a/lib/public/Collaboration/Resources/IManager.php +++ b/lib/public/Collaboration/Resources/IManager.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/IProvider.php b/lib/public/Collaboration/Resources/IProvider.php index 28bb06d2b85..88a74496e55 100644 --- a/lib/public/Collaboration/Resources/IProvider.php +++ b/lib/public/Collaboration/Resources/IProvider.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/IProviderManager.php b/lib/public/Collaboration/Resources/IProviderManager.php index 894d4b8df98..5dcb3eeaca9 100644 --- a/lib/public/Collaboration/Resources/IProviderManager.php +++ b/lib/public/Collaboration/Resources/IProviderManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; /** diff --git a/lib/public/Collaboration/Resources/IResource.php b/lib/public/Collaboration/Resources/IResource.php index 7505bd69d86..20148090d64 100644 --- a/lib/public/Collaboration/Resources/IResource.php +++ b/lib/public/Collaboration/Resources/IResource.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/ResourceException.php b/lib/public/Collaboration/Resources/ResourceException.php index 562207f8e7b..6dd154853b4 100644 --- a/lib/public/Collaboration/Resources/ResourceException.php +++ b/lib/public/Collaboration/Resources/ResourceException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Collaboration\Resources; /** diff --git a/lib/public/Command/IBus.php b/lib/public/Command/IBus.php index 9de5dd8e4b3..54b57b0477c 100644 --- a/lib/public/Command/IBus.php +++ b/lib/public/Command/IBus.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Command; /** diff --git a/lib/public/Command/ICommand.php b/lib/public/Command/ICommand.php index cfe4b1348c9..119778c15d7 100644 --- a/lib/public/Command/ICommand.php +++ b/lib/public/Command/ICommand.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Command; /** diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index 7ae2968ead8..e4b4c78f03c 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; use OCP\EventDispatcher\Event; diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php index 9090425aae5..244df0243f7 100644 --- a/lib/public/Comments/CommentsEvent.php +++ b/lib/public/Comments/CommentsEvent.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; use OCP\EventDispatcher\Event; diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php index fb8c1facfdd..b9747aefb5b 100644 --- a/lib/public/Comments/IComment.php +++ b/lib/public/Comments/IComment.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; /** diff --git a/lib/public/Comments/ICommentsEventHandler.php b/lib/public/Comments/ICommentsEventHandler.php index 38939fefd5b..4e19a3aaadc 100644 --- a/lib/public/Comments/ICommentsEventHandler.php +++ b/lib/public/Comments/ICommentsEventHandler.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Comments; /** diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index aabacec9202..64bb98db478 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -5,7 +5,7 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; use OCP\IUser; diff --git a/lib/public/Comments/ICommentsManagerFactory.php b/lib/public/Comments/ICommentsManagerFactory.php index 3b939297573..e6f69807b05 100644 --- a/lib/public/Comments/ICommentsManagerFactory.php +++ b/lib/public/Comments/ICommentsManagerFactory.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; use OCP\IServerContainer; diff --git a/lib/public/Comments/IllegalIDChangeException.php b/lib/public/Comments/IllegalIDChangeException.php index f20120bd207..76b0ced6bc6 100644 --- a/lib/public/Comments/IllegalIDChangeException.php +++ b/lib/public/Comments/IllegalIDChangeException.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; /** diff --git a/lib/public/Comments/MessageTooLongException.php b/lib/public/Comments/MessageTooLongException.php index b6152291755..39d86881183 100644 --- a/lib/public/Comments/MessageTooLongException.php +++ b/lib/public/Comments/MessageTooLongException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; /** diff --git a/lib/public/Comments/NotFoundException.php b/lib/public/Comments/NotFoundException.php index 9e86b7ff27f..e9f7a07aa52 100644 --- a/lib/public/Comments/NotFoundException.php +++ b/lib/public/Comments/NotFoundException.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Comments; /** diff --git a/lib/public/Console/ConsoleEvent.php b/lib/public/Console/ConsoleEvent.php index a12d65c3b15..803cf761c0c 100644 --- a/lib/public/Console/ConsoleEvent.php +++ b/lib/public/Console/ConsoleEvent.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Console; use OCP\EventDispatcher\Event; diff --git a/lib/public/Constants.php b/lib/public/Constants.php index 86e1fb6c538..6a38190e167 100644 --- a/lib/public/Constants.php +++ b/lib/public/Constants.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -25,9 +28,7 @@ * */ -/** - * This file defines common constants used in ownCloud - */ +// This file defines common constants used in ownCloud namespace OCP; diff --git a/lib/public/Contacts/ContactsMenu/IAction.php b/lib/public/Contacts/ContactsMenu/IAction.php index ad2780fcf5b..9b08bbbf04b 100644 --- a/lib/public/Contacts/ContactsMenu/IAction.php +++ b/lib/public/Contacts/ContactsMenu/IAction.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Contacts\ContactsMenu; use JsonSerializable; @@ -61,4 +60,16 @@ interface IAction extends JsonSerializable { * @since 12.0 */ public function getPriority(); + + /** + * @param string $appId + * @since 23.0.0 + */ + public function setAppId(string $appId); + + /** + * @return string + * @since 23.0.0 + */ + public function getAppId(): string; } diff --git a/lib/public/Contacts/ContactsMenu/IActionFactory.php b/lib/public/Contacts/ContactsMenu/IActionFactory.php index 18f12359ea1..b4e4eb96819 100644 --- a/lib/public/Contacts/ContactsMenu/IActionFactory.php +++ b/lib/public/Contacts/ContactsMenu/IActionFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Contacts\ContactsMenu; /** @@ -36,9 +35,10 @@ interface IActionFactory { * @param string $icon full path to the action's icon * @param string $name localized name of the action * @param string $href target URL + * @param string $appId the app ID registering the action * @return ILinkAction */ - public function newLinkAction($icon, $name, $href); + public function newLinkAction(string $icon, string $name, string $href, string $appId = ''): ILinkAction; /** * Construct and return a new email action for the contacts menu @@ -48,7 +48,8 @@ interface IActionFactory { * @param string $icon full path to the action's icon * @param string $name localized name of the action * @param string $email target e-mail address + * @param string $appId the appName registering the action * @return ILinkAction */ - public function newEMailAction($icon, $name, $email); + public function newEMailAction(string $icon, string $name, string $email, string $appId = ''): ILinkAction; } diff --git a/lib/public/Contacts/ContactsMenu/IContactsStore.php b/lib/public/Contacts/ContactsMenu/IContactsStore.php index 6fc8d788d9f..3aa51888450 100644 --- a/lib/public/Contacts/ContactsMenu/IContactsStore.php +++ b/lib/public/Contacts/ContactsMenu/IContactsStore.php @@ -1,6 +1,6 @@ <?php /** - * + * @copyright Copyright (c) 2016 Tobia De Koninck <tobia@ledfan.be> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> @@ -15,7 +15,7 @@ * * 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 + * 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 diff --git a/lib/public/Contacts/ContactsMenu/IEntry.php b/lib/public/Contacts/ContactsMenu/IEntry.php index 45517885574..d4e3e31cf79 100644 --- a/lib/public/Contacts/ContactsMenu/IEntry.php +++ b/lib/public/Contacts/ContactsMenu/IEntry.php @@ -3,6 +3,7 @@ * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -13,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Contacts\ContactsMenu; use JsonSerializable; diff --git a/lib/public/Contacts/ContactsMenu/ILinkAction.php b/lib/public/Contacts/ContactsMenu/ILinkAction.php index 4febf5486ea..63e77f5446f 100644 --- a/lib/public/Contacts/ContactsMenu/ILinkAction.php +++ b/lib/public/Contacts/ContactsMenu/ILinkAction.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Contacts\ContactsMenu; /** diff --git a/lib/public/Contacts/ContactsMenu/IProvider.php b/lib/public/Contacts/ContactsMenu/IProvider.php index 07ce602b917..c6c695c5698 100644 --- a/lib/public/Contacts/ContactsMenu/IProvider.php +++ b/lib/public/Contacts/ContactsMenu/IProvider.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Contacts\ContactsMenu; /** diff --git a/lib/public/Contacts/Events/ContactInteractedWithEvent.php b/lib/public/Contacts/Events/ContactInteractedWithEvent.php index 1888b7606bf..b879c89a730 100644 --- a/lib/public/Contacts/Events/ContactInteractedWithEvent.php +++ b/lib/public/Contacts/Events/ContactInteractedWithEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Contacts\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php index eba3d604ca3..8d24249e997 100644 --- a/lib/public/Contacts/IManager.php +++ b/lib/public/Contacts/IManager.php @@ -2,9 +2,10 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Anna Larch <anna@nextcloud.com> * @author Arne Hamann <kontakt+github@arne.email> * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -25,13 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Contacts Class - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/DB/Exception.php b/lib/public/DB/Exception.php index 1154530e85d..d9d11e308d6 100644 --- a/lib/public/DB/Exception.php +++ b/lib/public/DB/Exception.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OCP\DB; use Exception as BaseException; diff --git a/lib/public/DB/IPreparedStatement.php b/lib/public/DB/IPreparedStatement.php index 6b6617ba5ea..2fadff5da3f 100644 --- a/lib/public/DB/IPreparedStatement.php +++ b/lib/public/DB/IPreparedStatement.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OCP\DB; use Doctrine\DBAL\Exception; diff --git a/lib/public/DB/IResult.php b/lib/public/DB/IResult.php index 10c788ebbf6..76f8cf26601 100644 --- a/lib/public/DB/IResult.php +++ b/lib/public/DB/IResult.php @@ -2,10 +2,11 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OCP\DB; use PDO; @@ -66,7 +67,7 @@ interface IResult { public function fetchColumn(); /** - * @param int $columnIndex + * Returns the first value of the next row of the result or FALSE if there are no more rows. * * @return false|mixed * diff --git a/lib/public/DB/ISchemaWrapper.php b/lib/public/DB/ISchemaWrapper.php index 3d58a10d2d2..82e4205f1b3 100644 --- a/lib/public/DB/ISchemaWrapper.php +++ b/lib/public/DB/ISchemaWrapper.php @@ -13,16 +13,18 @@ * * 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 + * 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/>. * */ - namespace OCP\DB; +use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\AbstractPlatform; + /** * Interface ISchemaWrapper * @@ -82,7 +84,7 @@ interface ISchemaWrapper { * @since 13.0.0 */ public function getTableNames(); - + /** * Gets all table names * @@ -90,4 +92,14 @@ interface ISchemaWrapper { * @since 13.0.0 */ public function getTableNamesWithoutPrefix(); + + /** + * Gets the DatabasePlatform for the database. + * + * @return AbstractPlatform + * + * @throws Exception + * @since 23.0.0 + */ + public function getDatabasePlatform(); } diff --git a/lib/public/DB/QueryBuilder/ICompositeExpression.php b/lib/public/DB/QueryBuilder/ICompositeExpression.php index c50dedf1797..56716c628b0 100644 --- a/lib/public/DB/QueryBuilder/ICompositeExpression.php +++ b/lib/public/DB/QueryBuilder/ICompositeExpression.php @@ -2,7 +2,6 @@ /** * @copyright Copyright (c) 2016, ownCloud, Inc. * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * @@ -21,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index dcba559a96b..77701240d51 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -5,7 +5,7 @@ * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Joas Schilling <coding@schilljs.com> - * @author Robin Appelman <robin@icewind.nl> + * @author Lukas Reschke <lukas@statuscode.ch> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\DB\QueryBuilder; use Doctrine\DBAL\Query\Expression\ExpressionBuilder; @@ -432,7 +431,7 @@ interface IExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction * @since 9.0.0 @@ -440,5 +439,5 @@ interface IExpressionBuilder { * @psalm-taint-sink sql $column * @psalm-taint-sink sql $type */ - public function castColumn(string $column, $type): IQueryFunction; + public function castColumn($column, $type): IQueryFunction; } diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php index 569bc7485d4..33d0fbe3b1a 100644 --- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php +++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/ILiteral.php b/lib/public/DB/QueryBuilder/ILiteral.php index 8fe5c62d3f8..fbd175470ac 100644 --- a/lib/public/DB/QueryBuilder/ILiteral.php +++ b/lib/public/DB/QueryBuilder/ILiteral.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IParameter.php b/lib/public/DB/QueryBuilder/IParameter.php index 1636dd8c438..3344a9c56ce 100644 --- a/lib/public/DB/QueryBuilder/IParameter.php +++ b/lib/public/DB/QueryBuilder/IParameter.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index a4f3f3b10b0..5d1116075d8 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -25,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\DB\QueryBuilder; use Doctrine\DBAL\Connection; @@ -149,7 +148,7 @@ interface IQueryBuilder { /** * Executes this query using the bound parameters and their types. * - * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeUpdate} + * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeStatement} * for insert, update and delete statements. * * Warning: until Nextcloud 20, this method could return a \Doctrine\DBAL\Driver\Statement but since @@ -159,7 +158,7 @@ interface IQueryBuilder { * @return IResult|int * @throws Exception since 21.0.0 * @since 8.2.0 - * @deprecated 22.0.0 Use executeQuery or executeUpdate + * @deprecated 22.0.0 Use executeQuery or executeStatement */ public function execute(); @@ -175,15 +174,15 @@ interface IQueryBuilder { public function executeQuery(): IResult; /** - * Execute for insert, update and delete statements + * Execute insert, update and delete statements * - * @return int + * @return int the number of affected rows * @since 22.0.0 * * @throws Exception * @throws \RuntimeException in case of usage with select query */ - public function executeUpdate(): int; + public function executeStatement(): int; /** * Gets the complete SQL string formed by the current specifications of this QueryBuilder. @@ -290,9 +289,9 @@ interface IQueryBuilder { /** * Gets the position of the first result the query object was set to retrieve (the "offset"). - * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder. + * Returns 0 if {@link setFirstResult} was not applied to this QueryBuilder. * - * @return integer The position of the first result. + * @return int The position of the first result. * @since 8.2.0 */ public function getFirstResult(); diff --git a/lib/public/DB/QueryBuilder/IQueryFunction.php b/lib/public/DB/QueryBuilder/IQueryFunction.php index 22ac6081f1f..d76f964fafd 100644 --- a/lib/public/DB/QueryBuilder/IQueryFunction.php +++ b/lib/public/DB/QueryBuilder/IQueryFunction.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/Types.php b/lib/public/DB/Types.php index 2fb1c13a529..4636ac3389f 100644 --- a/lib/public/DB/Types.php +++ b/lib/public/DB/Types.php @@ -2,10 +2,10 @@ declare(strict_types=1); -/* +/** * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,13 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ - namespace OCP\DB; /** diff --git a/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php b/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php index e42f8b28d07..854848da5b7 100644 --- a/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php +++ b/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Exceptions; /** diff --git a/lib/public/Dashboard/IAPIWidget.php b/lib/public/Dashboard/IAPIWidget.php new file mode 100644 index 00000000000..42ba9544d8a --- /dev/null +++ b/lib/public/Dashboard/IAPIWidget.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Julien Veyssier <eneiluj@posteo.net> + * + * @author Julien Veyssier <eneiluj@posteo.net> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OCP\Dashboard; + +/** + * interface IAPIWidget + * + * @since 22.0.0 + */ +interface IAPIWidget extends IWidget { + + /** + * @return \OCP\Dashboard\Model\WidgetItem[] The widget items + * @since 22.0.0 + */ + public function getItems(string $userId, ?string $since = null, int $limit = 7): array; +} diff --git a/lib/public/Dashboard/IDashboardManager.php b/lib/public/Dashboard/IDashboardManager.php index eaf5b9936c6..46f31cd8ff4 100644 --- a/lib/public/Dashboard/IDashboardManager.php +++ b/lib/public/Dashboard/IDashboardManager.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard; use OCP\Dashboard\Exceptions\DashboardAppNotAvailableException; diff --git a/lib/public/Dashboard/IDashboardWidget.php b/lib/public/Dashboard/IDashboardWidget.php index 36886de2069..fc7de4dae98 100644 --- a/lib/public/Dashboard/IDashboardWidget.php +++ b/lib/public/Dashboard/IDashboardWidget.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard; use OCP\Dashboard\Model\IWidgetConfig; diff --git a/lib/public/Dashboard/IManager.php b/lib/public/Dashboard/IManager.php index 065ab128c3c..396624876ef 100644 --- a/lib/public/Dashboard/IManager.php +++ b/lib/public/Dashboard/IManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard; /** diff --git a/lib/public/Dashboard/IWidget.php b/lib/public/Dashboard/IWidget.php index dbfcb5d0848..6f3f795f958 100644 --- a/lib/public/Dashboard/IWidget.php +++ b/lib/public/Dashboard/IWidget.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard; /** diff --git a/lib/public/Dashboard/Model/IWidgetConfig.php b/lib/public/Dashboard/Model/IWidgetConfig.php index 995ba083c02..b117660c441 100644 --- a/lib/public/Dashboard/Model/IWidgetConfig.php +++ b/lib/public/Dashboard/Model/IWidgetConfig.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Model; use OCP\Dashboard\IDashboardWidget; diff --git a/lib/public/Dashboard/Model/IWidgetRequest.php b/lib/public/Dashboard/Model/IWidgetRequest.php index ca22c39d3d8..73fe5fc5c2c 100644 --- a/lib/public/Dashboard/Model/IWidgetRequest.php +++ b/lib/public/Dashboard/Model/IWidgetRequest.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Model; use OCP\Dashboard\IDashboardWidget; diff --git a/lib/public/Dashboard/Model/WidgetItem.php b/lib/public/Dashboard/Model/WidgetItem.php new file mode 100644 index 00000000000..2bea9b93226 --- /dev/null +++ b/lib/public/Dashboard/Model/WidgetItem.php @@ -0,0 +1,149 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021, Julien Veyssier <eneiluj@posteo.net> + * + * @author Julien Veyssier <eneiluj@posteo.net> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OCP\Dashboard\Model; + +use JsonSerializable; + +/** + * Interface WidgetItem + * + * This class is used by IAPIWidget interface. + * It represents an widget item data that can be provided to clients via the Dashboard API + * @see IAPIWidget::getWidgetItems + * + * @since 22.0.0 + * + */ +final class WidgetItem implements JsonSerializable { + /** @var string */ + private $title = ''; + + /** @var string */ + private $subtitle = ''; + + /** @var string */ + private $link = ''; + + /** @var string */ + private $iconUrl = ''; + + /** @var string + * Timestamp or ID used by the dashboard API to avoid getting already retrieved items + */ + private $sinceId = ''; + + + /** + * WidgetItem constructor + * + * @since 22.0.0 + * + * @param string $type + */ + public function __construct(string $title = '', + string $subtitle = '', + string $link = '', + string $iconUrl = '', + string $sinceId = '') { + $this->title = $title; + $this->subtitle = $subtitle; + $this->iconUrl = $iconUrl; + $this->link = $link; + $this->sinceId = $sinceId; + } + + /** + * Get the item title + * + * @since 22.0.0 + * + * @return string + */ + public function getTitle(): string { + return $this->title; + } + + /** + * Get the item subtitle + * + * @since 22.0.0 + * + * @return string + */ + public function getSubtitle(): string { + return $this->subtitle; + } + + /** + * Get the item link + * + * @since 22.0.0 + * + * @return string + */ + public function getLink(): string { + return $this->link; + } + + /** + * Get the item icon URL + * The icon should be a square svg or a jpg/png of at least 44x44px + * + * @since 22.0.0 + * + * @return string + */ + public function getIconUrl(): string { + return $this->iconUrl; + } + + /** + * Get the item since ID + * + * @since 22.0.0 + * + * @return string + */ + public function getSinceId(): string { + return $this->sinceId; + } + + /** + * @since 22.0.0 + * + * @return array + */ + public function jsonSerialize(): array { + return [ + 'subtitle' => $this->getSubtitle(), + 'title' => $this->getTitle(), + 'link' => $this->getLink(), + 'iconUrl' => $this->getIconUrl(), + 'sinceId' => $this->getSinceId(), + ]; + } +} diff --git a/lib/public/Dashboard/Model/WidgetSetting.php b/lib/public/Dashboard/Model/WidgetSetting.php index af7f8c6a720..c456c63f4f5 100644 --- a/lib/public/Dashboard/Model/WidgetSetting.php +++ b/lib/public/Dashboard/Model/WidgetSetting.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Model; use JsonSerializable; diff --git a/lib/public/Dashboard/Model/WidgetSetup.php b/lib/public/Dashboard/Model/WidgetSetup.php index 9ef334ede46..1cc8d9ff561 100644 --- a/lib/public/Dashboard/Model/WidgetSetup.php +++ b/lib/public/Dashboard/Model/WidgetSetup.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Model; use JsonSerializable; diff --git a/lib/public/Dashboard/Model/WidgetTemplate.php b/lib/public/Dashboard/Model/WidgetTemplate.php index 4f358984d3e..e6f9742fed7 100644 --- a/lib/public/Dashboard/Model/WidgetTemplate.php +++ b/lib/public/Dashboard/Model/WidgetTemplate.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Model; use JsonSerializable; diff --git a/lib/public/Dashboard/RegisterWidgetEvent.php b/lib/public/Dashboard/RegisterWidgetEvent.php index 962a8657be2..289de8e965d 100644 --- a/lib/public/Dashboard/RegisterWidgetEvent.php +++ b/lib/public/Dashboard/RegisterWidgetEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard; use OCP\EventDispatcher\Event; diff --git a/lib/public/Dashboard/Service/IEventsService.php b/lib/public/Dashboard/Service/IEventsService.php index 788d61a4aff..a2a14e8c1c1 100644 --- a/lib/public/Dashboard/Service/IEventsService.php +++ b/lib/public/Dashboard/Service/IEventsService.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Service; use OCP\Dashboard\IDashboardManager; diff --git a/lib/public/Dashboard/Service/IWidgetsService.php b/lib/public/Dashboard/Service/IWidgetsService.php index 4d90cb83003..9601a1a478e 100644 --- a/lib/public/Dashboard/Service/IWidgetsService.php +++ b/lib/public/Dashboard/Service/IWidgetsService.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Dashboard\Service; use OCP\Dashboard\Model\IWidgetConfig; diff --git a/lib/public/Defaults.php b/lib/public/Defaults.php index 8f5ed68d189..7c6d73bcaea 100644 --- a/lib/public/Defaults.php +++ b/lib/public/Defaults.php @@ -1,9 +1,14 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Björn Schießle <bjoern@schiessle.org> + * @author J0WI <J0WI@users.noreply.github.com> * @author Joas Schilling <coding@schilljs.com> + * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -24,13 +29,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Defaults Class - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes @@ -65,7 +63,7 @@ class Defaults { * @return string * @since 6.0.0 */ - public function getBaseUrl() { + public function getBaseUrl(): string { return $this->defaults->getBaseUrl(); } @@ -74,7 +72,7 @@ class Defaults { * @return string * @since 6.0.0 */ - public function getSyncClientUrl() { + public function getSyncClientUrl(): string { return $this->defaults->getSyncClientUrl(); } @@ -83,7 +81,7 @@ class Defaults { * @return string * @since 8.0.0 */ - public function getiOSClientUrl() { + public function getiOSClientUrl(): string { return $this->defaults->getiOSClientUrl(); } @@ -92,35 +90,54 @@ class Defaults { * @return string * @since 8.0.0 */ - public function getAndroidClientUrl() { + public function getAndroidClientUrl(): string { return $this->defaults->getAndroidClientUrl(); } /** + * link to the Android client on F-Droid + * @return string + * @since 23.0.0 + */ + public function getFDroidClientUrl() { + return $this->defaults->getFDroidClientUrl(); + } + + /** * base URL to the documentation of your ownCloud instance * @return string * @since 6.0.0 */ - public function getDocBaseUrl() { + public function getDocBaseUrl(): string { return $this->defaults->getDocBaseUrl(); } /** - * name of your ownCloud instance + * name of your Nextcloud instance (e.g. MyPrivateCloud) * @return string * @since 6.0.0 */ - public function getName() { + public function getName(): string { return $this->defaults->getName(); } /** + * Name of the software product (defaults to Nextcloud) + * + * @return string + * @since 22.0.0 + */ + public function getProductName(): string { + return $this->defaults->getProductName(); + } + + /** * name of your ownCloud instance containing HTML styles * @return string * @since 8.0.0 * @depreacted 22.0.0 */ - public function getHTMLName() { + public function getHTMLName(): string { return $this->defaults->getHTMLName(); } @@ -129,7 +146,7 @@ class Defaults { * @return string * @since 6.0.0 */ - public function getEntity() { + public function getEntity(): string { return $this->defaults->getEntity(); } @@ -138,7 +155,7 @@ class Defaults { * @return string * @since 6.0.0 */ - public function getSlogan(?string $lang = null) { + public function getSlogan(?string $lang = null): string { return $this->defaults->getSlogan($lang); } @@ -147,7 +164,7 @@ class Defaults { * @return string * @since 6.0.0 */ - public function getShortFooter() { + public function getShortFooter(): string { return $this->defaults->getShortFooter(); } @@ -156,7 +173,7 @@ class Defaults { * @return string * @since 6.0.0 */ - public function getLongFooter() { + public function getLongFooter(): string { return $this->defaults->getLongFooter(); } @@ -165,7 +182,7 @@ class Defaults { * @return string AppId * @since 8.0.0 */ - public function getiTunesAppId() { + public function getiTunesAppId(): string { return $this->defaults->getiTunesAppId(); } @@ -176,7 +193,7 @@ class Defaults { * @return string * @since 12.0.0 */ - public function getLogo($useSvg = true) { + public function getLogo(bool $useSvg = true): string { return $this->defaults->getLogo($useSvg); } @@ -185,7 +202,7 @@ class Defaults { * @return string * @since 12.0.0 */ - public function getColorPrimary() { + public function getColorPrimary(): string { return $this->defaults->getColorPrimary(); } @@ -194,7 +211,7 @@ class Defaults { * @return string URL to doc with key * @since 12.0.0 */ - public function buildDocLinkToKey($key) { + public function buildDocLinkToKey(string $key): string { return $this->defaults->buildDocLinkToKey($key); } @@ -203,7 +220,7 @@ class Defaults { * @return string title * @since 12.0.0 */ - public function getTitle() { + public function getTitle(): string { return $this->defaults->getTitle(); } @@ -212,7 +229,7 @@ class Defaults { * @return string * @since 13.0.0 */ - public function getTextColorPrimary() { + public function getTextColorPrimary(): string { return $this->defaults->getTextColorPrimary(); } } diff --git a/lib/public/Diagnostics/IEvent.php b/lib/public/Diagnostics/IEvent.php index bfbf5614a10..f30717bdeca 100644 --- a/lib/public/Diagnostics/IEvent.php +++ b/lib/public/Diagnostics/IEvent.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Diagnostics; /** diff --git a/lib/public/Diagnostics/IEventLogger.php b/lib/public/Diagnostics/IEventLogger.php index dcdfcad2574..aecc0e5faec 100644 --- a/lib/public/Diagnostics/IEventLogger.php +++ b/lib/public/Diagnostics/IEventLogger.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Diagnostics; /** diff --git a/lib/public/Diagnostics/IQuery.php b/lib/public/Diagnostics/IQuery.php index c33b1b5aa20..a3e6ec23d58 100644 --- a/lib/public/Diagnostics/IQuery.php +++ b/lib/public/Diagnostics/IQuery.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Diagnostics; /** diff --git a/lib/public/Diagnostics/IQueryLogger.php b/lib/public/Diagnostics/IQueryLogger.php index c229837a2af..ba4c97f5b50 100644 --- a/lib/public/Diagnostics/IQueryLogger.php +++ b/lib/public/Diagnostics/IQueryLogger.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Diagnostics; use Doctrine\DBAL\Logging\SQLLogger; diff --git a/lib/public/DirectEditing/ACreateEmpty.php b/lib/public/DirectEditing/ACreateEmpty.php index cbb17d5d3e2..263663c7907 100644 --- a/lib/public/DirectEditing/ACreateEmpty.php +++ b/lib/public/DirectEditing/ACreateEmpty.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; use OCP\Files\File; diff --git a/lib/public/DirectEditing/ACreateFromTemplate.php b/lib/public/DirectEditing/ACreateFromTemplate.php index 43a21fdf4e9..0bdebc3e2d1 100644 --- a/lib/public/DirectEditing/ACreateFromTemplate.php +++ b/lib/public/DirectEditing/ACreateFromTemplate.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; /** diff --git a/lib/public/DirectEditing/ATemplate.php b/lib/public/DirectEditing/ATemplate.php index 82e86e8730e..c38fc898dab 100644 --- a/lib/public/DirectEditing/ATemplate.php +++ b/lib/public/DirectEditing/ATemplate.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; use JsonSerializable; diff --git a/lib/public/DirectEditing/IEditor.php b/lib/public/DirectEditing/IEditor.php index 22ec130aee0..f3b0de07e5b 100644 --- a/lib/public/DirectEditing/IEditor.php +++ b/lib/public/DirectEditing/IEditor.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; use OCP\AppFramework\Http\Response; diff --git a/lib/public/DirectEditing/IManager.php b/lib/public/DirectEditing/IManager.php index ce39d014193..90ca94e6535 100644 --- a/lib/public/DirectEditing/IManager.php +++ b/lib/public/DirectEditing/IManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; use OCP\AppFramework\Http\Response; diff --git a/lib/public/DirectEditing/IToken.php b/lib/public/DirectEditing/IToken.php index 511b12d4aed..502ef7f5032 100644 --- a/lib/public/DirectEditing/IToken.php +++ b/lib/public/DirectEditing/IToken.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; use OCP\Files\File; diff --git a/lib/public/DirectEditing/RegisterDirectEditorEvent.php b/lib/public/DirectEditing/RegisterDirectEditorEvent.php index cce9649ce0d..ed9a450d5e6 100644 --- a/lib/public/DirectEditing/RegisterDirectEditorEvent.php +++ b/lib/public/DirectEditing/RegisterDirectEditorEvent.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\DirectEditing; use OCP\EventDispatcher\Event; diff --git a/lib/public/Encryption/Exceptions/GenericEncryptionException.php b/lib/public/Encryption/Exceptions/GenericEncryptionException.php index 6e50c31d851..aef4114bb1b 100644 --- a/lib/public/Encryption/Exceptions/GenericEncryptionException.php +++ b/lib/public/Encryption/Exceptions/GenericEncryptionException.php @@ -24,10 +24,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Encryption\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class GenericEncryptionException diff --git a/lib/public/Encryption/IEncryptionModule.php b/lib/public/Encryption/IEncryptionModule.php index 050cdf2555b..058256e4850 100644 --- a/lib/public/Encryption/IEncryptionModule.php +++ b/lib/public/Encryption/IEncryptionModule.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Encryption; use Symfony\Component\Console\Input\InputInterface; diff --git a/lib/public/Encryption/IFile.php b/lib/public/Encryption/IFile.php index 6819cdcf642..ab2b46a5ce4 100644 --- a/lib/public/Encryption/IFile.php +++ b/lib/public/Encryption/IFile.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Encryption; /** diff --git a/lib/public/Encryption/IManager.php b/lib/public/Encryption/IManager.php index 1d824ab6a62..1a745716209 100644 --- a/lib/public/Encryption/IManager.php +++ b/lib/public/Encryption/IManager.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Encryption; use OC\Encryption\Exceptions\ModuleAlreadyExistsException; diff --git a/lib/public/Encryption/Keys/IStorage.php b/lib/public/Encryption/Keys/IStorage.php index aa9f3aae3e7..ae1449c7fdf 100644 --- a/lib/public/Encryption/Keys/IStorage.php +++ b/lib/public/Encryption/Keys/IStorage.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Encryption\Keys; /** diff --git a/lib/public/EventDispatcher/ABroadcastedEvent.php b/lib/public/EventDispatcher/ABroadcastedEvent.php index 5e6e18a80d4..3e41d316b9c 100644 --- a/lib/public/EventDispatcher/ABroadcastedEvent.php +++ b/lib/public/EventDispatcher/ABroadcastedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\EventDispatcher; use JsonSerializable; diff --git a/lib/public/EventDispatcher/Event.php b/lib/public/EventDispatcher/Event.php index b07efba0f19..92f18a4fa43 100644 --- a/lib/public/EventDispatcher/Event.php +++ b/lib/public/EventDispatcher/Event.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\EventDispatcher; use Psr\EventDispatcher\StoppableEventInterface; diff --git a/lib/public/EventDispatcher/GenericEvent.php b/lib/public/EventDispatcher/GenericEvent.php index eda7fdf0997..e78ae1827a1 100644 --- a/lib/public/EventDispatcher/GenericEvent.php +++ b/lib/public/EventDispatcher/GenericEvent.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * * @license GNU AGPL version 3 or any later version * @@ -16,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\EventDispatcher; use ArrayAccess; diff --git a/lib/public/EventDispatcher/IEventDispatcher.php b/lib/public/EventDispatcher/IEventDispatcher.php index f38c0828bce..82505b6a512 100644 --- a/lib/public/EventDispatcher/IEventDispatcher.php +++ b/lib/public/EventDispatcher/IEventDispatcher.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\EventDispatcher; /** diff --git a/lib/public/EventDispatcher/IEventListener.php b/lib/public/EventDispatcher/IEventListener.php index fcf44133aff..638e0570ca0 100644 --- a/lib/public/EventDispatcher/IEventListener.php +++ b/lib/public/EventDispatcher/IEventListener.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\EventDispatcher; /** diff --git a/lib/public/Federation/Exceptions/ActionNotSupportedException.php b/lib/public/Federation/Exceptions/ActionNotSupportedException.php index df54ce22f97..7b2ca3d9597 100644 --- a/lib/public/Federation/Exceptions/ActionNotSupportedException.php +++ b/lib/public/Federation/Exceptions/ActionNotSupportedException.php @@ -13,17 +13,16 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class ActionNotSupportedException diff --git a/lib/public/Federation/Exceptions/AuthenticationFailedException.php b/lib/public/Federation/Exceptions/AuthenticationFailedException.php index 5ddac52c130..dfcd9636035 100644 --- a/lib/public/Federation/Exceptions/AuthenticationFailedException.php +++ b/lib/public/Federation/Exceptions/AuthenticationFailedException.php @@ -13,17 +13,16 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class AuthenticationFailedException diff --git a/lib/public/Federation/Exceptions/BadRequestException.php b/lib/public/Federation/Exceptions/BadRequestException.php index 850f84f1e90..8054c0e89f0 100644 --- a/lib/public/Federation/Exceptions/BadRequestException.php +++ b/lib/public/Federation/Exceptions/BadRequestException.php @@ -14,17 +14,16 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class BadRequestException diff --git a/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php b/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php index e7e1d859db0..b6d4b7e9bce 100644 --- a/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php +++ b/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php @@ -15,17 +15,16 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class ProviderAlreadyExistsException diff --git a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php index a7d9b403175..efcc8788386 100644 --- a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php +++ b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php @@ -13,18 +13,17 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation\Exceptions; -use OC\HintException; use OCP\AppFramework\Http; +use OCP\HintException; /** * Class ProviderCouldNotAddShareException diff --git a/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php b/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php index 2f3471f981b..69c69f17d99 100644 --- a/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php +++ b/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php @@ -13,17 +13,16 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class ProviderDoesNotExistsException diff --git a/lib/public/Federation/ICloudFederationFactory.php b/lib/public/Federation/ICloudFederationFactory.php index 13c2d4cf479..d92e9f6b4ed 100644 --- a/lib/public/Federation/ICloudFederationFactory.php +++ b/lib/public/Federation/ICloudFederationFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudFederationNotification.php b/lib/public/Federation/ICloudFederationNotification.php index 79712ccc7db..b8fec05d6d2 100644 --- a/lib/public/Federation/ICloudFederationNotification.php +++ b/lib/public/Federation/ICloudFederationNotification.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudFederationProvider.php b/lib/public/Federation/ICloudFederationProvider.php index f53dff23efd..2e9d58fcb3e 100644 --- a/lib/public/Federation/ICloudFederationProvider.php +++ b/lib/public/Federation/ICloudFederationProvider.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation; use OCP\Federation\Exceptions\ActionNotSupportedException; diff --git a/lib/public/Federation/ICloudFederationProviderManager.php b/lib/public/Federation/ICloudFederationProviderManager.php index 133683984b8..e607b0555ab 100644 --- a/lib/public/Federation/ICloudFederationProviderManager.php +++ b/lib/public/Federation/ICloudFederationProviderManager.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation; /** @@ -90,7 +89,7 @@ interface ICloudFederationProviderManager { * * @param string $url * @param ICloudFederationNotification $notification - * @return mixed + * @return array|false * * @since 14.0.0 */ diff --git a/lib/public/Federation/ICloudFederationShare.php b/lib/public/Federation/ICloudFederationShare.php index dd8c3258668..892a47e8186 100644 --- a/lib/public/Federation/ICloudFederationShare.php +++ b/lib/public/Federation/ICloudFederationShare.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudId.php b/lib/public/Federation/ICloudId.php index 1399a08188c..89c978a0940 100644 --- a/lib/public/Federation/ICloudId.php +++ b/lib/public/Federation/ICloudId.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudIdManager.php b/lib/public/Federation/ICloudIdManager.php index b5821721ff8..1612c03ba4a 100644 --- a/lib/public/Federation/ICloudIdManager.php +++ b/lib/public/Federation/ICloudIdManager.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Federation; /** @@ -47,12 +46,12 @@ interface ICloudIdManager { * Get the cloud id for a remote user * * @param string $user - * @param string $remote + * @param string|null $remote (optional since 23.0.0 for local users) * @return ICloudId * * @since 12.0.0 */ - public function getCloudId(string $user, string $remote): ICloudId; + public function getCloudId(string $user, ?string $remote): ICloudId; /** * Check if the input is a correctly formatted cloud id diff --git a/lib/public/Files.php b/lib/public/Files.php index 0adaeaafd2c..c078f57b2c3 100644 --- a/lib/public/Files.php +++ b/lib/public/Files.php @@ -30,13 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files Class - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/AlreadyExistsException.php b/lib/public/Files/AlreadyExistsException.php index ede7c446f49..4e4e2cc505d 100644 --- a/lib/public/Files/AlreadyExistsException.php +++ b/lib/public/Files/AlreadyExistsException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/AlreadyExistsException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Cache/AbstractCacheEvent.php b/lib/public/Files/Cache/AbstractCacheEvent.php index 31d31699804..4b2daf6bfc0 100644 --- a/lib/public/Files/Cache/AbstractCacheEvent.php +++ b/lib/public/Files/Cache/AbstractCacheEvent.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Cache/CacheEntryInsertedEvent.php b/lib/public/Files/Cache/CacheEntryInsertedEvent.php index 5c57103259e..c3aa5f0a598 100644 --- a/lib/public/Files/Cache/CacheEntryInsertedEvent.php +++ b/lib/public/Files/Cache/CacheEntryInsertedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/CacheEntryRemovedEvent.php b/lib/public/Files/Cache/CacheEntryRemovedEvent.php index 92075e4282b..f4009fde81c 100644 --- a/lib/public/Files/Cache/CacheEntryRemovedEvent.php +++ b/lib/public/Files/Cache/CacheEntryRemovedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/CacheEntryUpdatedEvent.php b/lib/public/Files/Cache/CacheEntryUpdatedEvent.php index 94b1dd7a8b3..91f4d17cc6a 100644 --- a/lib/public/Files/Cache/CacheEntryUpdatedEvent.php +++ b/lib/public/Files/Cache/CacheEntryUpdatedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/CacheInsertEvent.php b/lib/public/Files/Cache/CacheInsertEvent.php index 08ab15f9a2d..3c2210c964e 100644 --- a/lib/public/Files/Cache/CacheInsertEvent.php +++ b/lib/public/Files/Cache/CacheInsertEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/CacheUpdateEvent.php b/lib/public/Files/Cache/CacheUpdateEvent.php index 54397045398..5903d18f965 100644 --- a/lib/public/Files/Cache/CacheUpdateEvent.php +++ b/lib/public/Files/Cache/CacheUpdateEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index 323359dcf68..e27f4207f1e 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -20,9 +20,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Cache; +use OCP\Files\Search\ISearchOperator; use OCP\Files\Search\ISearchQuery; /** @@ -31,8 +31,8 @@ use OCP\Files\Search\ISearchQuery; * The cache stores the metadata for all files and folders in a storage and is kept up to date trough the following mechanisms: * * - Scanner: scans the storage and updates the cache where needed - * - Watcher: checks for changes made to the filesystem outside of the ownCloud instance and rescans files and folder when a change is detected - * - Updater: listens to changes made to the filesystem inside of the ownCloud instance and updates the cache where needed + * - Watcher: checks for changes made to the filesystem outside of the Nextcloud instance and rescans files and folder when a change is detected + * - Updater: listens to changes made to the filesystem inside of the Nextcloud instance and updates the cache where needed * - ChangePropagator: updates the mtime and etags of parent folders whenever a change to the cache is made to the cache by the updater * * @since 9.0.0 @@ -119,7 +119,7 @@ interface ICache { /** * get the file id for a file * - * A file id is a numeric id for a file or folder that's unique within an owncloud instance which stays the same for the lifetime of a file + * A file id is a numeric id for a file or folder that's unique within an Nextcloud instance which stays the same for the lifetime of a file * * File ids are easiest way for apps to store references to a file since unlike paths they are not affected by renames or sharing * @@ -265,4 +265,30 @@ interface ICache { * @since 9.0.0 */ public function normalize($path); + + /** + * Get the query expression required to filter files within this storage. + * + * In the most basic case this is just comparing the storage id + * but storage wrappers can add additional expressions to filter down things further + * + * @return ISearchOperator + * @since 22.0.0 + */ + public function getQueryFilterForStorage(): ISearchOperator; + + /** + * Construct a cache entry from a search result row *if* the entry belongs to this storage. + * + * This method will be called for every item in the search results, including results from different storages. + * It's the responsibility of this method to return `null` for all results that don't belong to this storage. + * + * Additionally some implementations might need to further process the resulting entry such as modifying the path + * or permissions of the result. + * + * @param ICacheEntry $rawEntry + * @return ICacheEntry|null + * @since 22.0.0 + */ + public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry; } diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php index 7a0e22496e0..17eecf89ddb 100644 --- a/lib/public/Files/Cache/ICacheEntry.php +++ b/lib/public/Files/Cache/ICacheEntry.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Cache; use ArrayAccess; diff --git a/lib/public/Files/Cache/ICacheEvent.php b/lib/public/Files/Cache/ICacheEvent.php index 56f6f46df1c..87d9a3a3fe4 100644 --- a/lib/public/Files/Cache/ICacheEvent.php +++ b/lib/public/Files/Cache/ICacheEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Cache; use OCP\Files\Storage\IStorage; diff --git a/lib/public/Files/Cache/IPropagator.php b/lib/public/Files/Cache/IPropagator.php index e5fb875453d..0ff72cd849f 100644 --- a/lib/public/Files/Cache/IPropagator.php +++ b/lib/public/Files/Cache/IPropagator.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Cache; /** @@ -50,7 +49,8 @@ interface IPropagator { /** * @param string $internalPath * @param int $time + * @param int $sizeDifference * @since 9.0.0 */ - public function propagateChange($internalPath, $time); + public function propagateChange($internalPath, $time, $sizeDifference = 0); } diff --git a/lib/public/Files/Cache/IScanner.php b/lib/public/Files/Cache/IScanner.php index 24281e2903d..8a45bfa6de7 100644 --- a/lib/public/Files/Cache/IScanner.php +++ b/lib/public/Files/Cache/IScanner.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/IUpdater.php b/lib/public/Files/Cache/IUpdater.php index 7211b52a9d2..5a776d4be7e 100644 --- a/lib/public/Files/Cache/IUpdater.php +++ b/lib/public/Files/Cache/IUpdater.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Cache; use OCP\Files\Storage\IStorage; diff --git a/lib/public/Files/Cache/IWatcher.php b/lib/public/Files/Cache/IWatcher.php index 9fc37c9b0ba..f70024247d5 100644 --- a/lib/public/Files/Cache/IWatcher.php +++ b/lib/public/Files/Cache/IWatcher.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Config/ICachedMountFileInfo.php b/lib/public/Files/Config/ICachedMountFileInfo.php index 17adf5a4209..4de0a1218b4 100644 --- a/lib/public/Files/Config/ICachedMountFileInfo.php +++ b/lib/public/Files/Config/ICachedMountFileInfo.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Config; /** diff --git a/lib/public/Files/Config/ICachedMountInfo.php b/lib/public/Files/Config/ICachedMountInfo.php index bf7481e2ebb..ba85e506d04 100644 --- a/lib/public/Files/Config/ICachedMountInfo.php +++ b/lib/public/Files/Config/ICachedMountInfo.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Config; use OCP\Files\Node; diff --git a/lib/public/Files/Config/IHomeMountProvider.php b/lib/public/Files/Config/IHomeMountProvider.php index c0d4b0a80f3..00bcd1dbc9f 100644 --- a/lib/public/Files/Config/IHomeMountProvider.php +++ b/lib/public/Files/Config/IHomeMountProvider.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Config; use OCP\Files\Storage\IStorageFactory; diff --git a/lib/public/Files/Config/IMountProvider.php b/lib/public/Files/Config/IMountProvider.php index 629b74b4fe6..6ac7c1acd5a 100644 --- a/lib/public/Files/Config/IMountProvider.php +++ b/lib/public/Files/Config/IMountProvider.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Config; use OCP\Files\Storage\IStorageFactory; diff --git a/lib/public/Files/Config/IMountProviderCollection.php b/lib/public/Files/Config/IMountProviderCollection.php index a4131514662..f845d72cee6 100644 --- a/lib/public/Files/Config/IMountProviderCollection.php +++ b/lib/public/Files/Config/IMountProviderCollection.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Config; use OCP\IUser; diff --git a/lib/public/Files/Config/IRootMountProvider.php b/lib/public/Files/Config/IRootMountProvider.php index 48d2e9722d3..bb6147ac691 100644 --- a/lib/public/Files/Config/IRootMountProvider.php +++ b/lib/public/Files/Config/IRootMountProvider.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Config; use OCP\Files\Storage\IStorageFactory; diff --git a/lib/public/Files/Config/IUserMountCache.php b/lib/public/Files/Config/IUserMountCache.php index cdb95078bc8..08f95990d3c 100644 --- a/lib/public/Files/Config/IUserMountCache.php +++ b/lib/public/Files/Config/IUserMountCache.php @@ -5,6 +5,7 @@ * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> + * @author szaimen <szaimen@e.mail.de> * * @license AGPL-3.0 * @@ -21,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Config; use OCP\Files\Mount\IMountPoint; @@ -111,7 +111,7 @@ interface IUserMountCache { * Get the used space for users * * Note that this only includes the space in their home directory, - * not any incoming shares or external storages. + * not any incoming shares or external storage. * * @param IUser[] $users * @return int[] [$userId => $userSpace] diff --git a/lib/public/Files/EmptyFileNameException.php b/lib/public/Files/EmptyFileNameException.php index 65decb098d5..99708f9afd8 100644 --- a/lib/public/Files/EmptyFileNameException.php +++ b/lib/public/Files/EmptyFileNameException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/EntityTooLargeException.php b/lib/public/Files/EntityTooLargeException.php index 66d924cf54a..04322dd0146 100644 --- a/lib/public/Files/EntityTooLargeException.php +++ b/lib/public/Files/EntityTooLargeException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/EntityTooLargeException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Events/BeforeFileScannedEvent.php b/lib/public/Files/Events/BeforeFileScannedEvent.php index c233c9e4a0e..10aabc4a143 100644 --- a/lib/public/Files/Events/BeforeFileScannedEvent.php +++ b/lib/public/Files/Events/BeforeFileScannedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/BeforeFolderScannedEvent.php b/lib/public/Files/Events/BeforeFolderScannedEvent.php index 5c8c05e9a21..add86ab719c 100644 --- a/lib/public/Files/Events/BeforeFolderScannedEvent.php +++ b/lib/public/Files/Events/BeforeFolderScannedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/FileCacheUpdated.php b/lib/public/Files/Events/FileCacheUpdated.php index f370aec1cf2..28376fc10b9 100644 --- a/lib/public/Files/Events/FileCacheUpdated.php +++ b/lib/public/Files/Events/FileCacheUpdated.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/FileScannedEvent.php b/lib/public/Files/Events/FileScannedEvent.php index 69c0dd3c538..3d6b3020b94 100644 --- a/lib/public/Files/Events/FileScannedEvent.php +++ b/lib/public/Files/Events/FileScannedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/FolderScannedEvent.php b/lib/public/Files/Events/FolderScannedEvent.php index 642d14b4499..82c408daaba 100644 --- a/lib/public/Files/Events/FolderScannedEvent.php +++ b/lib/public/Files/Events/FolderScannedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/Node/AbstractNodeEvent.php b/lib/public/Files/Events/Node/AbstractNodeEvent.php index 2e36e62bb2a..6478d527eee 100644 --- a/lib/public/Files/Events/Node/AbstractNodeEvent.php +++ b/lib/public/Files/Events/Node/AbstractNodeEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/Node/AbstractNodesEvent.php b/lib/public/Files/Events/Node/AbstractNodesEvent.php index e27569a6b89..dd2174f0884 100644 --- a/lib/public/Files/Events/Node/AbstractNodesEvent.php +++ b/lib/public/Files/Events/Node/AbstractNodesEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php b/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php index 23d23d0068d..07c14838b97 100644 --- a/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php b/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php index 30898fd9444..e213956a05f 100644 --- a/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php b/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php index 1d887278bea..316a30fadd8 100644 --- a/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeReadEvent.php b/lib/public/Files/Events/Node/BeforeNodeReadEvent.php index 98724ba65fd..14d0ee7ad8b 100644 --- a/lib/public/Files/Events/Node/BeforeNodeReadEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeReadEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php b/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php index f65e47415d4..efbef03e383 100644 --- a/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php b/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php index 20d69be9b31..2b9e3df566b 100644 --- a/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php b/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php index d13416498db..a9c1f00c0ff 100644 --- a/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeCopiedEvent.php b/lib/public/Files/Events/Node/NodeCopiedEvent.php index 9ce96842a80..ba0f495fd92 100644 --- a/lib/public/Files/Events/Node/NodeCopiedEvent.php +++ b/lib/public/Files/Events/Node/NodeCopiedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeCreatedEvent.php b/lib/public/Files/Events/Node/NodeCreatedEvent.php index 3a6a2d56d65..3b19503ac74 100644 --- a/lib/public/Files/Events/Node/NodeCreatedEvent.php +++ b/lib/public/Files/Events/Node/NodeCreatedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeDeletedEvent.php b/lib/public/Files/Events/Node/NodeDeletedEvent.php index fef6c28651e..b04cf336aa7 100644 --- a/lib/public/Files/Events/Node/NodeDeletedEvent.php +++ b/lib/public/Files/Events/Node/NodeDeletedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeRenamedEvent.php b/lib/public/Files/Events/Node/NodeRenamedEvent.php index eb7072f7048..9194a679e3b 100644 --- a/lib/public/Files/Events/Node/NodeRenamedEvent.php +++ b/lib/public/Files/Events/Node/NodeRenamedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeTouchedEvent.php b/lib/public/Files/Events/Node/NodeTouchedEvent.php index d82b14396c2..236bce9a764 100644 --- a/lib/public/Files/Events/Node/NodeTouchedEvent.php +++ b/lib/public/Files/Events/Node/NodeTouchedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeWrittenEvent.php b/lib/public/Files/Events/Node/NodeWrittenEvent.php index 29806c21f4b..a4862cd8042 100644 --- a/lib/public/Files/Events/Node/NodeWrittenEvent.php +++ b/lib/public/Files/Events/Node/NodeWrittenEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/NodeAddedToCache.php b/lib/public/Files/Events/NodeAddedToCache.php index f1ffd755f68..8699131d4d4 100644 --- a/lib/public/Files/Events/NodeAddedToCache.php +++ b/lib/public/Files/Events/NodeAddedToCache.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/NodeRemovedFromCache.php b/lib/public/Files/Events/NodeRemovedFromCache.php index 0437bc001a7..7c85e5e4586 100644 --- a/lib/public/Files/Events/NodeRemovedFromCache.php +++ b/lib/public/Files/Events/NodeRemovedFromCache.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/File.php b/lib/public/Files/File.php index 79955bbb849..cdb868241b6 100644 --- a/lib/public/Files/File.php +++ b/lib/public/Files/File.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/File interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php index bad67269a50..00b1e78fbac 100644 --- a/lib/public/Files/FileInfo.php +++ b/lib/public/Files/FileInfo.php @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/FileNameTooLongException.php b/lib/public/Files/FileNameTooLongException.php index d1c6c6f9e04..f188eca5193 100644 --- a/lib/public/Files/FileNameTooLongException.php +++ b/lib/public/Files/FileNameTooLongException.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/ReservedWordException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Folder.php b/lib/public/Files/Folder.php index 3e90abdd944..912c5472fac 100644 --- a/lib/public/Files/Folder.php +++ b/lib/public/Files/Folder.php @@ -23,12 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/Folder interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes @@ -55,7 +49,7 @@ interface Folder extends Node { * * @param string $path absolute path of an item in the folder * @throws \OCP\Files\NotFoundException - * @return string + * @return string|null * @since 6.0.0 */ public function getRelativePath($path); diff --git a/lib/public/Files/ForbiddenException.php b/lib/public/Files/ForbiddenException.php index d0f0d10eae1..4b148dde93b 100644 --- a/lib/public/Files/ForbiddenException.php +++ b/lib/public/Files/ForbiddenException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/GenericFileException.php b/lib/public/Files/GenericFileException.php index 780db6fc112..3ee36339c9e 100644 --- a/lib/public/Files/GenericFileException.php +++ b/lib/public/Files/GenericFileException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/IAppData.php b/lib/public/Files/IAppData.php index 8cc54a02fd9..6217f4a263c 100644 --- a/lib/public/Files/IAppData.php +++ b/lib/public/Files/IAppData.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files; use OCP\Files\SimpleFS\ISimpleRoot; diff --git a/lib/public/Files/IHomeStorage.php b/lib/public/Files/IHomeStorage.php index 074e7a09301..0f10d599148 100644 --- a/lib/public/Files/IHomeStorage.php +++ b/lib/public/Files/IHomeStorage.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/Storage interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php index a73b60e19b8..6017360cab0 100644 --- a/lib/public/Files/IMimeTypeDetector.php +++ b/lib/public/Files/IMimeTypeDetector.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/IMimeTypeLoader.php b/lib/public/Files/IMimeTypeLoader.php index 5b54b8c7619..faed18ed7d9 100644 --- a/lib/public/Files/IMimeTypeLoader.php +++ b/lib/public/Files/IMimeTypeLoader.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/IRootFolder.php b/lib/public/Files/IRootFolder.php index eb3c19ce664..f89a0041146 100644 --- a/lib/public/Files/IRootFolder.php +++ b/lib/public/Files/IRootFolder.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; use OC\Hooks\Emitter; diff --git a/lib/public/Files/InvalidCharacterInPathException.php b/lib/public/Files/InvalidCharacterInPathException.php index 57fb2134bb0..b54269e12eb 100644 --- a/lib/public/Files/InvalidCharacterInPathException.php +++ b/lib/public/Files/InvalidCharacterInPathException.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/InvalidCharacterInPathException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/InvalidContentException.php b/lib/public/Files/InvalidContentException.php index 98e79c61fc2..7eee0d46780 100644 --- a/lib/public/Files/InvalidContentException.php +++ b/lib/public/Files/InvalidContentException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/InvalidContentException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/InvalidDirectoryException.php b/lib/public/Files/InvalidDirectoryException.php index dfb428710ea..613d12bd5b5 100644 --- a/lib/public/Files/InvalidDirectoryException.php +++ b/lib/public/Files/InvalidDirectoryException.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/InvalidPathException.php b/lib/public/Files/InvalidPathException.php index 8eaeb2f3bc7..98e886d6fa0 100644 --- a/lib/public/Files/InvalidPathException.php +++ b/lib/public/Files/InvalidPathException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/InvalidPathException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/LockNotAcquiredException.php b/lib/public/Files/LockNotAcquiredException.php index 47539c4979f..4a26878cedf 100644 --- a/lib/public/Files/LockNotAcquiredException.php +++ b/lib/public/Files/LockNotAcquiredException.php @@ -23,12 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/LockNotAcquiredException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Mount/IMountManager.php b/lib/public/Files/Mount/IMountManager.php index e01e3df88a4..1e8c674f8f5 100644 --- a/lib/public/Files/Mount/IMountManager.php +++ b/lib/public/Files/Mount/IMountManager.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Mount; /** diff --git a/lib/public/Files/Mount/IMountPoint.php b/lib/public/Files/Mount/IMountPoint.php index 9b55c764451..601f293fc16 100644 --- a/lib/public/Files/Mount/IMountPoint.php +++ b/lib/public/Files/Mount/IMountPoint.php @@ -4,6 +4,7 @@ * * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> + * @author szaimen <szaimen@e.mail.de> * * @license AGPL-3.0 * @@ -20,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Mount; /** @@ -48,7 +48,7 @@ interface IMountPoint { /** * Get the storage that is mounted * - * @return \OCP\Files\Storage\IStorage + * @return \OCP\Files\Storage\IStorage|null * @since 8.0.0 */ public function getStorage(); @@ -121,7 +121,7 @@ interface IMountPoint { public function getMountId(); /** - * Get the type of mount point, used to distinguish things like shares and external storages + * Get the type of mount point, used to distinguish things like shares and external storage * in the web interface * * @return string diff --git a/lib/public/Files/Node.php b/lib/public/Files/Node.php index 02becc0de34..1e5fc580db3 100644 --- a/lib/public/Files/Node.php +++ b/lib/public/Files/Node.php @@ -25,12 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/Node interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes @@ -69,7 +63,7 @@ interface Node extends FileInfo { public function delete(); /** - * Cope the file or folder to a new location + * Copy the file or folder to a new location * * @param string $targetPath the absolute target path * @return Node diff --git a/lib/public/Files/NotEnoughSpaceException.php b/lib/public/Files/NotEnoughSpaceException.php index 337b86712e7..bf5816448e9 100644 --- a/lib/public/Files/NotEnoughSpaceException.php +++ b/lib/public/Files/NotEnoughSpaceException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/NotEnoughSpaceException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/NotFoundException.php b/lib/public/Files/NotFoundException.php index 853138b9d5e..0caf52d42a5 100644 --- a/lib/public/Files/NotFoundException.php +++ b/lib/public/Files/NotFoundException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/NotFoundException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/NotPermittedException.php b/lib/public/Files/NotPermittedException.php index 661f7c2ce44..e69a9bf4f92 100644 --- a/lib/public/Files/NotPermittedException.php +++ b/lib/public/Files/NotPermittedException.php @@ -22,12 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/NotPermittedException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Notify/IChange.php b/lib/public/Files/Notify/IChange.php index dd9fbc64bee..2a4f806be46 100644 --- a/lib/public/Files/Notify/IChange.php +++ b/lib/public/Files/Notify/IChange.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Notify; /** diff --git a/lib/public/Files/Notify/INotifyHandler.php b/lib/public/Files/Notify/INotifyHandler.php index 80cd3e08165..dd819982f9e 100644 --- a/lib/public/Files/Notify/INotifyHandler.php +++ b/lib/public/Files/Notify/INotifyHandler.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Notify; /** diff --git a/lib/public/Files/Notify/IRenameChange.php b/lib/public/Files/Notify/IRenameChange.php index 7630d40aed8..e45880b69f4 100644 --- a/lib/public/Files/Notify/IRenameChange.php +++ b/lib/public/Files/Notify/IRenameChange.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Notify; /** diff --git a/lib/public/Files/ObjectStore/IObjectStore.php b/lib/public/Files/ObjectStore/IObjectStore.php index e9d948682f8..924141a3d4b 100644 --- a/lib/public/Files/ObjectStore/IObjectStore.php +++ b/lib/public/Files/ObjectStore/IObjectStore.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\ObjectStore; use OCP\Files\NotFoundException; @@ -52,10 +51,11 @@ interface IObjectStore { /** * @param string $urn the unified resource name used to identify the object * @param resource $stream stream with the data to write + * @param string|null $mimetype the mimetype to set for the remove object @since 22.0.0 * @throws \Exception when something goes wrong, message will be logged * @since 7.0.0 */ - public function writeObject($urn, $stream); + public function writeObject($urn, $stream, string $mimetype = null); /** * @param string $urn the unified resource name used to identify the object diff --git a/lib/public/Files/ReservedWordException.php b/lib/public/Files/ReservedWordException.php index 81f25fb4366..fd4a26808fb 100644 --- a/lib/public/Files/ReservedWordException.php +++ b/lib/public/Files/ReservedWordException.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/ReservedWordException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Search/ISearchBinaryOperator.php b/lib/public/Files/Search/ISearchBinaryOperator.php index d02ec9f36bd..4b3bbfd21fc 100644 --- a/lib/public/Files/Search/ISearchBinaryOperator.php +++ b/lib/public/Files/Search/ISearchBinaryOperator.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Search; /** diff --git a/lib/public/Files/Search/ISearchComparison.php b/lib/public/Files/Search/ISearchComparison.php index 6fb09433c92..8ebaeced304 100644 --- a/lib/public/Files/Search/ISearchComparison.php +++ b/lib/public/Files/Search/ISearchComparison.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Search; /** @@ -34,6 +33,9 @@ interface ISearchComparison extends ISearchOperator { public const COMPARE_LESS_THAN = 'lt'; public const COMPARE_LESS_THAN_EQUAL = 'lte'; public const COMPARE_LIKE = 'like'; + public const COMPARE_LIKE_CASE_SENSITIVE = 'clike'; + + public const HINT_PATH_EQ_HASH = 'path_eq_hash'; // transform `path = "$path"` into `path_hash = md5("$path")`, on by default /** * Get the type of comparison, one of the ISearchComparison::COMPARE_* constants diff --git a/lib/public/Files/Search/ISearchOperator.php b/lib/public/Files/Search/ISearchOperator.php index a443c2744cf..1799b97c1ca 100644 --- a/lib/public/Files/Search/ISearchOperator.php +++ b/lib/public/Files/Search/ISearchOperator.php @@ -13,18 +13,35 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Search; /** * @since 12.0.0 */ interface ISearchOperator { + /** + * Get a query builder hint by name + * + * @param string $name + * @param $default + * @return mixed + * @since 23.0.0 + */ + public function getQueryHint(string $name, $default); + + /** + * Get a query builder hint + * + * @param string $name + * @param $value + * @since 23.0.0 + */ + public function setQueryHint(string $name, $value): void; } diff --git a/lib/public/Files/Search/ISearchOrder.php b/lib/public/Files/Search/ISearchOrder.php index 8237b1861ea..3b9e6e6713a 100644 --- a/lib/public/Files/Search/ISearchOrder.php +++ b/lib/public/Files/Search/ISearchOrder.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Search; use OCP\Files\FileInfo; diff --git a/lib/public/Files/Search/ISearchQuery.php b/lib/public/Files/Search/ISearchQuery.php index dd7c901f7f5..91c6f642566 100644 --- a/lib/public/Files/Search/ISearchQuery.php +++ b/lib/public/Files/Search/ISearchQuery.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Search; use OCP\IUser; diff --git a/lib/public/Files/SimpleFS/ISimpleFile.php b/lib/public/Files/SimpleFS/ISimpleFile.php index 3ef005b361c..3287c42054f 100644 --- a/lib/public/Files/SimpleFS/ISimpleFile.php +++ b/lib/public/Files/SimpleFS/ISimpleFile.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\SimpleFS; use OCP\Files\NotFoundException; diff --git a/lib/public/Files/SimpleFS/ISimpleFolder.php b/lib/public/Files/SimpleFS/ISimpleFolder.php index ebe8194325c..0159c41760b 100644 --- a/lib/public/Files/SimpleFS/ISimpleFolder.php +++ b/lib/public/Files/SimpleFS/ISimpleFolder.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\SimpleFS; use OCP\Files\NotFoundException; diff --git a/lib/public/Files/SimpleFS/ISimpleRoot.php b/lib/public/Files/SimpleFS/ISimpleRoot.php index b90e8af5a7e..fd590b66b31 100644 --- a/lib/public/Files/SimpleFS/ISimpleRoot.php +++ b/lib/public/Files/SimpleFS/ISimpleRoot.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\SimpleFS; use OCP\Files\NotFoundException; diff --git a/lib/public/Files/SimpleFS/InMemoryFile.php b/lib/public/Files/SimpleFS/InMemoryFile.php index d420638737d..6020b42d953 100644 --- a/lib/public/Files/SimpleFS/InMemoryFile.php +++ b/lib/public/Files/SimpleFS/InMemoryFile.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\SimpleFS; use OCP\Files\NotPermittedException; diff --git a/lib/public/Files/Storage.php b/lib/public/Files/Storage.php index c9e72983231..afc735c7829 100644 --- a/lib/public/Files/Storage.php +++ b/lib/public/Files/Storage.php @@ -30,12 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/Storage interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/Storage/IDisableEncryptionStorage.php b/lib/public/Files/Storage/IDisableEncryptionStorage.php index 761f636b068..11d71549cac 100644 --- a/lib/public/Files/Storage/IDisableEncryptionStorage.php +++ b/lib/public/Files/Storage/IDisableEncryptionStorage.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Storage; /** diff --git a/lib/public/Files/Storage/ILockingStorage.php b/lib/public/Files/Storage/ILockingStorage.php index 3fa08bce3f0..401a8de30bf 100644 --- a/lib/public/Files/Storage/ILockingStorage.php +++ b/lib/public/Files/Storage/ILockingStorage.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Storage; use OCP\Lock\ILockingProvider; diff --git a/lib/public/Files/Storage/INotifyStorage.php b/lib/public/Files/Storage/INotifyStorage.php index 35dc828dfdf..18bcf3c6adc 100644 --- a/lib/public/Files/Storage/INotifyStorage.php +++ b/lib/public/Files/Storage/INotifyStorage.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Files\Storage; use OCP\Files\Notify\INotifyHandler; diff --git a/lib/public/Files/Storage/IStorage.php b/lib/public/Files/Storage/IStorage.php index ee26dd9c66b..21272f216c7 100644 --- a/lib/public/Files/Storage/IStorage.php +++ b/lib/public/Files/Storage/IStorage.php @@ -24,14 +24,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/Storage interface - */ - // use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes +// This means that they should be used by apps instead of the internal Nextcloud classes namespace OCP\Files\Storage; diff --git a/lib/public/Files/Storage/IStorageFactory.php b/lib/public/Files/Storage/IStorageFactory.php index 7c5860f6b77..846e4114497 100644 --- a/lib/public/Files/Storage/IStorageFactory.php +++ b/lib/public/Files/Storage/IStorageFactory.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files\Storage; use OCP\Files\Mount\IMountPoint; diff --git a/lib/public/Files/Storage/IWriteStreamStorage.php b/lib/public/Files/Storage/IWriteStreamStorage.php index 5f8e73e0cba..f9122cd4b2c 100644 --- a/lib/public/Files/Storage/IWriteStreamStorage.php +++ b/lib/public/Files/Storage/IWriteStreamStorage.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files\Storage; use OCP\Files\GenericFileException; diff --git a/lib/public/Files/StorageAuthException.php b/lib/public/Files/StorageAuthException.php index 24afacd72ea..696792c8d43 100644 --- a/lib/public/Files/StorageAuthException.php +++ b/lib/public/Files/StorageAuthException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/StorageBadConfigException.php b/lib/public/Files/StorageBadConfigException.php index 2b0e362389f..e05b9217799 100644 --- a/lib/public/Files/StorageBadConfigException.php +++ b/lib/public/Files/StorageBadConfigException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/StorageConnectionException.php b/lib/public/Files/StorageConnectionException.php index 221fe661b3b..d9a69e53edd 100644 --- a/lib/public/Files/StorageConnectionException.php +++ b/lib/public/Files/StorageConnectionException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/StorageInvalidException.php b/lib/public/Files/StorageInvalidException.php index 3f9acdc1562..c59a703eee0 100644 --- a/lib/public/Files/StorageInvalidException.php +++ b/lib/public/Files/StorageInvalidException.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/AlreadyExistsException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php index 11b8d76f706..f600ef80808 100644 --- a/lib/public/Files/StorageNotAvailableException.php +++ b/lib/public/Files/StorageNotAvailableException.php @@ -27,18 +27,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/AlreadyExistsException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; -use OC\HintException; +use OCP\HintException; /** * Storage is temporarily not available diff --git a/lib/public/Files/StorageTimeoutException.php b/lib/public/Files/StorageTimeoutException.php index b473b5da96f..256f7e710a1 100644 --- a/lib/public/Files/StorageTimeoutException.php +++ b/lib/public/Files/StorageTimeoutException.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Files; /** diff --git a/lib/public/Files/Template/FileCreatedFromTemplateEvent.php b/lib/public/Files/Template/FileCreatedFromTemplateEvent.php index 7ed342e4007..bb913f6f16a 100644 --- a/lib/public/Files/Template/FileCreatedFromTemplateEvent.php +++ b/lib/public/Files/Template/FileCreatedFromTemplateEvent.php @@ -1,5 +1,8 @@ <?php -/* + +declare(strict_types=1); + +/** * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> @@ -20,10 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -declare(strict_types=1); - - namespace OCP\Files\Template; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Template/ICustomTemplateProvider.php b/lib/public/Files/Template/ICustomTemplateProvider.php index a14ea86a100..81448a111de 100644 --- a/lib/public/Files/Template/ICustomTemplateProvider.php +++ b/lib/public/Files/Template/ICustomTemplateProvider.php @@ -1,5 +1,8 @@ <?php -/* + +declare(strict_types=1); + +/** * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> @@ -20,10 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -declare(strict_types=1); - - namespace OCP\Files\Template; use OCP\Files\File; diff --git a/lib/public/Files/Template/ITemplateManager.php b/lib/public/Files/Template/ITemplateManager.php index 39a48598508..a874ec6491a 100644 --- a/lib/public/Files/Template/ITemplateManager.php +++ b/lib/public/Files/Template/ITemplateManager.php @@ -1,7 +1,11 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net> * + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -20,10 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -declare(strict_types=1); - - namespace OCP\Files\Template; use OCP\Files\GenericFileException; diff --git a/lib/public/Files/Template/Template.php b/lib/public/Files/Template/Template.php index 71c02d1f5be..50d8b406be9 100644 --- a/lib/public/Files/Template/Template.php +++ b/lib/public/Files/Template/Template.php @@ -1,5 +1,8 @@ <?php -/* + +declare(strict_types=1); + +/** * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> @@ -20,10 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -declare(strict_types=1); - - namespace OCP\Files\Template; use OCP\Files\File; diff --git a/lib/public/Files/Template/TemplateFileCreator.php b/lib/public/Files/Template/TemplateFileCreator.php index e40fa8e91b3..7be45e68ef9 100644 --- a/lib/public/Files/Template/TemplateFileCreator.php +++ b/lib/public/Files/Template/TemplateFileCreator.php @@ -1,7 +1,11 @@ <?php -/* + +declare(strict_types=1); + +/** * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net> * + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * * @license GNU AGPL version 3 or any later version @@ -20,9 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -declare(strict_types=1); - namespace OCP\Files\Template; /** diff --git a/lib/public/Files/UnseekableException.php b/lib/public/Files/UnseekableException.php index 13ef6330207..1fb7cdc4787 100644 --- a/lib/public/Files/UnseekableException.php +++ b/lib/public/Files/UnseekableException.php @@ -21,12 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Files/UnseekableException class - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php index d9c4a02ea5c..421015067df 100644 --- a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php +++ b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Files_FullTextSearch\Model; use OC\FullTextSearch\Model\IndexDocument; diff --git a/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php b/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php index f8844e133a9..1e10f6ced9b 100644 --- a/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php +++ b/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Exceptions; /** diff --git a/lib/public/FullTextSearch/IFullTextSearchManager.php b/lib/public/FullTextSearch/IFullTextSearchManager.php index 4066c343607..ee9f4ba20e1 100644 --- a/lib/public/FullTextSearch/IFullTextSearchManager.php +++ b/lib/public/FullTextSearch/IFullTextSearchManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch; use OCP\FullTextSearch\Model\IIndex; diff --git a/lib/public/FullTextSearch/IFullTextSearchPlatform.php b/lib/public/FullTextSearch/IFullTextSearchPlatform.php index 516e18e9e1f..147a883885e 100644 --- a/lib/public/FullTextSearch/IFullTextSearchPlatform.php +++ b/lib/public/FullTextSearch/IFullTextSearchPlatform.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch; use OCP\FullTextSearch\Model\IDocumentAccess; diff --git a/lib/public/FullTextSearch/IFullTextSearchProvider.php b/lib/public/FullTextSearch/IFullTextSearchProvider.php index ee3c60914b8..3d78199f4d6 100644 --- a/lib/public/FullTextSearch/IFullTextSearchProvider.php +++ b/lib/public/FullTextSearch/IFullTextSearchProvider.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch; use OCP\FullTextSearch\Model\IIndex; diff --git a/lib/public/FullTextSearch/Model/IDocumentAccess.php b/lib/public/FullTextSearch/Model/IDocumentAccess.php index 996d9060557..84ce46db361 100644 --- a/lib/public/FullTextSearch/Model/IDocumentAccess.php +++ b/lib/public/FullTextSearch/Model/IDocumentAccess.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php index 0f817b75e35..1a8b5d875ba 100644 --- a/lib/public/FullTextSearch/Model/IIndex.php +++ b/lib/public/FullTextSearch/Model/IIndex.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php index cbc44f73031..b659c2b33f1 100644 --- a/lib/public/FullTextSearch/Model/IIndexDocument.php +++ b/lib/public/FullTextSearch/Model/IIndexDocument.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/IIndexOptions.php b/lib/public/FullTextSearch/Model/IIndexOptions.php index a395c773fa3..f8ee10671e5 100644 --- a/lib/public/FullTextSearch/Model/IIndexOptions.php +++ b/lib/public/FullTextSearch/Model/IIndexOptions.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php index 26d95c0fa03..c03126500cb 100644 --- a/lib/public/FullTextSearch/Model/IRunner.php +++ b/lib/public/FullTextSearch/Model/IRunner.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php index 676e5082a62..7cfe07d9c3e 100644 --- a/lib/public/FullTextSearch/Model/ISearchOption.php +++ b/lib/public/FullTextSearch/Model/ISearchOption.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/ISearchRequest.php b/lib/public/FullTextSearch/Model/ISearchRequest.php index e3ce476ce98..be93b2d9970 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequest.php +++ b/lib/public/FullTextSearch/Model/ISearchRequest.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php index aa94eabb380..91f3c6dfe1b 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php +++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/ISearchResult.php b/lib/public/FullTextSearch/Model/ISearchResult.php index 0cb5deb82dc..729f79da762 100644 --- a/lib/public/FullTextSearch/Model/ISearchResult.php +++ b/lib/public/FullTextSearch/Model/ISearchResult.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; use OCP\FullTextSearch\IFullTextSearchProvider; diff --git a/lib/public/FullTextSearch/Model/ISearchTemplate.php b/lib/public/FullTextSearch/Model/ISearchTemplate.php index 86b894c63dd..adeccd4224c 100644 --- a/lib/public/FullTextSearch/Model/ISearchTemplate.php +++ b/lib/public/FullTextSearch/Model/ISearchTemplate.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Model; use OCP\FullTextSearch\IFullTextSearchProvider; diff --git a/lib/public/FullTextSearch/Service/IIndexService.php b/lib/public/FullTextSearch/Service/IIndexService.php index 80f1ad12528..b9b15e96371 100644 --- a/lib/public/FullTextSearch/Service/IIndexService.php +++ b/lib/public/FullTextSearch/Service/IIndexService.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Service; use OCP\FullTextSearch\Model\IIndex; diff --git a/lib/public/FullTextSearch/Service/IProviderService.php b/lib/public/FullTextSearch/Service/IProviderService.php index 0c543480747..8a5db07cb1d 100644 --- a/lib/public/FullTextSearch/Service/IProviderService.php +++ b/lib/public/FullTextSearch/Service/IProviderService.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Service; /** diff --git a/lib/public/FullTextSearch/Service/ISearchService.php b/lib/public/FullTextSearch/Service/ISearchService.php index caa1dacb285..6a29e15755a 100644 --- a/lib/public/FullTextSearch/Service/ISearchService.php +++ b/lib/public/FullTextSearch/Service/ISearchService.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\FullTextSearch\Service; use OCP\FullTextSearch\Model\ISearchRequest; diff --git a/lib/public/GlobalScale/IConfig.php b/lib/public/GlobalScale/IConfig.php index 4fc8ae7db1d..03bac271fbe 100644 --- a/lib/public/GlobalScale/IConfig.php +++ b/lib/public/GlobalScale/IConfig.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\GlobalScale; /** diff --git a/lib/public/Group/Backend/ABackend.php b/lib/public/Group/Backend/ABackend.php index 9914c7ed0e0..2d611c27b4f 100644 --- a/lib/public/Group/Backend/ABackend.php +++ b/lib/public/Group/Backend/ABackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; use OCP\GroupInterface; diff --git a/lib/public/Group/Backend/IAddToGroupBackend.php b/lib/public/Group/Backend/IAddToGroupBackend.php index 84dd43df9bb..8019766ca84 100644 --- a/lib/public/Group/Backend/IAddToGroupBackend.php +++ b/lib/public/Group/Backend/IAddToGroupBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICountDisabledInGroup.php b/lib/public/Group/Backend/ICountDisabledInGroup.php index ede5dbd6ede..a971d3d0c06 100644 --- a/lib/public/Group/Backend/ICountDisabledInGroup.php +++ b/lib/public/Group/Backend/ICountDisabledInGroup.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com> * - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICountUsersBackend.php b/lib/public/Group/Backend/ICountUsersBackend.php index fb0f99e8c2a..946dd20ee8b 100644 --- a/lib/public/Group/Backend/ICountUsersBackend.php +++ b/lib/public/Group/Backend/ICountUsersBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICreateGroupBackend.php b/lib/public/Group/Backend/ICreateGroupBackend.php index 8593c47375c..43f2960725b 100644 --- a/lib/public/Group/Backend/ICreateGroupBackend.php +++ b/lib/public/Group/Backend/ICreateGroupBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IDeleteGroupBackend.php b/lib/public/Group/Backend/IDeleteGroupBackend.php index 364be79d838..90be105e7d8 100644 --- a/lib/public/Group/Backend/IDeleteGroupBackend.php +++ b/lib/public/Group/Backend/IDeleteGroupBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IGetDisplayNameBackend.php b/lib/public/Group/Backend/IGetDisplayNameBackend.php index 13e9ca204f2..096555d0c8e 100644 --- a/lib/public/Group/Backend/IGetDisplayNameBackend.php +++ b/lib/public/Group/Backend/IGetDisplayNameBackend.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IGroupDetailsBackend.php b/lib/public/Group/Backend/IGroupDetailsBackend.php index 0d7f505e572..56241d5538b 100644 --- a/lib/public/Group/Backend/IGroupDetailsBackend.php +++ b/lib/public/Group/Backend/IGroupDetailsBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IHideFromCollaborationBackend.php b/lib/public/Group/Backend/IHideFromCollaborationBackend.php index fdd156eee83..6547adc0ca6 100644 --- a/lib/public/Group/Backend/IHideFromCollaborationBackend.php +++ b/lib/public/Group/Backend/IHideFromCollaborationBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IIsAdminBackend.php b/lib/public/Group/Backend/IIsAdminBackend.php index a6a6493f9fb..4ee67cc139f 100644 --- a/lib/public/Group/Backend/IIsAdminBackend.php +++ b/lib/public/Group/Backend/IIsAdminBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/INamedBackend.php b/lib/public/Group/Backend/INamedBackend.php index b6aaea328c4..eca9b5d7aca 100644 --- a/lib/public/Group/Backend/INamedBackend.php +++ b/lib/public/Group/Backend/INamedBackend.php @@ -1,25 +1,25 @@ <?php /** - * @copyright Copyright (c) 2021, hosting.de, Johannes Leuker <j.leuker@hosting.de>. + * @copyright Copyright (c) 2021, hosting.de, Johannes Leuker <developers@hosting.de>. * - * @author Johannes Leuker <j.leuker@hosting.de>. + * @author Johannes Leuker <j.leuker@hosting.de> * - * @license AGPL-3.0 + * @license GNU AGPL version 3 or any later version * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. + * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IRemoveFromGroupBackend.php b/lib/public/Group/Backend/IRemoveFromGroupBackend.php index ca69c80de8b..8532bcefd1c 100644 --- a/lib/public/Group/Backend/IRemoveFromGroupBackend.php +++ b/lib/public/Group/Backend/IRemoveFromGroupBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ISetDisplayNameBackend.php b/lib/public/Group/Backend/ISetDisplayNameBackend.php index 244fa5c351c..e5896b52953 100644 --- a/lib/public/Group/Backend/ISetDisplayNameBackend.php +++ b/lib/public/Group/Backend/ISetDisplayNameBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Events/BeforeGroupCreatedEvent.php b/lib/public/Group/Events/BeforeGroupCreatedEvent.php index 5ed5a5311e5..a8bd6a4e100 100644 --- a/lib/public/Group/Events/BeforeGroupCreatedEvent.php +++ b/lib/public/Group/Events/BeforeGroupCreatedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeGroupDeletedEvent.php b/lib/public/Group/Events/BeforeGroupDeletedEvent.php index af44d4c054e..7824a17dfdd 100644 --- a/lib/public/Group/Events/BeforeGroupDeletedEvent.php +++ b/lib/public/Group/Events/BeforeGroupDeletedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeUserAddedEvent.php b/lib/public/Group/Events/BeforeUserAddedEvent.php index c8ebc24e3d9..526d94f564f 100644 --- a/lib/public/Group/Events/BeforeUserAddedEvent.php +++ b/lib/public/Group/Events/BeforeUserAddedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeUserRemovedEvent.php b/lib/public/Group/Events/BeforeUserRemovedEvent.php index db5f44621bc..164e3282c31 100644 --- a/lib/public/Group/Events/BeforeUserRemovedEvent.php +++ b/lib/public/Group/Events/BeforeUserRemovedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/GroupCreatedEvent.php b/lib/public/Group/Events/GroupCreatedEvent.php index ac9af26307e..38c5aaf4fec 100644 --- a/lib/public/Group/Events/GroupCreatedEvent.php +++ b/lib/public/Group/Events/GroupCreatedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/GroupDeletedEvent.php b/lib/public/Group/Events/GroupDeletedEvent.php index 267eb806264..d3d9a3736f4 100644 --- a/lib/public/Group/Events/GroupDeletedEvent.php +++ b/lib/public/Group/Events/GroupDeletedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/SubAdminAddedEvent.php b/lib/public/Group/Events/SubAdminAddedEvent.php index d21df13be5e..08bca54253a 100644 --- a/lib/public/Group/Events/SubAdminAddedEvent.php +++ b/lib/public/Group/Events/SubAdminAddedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/SubAdminRemovedEvent.php b/lib/public/Group/Events/SubAdminRemovedEvent.php index 6f1763656a7..41d42a24b88 100644 --- a/lib/public/Group/Events/SubAdminRemovedEvent.php +++ b/lib/public/Group/Events/SubAdminRemovedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/UserAddedEvent.php b/lib/public/Group/Events/UserAddedEvent.php index e88487a02cf..85b618d5e78 100644 --- a/lib/public/Group/Events/UserAddedEvent.php +++ b/lib/public/Group/Events/UserAddedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/UserRemovedEvent.php b/lib/public/Group/Events/UserRemovedEvent.php index 953bb5f220f..c3c9483996f 100644 --- a/lib/public/Group/Events/UserRemovedEvent.php +++ b/lib/public/Group/Events/UserRemovedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/ISubAdmin.php b/lib/public/Group/ISubAdmin.php index f8f276e45d7..d2b302a4b8c 100644 --- a/lib/public/Group/ISubAdmin.php +++ b/lib/public/Group/ISubAdmin.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Group; use OCP\IGroup; diff --git a/lib/public/GroupInterface.php b/lib/public/GroupInterface.php index c73ca6836a8..f1765afed96 100644 --- a/lib/public/GroupInterface.php +++ b/lib/public/GroupInterface.php @@ -25,13 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Group Class. - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/HintException.php b/lib/public/HintException.php new file mode 100644 index 00000000000..b5ee7642b03 --- /dev/null +++ b/lib/public/HintException.php @@ -0,0 +1,82 @@ +<?php +/** + * @copyright Copyright (c) 2016, ownCloud, Inc. + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Bart Visscher <bartv@thisnet.nl> + * @author Lukas Reschke <lukas@statuscode.ch> + * @author Michael Gapczynski <GapczynskiM@gmail.com> + * @author Thomas Müller <thomas.mueller@tmit.eu> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * 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, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCP; + +/** + * Class HintException + * + * An Exception class with the intention to be presented to the end user + * + * @package OCP + * @since 23.0.0 + */ +class HintException extends \Exception { + private $hint; + + /** + * HintException constructor. + * + * @since 23.0.0 + * @param string $message The error message. It will be not revealed to the + * the user (unless the hint is empty) and thus + * should be not translated. + * @param string $hint A useful message that is presented to the end + * user. It should be translated, but must not + * contain sensitive data. + * @param int $code + * @param \Exception|null $previous + */ + public function __construct($message, $hint = '', $code = 0, \Exception $previous = null) { + $this->hint = $hint; + parent::__construct($message, $code, $previous); + } + + /** + * Returns a string representation of this Exception that includes the error + * code, the message and the hint. + * + * @since 23.0.0 + * @return string + */ + public function __toString(): string { + return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n"; + } + + /** + * Returns the hint with the intention to be presented to the end user. If + * an empty hint was specified upon instatiation, the message is returned + * instead. + * + * @since 23.0.0 + * @return string + */ + public function getHint(): string { + if (empty($this->hint)) { + return $this->message; + } + return $this->hint; + } +} diff --git a/lib/public/Http/Client/IClient.php b/lib/public/Http/Client/IClient.php index 1498cfaaba2..9a6dc7a9b65 100644 --- a/lib/public/Http/Client/IClient.php +++ b/lib/public/Http/Client/IClient.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Http\Client; /** diff --git a/lib/public/Http/Client/IClientService.php b/lib/public/Http/Client/IClientService.php index 7498be08ed3..cba7df0517d 100644 --- a/lib/public/Http/Client/IClientService.php +++ b/lib/public/Http/Client/IClientService.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Http\Client; /** diff --git a/lib/public/Http/Client/IResponse.php b/lib/public/Http/Client/IResponse.php index c07c550405e..a6adc682910 100644 --- a/lib/public/Http/Client/IResponse.php +++ b/lib/public/Http/Client/IResponse.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Http\Client; /** diff --git a/lib/public/Http/Client/LocalServerException.php b/lib/public/Http/Client/LocalServerException.php index 829d747715f..2d16c6190b8 100644 --- a/lib/public/Http/Client/LocalServerException.php +++ b/lib/public/Http/Client/LocalServerException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Http\Client; /** diff --git a/lib/public/Http/WellKnown/GenericResponse.php b/lib/public/Http/WellKnown/GenericResponse.php index 57007232fc6..a240c0eebde 100644 --- a/lib/public/Http/WellKnown/GenericResponse.php +++ b/lib/public/Http/WellKnown/GenericResponse.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Http\WellKnown; use OCP\AppFramework\Http\Response; diff --git a/lib/public/Http/WellKnown/IHandler.php b/lib/public/Http/WellKnown/IHandler.php index 7665bd47d46..c0dd1d372bc 100644 --- a/lib/public/Http/WellKnown/IHandler.php +++ b/lib/public/Http/WellKnown/IHandler.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Http\WellKnown; /** diff --git a/lib/public/Http/WellKnown/IRequestContext.php b/lib/public/Http/WellKnown/IRequestContext.php index 1382a5d73e6..1d05b116e9b 100644 --- a/lib/public/Http/WellKnown/IRequestContext.php +++ b/lib/public/Http/WellKnown/IRequestContext.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Http\WellKnown; use OCP\IRequest; diff --git a/lib/public/Http/WellKnown/IResponse.php b/lib/public/Http/WellKnown/IResponse.php index a29847fb027..1504d4d0066 100644 --- a/lib/public/Http/WellKnown/IResponse.php +++ b/lib/public/Http/WellKnown/IResponse.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Http\WellKnown; use OCP\AppFramework\Http\Response; diff --git a/lib/public/Http/WellKnown/JrdResponse.php b/lib/public/Http/WellKnown/JrdResponse.php index 01b7da9dbbc..192334ce83c 100644 --- a/lib/public/Http/WellKnown/JrdResponse.php +++ b/lib/public/Http/WellKnown/JrdResponse.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Http\WellKnown; use OCP\AppFramework\Http\JSONResponse; diff --git a/lib/public/IAddressBook.php b/lib/public/IAddressBook.php index 66723b4b2ed..b0196764be3 100644 --- a/lib/public/IAddressBook.php +++ b/lib/public/IAddressBook.php @@ -5,7 +5,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Daniel Kesselberg <mail@danielkesselberg.de> * @author Georg Ehrke <oc.list@georgehrke.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin McCorkell <robin@mccorkell.me.uk> @@ -27,12 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * IAddressBook interface - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/IAppConfig.php b/lib/public/IAppConfig.php index 1a65f1850e3..7ab70fb04bf 100644 --- a/lib/public/IAppConfig.php +++ b/lib/public/IAppConfig.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IAvatar.php b/lib/public/IAvatar.php index 644c8bb2065..1f079ba1e03 100644 --- a/lib/public/IAvatar.php +++ b/lib/public/IAvatar.php @@ -4,7 +4,7 @@ * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; use OCP\Files\File; diff --git a/lib/public/IAvatarManager.php b/lib/public/IAvatarManager.php index 75ea886c16a..573e109f003 100644 --- a/lib/public/IAvatarManager.php +++ b/lib/public/IAvatarManager.php @@ -6,7 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Christopher Schäpers <kondou@ts.unde.re> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Michael Weimann <mail@michael-weimann.eu> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin McCorkell <robin@mccorkell.me.uk> @@ -27,7 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/ICache.php b/lib/public/ICache.php index f536f3213a1..47b0e2f4c3d 100644 --- a/lib/public/ICache.php +++ b/lib/public/ICache.php @@ -23,13 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Cache interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/ICacheFactory.php b/lib/public/ICacheFactory.php index 1da7da1e26b..d70a836aa52 100644 --- a/lib/public/ICacheFactory.php +++ b/lib/public/ICacheFactory.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/ICertificate.php b/lib/public/ICertificate.php index dbedd274305..dfe4e038daa 100644 --- a/lib/public/ICertificate.php +++ b/lib/public/ICertificate.php @@ -1,7 +1,11 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author J0WI <J0WI@users.noreply.github.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> * @@ -20,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** @@ -33,47 +36,47 @@ interface ICertificate { * @return string * @since 8.0.0 */ - public function getName(); + public function getName(): string; /** - * @return string + * @return string|null * @since 8.0.0 */ - public function getCommonName(); + public function getCommonName(): ?string; /** - * @return string + * @return string|null * @since 8.0.0 */ - public function getOrganization(); + public function getOrganization(): ?string; /** * @return \DateTime * @since 8.0.0 */ - public function getIssueDate(); + public function getIssueDate(): \DateTime; /** * @return \DateTime * @since 8.0.0 */ - public function getExpireDate(); + public function getExpireDate(): \DateTime; /** * @return bool * @since 8.0.0 */ - public function isExpired(); + public function isExpired(): bool; /** - * @return string + * @return string|null * @since 8.0.0 */ - public function getIssuerName(); + public function getIssuerName(): ?string; /** - * @return string + * @return string|null * @since 8.0.0 */ - public function getIssuerOrganization(); + public function getIssuerOrganization(): ?string; } diff --git a/lib/public/ICertificateManager.php b/lib/public/ICertificateManager.php index da97dc105d0..299137de98a 100644 --- a/lib/public/ICertificateManager.php +++ b/lib/public/ICertificateManager.php @@ -1,7 +1,11 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author J0WI <J0WI@users.noreply.github.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -21,7 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** @@ -35,7 +38,7 @@ interface ICertificateManager { * @return \OCP\ICertificate[] * @since 8.0.0 */ - public function listCertificates(); + public function listCertificates(): array; /** * @param string $certificate the certificate data @@ -44,13 +47,14 @@ interface ICertificateManager { * @throws \Exception If the certificate could not get added * @since 8.0.0 - since 8.1.0 throws exception instead of returning false */ - public function addCertificate($certificate, $name); + public function addCertificate(string $certificate, string $name): \OCP\ICertificate; /** * @param string $name + * @return bool * @since 8.0.0 */ - public function removeCertificate($name); + public function removeCertificate(string $name): bool; /** * Get the path to the certificate bundle @@ -58,7 +62,7 @@ interface ICertificateManager { * @return string * @since 8.0.0 */ - public function getCertificateBundle(); + public function getCertificateBundle(): string; /** * Get the full local path to the certificate bundle @@ -66,5 +70,5 @@ interface ICertificateManager { * @return string * @since 9.0.0 */ - public function getAbsoluteBundlePath(); + public function getAbsoluteBundlePath(): string; } diff --git a/lib/public/IConfig.php b/lib/public/IConfig.php index 59993d27f79..6b396624556 100644 --- a/lib/public/IConfig.php +++ b/lib/public/IConfig.php @@ -27,20 +27,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Config interface - * - */ - // use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes +// This means that they should be used by apps instead of the internal Nextcloud classes namespace OCP; /** - * Access to all the configuration options ownCloud offers + * Access to all the configuration options Nextcloud offers. * @since 6.0.0 */ interface IConfig { diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php index cb29e522032..08634ad508f 100644 --- a/lib/public/IContainer.php +++ b/lib/public/IContainer.php @@ -24,13 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Container interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index 3d2d83aa828..cedf0429869 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -5,6 +5,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> + * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Ole Ostergaard <ole.c.ostergaard@gmail.com> * @author Robin Appelman <robin@icewind.nl> @@ -27,13 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * DBConnection interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/IDateTimeFormatter.php b/lib/public/IDateTimeFormatter.php index 47756f611b9..f85a88b4e38 100644 --- a/lib/public/IDateTimeFormatter.php +++ b/lib/public/IDateTimeFormatter.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IDateTimeZone.php b/lib/public/IDateTimeZone.php index 317530a5cef..2ea0d847f91 100644 --- a/lib/public/IDateTimeZone.php +++ b/lib/public/IDateTimeZone.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IEventSource.php b/lib/public/IEventSource.php index 316d4bf2ff6..85f09837125 100644 --- a/lib/public/IEventSource.php +++ b/lib/public/IEventSource.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IGroup.php b/lib/public/IGroup.php index 014302347ed..ba13359c472 100644 --- a/lib/public/IGroup.php +++ b/lib/public/IGroup.php @@ -3,7 +3,8 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author Johannes Leuker <j.leuker@hosting.de> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -25,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IGroupManager.php b/lib/public/IGroupManager.php index eec36f3de79..d942caac9b4 100644 --- a/lib/public/IGroupManager.php +++ b/lib/public/IGroupManager.php @@ -9,6 +9,7 @@ * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> + * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Vinicius Cubas Brand <vinicius@eita.org.br> * @@ -27,7 +28,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IImage.php b/lib/public/IImage.php index aa1cf344e5f..459553de799 100644 --- a/lib/public/IImage.php +++ b/lib/public/IImage.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IInitialStateService.php b/lib/public/IInitialStateService.php index 44c4a4fd3da..eb3843129a0 100644 --- a/lib/public/IInitialStateService.php +++ b/lib/public/IInitialStateService.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP; use Closure; diff --git a/lib/public/IL10N.php b/lib/public/IL10N.php index 0aba11e1322..26556b7eb75 100644 --- a/lib/public/IL10N.php +++ b/lib/public/IL10N.php @@ -28,13 +28,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * L10n interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php index 86ee16100c6..d6bd0a5406e 100644 --- a/lib/public/ILogger.php +++ b/lib/public/ILogger.php @@ -29,7 +29,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IMemcache.php b/lib/public/IMemcache.php index 90ea1aa7fb2..9add524cb3e 100644 --- a/lib/public/IMemcache.php +++ b/lib/public/IMemcache.php @@ -21,13 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Cache interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/IMemcacheTTL.php b/lib/public/IMemcacheTTL.php index a52a7525657..8424e5b2bfa 100644 --- a/lib/public/IMemcacheTTL.php +++ b/lib/public/IMemcacheTTL.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/INavigationManager.php b/lib/public/INavigationManager.php index fb1fe0f4477..71979042811 100644 --- a/lib/public/INavigationManager.php +++ b/lib/public/INavigationManager.php @@ -5,7 +5,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> @@ -27,13 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Navigation manager interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes @@ -97,4 +90,13 @@ interface INavigationManager { * @since 14.0.0 */ public function getAll(string $type = self::TYPE_APPS): array; + + /** + * Set an unread counter for navigation entries + * + * @param string $id id of the navigation entry + * @param int $unreadCounter Number of unread entries (0 to hide the counter which is the default) + * @since 22.0.0 + */ + public function setUnreadCounter(string $id, int $unreadCounter): void; } diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php index 2ae5d835254..a8a798a526c 100644 --- a/lib/public/IPreview.php +++ b/lib/public/IPreview.php @@ -24,13 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Preview interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes @@ -65,6 +58,9 @@ interface IPreview { * @param \Closure $callable * @return void * @since 8.1.0 + * @see \OCP\AppFramework\Bootstrap\IRegistrationContext::registerPreviewProvider + * + * @deprecated 23.0.0 Register your provider via the IRegistrationContext when booting the app */ public function registerProvider($mimeTypeRegex, \Closure $callable); diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php index 583e8d58180..7696c3fa8c3 100644 --- a/lib/public/IRequest.php +++ b/lib/public/IRequest.php @@ -30,13 +30,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Request interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/ISearch.php b/lib/public/ISearch.php index 94338b3d20d..3b6f8cf6065 100644 --- a/lib/public/ISearch.php +++ b/lib/public/ISearch.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php index b3840a0cbad..024abbe2a97 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -39,7 +39,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; use OCP\Federation\ICloudFederationFactory; diff --git a/lib/public/ISession.php b/lib/public/ISession.php index 3e3fc0e39f8..2709e09d4ca 100644 --- a/lib/public/ISession.php +++ b/lib/public/ISession.php @@ -27,13 +27,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Session interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/ITagManager.php b/lib/public/ITagManager.php index 9003beb8a2a..f015dad809e 100644 --- a/lib/public/ITagManager.php +++ b/lib/public/ITagManager.php @@ -23,13 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Tag manager interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/ITags.php b/lib/public/ITags.php index 780e6dee85f..03bcb845f4e 100644 --- a/lib/public/ITags.php +++ b/lib/public/ITags.php @@ -25,13 +25,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Tags interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/ITempManager.php b/lib/public/ITempManager.php index dd2ed04fb72..f594bad3992 100644 --- a/lib/public/ITempManager.php +++ b/lib/public/ITempManager.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php index 81f5d449484..580536b8b5f 100644 --- a/lib/public/IURLGenerator.php +++ b/lib/public/IURLGenerator.php @@ -28,7 +28,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** @@ -99,8 +98,22 @@ interface IURLGenerator { public function linkToDocs(string $key): string; /** + * Returns the URL of the default page based on the system configuration + * and the apps visible for the current user + * @return string + * @since 23.0.0 + */ + public function linkToDefaultPageUrl(): string; + + /** * @return string base url of the current request * @since 13.0.0 */ public function getBaseUrl(): string; + + /** + * @return string webroot part of the base url + * @since 23.0.0 + */ + public function getWebroot(): string; } diff --git a/lib/public/IUser.php b/lib/public/IUser.php index feb876176bf..1a1d1e44d8a 100644 --- a/lib/public/IUser.php +++ b/lib/public/IUser.php @@ -3,7 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <robin@icewind.nl> @@ -25,9 +25,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; +use InvalidArgumentException; + /** * Interface IUser * @@ -158,7 +159,7 @@ interface IUser { public function setEnabled(bool $enabled = true); /** - * get the users email address + * get the user's email address * * @return string|null * @since 9.0.0 @@ -166,6 +167,35 @@ interface IUser { public function getEMailAddress(); /** + * get the user's system email address + * + * The system mail address may be read only and may be set from different + * sources like LDAP, SAML or simply the admin. + * + * Use this getter only when the system address is needed. For picking the + * proper address to e.g. send a mail to, use getEMailAddress(). + * + * @return string|null + * @since 23.0.0 + */ + public function getSystemEMailAddress(): ?string; + + /** + * get the user's preferred email address + * + * The primary mail address may be set be the user to specify a different + * email address where mails by Nextcloud are sent to. It is not necessarily + * set. + * + * Use this getter only when the primary address is needed. For picking the + * proper address to e.g. send a mail to, use getEMailAddress(). + * + * @return string|null + * @since 23.0.0 + */ + public function getPrimaryEMailAddress(): ?string; + + /** * get the avatar image if it exists * * @param int $size @@ -185,13 +215,43 @@ interface IUser { /** * set the email address of the user * + * It is an alias to setSystemEMailAddress() + * * @param string|null $mailAddress * @return void * @since 9.0.0 + * @deprecated 23.0.0 use setSystemEMailAddress() or setPrimaryEMailAddress() */ public function setEMailAddress($mailAddress); /** + * Set the system email address of the user + * + * This is supposed to be used when the email is set from different sources + * (i.e. other user backends, admin). + * + * @since 23.0.0 + */ + public function setSystemEMailAddress(string $mailAddress): void; + + /** + * Set the primary email address of the user. + * + * This method should be typically called when the user is changing their + * own primary address and is not allowed to change their system email. + * + * The mail address provided here must be already registered as an + * additional mail in the user account and also be verified locally. Also + * an empty string is allowed to delete this preference. + * + * @throws InvalidArgumentException when the provided email address does not + * satisfy constraints. + * + * @since 23.0.0 + */ + public function setPrimaryEMailAddress(string $mailAddress): void; + + /** * get the users' quota in human readable form. If a specific quota is not * set for the user, the default value is returned. If a default setting * was not set otherwise, it is return as 'none', i.e. quota is not limited. diff --git a/lib/public/IUserBackend.php b/lib/public/IUserBackend.php index 7f1cbe3b4bc..22df225cb8a 100644 --- a/lib/public/IUserBackend.php +++ b/lib/public/IUserBackend.php @@ -20,13 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * User Interface version 2 - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php index 6963bb5ddbc..e5c220af40c 100644 --- a/lib/public/IUserManager.php +++ b/lib/public/IUserManager.php @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** @@ -197,6 +196,8 @@ interface IUserManager { public function callForSeenUsers(\Closure $callback); /** + * returns all users having the provided email set as system email address + * * @param string $email * @return IUser[] * @since 9.1.0 diff --git a/lib/public/IUserSession.php b/lib/public/IUserSession.php index 17c751127fa..7bc37cc67c6 100644 --- a/lib/public/IUserSession.php +++ b/lib/public/IUserSession.php @@ -26,13 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * User session interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Image.php b/lib/public/Image.php index f01337c9000..dcdad8e1612 100644 --- a/lib/public/Image.php +++ b/lib/public/Image.php @@ -22,13 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Image class - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/L10N/IFactory.php b/lib/public/L10N/IFactory.php index 2c6db1864df..0c8c945caab 100644 --- a/lib/public/L10N/IFactory.php +++ b/lib/public/L10N/IFactory.php @@ -1,11 +1,14 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Georg Ehrke <oc.list@georgehrke.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -47,13 +50,35 @@ interface IFactory { public function get($app, $lang = null, $locale = null); /** - * Find the best language + * Find the best language for the context of the current user * - * @param string|null $app App id or null for core - * @return string language If nothing works it returns 'en' + * This method will try to find the most specific language based on info + * from the user who is logged into the current process and will fall + * back to system settings and heuristics otherwise. + * + * @param string|null $appId specify if you only want a language a specific app supports + * + * @return string language code, defaults to 'en' if no other matches are found * @since 9.0.0 */ - public function findLanguage($app = null); + public function findLanguage(?string $appId = null): string; + + /** + * Try to find the best language for generic tasks + * + * This method will try to find the most generic language based on system + * settings, independent of the user logged into the current process. This + * is useful for tasks that are run for another user. E.g. the current user + * sends an email to someone else, then we don't want the current user's + * language to be picked but rather a instance-wide default that likely fits + * the target user + * + * @param string|null $appId specify if you only want a language a specific app supports + * + * @return string language code, defaults to 'en' if no other matches are found + * @since 23.0.0 + */ + public function findGenericLanguage(string $appId = null): string; /** * @param string|null $lang user language as default locale @@ -79,7 +104,7 @@ interface IFactory { * @return string[] an array of available languages * @since 9.0.0 */ - public function findAvailableLanguages($app = null); + public function findAvailableLanguages($app = null): array; /** * @return array an array of available @@ -128,6 +153,14 @@ interface IFactory { public function getLanguageIterator(IUser $user = null): ILanguageIterator; /** + * returns the common language and other languages in an + * associative array + * + * @since 23.0.0 + */ + public function getLanguages(): array; + + /** * Return the language to use when sending something to a user * * @param IUser|null $user diff --git a/lib/public/L10N/ILanguageIterator.php b/lib/public/L10N/ILanguageIterator.php index 57a572ed3fe..882c8bc6f9e 100644 --- a/lib/public/L10N/ILanguageIterator.php +++ b/lib/public/L10N/ILanguageIterator.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\L10N; /** diff --git a/lib/public/LDAP/IDeletionFlagSupport.php b/lib/public/LDAP/IDeletionFlagSupport.php index af440d307dd..54fdfd90993 100644 --- a/lib/public/LDAP/IDeletionFlagSupport.php +++ b/lib/public/LDAP/IDeletionFlagSupport.php @@ -15,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\LDAP; /** diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php index 0baee4254e0..0355a0052c4 100644 --- a/lib/public/LDAP/ILDAPProvider.php +++ b/lib/public/LDAP/ILDAPProvider.php @@ -3,7 +3,9 @@ * @copyright Copyright (c) 2016, Roger Szabo (roger.szabo@web.de) * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author blizzz <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Roger Szabo <roger.szabo@web.de> * @author root <root@localhost.localdomain> @@ -18,14 +20,13 @@ * * 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 + * 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/>. * */ - namespace OCP\LDAP; /** @@ -160,11 +161,17 @@ interface ILDAPProvider { /** * Get an LDAP attribute for a nextcloud user - * @param string $uid the nextcloud user id to get the attribute for - * @param string $attribute the name of the attribute to read - * @return string|null + * * @throws \Exception if user id was not found in LDAP * @since 21.0.0 */ public function getUserAttribute(string $uid, string $attribute): ?string; + + /** + * Get a multi-value LDAP attribute for a nextcloud user + * + * @throws \Exception if user id was not found in LDAP + * @since 22.0.0 + */ + public function getMultiValueUserAttribute(string $uid, string $attribute): array; } diff --git a/lib/public/LDAP/ILDAPProviderFactory.php b/lib/public/LDAP/ILDAPProviderFactory.php index f005cf07885..246c665b04b 100644 --- a/lib/public/LDAP/ILDAPProviderFactory.php +++ b/lib/public/LDAP/ILDAPProviderFactory.php @@ -2,6 +2,7 @@ /** * @copyright Copyright (c) 2016, Roger Szabo (roger.szabo@web.de) * + * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Roger Szabo <roger.szabo@web.de> * @author root <root@localhost.localdomain> @@ -15,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OCP\LDAP; use OCP\IServerContainer; @@ -44,7 +44,7 @@ interface ILDAPProviderFactory { * @since 11.0.0 */ public function __construct(IServerContainer $serverContainer); - + /** * creates and returns an instance of the ILDAPProvider * @@ -52,4 +52,12 @@ interface ILDAPProviderFactory { * @since 11.0.0 */ public function getLDAPProvider(); + + /** + * Check if an ldap provider is available + * + * @return bool + * @since 21.0.0 + */ + public function isAvailable(): bool; } diff --git a/lib/public/Lock/ILockingProvider.php b/lib/public/Lock/ILockingProvider.php index 23adc02387e..3dc7c73b6eb 100644 --- a/lib/public/Lock/ILockingProvider.php +++ b/lib/public/Lock/ILockingProvider.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Lock; /** diff --git a/lib/public/Lock/LockedException.php b/lib/public/Lock/LockedException.php index 60ece6146a3..cf85096d389 100644 --- a/lib/public/Lock/LockedException.php +++ b/lib/public/Lock/LockedException.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Lock; /** diff --git a/lib/public/Lock/ManuallyLockedException.php b/lib/public/Lock/ManuallyLockedException.php index db2e0ff3c92..55a1e807a57 100644 --- a/lib/public/Lock/ManuallyLockedException.php +++ b/lib/public/Lock/ManuallyLockedException.php @@ -16,15 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - - namespace OCP\Lock; /** diff --git a/lib/public/Lockdown/ILockdownManager.php b/lib/public/Lockdown/ILockdownManager.php index 88a354b1eec..85a59cf8090 100644 --- a/lib/public/Lockdown/ILockdownManager.php +++ b/lib/public/Lockdown/ILockdownManager.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Lockdown; use OC\Authentication\Token\IToken; diff --git a/lib/public/Log/Audit/CriticalActionPerformedEvent.php b/lib/public/Log/Audit/CriticalActionPerformedEvent.php new file mode 100644 index 00000000000..1b991e4d871 --- /dev/null +++ b/lib/public/Log/Audit/CriticalActionPerformedEvent.php @@ -0,0 +1,84 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Joas Schilling <coding@schilljs.com> + * + * @author Joas Schilling <coding@schilljs.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OCP\Log\Audit; + +use OCP\EventDispatcher\Event; + +/** + * Emitted when the admin_audit app should log an entry + * + * @since 22.0.0 + */ +class CriticalActionPerformedEvent extends Event { + + /** @var string */ + private $logMessage; + + /** @var array */ + private $parameters; + + /** @var bool */ + private $obfuscateParameters; + + /** + * @param string $logMessage + * @param array $parameters + * @param bool $obfuscateParameters + * @since 22.0.0 + */ + public function __construct(string $logMessage, + array $parameters = [], + bool $obfuscateParameters = false) { + parent::__construct(); + $this->logMessage = $logMessage; + $this->parameters = $parameters; + $this->obfuscateParameters = $obfuscateParameters; + } + + /** + * @return string + * @since 22.0.0 + */ + public function getLogMessage(): string { + return $this->logMessage; + } + + /** + * @return array + * @since 22.0.0 + */ + public function getParameters(): array { + return $this->parameters; + } + + /** + * @return bool + * @since 22.0.0 + */ + public function getObfuscateParameters(): bool { + return $this->obfuscateParameters; + } +} diff --git a/lib/public/Log/IDataLogger.php b/lib/public/Log/IDataLogger.php index ed56009ca05..e9e476c3760 100644 --- a/lib/public/Log/IDataLogger.php +++ b/lib/public/Log/IDataLogger.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Log; /** diff --git a/lib/public/Log/IFileBased.php b/lib/public/Log/IFileBased.php index eeebb766cda..54f9e7d754a 100644 --- a/lib/public/Log/IFileBased.php +++ b/lib/public/Log/IFileBased.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Log; /** diff --git a/lib/public/Log/ILogFactory.php b/lib/public/Log/ILogFactory.php index 54aa6456156..54ed761a8e7 100644 --- a/lib/public/Log/ILogFactory.php +++ b/lib/public/Log/ILogFactory.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2018 Arthur Schiwon <blizzz@arthur-schiwon.de> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Johannes Ernst <jernst@indiecomputing.com> * * @license GNU AGPL version 3 or any later version @@ -14,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Log; use OCP\ILogger; diff --git a/lib/public/Log/IWriter.php b/lib/public/Log/IWriter.php index bc8feb908b9..acc39533bfd 100644 --- a/lib/public/Log/IWriter.php +++ b/lib/public/Log/IWriter.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Log; /** diff --git a/lib/public/Log/RotationTrait.php b/lib/public/Log/RotationTrait.php index d7de50410d6..8fc1516c346 100644 --- a/lib/public/Log/RotationTrait.php +++ b/lib/public/Log/RotationTrait.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2018 Arthur Schiwon <blizzz@arthur-schiwon.de> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author dartcafe <github@dartcafe.de> * * @license GNU AGPL version 3 or any later version * @@ -13,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Log; /** @@ -58,7 +58,7 @@ trait RotationTrait { * @since 14.0.0 */ protected function shouldRotateBySize():bool { - if ((int)$this->maxSize > 0) { + if ((int)$this->maxSize > 0 && file_exists($this->filePath)) { $filesize = @filesize($this->filePath); if ($filesize >= (int)$this->maxSize) { return true; diff --git a/lib/public/Mail/Events/BeforeMessageSent.php b/lib/public/Mail/Events/BeforeMessageSent.php index cacbb778b39..e4ea0680f9e 100644 --- a/lib/public/Mail/Events/BeforeMessageSent.php +++ b/lib/public/Mail/Events/BeforeMessageSent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Mail\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Mail/IAttachment.php b/lib/public/Mail/IAttachment.php index 4f17923622f..714d4a45158 100644 --- a/lib/public/Mail/IAttachment.php +++ b/lib/public/Mail/IAttachment.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Mail; /** diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php index 726ec05039d..2d776549814 100644 --- a/lib/public/Mail/IEMailTemplate.php +++ b/lib/public/Mail/IEMailTemplate.php @@ -20,14 +20,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Mail; /** @@ -131,7 +130,7 @@ interface IEMailTemplate { * * @param string $text Text of button; Note: When $plainText falls back to this, HTML is automatically escaped in the HTML email * @param string $url URL of button - * @param string $plainText Text of button in plain text version + * @param string|false $plainText Text of button in plain text version * if empty the $text is used, if false none will be used * * @since 12.0.0 diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php index 11a174e96a8..325abd9301e 100644 --- a/lib/public/Mail/IMailer.php +++ b/lib/public/Mail/IMailer.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Mail; /** diff --git a/lib/public/Mail/IMessage.php b/lib/public/Mail/IMessage.php index 9927b228df3..1549f61c1fe 100644 --- a/lib/public/Mail/IMessage.php +++ b/lib/public/Mail/IMessage.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Mail; /** diff --git a/lib/public/Migration/BigIntMigration.php b/lib/public/Migration/BigIntMigration.php index 316c1565360..85da6fd740d 100644 --- a/lib/public/Migration/BigIntMigration.php +++ b/lib/public/Migration/BigIntMigration.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Migration; use Doctrine\DBAL\Types\Type; diff --git a/lib/public/Migration/IMigrationStep.php b/lib/public/Migration/IMigrationStep.php index e5e7bf6c4dc..1b5aa828994 100644 --- a/lib/public/Migration/IMigrationStep.php +++ b/lib/public/Migration/IMigrationStep.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/public/Migration/IOutput.php b/lib/public/Migration/IOutput.php index 0bab1f609bc..2dba50ab2c6 100644 --- a/lib/public/Migration/IOutput.php +++ b/lib/public/Migration/IOutput.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Migration; /** diff --git a/lib/public/Migration/IRepairStep.php b/lib/public/Migration/IRepairStep.php index 83e1c17c65a..74f0060b990 100644 --- a/lib/public/Migration/IRepairStep.php +++ b/lib/public/Migration/IRepairStep.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Migration; /** diff --git a/lib/public/Migration/SimpleMigrationStep.php b/lib/public/Migration/SimpleMigrationStep.php index d592c022466..e8d19f533ac 100644 --- a/lib/public/Migration/SimpleMigrationStep.php +++ b/lib/public/Migration/SimpleMigrationStep.php @@ -19,14 +19,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Migration; /** diff --git a/lib/public/Notification/AlreadyProcessedException.php b/lib/public/Notification/AlreadyProcessedException.php index 3100e433608..5b0e672d5a0 100644 --- a/lib/public/Notification/AlreadyProcessedException.php +++ b/lib/public/Notification/AlreadyProcessedException.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Notification; /** diff --git a/lib/public/Notification/IAction.php b/lib/public/Notification/IAction.php index 52a42e3206e..2499b66a1a9 100644 --- a/lib/public/Notification/IAction.php +++ b/lib/public/Notification/IAction.php @@ -22,7 +22,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Notification; /** diff --git a/lib/public/Notification/IApp.php b/lib/public/Notification/IApp.php index 159f330039e..6abb9a823e5 100644 --- a/lib/public/Notification/IApp.php +++ b/lib/public/Notification/IApp.php @@ -22,7 +22,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Notification; /** diff --git a/lib/public/Notification/IDeferrableApp.php b/lib/public/Notification/IDeferrableApp.php index f03ab973887..dad2828cdbd 100644 --- a/lib/public/Notification/IDeferrableApp.php +++ b/lib/public/Notification/IDeferrableApp.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Notification; /** diff --git a/lib/public/Notification/IDismissableNotifier.php b/lib/public/Notification/IDismissableNotifier.php index 2be03ddf40d..8c236875cca 100644 --- a/lib/public/Notification/IDismissableNotifier.php +++ b/lib/public/Notification/IDismissableNotifier.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Notification; /** diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php index accebee61ba..66fe78b723e 100644 --- a/lib/public/Notification/IManager.php +++ b/lib/public/Notification/IManager.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Notification; /** @@ -53,6 +52,7 @@ interface IManager extends IApp, INotifier { * @param string $notifierService The service must implement INotifier, otherwise a * \InvalidArgumentException is thrown later * @since 17.0.0 + * @depreacted 22.0.0 use the IBootStrap registration context */ public function registerNotifierService(string $notifierService): void; diff --git a/lib/public/Notification/INotification.php b/lib/public/Notification/INotification.php index 8e3feb2b3dd..511f65955f5 100644 --- a/lib/public/Notification/INotification.php +++ b/lib/public/Notification/INotification.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Notification; /** diff --git a/lib/public/Notification/INotifier.php b/lib/public/Notification/INotifier.php index 406c04470bb..b8333cd368a 100644 --- a/lib/public/Notification/INotifier.php +++ b/lib/public/Notification/INotifier.php @@ -22,7 +22,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Notification; /** diff --git a/lib/public/OCS/IDiscoveryService.php b/lib/public/OCS/IDiscoveryService.php index fdbe886f695..b3f0a0e53f7 100644 --- a/lib/public/OCS/IDiscoveryService.php +++ b/lib/public/OCS/IDiscoveryService.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\OCS; /** diff --git a/lib/public/PreConditionNotMetException.php b/lib/public/PreConditionNotMetException.php index 1871a16088f..12269762a9a 100644 --- a/lib/public/PreConditionNotMetException.php +++ b/lib/public/PreConditionNotMetException.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -21,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Preview/IProvider.php b/lib/public/Preview/IProvider.php index c85dccc8a74..801aa276d83 100644 --- a/lib/public/Preview/IProvider.php +++ b/lib/public/Preview/IProvider.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Preview; /** diff --git a/lib/public/Preview/IProviderV2.php b/lib/public/Preview/IProviderV2.php index 25674b7a3ef..8b5f85b3d5c 100644 --- a/lib/public/Preview/IProviderV2.php +++ b/lib/public/Preview/IProviderV2.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Preview; use OCP\Files\File; diff --git a/lib/public/Preview/IVersionedPreviewFile.php b/lib/public/Preview/IVersionedPreviewFile.php index ed16d5d18c3..e41e7db78cd 100644 --- a/lib/public/Preview/IVersionedPreviewFile.php +++ b/lib/public/Preview/IVersionedPreviewFile.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Preview; /** diff --git a/lib/public/Profile/ILinkAction.php b/lib/public/Profile/ILinkAction.php new file mode 100644 index 00000000000..67e69a73d9c --- /dev/null +++ b/lib/public/Profile/ILinkAction.php @@ -0,0 +1,115 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OCP\Profile; + +use OCP\IUser; + +/** + * @since 23.0.0 + */ +interface ILinkAction { + + /** + * Preload the user specific value required by the action + * + * e.g. the email is loaded for the email action and the userId for the Talk action + * + * @since 23.0.0 + */ + public function preload(IUser $targetUser): void; + + /** + * Returns the app ID of the action + * + * e.g. 'spreed' + * + * @since 23.0.0 + */ + public function getAppId(): string; + + /** + * Returns the unique ID of the action + * + * *For account properties this is the constant defined in lib/public/Accounts/IAccountManager.php* + * + * e.g. 'email' + * + * @since 23.0.0 + */ + public function getId(): string; + + /** + * Returns the translated unique display ID of the action + * + * Should be something short and descriptive of the action + * as this is seen by the end-user when configuring actions + * + * e.g. 'Email' + * + * @since 23.0.0 + */ + public function getDisplayId(): string; + + /** + * Returns the translated title + * + * e.g. 'Mail user@domain.com' + * + * Use the L10N service to translate it + * + * @since 23.0.0 + */ + public function getTitle(): string; + + /** + * Returns the priority + * + * *Actions are sorted in ascending order* + * + * e.g. 60 + * + * @since 23.0.0 + */ + public function getPriority(): int; + + /** + * Returns the URL link to the 16*16 SVG icon + * + * @since 23.0.0 + */ + public function getIcon(): string; + + /** + * Returns the target of the action, + * if null is returned the action won't be registered + * + * e.g. 'mailto:user@domain.com' + * + * @since 23.0.0 + */ + public function getTarget(): ?string; +} diff --git a/lib/public/Profile/ParameterDoesNotExistException.php b/lib/public/Profile/ParameterDoesNotExistException.php new file mode 100644 index 00000000000..543a8edc17a --- /dev/null +++ b/lib/public/Profile/ParameterDoesNotExistException.php @@ -0,0 +1,40 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2021 Christopher Ng <chrng8@gmail.com> + * + * @author Christopher Ng <chrng8@gmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ + +namespace OCP\Profile; + +/** + * @since 23.0.0 + */ +class ParameterDoesNotExistException extends \Exception { + + /** + * @since 23.0.0 + */ + public function __construct($parameter) { + parent::__construct("Parameter $parameter does not exist."); + } +} diff --git a/lib/public/Remote/Api/IApiCollection.php b/lib/public/Remote/Api/IApiCollection.php index 04a0cef7af3..0216507db3e 100644 --- a/lib/public/Remote/Api/IApiCollection.php +++ b/lib/public/Remote/Api/IApiCollection.php @@ -13,26 +13,27 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote\Api; /** * Provides access to the various apis of a remote instance * * @since 13.0.0 + * @deprecated 23.0.0 */ interface IApiCollection { /** * @return IUserApi * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getUserApi(); @@ -40,6 +41,7 @@ interface IApiCollection { * @return ICapabilitiesApi * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getCapabilitiesApi(); } diff --git a/lib/public/Remote/Api/IApiFactory.php b/lib/public/Remote/Api/IApiFactory.php index f144898fe55..6d367f86207 100644 --- a/lib/public/Remote/Api/IApiFactory.php +++ b/lib/public/Remote/Api/IApiFactory.php @@ -13,14 +13,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote\Api; use OCP\Remote\ICredentials; @@ -28,6 +27,7 @@ use OCP\Remote\IInstance; /** * @since 13.0.0 + * @deprecated 23.0.0 */ interface IApiFactory { /** @@ -36,6 +36,7 @@ interface IApiFactory { * @return IApiCollection * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getApiCollection(IInstance $instance, ICredentials $credentials); } diff --git a/lib/public/Remote/Api/ICapabilitiesApi.php b/lib/public/Remote/Api/ICapabilitiesApi.php index 6c5833aae4d..cecc9d3f943 100644 --- a/lib/public/Remote/Api/ICapabilitiesApi.php +++ b/lib/public/Remote/Api/ICapabilitiesApi.php @@ -13,24 +13,25 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote\Api; /** * @since 13.0.0 + * @deprecated 23.0.0 */ interface ICapabilitiesApi { /** * @return array The capabilities in the form of [$appId => [$capability => $value]] * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getCapabilities(); } diff --git a/lib/public/Remote/Api/IUserApi.php b/lib/public/Remote/Api/IUserApi.php index f4def442cfd..71bf5e3fd2b 100644 --- a/lib/public/Remote/Api/IUserApi.php +++ b/lib/public/Remote/Api/IUserApi.php @@ -13,20 +13,20 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote\Api; use OCP\Remote\IUser; /** * @since 13.0.0 + * @deprecated 23.0.0 */ interface IUserApi { /** @@ -34,6 +34,7 @@ interface IUserApi { * @return IUser * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getUser($userId); } diff --git a/lib/public/Remote/ICredentials.php b/lib/public/Remote/ICredentials.php index c737c1e517b..db8fa9fa109 100644 --- a/lib/public/Remote/ICredentials.php +++ b/lib/public/Remote/ICredentials.php @@ -13,26 +13,27 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote; /** * The credentials for a remote user * * @since 13.0.0 + * @deprecated 23.0.0 */ interface ICredentials { /** * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getUsername(); @@ -40,6 +41,7 @@ interface ICredentials { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getPassword(); } diff --git a/lib/public/Remote/IInstance.php b/lib/public/Remote/IInstance.php index 73bb854a030..8c048805434 100644 --- a/lib/public/Remote/IInstance.php +++ b/lib/public/Remote/IInstance.php @@ -13,26 +13,27 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote; /** * Provides some basic info about a remote Nextcloud instance * * @since 13.0.0 + * @deprecated 23.0.0 */ interface IInstance { /** * @return string The url of the remote server without protocol * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getUrl(); @@ -40,6 +41,7 @@ interface IInstance { * @return string The of of the remote server with protocol * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getFullUrl(); @@ -47,6 +49,7 @@ interface IInstance { * @return string The full version string in '13.1.2.3' format * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getVersion(); @@ -54,6 +57,7 @@ interface IInstance { * @return string 'http' or 'https' * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getProtocol(); @@ -61,6 +65,7 @@ interface IInstance { * Check that the remote server is installed and not in maintenance mode * * @since 13.0.0 + * @deprecated 23.0.0 * * @return bool */ diff --git a/lib/public/Remote/IInstanceFactory.php b/lib/public/Remote/IInstanceFactory.php index 199f25a26f0..10a8b733a04 100644 --- a/lib/public/Remote/IInstanceFactory.php +++ b/lib/public/Remote/IInstanceFactory.php @@ -13,18 +13,18 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote; /** * @since 13.0.0 + * @deprecated 23.0.0 */ interface IInstanceFactory { /** @@ -32,6 +32,7 @@ interface IInstanceFactory { * @return IInstance * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getInstance($url); } diff --git a/lib/public/Remote/IUser.php b/lib/public/Remote/IUser.php index d031753f16a..27fa8bc8b43 100644 --- a/lib/public/Remote/IUser.php +++ b/lib/public/Remote/IUser.php @@ -13,26 +13,27 @@ * * 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 + * 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/>. * */ - namespace OCP\Remote; /** * User info for a remote user * * @since 13.0.0 + * @deprecated 23.0.0 */ interface IUser { /** * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getUserId(); @@ -40,6 +41,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getEmail(); @@ -47,6 +49,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getDisplayName(); @@ -54,6 +57,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getPhone(); @@ -61,6 +65,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getAddress(); @@ -68,6 +73,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getWebsite(); @@ -75,6 +81,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getTwitter(); @@ -82,6 +89,7 @@ interface IUser { * @return string[] * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getGroups(); @@ -89,6 +97,7 @@ interface IUser { * @return string * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getLanguage(); @@ -96,6 +105,7 @@ interface IUser { * @return int * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getUsedSpace(); @@ -103,6 +113,7 @@ interface IUser { * @return int * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getFreeSpace(); @@ -110,6 +121,7 @@ interface IUser { * @return int * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getTotalSpace(); @@ -117,6 +129,7 @@ interface IUser { * @return int * * @since 13.0.0 + * @deprecated 23.0.0 */ public function getQuota(); } diff --git a/lib/public/RichObjectStrings/Definitions.php b/lib/public/RichObjectStrings/Definitions.php index c59855e957b..676979170a6 100644 --- a/lib/public/RichObjectStrings/Definitions.php +++ b/lib/public/RichObjectStrings/Definitions.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com> * * @author Joas Schilling <coding@schilljs.com> + * @author Jonas Rittershofer <jotoeri@users.noreply.github.com> * @author Julius Härtl <jus@bitgrid.net> * @author Maxence Lange <maxence@nextcloud.com> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -18,14 +19,13 @@ * * 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 + * 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/>. * */ - namespace OCP\RichObjectStrings; /** @@ -418,6 +418,37 @@ class Definitions { ], ], ], + 'geo-location' => [ + 'author' => 'Nextcloud', + 'app' => 'core', + 'since' => '22.0.0', + 'parameters' => [ + 'id' => [ + 'since' => '22.0.0', + 'required' => true, + 'description' => 'The geo URI (https://en.wikipedia.org/wiki/Geo_URI_scheme) to identify the location', + 'example' => 'geo:52.5450511,13.3741463', + ], + 'name' => [ + 'since' => '22.0.0', + 'required' => true, + 'description' => 'A description of the location', + 'example' => 'Nextcloud Berlin Office', + ], + 'latitude' => [ + 'since' => '22.0.0', + 'required' => true, + 'description' => 'The latitude of the location MUST be the same as in the id', + 'example' => '52.5450511', + ], + 'longitude' => [ + 'since' => '22.0.0', + 'required' => true, + 'description' => 'The longitude of the location MUST be the same as in the id', + 'example' => '13.3741463', + ], + ], + ], 'open-graph' => [ 'author' => 'Maxence Lange', 'app' => 'mood', diff --git a/lib/public/RichObjectStrings/IValidator.php b/lib/public/RichObjectStrings/IValidator.php index f04d17681d8..1dfd2a8d329 100644 --- a/lib/public/RichObjectStrings/IValidator.php +++ b/lib/public/RichObjectStrings/IValidator.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\RichObjectStrings; /** diff --git a/lib/public/RichObjectStrings/InvalidObjectExeption.php b/lib/public/RichObjectStrings/InvalidObjectExeption.php index 76460dc0330..95b0cf591b3 100644 --- a/lib/public/RichObjectStrings/InvalidObjectExeption.php +++ b/lib/public/RichObjectStrings/InvalidObjectExeption.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\RichObjectStrings; /** diff --git a/lib/public/Route/IRoute.php b/lib/public/Route/IRoute.php index fd0a6ffbb90..f0364dc2f84 100644 --- a/lib/public/Route/IRoute.php +++ b/lib/public/Route/IRoute.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Route; /** diff --git a/lib/public/Route/IRouter.php b/lib/public/Route/IRouter.php index 2eeb4a3b35e..5b50cf8c3c8 100644 --- a/lib/public/Route/IRouter.php +++ b/lib/public/Route/IRouter.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Route; /** diff --git a/lib/public/SabrePluginEvent.php b/lib/public/SabrePluginEvent.php index c9f80d184c2..c0dde301ff1 100644 --- a/lib/public/SabrePluginEvent.php +++ b/lib/public/SabrePluginEvent.php @@ -22,7 +22,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; use OCP\AppFramework\Http; diff --git a/lib/public/SabrePluginException.php b/lib/public/SabrePluginException.php index 7d2220999e5..8e322b1fa9b 100644 --- a/lib/public/SabrePluginException.php +++ b/lib/public/SabrePluginException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; use Sabre\DAV\Exception; diff --git a/lib/public/Search/IProvider.php b/lib/public/Search/IProvider.php index 91258043297..c94dfe7a4e4 100644 --- a/lib/public/Search/IProvider.php +++ b/lib/public/Search/IProvider.php @@ -7,7 +7,7 @@ declare(strict_types=1); * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Search; use OCP\IUser; diff --git a/lib/public/Search/ISearchQuery.php b/lib/public/Search/ISearchQuery.php index 3f0d9ede645..2f4f1038fe4 100644 --- a/lib/public/Search/ISearchQuery.php +++ b/lib/public/Search/ISearchQuery.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Search; /** diff --git a/lib/public/Search/PagedProvider.php b/lib/public/Search/PagedProvider.php index 479214ad405..61f5dd457ee 100644 --- a/lib/public/Search/PagedProvider.php +++ b/lib/public/Search/PagedProvider.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Search; /** diff --git a/lib/public/Search/Provider.php b/lib/public/Search/Provider.php index 275a63c0056..2cf0c4d043b 100644 --- a/lib/public/Search/Provider.php +++ b/lib/public/Search/Provider.php @@ -24,11 +24,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Search; /** - * Provides a template for search functionality throughout ownCloud; + * Provides a template for search functionality throughout Nextcloud; * @since 7.0.0 * @deprecated 20.0.0 */ diff --git a/lib/public/Search/Result.php b/lib/public/Search/Result.php index a3a58a38cde..86476ade721 100644 --- a/lib/public/Search/Result.php +++ b/lib/public/Search/Result.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Search; /** diff --git a/lib/public/Search/SearchResult.php b/lib/public/Search/SearchResult.php index e70c70f1aaa..685dad0f0ca 100644 --- a/lib/public/Search/SearchResult.php +++ b/lib/public/Search/SearchResult.php @@ -6,7 +6,7 @@ declare(strict_types=1); * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Search; use JsonSerializable; diff --git a/lib/public/Search/SearchResultEntry.php b/lib/public/Search/SearchResultEntry.php index 347c3fcd289..42c3a4cbdd7 100644 --- a/lib/public/Search/SearchResultEntry.php +++ b/lib/public/Search/SearchResultEntry.php @@ -6,7 +6,7 @@ declare(strict_types=1); * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license GNU AGPL version 3 or any later version * @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Search; use JsonSerializable; diff --git a/lib/public/Security/Bruteforce/MaxDelayReached.php b/lib/public/Security/Bruteforce/MaxDelayReached.php index 3dcb3fefe27..eaac4edbd1b 100644 --- a/lib/public/Security/Bruteforce/MaxDelayReached.php +++ b/lib/public/Security/Bruteforce/MaxDelayReached.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Security\Bruteforce; /** diff --git a/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php b/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php index 369e86f3852..13aeab8bf44 100644 --- a/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php +++ b/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Security\CSP; use OC\Security\CSP\ContentSecurityPolicyManager; diff --git a/lib/public/Security/Events/GenerateSecurePasswordEvent.php b/lib/public/Security/Events/GenerateSecurePasswordEvent.php index ba3c5a63e11..6897cb1ee91 100644 --- a/lib/public/Security/Events/GenerateSecurePasswordEvent.php +++ b/lib/public/Security/Events/GenerateSecurePasswordEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Security\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Security/Events/ValidatePasswordPolicyEvent.php b/lib/public/Security/Events/ValidatePasswordPolicyEvent.php index 1eab7780723..efe420d3cf2 100644 --- a/lib/public/Security/Events/ValidatePasswordPolicyEvent.php +++ b/lib/public/Security/Events/ValidatePasswordPolicyEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Security\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php b/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php index 764b57c31ea..a0478ad56fe 100644 --- a/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php +++ b/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Security\FeaturePolicy; use OC\Security\FeaturePolicy\FeaturePolicyManager; diff --git a/lib/public/Security/IContentSecurityPolicyManager.php b/lib/public/Security/IContentSecurityPolicyManager.php index ccd6ec16133..878527bc4be 100644 --- a/lib/public/Security/IContentSecurityPolicyManager.php +++ b/lib/public/Security/IContentSecurityPolicyManager.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -21,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Security; use OCP\AppFramework\Http\EmptyContentSecurityPolicy; diff --git a/lib/public/Security/ICredentialsManager.php b/lib/public/Security/ICredentialsManager.php index 47c8c7dbef2..7ac0d705a77 100644 --- a/lib/public/Security/ICredentialsManager.php +++ b/lib/public/Security/ICredentialsManager.php @@ -1,8 +1,12 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author J0WI <J0WI@users.noreply.github.com> * @author Robin McCorkell <robin@mccorkell.me.uk> * * @license AGPL-3.0 @@ -20,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Security; /** @@ -38,7 +41,7 @@ interface ICredentialsManager { * @param mixed $credentials * @since 8.2.0 */ - public function store($userId, $identifier, $credentials); + public function store(string $userId, string $identifier, $credentials): void; /** * Retrieve a set of credentials @@ -48,7 +51,7 @@ interface ICredentialsManager { * @return mixed * @since 8.2.0 */ - public function retrieve($userId, $identifier); + public function retrieve(string $userId, string $identifier); /** * Delete a set of credentials @@ -58,7 +61,7 @@ interface ICredentialsManager { * @return int rows removed * @since 8.2.0 */ - public function delete($userId, $identifier); + public function delete(string $userId, string $identifier): int; /** * Erase all credentials stored for a user @@ -67,5 +70,5 @@ interface ICredentialsManager { * @return int rows removed * @since 8.2.0 */ - public function erase($userId); + public function erase(string $userId): int; } diff --git a/lib/public/Security/ICrypto.php b/lib/public/Security/ICrypto.php index 622b77d469c..2ca501e62be 100644 --- a/lib/public/Security/ICrypto.php +++ b/lib/public/Security/ICrypto.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Security; /** diff --git a/lib/public/Security/IHasher.php b/lib/public/Security/IHasher.php index 881d74aa184..7c4d743002c 100644 --- a/lib/public/Security/IHasher.php +++ b/lib/public/Security/IHasher.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Security; /** diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php index 2d82f9024b2..250ecd25358 100644 --- a/lib/public/Security/ISecureRandom.php +++ b/lib/public/Security/ISecureRandom.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Security; /** @@ -48,6 +47,7 @@ interface ISecureRandom { public const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz'; public const CHAR_DIGITS = '0123456789'; public const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~'; + public const CHAR_ALPHANUMERIC = self::CHAR_UPPER . self::CHAR_LOWER . self::CHAR_DIGITS; /** * Characters that can be used for <code>generate($length, $characters)</code>, to diff --git a/lib/public/Security/VerificationToken/IVerificationToken.php b/lib/public/Security/VerificationToken/IVerificationToken.php new file mode 100644 index 00000000000..e1d9203ec3b --- /dev/null +++ b/lib/public/Security/VerificationToken/IVerificationToken.php @@ -0,0 +1,62 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Security\VerificationToken; + +use OCP\IUser; + +/** + * @since 23.0.0 + */ +interface IVerificationToken { + + /** + * Checks whether the a provided tokent matches a stored token and its + * constraints. An InvalidTokenException is thrown on issues, otherwise + * the check is successful. + * + * null can be passed as $user, but mind that this is for conveniently + * passing the return of IUserManager::getUser() to this method. When + * $user is null, InvalidTokenException is thrown for all the issued + * tokens are user related. + * + * @throws InvalidTokenException + * @since 23.0.0 + */ + public function check(string $token, ?IUser $user, string $subject, string $passwordPrefix = '', bool $expiresWithLogin = false): void; + + /** + * @since 23.0.0 + */ + public function create(IUser $user, string $subject, string $passwordPrefix = ''): string; + + /** + * Deletes the token identified by the provided parameters + * + * @since 23.0.0 + */ + public function delete(string $token, IUser $user, string $subject): void; +} diff --git a/lib/public/Security/VerificationToken/InvalidTokenException.php b/lib/public/Security/VerificationToken/InvalidTokenException.php new file mode 100644 index 00000000000..5c8144c5c74 --- /dev/null +++ b/lib/public/Security/VerificationToken/InvalidTokenException.php @@ -0,0 +1,74 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * + * @license GNU AGPL version 3 or any later version + * + * 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 <https://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Security\VerificationToken; + +/** @since 23.0.0 */ +class InvalidTokenException extends \Exception { + + /** + * @since 23.0.0 + */ + public function __construct(int $code) { + parent::__construct('', $code); + } + + /** + * @var int + * @since 23.0.0 + */ + public const USER_UNKNOWN = 1; + + /** + * @var int + * @since 23.0.0 + */ + public const TOKEN_NOT_FOUND = 2; + + /** + * @var int + * @since 23.0.0 + */ + public const TOKEN_DECRYPTION_ERROR = 3; + + /** + * @var int + * @since 23.0.0 + */ + public const TOKEN_INVALID_FORMAT = 4; + + /** + * @var int + * @since 23.0.0 + */ + public const TOKEN_EXPIRED = 5; + + /** + * @var int + * @since 23.0.0 + */ + public const TOKEN_MISMATCH = 6; +} diff --git a/lib/public/Session/Exceptions/SessionNotAvailableException.php b/lib/public/Session/Exceptions/SessionNotAvailableException.php index b7c7b993614..92cdf487a92 100644 --- a/lib/public/Session/Exceptions/SessionNotAvailableException.php +++ b/lib/public/Session/Exceptions/SessionNotAvailableException.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Session\Exceptions; use Exception; diff --git a/lib/public/Settings/IDelegatedSettings.php b/lib/public/Settings/IDelegatedSettings.php new file mode 100644 index 00000000000..f9bf98668fb --- /dev/null +++ b/lib/public/Settings/IDelegatedSettings.php @@ -0,0 +1,54 @@ +<?php +/** + * @copyright Copyright (c) Nextcloud GmbH + * + * @author Carl Schwan <carl@carlschwan.eu> + * + * @license GNU AGPL version 3 or any later version + * + * 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/>. + * + */ +namespace OCP\Settings; + +/** + * Special cases of settings that can be allowed to use by member of special + * groups. + * @since 23.0.0 + */ +interface IDelegatedSettings extends ISettings { + /** + * Get the name of the settings to differentiate settings inside a section or + * null if only the section name should be displayed. + * @since 23.0.0 + */ + public function getName(): ?string; + + /** + * Get a list of authorized app config that this setting is allowed to modify. + * The format of the array is the following: + * ```php + * <?php + * [ + * 'app_name' => [ + * '/simple_key/', # value + * '/s[a-z]*ldap/', # regex + * ], + * 'another_app_name => [ ... ], + * ] + * ``` + * @since 23.0.0 + */ + public function getAuthorizedAppConfig(): array; +} diff --git a/lib/public/Settings/IIconSection.php b/lib/public/Settings/IIconSection.php index 3a7ef9ed126..c56565fbf85 100644 --- a/lib/public/Settings/IIconSection.php +++ b/lib/public/Settings/IIconSection.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Settings; /** diff --git a/lib/public/Settings/IManager.php b/lib/public/Settings/IManager.php index 88a8a297c54..2ec3fb0fd21 100644 --- a/lib/public/Settings/IManager.php +++ b/lib/public/Settings/IManager.php @@ -16,7 +16,7 @@ * * 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 + * 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 @@ -26,6 +26,8 @@ namespace OCP\Settings; +use OCP\IUser; + /** * @since 9.1 */ @@ -51,7 +53,7 @@ interface IManager { public const KEY_PERSONAL_SECTION = 'personal-section'; /** - * @param string $type 'admin' or 'personal' + * @param string $type 'admin-section' or 'personal-section' * @param string $section Class must implement OCP\Settings\ISection * @since 14.0.0 */ @@ -59,7 +61,7 @@ interface IManager { /** * @param string $type 'admin' or 'personal' - * @param string $setting Class must implement OCP\Settings\ISetting + * @param string $setting Class must implement OCP\Settings\ISettings * @since 14.0.0 */ public function registerSetting(string $type, string $setting); @@ -67,7 +69,7 @@ interface IManager { /** * returns a list of the admin sections * - * @return array array of ISection[] where key is the priority + * @return array<int, array<int, IIconSection>> array from IConSection[] where key is the priority * @since 9.1.0 */ public function getAdminSections(): array; @@ -85,16 +87,32 @@ interface IManager { * * @param string $section the section id for which to load the settings * @param bool $subAdminOnly only return settings sub admins are supposed to see (since 17.0.0) - * @return array array of IAdmin[] where key is the priority + * @return array<int, array<int, ISettings>> array of ISettings[] where key is the priority * @since 9.1.0 */ public function getAdminSettings($section, bool $subAdminOnly = false): array; /** + * Returns a list of admin settings that the given user can use for the give section + * + * @return array<int, list<ISettings>> The array of admin settings there admin delegation is allowed. + * @since 23.0.0 + */ + public function getAllowedAdminSettings(string $section, IUser $user): array; + + /** + * Returns a list of admin settings that the given user can use. + * + * @return array<int, list<ISettings>> The array of admin settings there admin delegation is allowed. + * @since 23.0.0 + */ + public function getAllAllowedAdminSettings(IUser $user): array; + + /** * returns a list of the personal settings * * @param string $section the section id for which to load the settings - * @return array array of IPersonal[] where key is the priority + * @return array array of ISettings[] where key is the priority * @since 13.0.0 */ public function getPersonalSettings($section): array; diff --git a/lib/public/Settings/ISettings.php b/lib/public/Settings/ISettings.php index a7bae53e3bf..be7e0b7bf82 100644 --- a/lib/public/Settings/ISettings.php +++ b/lib/public/Settings/ISettings.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Lukas Reschke <lukas@statuscode.ch> * * @license GNU AGPL version 3 or any later version @@ -14,14 +15,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Settings; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/public/Settings/ISubAdminSettings.php b/lib/public/Settings/ISubAdminSettings.php index d7f55eddfb0..46eb80696b2 100644 --- a/lib/public/Settings/ISubAdminSettings.php +++ b/lib/public/Settings/ISubAdminSettings.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Settings; /** diff --git a/lib/public/Share.php b/lib/public/Share.php index 7ce294b614d..6aeadb3a6ed 100644 --- a/lib/public/Share.php +++ b/lib/public/Share.php @@ -27,13 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Share Class - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Share/Events/ShareCreatedEvent.php b/lib/public/Share/Events/ShareCreatedEvent.php index d0f2defb698..85de3a83040 100644 --- a/lib/public/Share/Events/ShareCreatedEvent.php +++ b/lib/public/Share/Events/ShareCreatedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareDeletedEvent.php b/lib/public/Share/Events/ShareDeletedEvent.php index e87799f568b..9a42088a8ff 100644 --- a/lib/public/Share/Events/ShareDeletedEvent.php +++ b/lib/public/Share/Events/ShareDeletedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/VerifyMountPointEvent.php b/lib/public/Share/Events/VerifyMountPointEvent.php index d27d02e6864..c824eea4608 100644 --- a/lib/public/Share/Events/VerifyMountPointEvent.php +++ b/lib/public/Share/Events/VerifyMountPointEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Share\Events; use OC\Files\View; diff --git a/lib/public/Share/Exceptions/AlreadySharedException.php b/lib/public/Share/Exceptions/AlreadySharedException.php index 2f8b9257387..06cb93cb6af 100644 --- a/lib/public/Share/Exceptions/AlreadySharedException.php +++ b/lib/public/Share/Exceptions/AlreadySharedException.php @@ -1,9 +1,12 @@ <?php declare(strict_types=1); + /** * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl> * + * @author Robin Appelman <robin@icewind.nl> + * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify @@ -13,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OCP\Share\Exceptions; use OCP\Share\IShare; diff --git a/lib/public/Share/Exceptions/GenericShareException.php b/lib/public/Share/Exceptions/GenericShareException.php index 8d622ff848f..85c440e2387 100644 --- a/lib/public/Share/Exceptions/GenericShareException.php +++ b/lib/public/Share/Exceptions/GenericShareException.php @@ -22,10 +22,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class GenericEncryptionException diff --git a/lib/public/Share/Exceptions/IllegalIDChangeException.php b/lib/public/Share/Exceptions/IllegalIDChangeException.php index 7345a0e1ff8..563a227e963 100644 --- a/lib/public/Share/Exceptions/IllegalIDChangeException.php +++ b/lib/public/Share/Exceptions/IllegalIDChangeException.php @@ -20,7 +20,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share\Exceptions; /** diff --git a/lib/public/Share/Exceptions/ShareNotFound.php b/lib/public/Share/Exceptions/ShareNotFound.php index 12cdbf4fd9c..66827b4d179 100644 --- a/lib/public/Share/Exceptions/ShareNotFound.php +++ b/lib/public/Share/Exceptions/ShareNotFound.php @@ -19,7 +19,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share\Exceptions; /** @@ -28,4 +27,18 @@ namespace OCP\Share\Exceptions; * @since 9.0.0 */ class ShareNotFound extends GenericShareException { + + /** + * @param string $message + * @param string $hint + * @param int $code + * @param \Exception|null $previous + * @since 9.0.0 + */ + public function __construct($message = '', ...$arguments) { + if (empty($message)) { + $message = 'Share not found'; + } + parent::__construct($message, ...$arguments); + } } diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 606e6429918..77a9980a894 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -5,7 +5,7 @@ * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Morris Jobke <hey@morrisjobke.de> @@ -27,7 +27,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share; use OCP\Files\Folder; @@ -347,6 +346,54 @@ interface IManager { public function shareApiLinkDefaultExpireDays(); /** + * Is default internal expire date enabled + * + * @return bool + * @since 22.0.0 + */ + public function shareApiInternalDefaultExpireDate(): bool; + + /** + * Is default remote expire date enabled + * + * @return bool + * @since 22.0.0 + */ + public function shareApiRemoteDefaultExpireDate(): bool; + + /** + * Is default expire date enforced + * + * @return bool + * @since 22.0.0 + */ + public function shareApiInternalDefaultExpireDateEnforced(): bool; + + /** + * Is default expire date enforced for remote shares + * + * @return bool + * @since 22.0.0 + */ + public function shareApiRemoteDefaultExpireDateEnforced(): bool; + + /** + * Number of default expire days + * + * @return int + * @since 22.0.0 + */ + public function shareApiInternalDefaultExpireDays(): int; + + /** + * Number of default expire days for remote shares + * + * @return int + * @since 22.0.0 + */ + public function shareApiRemoteDefaultExpireDays(): int; + + /** * Allow public upload on link shares * * @return bool diff --git a/lib/public/Share/IProviderFactory.php b/lib/public/Share/IProviderFactory.php index 32f0b2bab8c..71d95203007 100644 --- a/lib/public/Share/IProviderFactory.php +++ b/lib/public/Share/IProviderFactory.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share; use OC\Share20\Exception\ProviderException; diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index 480d6c06e17..8ff3f5f0394 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -5,7 +5,7 @@ * @author Bjoern Schiessle <bjoern@schiessle.org> * @author Daniel Calviño Sánchez <danxuliu@gmail.com> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> + * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Maxence Lange <maxence@nextcloud.com> * @author Robin Appelman <robin@icewind.nl> @@ -26,7 +26,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/public/Share/IShareHelper.php b/lib/public/Share/IShareHelper.php index 37defc00f93..8bb08de07d6 100644 --- a/lib/public/Share/IShareHelper.php +++ b/lib/public/Share/IShareHelper.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\Share; use OCP\Files\Node; diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index c35fa6660f2..6af513360fe 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\Share; use OCP\Files\Folder; diff --git a/lib/public/Share_Backend.php b/lib/public/Share_Backend.php index cb49ce8e844..6b046df0feb 100644 --- a/lib/public/Share_Backend.php +++ b/lib/public/Share_Backend.php @@ -23,7 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Share_Backend_Collection.php b/lib/public/Share_Backend_Collection.php index 45aa653ebff..37872aed8e9 100644 --- a/lib/public/Share_Backend_Collection.php +++ b/lib/public/Share_Backend_Collection.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Share_Backend_File_Dependent.php b/lib/public/Share_Backend_File_Dependent.php index f49c0b18f7e..dfb6c8c5a2c 100644 --- a/lib/public/Share_Backend_File_Dependent.php +++ b/lib/public/Share_Backend_File_Dependent.php @@ -21,7 +21,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/Support/CrashReport/ICollectBreadcrumbs.php b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php index f74afe52193..105f3272bd4 100644 --- a/lib/public/Support/CrashReport/ICollectBreadcrumbs.php +++ b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\CrashReport; /** diff --git a/lib/public/Support/CrashReport/IMessageReporter.php b/lib/public/Support/CrashReport/IMessageReporter.php index 425900db0a6..e56710750b6 100644 --- a/lib/public/Support/CrashReport/IMessageReporter.php +++ b/lib/public/Support/CrashReport/IMessageReporter.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\CrashReport; /** diff --git a/lib/public/Support/CrashReport/IRegistry.php b/lib/public/Support/CrashReport/IRegistry.php index 77456663848..6ee2b57f613 100644 --- a/lib/public/Support/CrashReport/IRegistry.php +++ b/lib/public/Support/CrashReport/IRegistry.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\CrashReport; use Exception; diff --git a/lib/public/Support/CrashReport/IReporter.php b/lib/public/Support/CrashReport/IReporter.php index 5aaa9d8a6f5..ecbfa348d04 100644 --- a/lib/public/Support/CrashReport/IReporter.php +++ b/lib/public/Support/CrashReport/IReporter.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\CrashReport; use Exception; diff --git a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php index 3d9485a71ec..726978c26a6 100644 --- a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php +++ b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> * * @author Morris Jobke <hey@morrisjobke.de> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\Subscription\Exception; /** diff --git a/lib/public/Support/Subscription/IRegistry.php b/lib/public/Support/Subscription/IRegistry.php index ab1d00fa823..1082f12ab58 100644 --- a/lib/public/Support/Subscription/IRegistry.php +++ b/lib/public/Support/Subscription/IRegistry.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> * * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\Subscription; use OCP\Support\Subscription\Exception\AlreadyRegisteredException; diff --git a/lib/public/Support/Subscription/ISubscription.php b/lib/public/Support/Subscription/ISubscription.php index 9614c0ed77b..c602156b47c 100644 --- a/lib/public/Support/Subscription/ISubscription.php +++ b/lib/public/Support/Subscription/ISubscription.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> * * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\Subscription; /** diff --git a/lib/public/Support/Subscription/ISupportedApps.php b/lib/public/Support/Subscription/ISupportedApps.php index 2e94601879b..121c2325a6e 100644 --- a/lib/public/Support/Subscription/ISupportedApps.php +++ b/lib/public/Support/Subscription/ISupportedApps.php @@ -3,7 +3,7 @@ declare(strict_types=1); /** - * + * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> * * @author Morris Jobke <hey@morrisjobke.de> * @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\Support\Subscription; /** diff --git a/lib/public/SystemTag/ISystemTag.php b/lib/public/SystemTag/ISystemTag.php index 39adb39ec08..6f6fce07585 100644 --- a/lib/public/SystemTag/ISystemTag.php +++ b/lib/public/SystemTag/ISystemTag.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * + * @author Johannes Leuker <j.leuker@hosting.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Vincent Petry <vincent@nextcloud.com> * @@ -23,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; /** @@ -32,6 +32,27 @@ namespace OCP\SystemTag; * @since 9.0.0 */ interface ISystemTag { + /** + * @since 22.0.0 + */ + public const ACCESS_LEVEL_PUBLIC = 0; + /** + * @since 22.0.0 + */ + public const ACCESS_LEVEL_RESTRICTED = 1; + /** + * @since 22.0.0 + */ + public const ACCESS_LEVEL_INVISIBLE = 2; + + /** + * @since 22.0.0 + */ + public const ACCESS_LEVEL_LOOKUP = [ + ISystemTag::ACCESS_LEVEL_PUBLIC => 'public', + ISystemTag::ACCESS_LEVEL_RESTRICTED => 'restricted', + ISystemTag::ACCESS_LEVEL_INVISIBLE => 'invisible', + ]; /** * Returns the tag id @@ -68,4 +89,13 @@ interface ISystemTag { * @since 9.0.0 */ public function isUserAssignable(): bool; + + /** + * Returns a term summarizing the access control flags + * + * @return int the level of access control + * + * @since 22.0.0 + */ + public function getAccessLevel(): int; } diff --git a/lib/public/SystemTag/ISystemTagManager.php b/lib/public/SystemTag/ISystemTagManager.php index a9973a571c6..500d80ea278 100644 --- a/lib/public/SystemTag/ISystemTagManager.php +++ b/lib/public/SystemTag/ISystemTagManager.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; use OCP\IUser; diff --git a/lib/public/SystemTag/ISystemTagManagerFactory.php b/lib/public/SystemTag/ISystemTagManagerFactory.php index 88999595caf..f016585dfc9 100644 --- a/lib/public/SystemTag/ISystemTagManagerFactory.php +++ b/lib/public/SystemTag/ISystemTagManagerFactory.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; use OCP\IServerContainer; diff --git a/lib/public/SystemTag/ISystemTagObjectMapper.php b/lib/public/SystemTag/ISystemTagObjectMapper.php index 4e774102db5..4d9cb24a2e8 100644 --- a/lib/public/SystemTag/ISystemTagObjectMapper.php +++ b/lib/public/SystemTag/ISystemTagObjectMapper.php @@ -24,7 +24,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; /** diff --git a/lib/public/SystemTag/ManagerEvent.php b/lib/public/SystemTag/ManagerEvent.php index 45cd35fc821..738cd1c748d 100644 --- a/lib/public/SystemTag/ManagerEvent.php +++ b/lib/public/SystemTag/ManagerEvent.php @@ -26,7 +26,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php index a8fc30771f4..cf686fa5ff6 100644 --- a/lib/public/SystemTag/MapperEvent.php +++ b/lib/public/SystemTag/MapperEvent.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php index 33acecdcd2d..5ef78c25728 100644 --- a/lib/public/SystemTag/SystemTagsEntityEvent.php +++ b/lib/public/SystemTag/SystemTagsEntityEvent.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/TagAlreadyExistsException.php b/lib/public/SystemTag/TagAlreadyExistsException.php index e7114d52f06..23c36a376f6 100644 --- a/lib/public/SystemTag/TagAlreadyExistsException.php +++ b/lib/public/SystemTag/TagAlreadyExistsException.php @@ -23,7 +23,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; /** diff --git a/lib/public/SystemTag/TagNotFoundException.php b/lib/public/SystemTag/TagNotFoundException.php index a689a689141..1e9ac3c7503 100644 --- a/lib/public/SystemTag/TagNotFoundException.php +++ b/lib/public/SystemTag/TagNotFoundException.php @@ -25,7 +25,6 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP\SystemTag; /** diff --git a/lib/public/Template.php b/lib/public/Template.php index aebd824f37f..c66f46798b3 100644 --- a/lib/public/Template.php +++ b/lib/public/Template.php @@ -24,7 +24,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - namespace OCP; /** diff --git a/lib/public/User.php b/lib/public/User.php deleted file mode 100644 index 9bbc2c20cca..00000000000 --- a/lib/public/User.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bart Visscher <bartv@thisnet.nl> - * @author Frank Karlitschek <frank@karlitschek.de> - * @author Georg Ehrke <oc.list@georgehrke.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Sebastian Wessalowski <sebastian@wessalowski.org> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -/** - * Public interface of ownCloud for apps to use. - * User Class - * - */ - -// use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes - -namespace OCP; - -/** - * This class provides access to the user management. You can get information - * about the currently logged in user and the permissions for example - * @since 5.0.0 - * @deprecated 13.0.0 - */ -class User { - /** - * Get the user id of the user currently logged in. - * @return string uid or false - * @deprecated 8.0.0 Use \OC::$server->getUserSession()->getUser()->getUID() - * @since 5.0.0 - */ - public static function getUser() { - return \OC_User::getUser(); - } - - /** - * Check if the user is logged in - * @return boolean - * @since 5.0.0 - * @deprecated 13.0.0 Use annotation based ACLs from the AppFramework instead - */ - public static function isLoggedIn() { - return \OC::$server->getUserSession()->isLoggedIn(); - } - - /** - * Check if the user is a admin, redirects to home if not - * @since 5.0.0 - * @deprecated 13.0.0 Use annotation based ACLs from the AppFramework instead - */ - public static function checkAdminUser() { - \OC_Util::checkAdminUser(); - } - - /** - * Check if the user is logged in, redirects to home if not. With - * redirect URL parameter to the request URI. - * @since 5.0.0 - * @deprecated 13.0.0 Use annotation based ACLs from the AppFramework instead - */ - public static function checkLoggedIn() { - \OC_Util::checkLoggedIn(); - } -} diff --git a/lib/public/User/Backend/ABackend.php b/lib/public/User/Backend/ABackend.php index a57a561369b..dff705e0806 100644 --- a/lib/public/User/Backend/ABackend.php +++ b/lib/public/User/Backend/ABackend.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; use OC\User\Backend; diff --git a/lib/public/User/Backend/ICheckPasswordBackend.php b/lib/public/User/Backend/ICheckPasswordBackend.php index ee71cff2195..b3eaf7cedb0 100644 --- a/lib/public/User/Backend/ICheckPasswordBackend.php +++ b/lib/public/User/Backend/ICheckPasswordBackend.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ICountUsersBackend.php b/lib/public/User/Backend/ICountUsersBackend.php index 1ef0d4c3661..52f947a654d 100644 --- a/lib/public/User/Backend/ICountUsersBackend.php +++ b/lib/public/User/Backend/ICountUsersBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ICreateUserBackend.php b/lib/public/User/Backend/ICreateUserBackend.php index 015351eebb8..a33cec58010 100644 --- a/lib/public/User/Backend/ICreateUserBackend.php +++ b/lib/public/User/Backend/ICreateUserBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ICustomLogout.php b/lib/public/User/Backend/ICustomLogout.php index b72141916a5..ec104d5ef42 100644 --- a/lib/public/User/Backend/ICustomLogout.php +++ b/lib/public/User/Backend/ICustomLogout.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IGetDisplayNameBackend.php b/lib/public/User/Backend/IGetDisplayNameBackend.php index 64c3713536c..1c3ed287f37 100644 --- a/lib/public/User/Backend/IGetDisplayNameBackend.php +++ b/lib/public/User/Backend/IGetDisplayNameBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IGetHomeBackend.php b/lib/public/User/Backend/IGetHomeBackend.php index aa9b278ac55..45ef5b6b215 100644 --- a/lib/public/User/Backend/IGetHomeBackend.php +++ b/lib/public/User/Backend/IGetHomeBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IGetRealUIDBackend.php b/lib/public/User/Backend/IGetRealUIDBackend.php index cc290eb6dc0..5d618b294d9 100644 --- a/lib/public/User/Backend/IGetRealUIDBackend.php +++ b/lib/public/User/Backend/IGetRealUIDBackend.php @@ -5,6 +5,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> * + * @author Joas Schilling <coding@schilljs.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -16,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IPasswordConfirmationBackend.php b/lib/public/User/Backend/IPasswordConfirmationBackend.php index de454b81d5c..3c6d14c3f1d 100644 --- a/lib/public/User/Backend/IPasswordConfirmationBackend.php +++ b/lib/public/User/Backend/IPasswordConfirmationBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IProvideAvatarBackend.php b/lib/public/User/Backend/IProvideAvatarBackend.php index 62dee1f5ca4..fe4bb841f72 100644 --- a/lib/public/User/Backend/IProvideAvatarBackend.php +++ b/lib/public/User/Backend/IProvideAvatarBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ISearchKnownUsersBackend.php b/lib/public/User/Backend/ISearchKnownUsersBackend.php index 89c7a49cd30..60a147dc62c 100644 --- a/lib/public/User/Backend/ISearchKnownUsersBackend.php +++ b/lib/public/User/Backend/ISearchKnownUsersBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ISetDisplayNameBackend.php b/lib/public/User/Backend/ISetDisplayNameBackend.php index da774d923e0..922d356bfd7 100644 --- a/lib/public/User/Backend/ISetDisplayNameBackend.php +++ b/lib/public/User/Backend/ISetDisplayNameBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ISetPasswordBackend.php b/lib/public/User/Backend/ISetPasswordBackend.php index a3cbed67ff3..2ba992286ec 100644 --- a/lib/public/User/Backend/ISetPasswordBackend.php +++ b/lib/public/User/Backend/ISetPasswordBackend.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Backend; /** diff --git a/lib/public/User/Events/BeforePasswordUpdatedEvent.php b/lib/public/User/Events/BeforePasswordUpdatedEvent.php index f41ee6e1b8d..a35659eccf4 100644 --- a/lib/public/User/Events/BeforePasswordUpdatedEvent.php +++ b/lib/public/User/Events/BeforePasswordUpdatedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserCreatedEvent.php b/lib/public/User/Events/BeforeUserCreatedEvent.php index 30c21575ec2..11575428839 100644 --- a/lib/public/User/Events/BeforeUserCreatedEvent.php +++ b/lib/public/User/Events/BeforeUserCreatedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserDeletedEvent.php b/lib/public/User/Events/BeforeUserDeletedEvent.php index 84e912a9520..511128b5d93 100644 --- a/lib/public/User/Events/BeforeUserDeletedEvent.php +++ b/lib/public/User/Events/BeforeUserDeletedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserLoggedInEvent.php b/lib/public/User/Events/BeforeUserLoggedInEvent.php index cec7b8ca29e..e39cd0f116d 100644 --- a/lib/public/User/Events/BeforeUserLoggedInEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php b/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php index 315046cfc09..d86892c52ff 100644 --- a/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserLoggedOutEvent.php b/lib/public/User/Events/BeforeUserLoggedOutEvent.php index c0967dd19ea..88a365b0eb8 100644 --- a/lib/public/User/Events/BeforeUserLoggedOutEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedOutEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/PasswordUpdatedEvent.php b/lib/public/User/Events/PasswordUpdatedEvent.php index 5c3af0b2b41..335557835c7 100644 --- a/lib/public/User/Events/PasswordUpdatedEvent.php +++ b/lib/public/User/Events/PasswordUpdatedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/PostLoginEvent.php b/lib/public/User/Events/PostLoginEvent.php index fb7df7677ee..e481b552e3b 100644 --- a/lib/public/User/Events/PostLoginEvent.php +++ b/lib/public/User/Events/PostLoginEvent.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserChangedEvent.php b/lib/public/User/Events/UserChangedEvent.php index 095e0d17c0b..3a40f8c3f11 100644 --- a/lib/public/User/Events/UserChangedEvent.php +++ b/lib/public/User/Events/UserChangedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserCreatedEvent.php b/lib/public/User/Events/UserCreatedEvent.php index 190a900f3d6..958d93d56ff 100644 --- a/lib/public/User/Events/UserCreatedEvent.php +++ b/lib/public/User/Events/UserCreatedEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserDeletedEvent.php b/lib/public/User/Events/UserDeletedEvent.php index 8e081c44407..8db7d0f2c74 100644 --- a/lib/public/User/Events/UserDeletedEvent.php +++ b/lib/public/User/Events/UserDeletedEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLiveStatusEvent.php b/lib/public/User/Events/UserLiveStatusEvent.php index 2d85fe1f2c6..dd90400cb3b 100644 --- a/lib/public/User/Events/UserLiveStatusEvent.php +++ b/lib/public/User/Events/UserLiveStatusEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLoggedInEvent.php b/lib/public/User/Events/UserLoggedInEvent.php index 7d0c0bf41de..b1a46b9570d 100644 --- a/lib/public/User/Events/UserLoggedInEvent.php +++ b/lib/public/User/Events/UserLoggedInEvent.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * * @license GNU AGPL version 3 or any later version * @@ -16,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; @@ -37,7 +37,7 @@ class UserLoggedInEvent extends Event { /** @var IUser */ private $user; - /** @var string */ + /** @var string|null */ private $password; /** @var bool */ @@ -49,7 +49,7 @@ class UserLoggedInEvent extends Event { /** * @since 18.0.0 */ - public function __construct(IUser $user, string $loginName, string $password, bool $isTokenLogin) { + public function __construct(IUser $user, string $loginName, ?string $password, bool $isTokenLogin) { parent::__construct(); $this->user = $user; $this->password = $password; @@ -74,7 +74,7 @@ class UserLoggedInEvent extends Event { /** * @since 18.0.0 */ - public function getPassword(): string { + public function getPassword(): ?string { return $this->password; } diff --git a/lib/public/User/Events/UserLoggedInWithCookieEvent.php b/lib/public/User/Events/UserLoggedInWithCookieEvent.php index b801a71b989..245c1f434f0 100644 --- a/lib/public/User/Events/UserLoggedInWithCookieEvent.php +++ b/lib/public/User/Events/UserLoggedInWithCookieEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLoggedOutEvent.php b/lib/public/User/Events/UserLoggedOutEvent.php index 887c83475e5..3e1472cc6ee 100644 --- a/lib/public/User/Events/UserLoggedOutEvent.php +++ b/lib/public/User/Events/UserLoggedOutEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/GetQuotaEvent.php b/lib/public/User/GetQuotaEvent.php index d5b9f625041..369f5762091 100644 --- a/lib/public/User/GetQuotaEvent.php +++ b/lib/public/User/GetQuotaEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\User; use OCP\EventDispatcher\Event; diff --git a/lib/public/UserInterface.php b/lib/public/UserInterface.php index 42a18cca103..c5fcc32276a 100644 --- a/lib/public/UserInterface.php +++ b/lib/public/UserInterface.php @@ -3,6 +3,7 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Joas Schilling <coding@schilljs.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> @@ -22,13 +23,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * User Interface - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/UserStatus/IManager.php b/lib/public/UserStatus/IManager.php index 61d93e6df0a..24cef821543 100644 --- a/lib/public/UserStatus/IManager.php +++ b/lib/public/UserStatus/IManager.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\UserStatus; /** @@ -41,4 +40,25 @@ interface IManager { * @since 20.0.0 */ public function getUserStatuses(array $userIds):array; + + + /** + * Set a new status for the selected user. + * + * @param string $userId The user for which we want to update the status. + * @param string $messageId The id of the predefined message. + * @param bool $createBackup If true, this will store the old status so that it is possible to revert it later (e.g. after a call). + * @since 23.0.0 + */ + public function setUserStatus(string $userId, string $messageId, string $status, bool $createBackup = false): void; + + /** + * Revert an automatically set user status. For example after leaving a call, + * change back to the previously set status. + * + * @param string $userId The user for which we want to update the status. + * @param string $messageId The expected current messageId. If the user has already updated their status, this method does nothing. + * @since 23.0.0 + */ + public function revertUserStatus(string $userId, string $messageId, string $status): void; } diff --git a/lib/public/UserStatus/IProvider.php b/lib/public/UserStatus/IProvider.php index 20575aa441b..976ebbefeab 100644 --- a/lib/public/UserStatus/IProvider.php +++ b/lib/public/UserStatus/IProvider.php @@ -16,18 +16,17 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\UserStatus; /** - * Interface IManager + * Interface IProvider * * @since 20.0.0 */ diff --git a/lib/public/UserStatus/IUserStatus.php b/lib/public/UserStatus/IUserStatus.php index 3e606e38712..bf743dea08d 100644 --- a/lib/public/UserStatus/IUserStatus.php +++ b/lib/public/UserStatus/IUserStatus.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\UserStatus; use DateTimeImmutable; diff --git a/lib/public/Util.php b/lib/public/Util.php index 3281c9cceec..5165846707a 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -12,7 +12,6 @@ * @author J0WI <J0WI@users.noreply.github.com> * @author Jens-Christian Fischer <jens-christian.fischer@switch.ch> * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> * @author Julius Härtl <jus@bitgrid.net> * @author Lukas Reschke <lukas@statuscode.ch> * @author Michael Gapczynski <GapczynskiM@gmail.com> @@ -41,13 +40,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ - -/** - * Public interface of ownCloud for apps to use. - * Utility Class. - * - */ - // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal ownCloud classes diff --git a/lib/public/WorkflowEngine/EntityContext/IContextPortation.php b/lib/public/WorkflowEngine/EntityContext/IContextPortation.php index 33983eac126..079151d70b1 100644 --- a/lib/public/WorkflowEngine/EntityContext/IContextPortation.php +++ b/lib/public/WorkflowEngine/EntityContext/IContextPortation.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IDisplayName.php b/lib/public/WorkflowEngine/EntityContext/IDisplayName.php index 4a7c3c12463..9a1cd19e199 100644 --- a/lib/public/WorkflowEngine/EntityContext/IDisplayName.php +++ b/lib/public/WorkflowEngine/EntityContext/IDisplayName.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IDisplayText.php b/lib/public/WorkflowEngine/EntityContext/IDisplayText.php index 513de8815c5..c840bd56fb7 100644 --- a/lib/public/WorkflowEngine/EntityContext/IDisplayText.php +++ b/lib/public/WorkflowEngine/EntityContext/IDisplayText.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IIcon.php b/lib/public/WorkflowEngine/EntityContext/IIcon.php index 1e4c83de48e..9c9629b2c8f 100644 --- a/lib/public/WorkflowEngine/EntityContext/IIcon.php +++ b/lib/public/WorkflowEngine/EntityContext/IIcon.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IUrl.php b/lib/public/WorkflowEngine/EntityContext/IUrl.php index c15cb950b43..7a615f07e3e 100644 --- a/lib/public/WorkflowEngine/EntityContext/IUrl.php +++ b/lib/public/WorkflowEngine/EntityContext/IUrl.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php b/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php index 1dddd8a357e..a5ae76f47b1 100644 --- a/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php +++ b/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php b/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php index 57249fe229c..7f36dbbc1b4 100644 --- a/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php +++ b/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php b/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php index 222b6b5faf2..5fd87490ff9 100644 --- a/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php +++ b/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php b/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php index 8f964188773..a94f181139b 100644 --- a/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php +++ b/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/GenericEntityEvent.php b/lib/public/WorkflowEngine/GenericEntityEvent.php index d88654c5e0c..64aee909a0d 100644 --- a/lib/public/WorkflowEngine/GenericEntityEvent.php +++ b/lib/public/WorkflowEngine/GenericEntityEvent.php @@ -18,14 +18,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/ICheck.php b/lib/public/WorkflowEngine/ICheck.php index 8ebb6e1335f..9f482540779 100644 --- a/lib/public/WorkflowEngine/ICheck.php +++ b/lib/public/WorkflowEngine/ICheck.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IComplexOperation.php b/lib/public/WorkflowEngine/IComplexOperation.php index 0fdaaa31970..f15580f0216 100644 --- a/lib/public/WorkflowEngine/IComplexOperation.php +++ b/lib/public/WorkflowEngine/IComplexOperation.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IEntity.php b/lib/public/WorkflowEngine/IEntity.php index 543fb5a9504..38da66384a0 100644 --- a/lib/public/WorkflowEngine/IEntity.php +++ b/lib/public/WorkflowEngine/IEntity.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/IEntityCheck.php b/lib/public/WorkflowEngine/IEntityCheck.php index 6a90796356d..6c8e69cb23f 100644 --- a/lib/public/WorkflowEngine/IEntityCheck.php +++ b/lib/public/WorkflowEngine/IEntityCheck.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IEntityCompat.php b/lib/public/WorkflowEngine/IEntityCompat.php index 4e8337cf5af..a1c6d20c034 100644 --- a/lib/public/WorkflowEngine/IEntityCompat.php +++ b/lib/public/WorkflowEngine/IEntityCompat.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IEntityEvent.php b/lib/public/WorkflowEngine/IEntityEvent.php index 4f90e14e758..8faed8b266c 100644 --- a/lib/public/WorkflowEngine/IEntityEvent.php +++ b/lib/public/WorkflowEngine/IEntityEvent.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IFileCheck.php b/lib/public/WorkflowEngine/IFileCheck.php index a06414190f8..f8f7c7dce4d 100644 --- a/lib/public/WorkflowEngine/IFileCheck.php +++ b/lib/public/WorkflowEngine/IFileCheck.php @@ -17,14 +17,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; use OCP\Files\Storage\IStorage; diff --git a/lib/public/WorkflowEngine/IManager.php b/lib/public/WorkflowEngine/IManager.php index 579cb4cd149..f09d51eb159 100644 --- a/lib/public/WorkflowEngine/IManager.php +++ b/lib/public/WorkflowEngine/IManager.php @@ -16,14 +16,13 @@ * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IOperation.php b/lib/public/WorkflowEngine/IOperation.php index b30246edbc8..3ef810438e0 100644 --- a/lib/public/WorkflowEngine/IOperation.php +++ b/lib/public/WorkflowEngine/IOperation.php @@ -14,14 +14,13 @@ * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/IOperationCompat.php b/lib/public/WorkflowEngine/IOperationCompat.php index ff03d0b5e3d..3e5f58a2867 100644 --- a/lib/public/WorkflowEngine/IOperationCompat.php +++ b/lib/public/WorkflowEngine/IOperationCompat.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IRuleMatcher.php b/lib/public/WorkflowEngine/IRuleMatcher.php index 06a5d1680b0..efae0cb79c3 100644 --- a/lib/public/WorkflowEngine/IRuleMatcher.php +++ b/lib/public/WorkflowEngine/IRuleMatcher.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; use RuntimeException; diff --git a/lib/public/WorkflowEngine/ISpecificOperation.php b/lib/public/WorkflowEngine/ISpecificOperation.php index 7fc12db6af5..9c031d9086b 100644 --- a/lib/public/WorkflowEngine/ISpecificOperation.php +++ b/lib/public/WorkflowEngine/ISpecificOperation.php @@ -16,14 +16,13 @@ declare(strict_types=1); * * 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 + * 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/>. * */ - namespace OCP\WorkflowEngine; /** diff --git a/lib/versioncheck.php b/lib/versioncheck.php index efd4e0f3774..4b1d9dec4d7 100644 --- a/lib/versioncheck.php +++ b/lib/versioncheck.php @@ -1,6 +1,9 @@ <?php + +declare(strict_types=1); + /** - * + * @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Morris Jobke <hey@morrisjobke.de> @@ -15,7 +18,7 @@ * * 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 + * 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 @@ -27,7 +30,7 @@ if (PHP_VERSION_ID < 70300) { http_response_code(500); echo 'This version of Nextcloud requires at least PHP 7.3<br/>'; echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.'; - exit(-1); + exit(1); } // Show warning if > PHP 8.0 is used as Nextcloud is not compatible with > PHP 8.0 for now @@ -35,5 +38,5 @@ if (PHP_VERSION_ID >= 80100) { http_response_code(500); echo 'This version of Nextcloud is not compatible with > PHP 8.0.<br/>'; echo 'You are currently running ' . PHP_VERSION . '.'; - exit(-1); + exit(1); } |