diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/DAV/CustomPropertiesBackend.php | 22 | ||||
-rw-r--r-- | apps/files_external/l10n/fi.js | 1 | ||||
-rw-r--r-- | apps/files_external/l10n/fi.json | 1 | ||||
-rw-r--r-- | apps/files_sharing/l10n/fi.js | 9 | ||||
-rw-r--r-- | apps/files_sharing/l10n/fi.json | 9 | ||||
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/Cache.php | 30 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 18 | ||||
-rw-r--r-- | apps/files_sharing/tests/TestCase.php | 2 | ||||
-rw-r--r-- | apps/weather_status/l10n/eu.js | 12 | ||||
-rw-r--r-- | apps/weather_status/l10n/eu.json | 12 |
11 files changed, 95 insertions, 24 deletions
diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 5f512995ce8..acee65cd00d 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -54,6 +54,28 @@ class CustomPropertiesBackend implements BackendInterface { '{http://owncloud.org/ns}dDC', '{http://owncloud.org/ns}size', '{http://nextcloud.org/ns}is-encrypted', + + // Currently, returning null from any propfind handler would still trigger the backend, + // so we add all known Nextcloud custom properties in here to avoid that + + // text app + '{http://nextcloud.org/ns}rich-workspace', + '{http://nextcloud.org/ns}rich-workspace-file', + // groupfolders + '{http://nextcloud.org/ns}acl-enabled', + '{http://nextcloud.org/ns}acl-can-manage', + '{http://nextcloud.org/ns}acl-list', + '{http://nextcloud.org/ns}inherited-acl-list', + '{http://nextcloud.org/ns}group-folder-id', + // files_lock + '{http://nextcloud.org/ns}lock', + '{http://nextcloud.org/ns}lock-owner-type', + '{http://nextcloud.org/ns}lock-owner', + '{http://nextcloud.org/ns}lock-owner-displayname', + '{http://nextcloud.org/ns}lock-owner-editor', + '{http://nextcloud.org/ns}lock-time', + '{http://nextcloud.org/ns}lock-timeout', + '{http://nextcloud.org/ns}lock-token', ]; /** diff --git a/apps/files_external/l10n/fi.js b/apps/files_external/l10n/fi.js index 06c7c2e5029..dc2c8b5fdd0 100644 --- a/apps/files_external/l10n/fi.js +++ b/apps/files_external/l10n/fi.js @@ -20,6 +20,7 @@ OC.L10N.register( "Never" : "Ei koskaan", "Once every direct access" : "Kerran aina suoran käytön yhteydessä", "Read only" : "Vain luku", + "Disconnect" : "Katkaise yhteys", "Admin defined" : "Ylläpitäjän määrittämä", "Delete storage?" : "Poistetaanko tallennustila?", "Saved" : "Tallennettu", diff --git a/apps/files_external/l10n/fi.json b/apps/files_external/l10n/fi.json index 09f9621c41b..8f26136ebae 100644 --- a/apps/files_external/l10n/fi.json +++ b/apps/files_external/l10n/fi.json @@ -18,6 +18,7 @@ "Never" : "Ei koskaan", "Once every direct access" : "Kerran aina suoran käytön yhteydessä", "Read only" : "Vain luku", + "Disconnect" : "Katkaise yhteys", "Admin defined" : "Ylläpitäjän määrittämä", "Delete storage?" : "Poistetaanko tallennustila?", "Saved" : "Tallennettu", diff --git a/apps/files_sharing/l10n/fi.js b/apps/files_sharing/l10n/fi.js index 3db7e899224..4ad2412692c 100644 --- a/apps/files_sharing/l10n/fi.js +++ b/apps/files_sharing/l10n/fi.js @@ -101,6 +101,7 @@ OC.L10N.register( "Wrong share ID, share doesn't exist" : "Väärä jakotunniste, jakoa ei ole olemassa", "Could not delete share" : "Jaon poistaminen epäonnistui", "Please specify a file or folder path" : "Määritä tiedoston tai kansion polku", + "Wrong path, file/folder does not exist" : "Väärä polku, tiedostoa/kansiota ei ole olemassa", "Could not create share" : "Jaon luominen epäonnistui", "Invalid permissions" : "Virheelliset käyttöoikeudet", "Please specify a valid user" : "Määritä kelvollinen käyttäjä", @@ -116,6 +117,7 @@ OC.L10N.register( "Please specify a valid circle" : "Määritä kelvollinen piiri", "Unknown share type" : "Tuntematon jaon tyyppi", "Not a directory" : "Ei hakemisto", + "Could not lock node" : "Solmua ei voitu lukita", "Could not lock path" : "Polun lukitseminen ei onnistunut", "Wrong or no update parameter given" : "Päivitettävä parametri puuttuu tai on väärin", "shared by %s" : "%s jakama", @@ -139,6 +141,10 @@ OC.L10N.register( "Read only" : "Vain luku", "Allow upload and editing" : "Salli lähetys ja muokkaus", "File drop (upload only)" : "Tiedostojen pudotus (vain lähetys)", + "Custom permissions" : "Mukautetut oikeudet", + "Read" : "Lue", + "Upload" : "Lähetä", + "Edit" : "Muokkaa", "Allow creating" : "Salli luominen", "Allow deleting" : "Salli poistaminen", "Allow resharing" : "Salli uudelleenjakaminen", @@ -231,6 +237,7 @@ OC.L10N.register( "Wrong path, file/folder doesn't exist" : "Väärä polku, tiedostoa tai kansiota ei ole olemassa", "invalid permissions" : "vialliset oikeudet", "Can't change permissions for public share links" : "Julkisten jakolinkkien käyttöoikeuksia ei voi muuttaa", - "Download %s" : "Lataa %s" + "Download %s" : "Lataa %s", + "Cannot change permissions for public share links" : "Julkisten jakolinkkien oikeuksia ei voi muuttaa" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_sharing/l10n/fi.json b/apps/files_sharing/l10n/fi.json index 59d876fef14..0507545ee83 100644 --- a/apps/files_sharing/l10n/fi.json +++ b/apps/files_sharing/l10n/fi.json @@ -99,6 +99,7 @@ "Wrong share ID, share doesn't exist" : "Väärä jakotunniste, jakoa ei ole olemassa", "Could not delete share" : "Jaon poistaminen epäonnistui", "Please specify a file or folder path" : "Määritä tiedoston tai kansion polku", + "Wrong path, file/folder does not exist" : "Väärä polku, tiedostoa/kansiota ei ole olemassa", "Could not create share" : "Jaon luominen epäonnistui", "Invalid permissions" : "Virheelliset käyttöoikeudet", "Please specify a valid user" : "Määritä kelvollinen käyttäjä", @@ -114,6 +115,7 @@ "Please specify a valid circle" : "Määritä kelvollinen piiri", "Unknown share type" : "Tuntematon jaon tyyppi", "Not a directory" : "Ei hakemisto", + "Could not lock node" : "Solmua ei voitu lukita", "Could not lock path" : "Polun lukitseminen ei onnistunut", "Wrong or no update parameter given" : "Päivitettävä parametri puuttuu tai on väärin", "shared by %s" : "%s jakama", @@ -137,6 +139,10 @@ "Read only" : "Vain luku", "Allow upload and editing" : "Salli lähetys ja muokkaus", "File drop (upload only)" : "Tiedostojen pudotus (vain lähetys)", + "Custom permissions" : "Mukautetut oikeudet", + "Read" : "Lue", + "Upload" : "Lähetä", + "Edit" : "Muokkaa", "Allow creating" : "Salli luominen", "Allow deleting" : "Salli poistaminen", "Allow resharing" : "Salli uudelleenjakaminen", @@ -229,6 +235,7 @@ "Wrong path, file/folder doesn't exist" : "Väärä polku, tiedostoa tai kansiota ei ole olemassa", "invalid permissions" : "vialliset oikeudet", "Can't change permissions for public share links" : "Julkisten jakolinkkien käyttöoikeuksia ei voi muuttaa", - "Download %s" : "Lataa %s" + "Download %s" : "Lataa %s", + "Cannot change permissions for public share links" : "Julkisten jakolinkkien oikeuksia ei voi muuttaa" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index befd1532d02..2539247b561 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -30,6 +30,7 @@ namespace OCA\Files_Sharing\AppInfo; use OC\Share\Share; +use OC\User\DisplayNameCache; use OCA\Files_Sharing\Capabilities; use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent; use OCA\Files_Sharing\External\Manager; @@ -65,6 +66,7 @@ use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Share\Events\ShareCreatedEvent; use OCP\Share\IManager; +use OCP\User\Events\UserChangedEvent; use OCP\Util; use Psr\Container\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -98,6 +100,7 @@ class Application extends App implements IBootstrap { $context->registerCapability(Capabilities::class); $context->registerNotifierService(Notifier::class); + $context->registerEventListener(UserChangedEvent::class, DisplayNameCache::class); } public function boot(IBootContext $context): void { diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index 8729426221b..9f11431008f 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -33,11 +33,13 @@ use OC\Files\Cache\Wrapper\CacheJail; use OC\Files\Search\SearchBinaryOperator; use OC\Files\Search\SearchComparison; use OC\Files\Storage\Wrapper\Jail; +use OC\User\DisplayNameCache; use OCP\Files\Cache\ICacheEntry; use OCP\Files\Search\ISearchBinaryOperator; use OCP\Files\Search\ISearchComparison; use OCP\Files\Search\ISearchOperator; use OCP\Files\StorageNotAvailableException; +use OCP\ICacheFactory; use OCP\IUserManager; /** @@ -46,27 +48,22 @@ use OCP\IUserManager; * don't use this class directly if you need to get metadata, use \OC\Files\Filesystem::getFileInfo instead */ class Cache extends CacheJail { - /** @var \OCA\Files_Sharing\SharedStorage */ + /** @var SharedStorage */ private $storage; - /** @var ICacheEntry */ - private $sourceRootInfo; - /** @var IUserManager */ - private $userManager; - - private $rootUnchanged = true; - - private $ownerDisplayName; - + private ICacheEntry $sourceRootInfo; + private bool $rootUnchanged = true; + private ?string $ownerDisplayName = null; private $numericId; + private DisplayNameCache $displayNameCache; /** - * @param \OCA\Files_Sharing\SharedStorage $storage + * @param SharedStorage $storage */ - public function __construct($storage, ICacheEntry $sourceRootInfo, IUserManager $userManager) { + public function __construct($storage, ICacheEntry $sourceRootInfo, DisplayNameCache $displayNameCache) { $this->storage = $storage; $this->sourceRootInfo = $sourceRootInfo; - $this->userManager = $userManager; $this->numericId = $sourceRootInfo->getStorageId(); + $this->displayNameCache = $displayNameCache; parent::__construct( null, @@ -173,12 +170,7 @@ class Cache extends CacheJail { private function getOwnerDisplayName() { if (!$this->ownerDisplayName) { $uid = $this->storage->getOwner(''); - $user = $this->userManager->get($uid); - if ($user) { - $this->ownerDisplayName = $user->getDisplayName(); - } else { - $this->ownerDisplayName = $uid; - } + $this->ownerDisplayName = $this->displayNameCache->getDisplayName($uid); } return $this->ownerDisplayName; } diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 6a342f0bdbf..60a292c498d 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -35,7 +35,12 @@ namespace OCA\Files_Sharing; use OC\Files\Cache\FailedCache; use OC\Files\Cache\NullWatcher; use OC\Files\Cache\Watcher; +use OC\Files\ObjectStore\HomeObjectStoreStorage; +use OC\Files\Storage\Common; +use OC\Files\Storage\Home; +use OC\User\DisplayNameCache; use OCP\Files\Folder; +use OCP\Files\IHomeStorage; use OCP\Files\Node; use OC\Files\Storage\FailedStorage; use OC\Files\Storage\Wrapper\PermissionsMask; @@ -182,10 +187,17 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto * @inheritdoc */ public function instanceOfStorage($class): bool { - if ($class === '\OC\Files\Storage\Common') { + if ($class === '\OC\Files\Storage\Common' || $class == Common::class) { return true; } - if (in_array($class, ['\OC\Files\Storage\Home', '\OC\Files\ObjectStore\HomeObjectStoreStorage', '\OCP\Files\IHomeStorage'])) { + if (in_array($class, [ + '\OC\Files\Storage\Home', + '\OC\Files\ObjectStore\HomeObjectStoreStorage', + '\OCP\Files\IHomeStorage', + Home::class, + HomeObjectStoreStorage::class, + IHomeStorage::class + ])) { return false; } return parent::instanceOfStorage($class); @@ -405,7 +417,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto $this->cache = new \OCA\Files_Sharing\Cache( $storage, $sourceRoot, - \OC::$server->get(IUserManager::class) + \OC::$server->get(DisplayNameCache::class) ); return $this->cache; } diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index bb1e3125ab2..234ea2c69c8 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -39,6 +39,7 @@ use OCA\Files_Sharing\MountProvider; use OCP\Files\Config\IMountProviderCollection; use OCP\Share\IShare; use Test\Traits\MountProviderTrait; +use OC\User\DisplayNameCache; /** * Class TestCase @@ -116,6 +117,7 @@ abstract class TestCase extends \Test\TestCase { protected function setUp(): void { parent::setUp(); + \OC::$server->get(DisplayNameCache::class)->clear(); //login as user1 self::loginHelper(self::TEST_FILES_SHARING_API_USER1); diff --git a/apps/weather_status/l10n/eu.js b/apps/weather_status/l10n/eu.js index cffdb9d1a5e..d36bcaaf2dd 100644 --- a/apps/weather_status/l10n/eu.js +++ b/apps/weather_status/l10n/eu.js @@ -21,6 +21,18 @@ OC.L10N.register( "{temperature} {unit} partly cloudy" : "{temperature} {unit} hodei-tarteak", "{temperature} {unit} foggy later today" : "{temperature} {unit} lainotu egingo da geroago", "{temperature} {unit} foggy" : "{temperature} {unit} lainotsu", + "{temperature} {unit} light rainfall later today" : "{tenperatura} {unitatea} eurite arina gaur beranduago", + "{temperature} {unit} light rainfall" : "{tenperatura} {unitatea} prezipitazio arina", + "{temperature} {unit} rainfall later today" : "{temperature} {unit} prezipitazioa gaur beranduago", + "{temperature} {unit} rainfall" : "{tenperatura} {unitatea} prezipitazioa", + "{temperature} {unit} heavy rainfall later today" : "{tenperatura} {unitatea} eurite handia gaur beranduago", + "{temperature} {unit} heavy rainfall" : "{tenperatura} {unitatea} euri-jasa", + "{temperature} {unit} rainfall showers later today" : "{temperature} {unit} euri zaparrada gaur beranduago", + "{temperature} {unit} rainfall showers" : "{tenperatura} {unitatea} euri zaparradak gaur beranduago", + "{temperature} {unit} light rainfall showers later today" : "{temperature} {unit} zaparrada arinak gaur beranduago", + "{temperature} {unit} light rainfall showers" : "{tenperatura} {unitatea} zaparrada arinak", + "{temperature} {unit} heavy rainfall showers later today" : "{temperature} {unit} euri zaparrada handiak gaur beranduago", + "{temperature} {unit} heavy rainfall showers" : "{tenperatura} {unitatea} euri zaparrada handiak", "More weather for {adr}" : "Eguraldi gehiago {adr}-(e)rako", "Loading weather" : "Eguraldia kargatzen", "Remove from favorites" : "Kendu gogokoetatik", diff --git a/apps/weather_status/l10n/eu.json b/apps/weather_status/l10n/eu.json index 091def3710b..3e974d1dba5 100644 --- a/apps/weather_status/l10n/eu.json +++ b/apps/weather_status/l10n/eu.json @@ -19,6 +19,18 @@ "{temperature} {unit} partly cloudy" : "{temperature} {unit} hodei-tarteak", "{temperature} {unit} foggy later today" : "{temperature} {unit} lainotu egingo da geroago", "{temperature} {unit} foggy" : "{temperature} {unit} lainotsu", + "{temperature} {unit} light rainfall later today" : "{tenperatura} {unitatea} eurite arina gaur beranduago", + "{temperature} {unit} light rainfall" : "{tenperatura} {unitatea} prezipitazio arina", + "{temperature} {unit} rainfall later today" : "{temperature} {unit} prezipitazioa gaur beranduago", + "{temperature} {unit} rainfall" : "{tenperatura} {unitatea} prezipitazioa", + "{temperature} {unit} heavy rainfall later today" : "{tenperatura} {unitatea} eurite handia gaur beranduago", + "{temperature} {unit} heavy rainfall" : "{tenperatura} {unitatea} euri-jasa", + "{temperature} {unit} rainfall showers later today" : "{temperature} {unit} euri zaparrada gaur beranduago", + "{temperature} {unit} rainfall showers" : "{tenperatura} {unitatea} euri zaparradak gaur beranduago", + "{temperature} {unit} light rainfall showers later today" : "{temperature} {unit} zaparrada arinak gaur beranduago", + "{temperature} {unit} light rainfall showers" : "{tenperatura} {unitatea} zaparrada arinak", + "{temperature} {unit} heavy rainfall showers later today" : "{temperature} {unit} euri zaparrada handiak gaur beranduago", + "{temperature} {unit} heavy rainfall showers" : "{tenperatura} {unitatea} euri zaparrada handiak", "More weather for {adr}" : "Eguraldi gehiago {adr}-(e)rako", "Loading weather" : "Eguraldia kargatzen", "Remove from favorites" : "Kendu gogokoetatik", |