Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/dashboard/l10n/lt_LT.js1
-rw-r--r--apps/dashboard/l10n/lt_LT.json1
-rw-r--r--apps/dav/l10n/fi.js1
-rw-r--r--apps/dav/l10n/fi.json1
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php7
-rw-r--r--apps/federatedfilesharing/l10n/fi.js1
-rw-r--r--apps/federatedfilesharing/l10n/fi.json1
-rw-r--r--apps/files/l10n/de_DE.js2
-rw-r--r--apps/files/l10n/de_DE.json2
-rw-r--r--apps/files/l10n/fi.js4
-rw-r--r--apps/files/l10n/fi.json4
-rw-r--r--apps/files/l10n/fr.js2
-rw-r--r--apps/files/l10n/fr.json2
-rw-r--r--apps/files/l10n/zh_TW.js2
-rw-r--r--apps/files/l10n/zh_TW.json2
-rw-r--r--apps/files_sharing/lib/Cache.php2
-rw-r--r--apps/settings/l10n/fi.js3
-rw-r--r--apps/settings/l10n/fi.json3
-rw-r--r--apps/settings/l10n/fr.js4
-rw-r--r--apps/settings/l10n/fr.json4
-rw-r--r--apps/sharebymail/l10n/fi.js39
-rw-r--r--apps/sharebymail/l10n/fi.json39
-rw-r--r--composer.lock18
-rw-r--r--lib/l10n/fi.js5
-rw-r--r--lib/l10n/fi.json5
-rw-r--r--lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php96
-rw-r--r--lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php4
-rw-r--r--lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php50
-rw-r--r--lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php4
-rw-r--r--lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php11
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php11
-rw-r--r--lib/private/DB/QueryBuilder/QueryBuilder.php12
-rw-r--r--lib/private/Files/Cache/Cache.php62
-rw-r--r--lib/private/Files/Cache/Propagator.php8
-rw-r--r--lib/private/Files/Cache/Scanner.php13
-rw-r--r--lib/private/Files/Cache/SearchBuilder.php2
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheJail.php12
-rw-r--r--lib/private/Files/Config/UserMountCache.php7
-rw-r--r--lib/private/Files/ObjectStore/NoopScanner.php2
-rw-r--r--lib/private/User/DisplayNameCache.php4
-rw-r--r--lib/private/User/LazyUser.php2
-rw-r--r--lib/private/User/Manager.php2
-rw-r--r--lib/public/DB/QueryBuilder/IExpressionBuilder.php64
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php12
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php8
-rw-r--r--lib/public/IUserManager.php6
-rw-r--r--tests/lib/DB/QueryBuilder/FunctionBuilderTest.php17
-rw-r--r--tests/lib/Files/Cache/ScannerTest.php78
-rw-r--r--tests/lib/Files/Config/UserMountCacheTest.php25
-rw-r--r--tests/lib/Files/ObjectStore/S3Test.php2
50 files changed, 368 insertions, 301 deletions
diff --git a/apps/dashboard/l10n/lt_LT.js b/apps/dashboard/l10n/lt_LT.js
index d119fe1a034..3313e553d68 100644
--- a/apps/dashboard/l10n/lt_LT.js
+++ b/apps/dashboard/l10n/lt_LT.js
@@ -23,6 +23,7 @@ OC.L10N.register(
"Hello" : "Sveiki",
"Hello, {name}" : "Sveiki, {name},",
"Pick from Files" : "Pasirinkti iš Failų",
+ "Default image" : "Numatytasis paveikslas",
"Plain background" : "Vientisas fonas",
"Insert from {productName}" : "Įterpti iš {productName}",
"Show something" : "Ką nors rodyti",
diff --git a/apps/dashboard/l10n/lt_LT.json b/apps/dashboard/l10n/lt_LT.json
index 4e7341caecb..b46bb284c7b 100644
--- a/apps/dashboard/l10n/lt_LT.json
+++ b/apps/dashboard/l10n/lt_LT.json
@@ -21,6 +21,7 @@
"Hello" : "Sveiki",
"Hello, {name}" : "Sveiki, {name},",
"Pick from Files" : "Pasirinkti iš Failų",
+ "Default image" : "Numatytasis paveikslas",
"Plain background" : "Vientisas fonas",
"Insert from {productName}" : "Įterpti iš {productName}",
"Show something" : "Ką nors rodyti",
diff --git a/apps/dav/l10n/fi.js b/apps/dav/l10n/fi.js
index ac1dc646a9b..a8a70f08b89 100644
--- a/apps/dav/l10n/fi.js
+++ b/apps/dav/l10n/fi.js
@@ -51,6 +51,7 @@ OC.L10N.register(
"Date: %s" : "Päiväys: %s",
"Description: %s" : "Kuvaus: %s",
"Where: %s" : "Missä: %s",
+ "%1$s via %2$s" : "%1$s palvelun %2$s kautta",
"Cancelled: %1$s" : "Peruutettu: %1$s",
"Invitation canceled" : "Kutsu peruttu",
"Invitation updated" : "Kutsu päivitetty",
diff --git a/apps/dav/l10n/fi.json b/apps/dav/l10n/fi.json
index 2f3691370ea..d8e6f00713b 100644
--- a/apps/dav/l10n/fi.json
+++ b/apps/dav/l10n/fi.json
@@ -49,6 +49,7 @@
"Date: %s" : "Päiväys: %s",
"Description: %s" : "Kuvaus: %s",
"Where: %s" : "Missä: %s",
+ "%1$s via %2$s" : "%1$s palvelun %2$s kautta",
"Cancelled: %1$s" : "Peruutettu: %1$s",
"Invitation canceled" : "Kutsu peruttu",
"Invitation updated" : "Kutsu päivitetty",
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index a9ca2eb30a3..6b60d6701d4 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -933,6 +933,12 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$cardData = stream_get_contents($cardData);
}
+ // Micro optimisation
+ // don't loop through
+ if (strpos($cardData, 'PHOTO:data:') === 0) {
+ return $cardData;
+ }
+
$cardDataArray = explode("\r\n", $cardData);
$cardDataFiltered = [];
@@ -956,7 +962,6 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$cardDataFiltered[] = $line;
}
-
return implode("\r\n", $cardDataFiltered);
}
diff --git a/apps/federatedfilesharing/l10n/fi.js b/apps/federatedfilesharing/l10n/fi.js
index dc163068be2..0cdf732f3f9 100644
--- a/apps/federatedfilesharing/l10n/fi.js
+++ b/apps/federatedfilesharing/l10n/fi.js
@@ -13,6 +13,7 @@ OC.L10N.register(
"Federated Share request sent, you will receive an invitation. Check your notifications." : "Federoidun jakamisen pyyntö lähetetty, saat kutsun. Tarkista ilmoitukset.",
"Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Federoitua jakoa ei voitu muodostaa. Vaikuttaa siltä, että palvelin jonka kanssa federointia yritetään, on versioltaan liian vanha (Nextcloud <= 9).",
"It is not allowed to send federated group shares from this server." : "Federoitujen ryhmäjakojen lähettäminen tältä palvelimelta ei ole sallittu.",
+ "Sharing %1$s failed, because this item is already shared with user %2$s" : "Kohteen %1$s jakaminen epäonnistui, koska tämä kohde on jo jaettu käyttäjän %2$s kanssa",
"Not allowed to create a federated share with the same user" : "Saman käyttäjän kanssa ei ole sallittua luoda federoitua jakoa",
"Federated shares require read permissions" : "Federoidut jaot vaativat lukuoikeuksia",
"File is already shared with %s" : "Tiedosto on jo jaettu kohteen %s kanssa",
diff --git a/apps/federatedfilesharing/l10n/fi.json b/apps/federatedfilesharing/l10n/fi.json
index a627009b843..78f327dba5f 100644
--- a/apps/federatedfilesharing/l10n/fi.json
+++ b/apps/federatedfilesharing/l10n/fi.json
@@ -11,6 +11,7 @@
"Federated Share request sent, you will receive an invitation. Check your notifications." : "Federoidun jakamisen pyyntö lähetetty, saat kutsun. Tarkista ilmoitukset.",
"Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Federoitua jakoa ei voitu muodostaa. Vaikuttaa siltä, että palvelin jonka kanssa federointia yritetään, on versioltaan liian vanha (Nextcloud <= 9).",
"It is not allowed to send federated group shares from this server." : "Federoitujen ryhmäjakojen lähettäminen tältä palvelimelta ei ole sallittu.",
+ "Sharing %1$s failed, because this item is already shared with user %2$s" : "Kohteen %1$s jakaminen epäonnistui, koska tämä kohde on jo jaettu käyttäjän %2$s kanssa",
"Not allowed to create a federated share with the same user" : "Saman käyttäjän kanssa ei ole sallittua luoda federoitua jakoa",
"Federated shares require read permissions" : "Federoidut jaot vaativat lukuoikeuksia",
"File is already shared with %s" : "Tiedosto on jo jaettu kohteen %s kanssa",
diff --git a/apps/files/l10n/de_DE.js b/apps/files/l10n/de_DE.js
index f87d7c4195d..2e6eba6cefe 100644
--- a/apps/files/l10n/de_DE.js
+++ b/apps/files/l10n/de_DE.js
@@ -79,6 +79,7 @@ OC.L10N.register(
"_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hoch geladen","%n Dateien werden hochgeladen"],
"New file/folder menu" : "Menü für neue Datei/Ordner",
"Select file range" : "Dateibereich auswählen",
+ "{used}%" : "{used}%",
"{used} of {quota} used" : "{used} von {quota} verwendet",
"{used} used" : "{used} verwendet",
"\"{name}\" is an invalid file name." : "„{name}“ ist kein gültiger Dateiname.",
@@ -189,6 +190,7 @@ OC.L10N.register(
"Templates" : "Vorlagen",
"Unable to initialize the templates directory" : "Der Vorlagenordner kann nicht initialisiert werden",
"%s used" : "%s verwendet",
+ "%s%%" : "%s%%",
"%1$s of %2$s used" : "%1$s von %2$s verwendet",
"Files settings" : "Dateien-Einstellungen",
"Show hidden files" : "Versteckte Dateien anzeigen",
diff --git a/apps/files/l10n/de_DE.json b/apps/files/l10n/de_DE.json
index e352b0156db..2be92831370 100644
--- a/apps/files/l10n/de_DE.json
+++ b/apps/files/l10n/de_DE.json
@@ -77,6 +77,7 @@
"_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hoch geladen","%n Dateien werden hochgeladen"],
"New file/folder menu" : "Menü für neue Datei/Ordner",
"Select file range" : "Dateibereich auswählen",
+ "{used}%" : "{used}%",
"{used} of {quota} used" : "{used} von {quota} verwendet",
"{used} used" : "{used} verwendet",
"\"{name}\" is an invalid file name." : "„{name}“ ist kein gültiger Dateiname.",
@@ -187,6 +188,7 @@
"Templates" : "Vorlagen",
"Unable to initialize the templates directory" : "Der Vorlagenordner kann nicht initialisiert werden",
"%s used" : "%s verwendet",
+ "%s%%" : "%s%%",
"%1$s of %2$s used" : "%1$s von %2$s verwendet",
"Files settings" : "Dateien-Einstellungen",
"Show hidden files" : "Versteckte Dateien anzeigen",
diff --git a/apps/files/l10n/fi.js b/apps/files/l10n/fi.js
index 1722fba0c5c..09c19528cc8 100644
--- a/apps/files/l10n/fi.js
+++ b/apps/files/l10n/fi.js
@@ -77,7 +77,9 @@ OC.L10N.register(
"_including %n hidden_::_including %n hidden_" : ["Sisältäen %n piilotetun","Sisältäen %n piilotettua"],
"You do not have permission to upload or create files here" : "Käyttöoikeutesi eivät riitä tiedostojen lähettämiseen tai luomiseen tähän sijaintiin",
"_Uploading %n file_::_Uploading %n files_" : ["Lähetetään %n tiedosto","Lähetetään %n tiedostoa"],
+ "New file/folder menu" : "Uusi tiedosto/kansio -valikko",
"Select file range" : "Valitse tiedostojoukko",
+ "{used}%" : "{used} %",
"{used} of {quota} used" : "{used}/{quota} käytetty",
"{used} used" : "{used} käytetty",
"\"{name}\" is an invalid file name." : "\"{name}\" on virheellinen tiedostonimi.",
@@ -188,7 +190,9 @@ OC.L10N.register(
"Templates" : "Mallipohjat",
"Unable to initialize the templates directory" : "Mallipohjien kansiota ei voitu alustaa",
"%s used" : "%s käytetty",
+ "%s%%" : "%s%%",
"%1$s of %2$s used" : "%1$s/%2$s käytetty",
+ "Files settings" : "Tiedostojen asetukset",
"Show hidden files" : "Näytä piilotetut tiedostot",
"Crop image previews" : "Rajaa kuvien esikatseluja",
"WebDAV" : "WebDAV",
diff --git a/apps/files/l10n/fi.json b/apps/files/l10n/fi.json
index ad0b96bf225..73e01467522 100644
--- a/apps/files/l10n/fi.json
+++ b/apps/files/l10n/fi.json
@@ -75,7 +75,9 @@
"_including %n hidden_::_including %n hidden_" : ["Sisältäen %n piilotetun","Sisältäen %n piilotettua"],
"You do not have permission to upload or create files here" : "Käyttöoikeutesi eivät riitä tiedostojen lähettämiseen tai luomiseen tähän sijaintiin",
"_Uploading %n file_::_Uploading %n files_" : ["Lähetetään %n tiedosto","Lähetetään %n tiedostoa"],
+ "New file/folder menu" : "Uusi tiedosto/kansio -valikko",
"Select file range" : "Valitse tiedostojoukko",
+ "{used}%" : "{used} %",
"{used} of {quota} used" : "{used}/{quota} käytetty",
"{used} used" : "{used} käytetty",
"\"{name}\" is an invalid file name." : "\"{name}\" on virheellinen tiedostonimi.",
@@ -186,7 +188,9 @@
"Templates" : "Mallipohjat",
"Unable to initialize the templates directory" : "Mallipohjien kansiota ei voitu alustaa",
"%s used" : "%s käytetty",
+ "%s%%" : "%s%%",
"%1$s of %2$s used" : "%1$s/%2$s käytetty",
+ "Files settings" : "Tiedostojen asetukset",
"Show hidden files" : "Näytä piilotetut tiedostot",
"Crop image previews" : "Rajaa kuvien esikatseluja",
"WebDAV" : "WebDAV",
diff --git a/apps/files/l10n/fr.js b/apps/files/l10n/fr.js
index db3999dd872..5728e87e955 100644
--- a/apps/files/l10n/fr.js
+++ b/apps/files/l10n/fr.js
@@ -218,7 +218,7 @@ OC.L10N.register(
"You don’t have permission to upload or create files here" : "Vous n'avez pas la permission d'envoyer ou de créer des fichiers ici",
"New" : "Nouveau",
"Cannot transfer ownership of a file or folder you don't own" : "Impossible de transférer la propriété d’un fichier ou d’un dossier dont vous n'êtes pas le propriétaire",
- "%s%% of %s used" : "%s%% de %s utilisé",
+ "%s%% of %s used" : "%s%% de %s utilisés",
"Settings" : "Paramètres"
},
"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/files/l10n/fr.json b/apps/files/l10n/fr.json
index fe21f815953..4f68b38fbb2 100644
--- a/apps/files/l10n/fr.json
+++ b/apps/files/l10n/fr.json
@@ -216,7 +216,7 @@
"You don’t have permission to upload or create files here" : "Vous n'avez pas la permission d'envoyer ou de créer des fichiers ici",
"New" : "Nouveau",
"Cannot transfer ownership of a file or folder you don't own" : "Impossible de transférer la propriété d’un fichier ou d’un dossier dont vous n'êtes pas le propriétaire",
- "%s%% of %s used" : "%s%% de %s utilisé",
+ "%s%% of %s used" : "%s%% de %s utilisés",
"Settings" : "Paramètres"
},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/files/l10n/zh_TW.js b/apps/files/l10n/zh_TW.js
index 84fd84b58ff..cab6a8d102f 100644
--- a/apps/files/l10n/zh_TW.js
+++ b/apps/files/l10n/zh_TW.js
@@ -79,6 +79,7 @@ OC.L10N.register(
"_Uploading %n file_::_Uploading %n files_" : ["正在上傳 %n 個檔案"],
"New file/folder menu" : "新檔案/資料夾選單",
"Select file range" : "選取多個檔案",
+ "{used}%" : "{used}%",
"{used} of {quota} used" : "已使用 {quota} 當中的 {used}",
"{used} used" : "已使用 {used}",
"\"{name}\" is an invalid file name." : "{name} 是無效的檔名。",
@@ -189,6 +190,7 @@ OC.L10N.register(
"Templates" : "範本",
"Unable to initialize the templates directory" : "無法初始化範本目錄",
"%s used" : "%s 已使用",
+ "%s%%" : "%s%%",
"%1$s of %2$s used" : "在 %2$s 中使用了 %1$s ",
"Files settings" : "檔案設定",
"Show hidden files" : "顯示隱藏檔",
diff --git a/apps/files/l10n/zh_TW.json b/apps/files/l10n/zh_TW.json
index b6b0e140b64..f37917512fa 100644
--- a/apps/files/l10n/zh_TW.json
+++ b/apps/files/l10n/zh_TW.json
@@ -77,6 +77,7 @@
"_Uploading %n file_::_Uploading %n files_" : ["正在上傳 %n 個檔案"],
"New file/folder menu" : "新檔案/資料夾選單",
"Select file range" : "選取多個檔案",
+ "{used}%" : "{used}%",
"{used} of {quota} used" : "已使用 {quota} 當中的 {used}",
"{used} used" : "已使用 {used}",
"\"{name}\" is an invalid file name." : "{name} 是無效的檔名。",
@@ -187,6 +188,7 @@
"Templates" : "範本",
"Unable to initialize the templates directory" : "無法初始化範本目錄",
"%s used" : "%s 已使用",
+ "%s%%" : "%s%%",
"%1$s of %2$s used" : "在 %2$s 中使用了 %1$s ",
"Files settings" : "檔案設定",
"Show hidden files" : "顯示隱藏檔",
diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php
index 9f11431008f..707b64b79d7 100644
--- a/apps/files_sharing/lib/Cache.php
+++ b/apps/files_sharing/lib/Cache.php
@@ -170,7 +170,7 @@ class Cache extends CacheJail {
private function getOwnerDisplayName() {
if (!$this->ownerDisplayName) {
$uid = $this->storage->getOwner('');
- $this->ownerDisplayName = $this->displayNameCache->getDisplayName($uid);
+ $this->ownerDisplayName = $this->displayNameCache->getDisplayName($uid) ?? $uid;
}
return $this->ownerDisplayName;
}
diff --git a/apps/settings/l10n/fi.js b/apps/settings/l10n/fi.js
index 6de23e0d397..3f96701d00b 100644
--- a/apps/settings/l10n/fi.js
+++ b/apps/settings/l10n/fi.js
@@ -58,6 +58,7 @@ OC.L10N.register(
"Unable to change personal password" : "Henkilökohtaista salasanaa ei voitu vaihtaa",
"Saved" : "Tallennettu",
"No user supplied" : "Käyttäjää ei määritetty",
+ "Unable to change password. Password too long." : "Salasanaa ei voitu vaihtaa. Salasana on liian pitkä.",
"Authentication error" : "Tunnistautumisvirhe",
"Please provide an admin recovery password; otherwise, all user data will be lost." : "Anna ylläpitäjän palautussalasana; muuten kaikki käyttäjien data menetetään.",
"Wrong admin recovery password. Please check the password and try again." : "Väärä ylläpitäjän salasana. Tarkista salasana ja yritä uudelleen.",
@@ -214,6 +215,7 @@ OC.L10N.register(
"Server-side encryption" : "Palvelinpään salaus",
"Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed." : "Palvelimelle ladatut tiedostot voidaan salata. Salaus aiheuttaa muun muassa palvelimen suorituskyvyn laskua, joten ota salaus käyttöön vain tarvittaessa.",
"Enable server-side encryption" : "Käytä palvelinpään salausta",
+ "Please read carefully before activating server-side encryption:" : "Lue tarkasti, ennen kuin otat palvelinpään salauksen käyttöön:",
"Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met." : "Kun salaus on otettu käyttöön, käyttöönoton jälkeen palvelimelle ladatut tiedostot salataan palvelimen ollessa lepotilassa. Salauksen ottaminen pois päältä myöhemmin on mahdollista vain, jos aktiivinen salausmoduuli tukee toiminta ja kaikki muut vaatimukset (kuten palautusavaimen asettaminen) täyttyvät.",
"Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases." : "Salaus sellaisenaan ei takaa järjestelmäsi turvallisuutta. Tutustu dokumentaation saadaksesi lisätietoja, miten salaussovellus toimii ja nähdäksesi tuettuja käyttötapauksia.",
"Be aware that encryption always increases the file size." : "Ota huomioon, että salaus kasvattaa aina tiedostojen kokoa.",
@@ -350,6 +352,7 @@ OC.L10N.register(
"An error occured during the request. Unable to proceed." : "Pyynnön aikana tapahtui virhe. Jatkaminen ei onnistu.",
"The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds." : "Sovellus on käytössä, mutta se tulee päivittää. Sinut ohjataan sovelluksen päivityssivulle viiden sekunnin kuluttua.",
"Error: This app cannot be enabled because it makes the server unstable" : "Virhe: Sovellusta ei voida ottaa käyttöön, koska se aiheuttaa palvelimen epävakauden",
+ "User already exists." : "Käyttäjä on jo olemassa.",
"Administrator documentation" : "Ylläpidon dokumentaatio",
"Documentation" : "Dokumentaatio",
"Forum" : "Keskustelupalsta",
diff --git a/apps/settings/l10n/fi.json b/apps/settings/l10n/fi.json
index 12c0a92029e..94ae2043385 100644
--- a/apps/settings/l10n/fi.json
+++ b/apps/settings/l10n/fi.json
@@ -56,6 +56,7 @@
"Unable to change personal password" : "Henkilökohtaista salasanaa ei voitu vaihtaa",
"Saved" : "Tallennettu",
"No user supplied" : "Käyttäjää ei määritetty",
+ "Unable to change password. Password too long." : "Salasanaa ei voitu vaihtaa. Salasana on liian pitkä.",
"Authentication error" : "Tunnistautumisvirhe",
"Please provide an admin recovery password; otherwise, all user data will be lost." : "Anna ylläpitäjän palautussalasana; muuten kaikki käyttäjien data menetetään.",
"Wrong admin recovery password. Please check the password and try again." : "Väärä ylläpitäjän salasana. Tarkista salasana ja yritä uudelleen.",
@@ -212,6 +213,7 @@
"Server-side encryption" : "Palvelinpään salaus",
"Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed." : "Palvelimelle ladatut tiedostot voidaan salata. Salaus aiheuttaa muun muassa palvelimen suorituskyvyn laskua, joten ota salaus käyttöön vain tarvittaessa.",
"Enable server-side encryption" : "Käytä palvelinpään salausta",
+ "Please read carefully before activating server-side encryption:" : "Lue tarkasti, ennen kuin otat palvelinpään salauksen käyttöön:",
"Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met." : "Kun salaus on otettu käyttöön, käyttöönoton jälkeen palvelimelle ladatut tiedostot salataan palvelimen ollessa lepotilassa. Salauksen ottaminen pois päältä myöhemmin on mahdollista vain, jos aktiivinen salausmoduuli tukee toiminta ja kaikki muut vaatimukset (kuten palautusavaimen asettaminen) täyttyvät.",
"Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases." : "Salaus sellaisenaan ei takaa järjestelmäsi turvallisuutta. Tutustu dokumentaation saadaksesi lisätietoja, miten salaussovellus toimii ja nähdäksesi tuettuja käyttötapauksia.",
"Be aware that encryption always increases the file size." : "Ota huomioon, että salaus kasvattaa aina tiedostojen kokoa.",
@@ -348,6 +350,7 @@
"An error occured during the request. Unable to proceed." : "Pyynnön aikana tapahtui virhe. Jatkaminen ei onnistu.",
"The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds." : "Sovellus on käytössä, mutta se tulee päivittää. Sinut ohjataan sovelluksen päivityssivulle viiden sekunnin kuluttua.",
"Error: This app cannot be enabled because it makes the server unstable" : "Virhe: Sovellusta ei voida ottaa käyttöön, koska se aiheuttaa palvelimen epävakauden",
+ "User already exists." : "Käyttäjä on jo olemassa.",
"Administrator documentation" : "Ylläpidon dokumentaatio",
"Documentation" : "Dokumentaatio",
"Forum" : "Keskustelupalsta",
diff --git a/apps/settings/l10n/fr.js b/apps/settings/l10n/fr.js
index 9c5a551daff..85944a4678f 100644
--- a/apps/settings/l10n/fr.js
+++ b/apps/settings/l10n/fr.js
@@ -307,7 +307,7 @@ OC.L10N.register(
"Welcome mail sent!" : "E-mail de bienvenue envoyé !",
"Edit User" : "Modifier l'utilisateur",
"Toggle user actions menu" : "Basculer le menu des actions de l'utilisateur",
- "{size} used" : "{size} utilisé",
+ "{size} used" : "{size} utilisés",
"New user" : "Nouvel utilisateur",
"Will be autogenerated" : "Sera généré automatiquement",
"Display name" : "Nom à afficher",
@@ -387,7 +387,7 @@ OC.L10N.register(
"An error occured during the request. Unable to proceed." : "Une erreur est survenue durant la requête. Impossible de traiter la demande.",
"The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds." : "L'application a été activée mais doit être mise à jour. Vous allez être redirigé vers la page des mises à jour dans 5 secondes.",
"Error: This app cannot be enabled because it makes the server unstable" : "Erreur : cette application ne peut être activée car elle rend le serveur instable",
- "User already exists." : "L'utilisateur existe déjà.",
+ "User already exists." : "Cet utilisateur existe déjà.",
"Administrator documentation" : "Documentation administrateur",
"Documentation" : "Documentation",
"Forum" : "Forum",
diff --git a/apps/settings/l10n/fr.json b/apps/settings/l10n/fr.json
index dc63b42c731..38d337117da 100644
--- a/apps/settings/l10n/fr.json
+++ b/apps/settings/l10n/fr.json
@@ -305,7 +305,7 @@
"Welcome mail sent!" : "E-mail de bienvenue envoyé !",
"Edit User" : "Modifier l'utilisateur",
"Toggle user actions menu" : "Basculer le menu des actions de l'utilisateur",
- "{size} used" : "{size} utilisé",
+ "{size} used" : "{size} utilisés",
"New user" : "Nouvel utilisateur",
"Will be autogenerated" : "Sera généré automatiquement",
"Display name" : "Nom à afficher",
@@ -385,7 +385,7 @@
"An error occured during the request. Unable to proceed." : "Une erreur est survenue durant la requête. Impossible de traiter la demande.",
"The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds." : "L'application a été activée mais doit être mise à jour. Vous allez être redirigé vers la page des mises à jour dans 5 secondes.",
"Error: This app cannot be enabled because it makes the server unstable" : "Erreur : cette application ne peut être activée car elle rend le serveur instable",
- "User already exists." : "L'utilisateur existe déjà.",
+ "User already exists." : "Cet utilisateur existe déjà.",
"Administrator documentation" : "Documentation administrateur",
"Documentation" : "Documentation",
"Forum" : "Forum",
diff --git a/apps/sharebymail/l10n/fi.js b/apps/sharebymail/l10n/fi.js
index 4afbd8169d9..614dc830268 100644
--- a/apps/sharebymail/l10n/fi.js
+++ b/apps/sharebymail/l10n/fi.js
@@ -1,31 +1,46 @@
OC.L10N.register(
"sharebymail",
{
- "Shared with %1$s" : "Jaettu käyttäjälle %1$s",
+ "Shared with %1$s" : "Jaettu käyttäjälle %1$s",
"Shared with {email}" : "Jaettu käyttäjälle {email}",
- "Shared with %1$s by %2$s" : "Jaettu käyttäjälle %1$s käyttäjältä %2$s",
- "Shared with {email} by {actor}" : "Jaettu käyttäjälle {email} käyttäjältä {actor}",
+ "Shared with %1$s by %2$s" : "Jaettu käyttäjälle %1$s käyttäjän %2$s toimesta",
+ "Shared with {email} by {actor}" : "Jaettu käyttäjälle {email} käyttäjän {actor} toimesta",
+ "Unshared from {email}" : "Jako käyttäjälle {email} lopetettu",
+ "Unshared from {email} by {actor}" : "Jako käyttäjälle {email} lopetettiin käyttäjän {actor} toimesta",
+ "Password for mail share sent to %1$s" : "Salasana sähköpostijakoon lähetettiin osoitteeseen %1$s",
+ "Password for mail share sent to {email}" : "Salasana sähköpostijakoon lähetettiin osoitteeseen {email}",
+ "Password for mail share sent to you" : "Salasana sähköpostijakoon lähetettiin sinulle",
"You shared %1$s with %2$s by mail" : "Jaoit tiedoston %1$s sähköpostitse osoitteeseen %2$s",
"You shared {file} with {email} by mail" : "Jaoit tiedoston {file} sähköpostitse osoitteeseen {email}",
"%3$s shared %1$s with %2$s by mail" : "%3$s jakoi tiedoston %1$s sähköpostitse osoitteeseen %2$s",
"{actor} shared {file} with {email} by mail" : "{actor} jakoi tiedoston {file} sähköpostitse osoitteeseen {email}",
+ "You unshared %1$s from %2$s by mail" : "Lopetit kohteen %1$s jaon käyttäjältä %2$s sähköpostitse",
+ "You unshared {file} from {email} by mail" : "Lopetit kohteen {file} jaon käyttäjältä {email} sähköpostitse",
+ "Password to access %1$s was sent to %2s" : "Salasana kohteen %1$s käyttämiseksi lähetettiin käyttäjälle %2s",
+ "Password to access {file} was sent to {email}" : "Salasana kohteen {file} käyttämiseksi lähetettiin osoitteeseen {email}",
+ "Password to access %1$s was sent to you" : "Salasana kohteen %1$s käyttämiseksi lähetettiin sinulle",
"Password to access {file} was sent to you" : "Salasana tiedoston {file} käyttämiseksi lähetettiin sinulle",
+ "Share by mail" : "Jaa sähköpostitse",
+ "Sharing %1$s failed, because this item is already shared with user %2$s" : "Kohteen %1$s jakaminen epäonnistui, koska tämä kohde on jo jaettu käyttäjän %2$s kanssa",
+ "We cannot send you the auto-generated password. Please set a valid email address in your personal settings and try again." : "Automaattisesti muodostettua salasanaa ei voi lähettää sinulle. Aseta kelvollinen sähköpostiosoite henkilökohtaisiin asetuksiisi ja yritä uudelleen.",
+ "Failed to send share by email. Got an invalid email address" : "Jaon lähettäminen sähköpostitse epäonnistui. Virheellinen sähköpostiosoite",
"Failed to send share by email" : "Jaon lähettäminen sähköpostitse epäonnistui",
- "Click the button below to open it." : "Klikkaa alla olevaa linkkiä avataksesi sen.",
+ "%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 linkkiä avataksesi sen.",
"Open »%s«" : "Avaa »%s«",
+ "%1$s via %2$s" : "%1$s palvelun %2$s kautta",
+ "Password to access »%s«" : "Salasana kohteen »%s« käyttöön",
"It is protected with the following password:" : "Se on suojattu seuraavalla salasanalla:",
+ "This password will expire at %s" : "Tämä salasana vanhenee %s",
+ "%1$s shared »%2$s« with you and wants to add:" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä:",
+ "%1$s shared »%2$s« with you and wants to add" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä",
+ "»%s« added a note to a file shared with you" : "»%s« lisäsi huomion jakamaasi tiedostoon",
"This is the password:" : "Tämä on salasana:",
"You can choose a different password at any time in the share dialog." : "Voit valita muun salasanan koska tahansa jakovalikossa.",
"Could not find share" : "Jakoa ei löytynyt",
- "Share by mail" : "Jaa sähköpostitse",
"Allows users to share a personalized link to a file or folder by putting in an email address." : "Salli käyttäjien jakaa personoitu linkki tiedostoon tai kansioon syöttämällä sähköpostiosoitteen.",
"Send password by mail" : "Lähetä salasana sähköpostitse",
- "Enforce password protection" : "Pakota salasanasuojaus",
- "Sharing %s failed, this item is already shared with %s" : "Kohteen %s jakaminen epäonnistui, koska se on jo jaettu käyttäjälle %s",
- "%s shared »%s« with you" : "%s jakoi kohteen »%s« kanssasi",
- "%s shared »%s« with you." : "%s jakoi kohteen »%s« kanssasi.",
- "%s via %s" : "%s (palvelun %s kautta)",
- "It is protected with the following password: %s" : "Se on suojattu seuraavalla salasanalla: %s",
- "This is the password: %s" : "Tämä on salasana: %s"
+ "Reply to initiator" : "Vastaa aloitteentekijälle"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/sharebymail/l10n/fi.json b/apps/sharebymail/l10n/fi.json
index c653bdf4396..39407ab0019 100644
--- a/apps/sharebymail/l10n/fi.json
+++ b/apps/sharebymail/l10n/fi.json
@@ -1,29 +1,44 @@
{ "translations": {
- "Shared with %1$s" : "Jaettu käyttäjälle %1$s",
+ "Shared with %1$s" : "Jaettu käyttäjälle %1$s",
"Shared with {email}" : "Jaettu käyttäjälle {email}",
- "Shared with %1$s by %2$s" : "Jaettu käyttäjälle %1$s käyttäjältä %2$s",
- "Shared with {email} by {actor}" : "Jaettu käyttäjälle {email} käyttäjältä {actor}",
+ "Shared with %1$s by %2$s" : "Jaettu käyttäjälle %1$s käyttäjän %2$s toimesta",
+ "Shared with {email} by {actor}" : "Jaettu käyttäjälle {email} käyttäjän {actor} toimesta",
+ "Unshared from {email}" : "Jako käyttäjälle {email} lopetettu",
+ "Unshared from {email} by {actor}" : "Jako käyttäjälle {email} lopetettiin käyttäjän {actor} toimesta",
+ "Password for mail share sent to %1$s" : "Salasana sähköpostijakoon lähetettiin osoitteeseen %1$s",
+ "Password for mail share sent to {email}" : "Salasana sähköpostijakoon lähetettiin osoitteeseen {email}",
+ "Password for mail share sent to you" : "Salasana sähköpostijakoon lähetettiin sinulle",
"You shared %1$s with %2$s by mail" : "Jaoit tiedoston %1$s sähköpostitse osoitteeseen %2$s",
"You shared {file} with {email} by mail" : "Jaoit tiedoston {file} sähköpostitse osoitteeseen {email}",
"%3$s shared %1$s with %2$s by mail" : "%3$s jakoi tiedoston %1$s sähköpostitse osoitteeseen %2$s",
"{actor} shared {file} with {email} by mail" : "{actor} jakoi tiedoston {file} sähköpostitse osoitteeseen {email}",
+ "You unshared %1$s from %2$s by mail" : "Lopetit kohteen %1$s jaon käyttäjältä %2$s sähköpostitse",
+ "You unshared {file} from {email} by mail" : "Lopetit kohteen {file} jaon käyttäjältä {email} sähköpostitse",
+ "Password to access %1$s was sent to %2s" : "Salasana kohteen %1$s käyttämiseksi lähetettiin käyttäjälle %2s",
+ "Password to access {file} was sent to {email}" : "Salasana kohteen {file} käyttämiseksi lähetettiin osoitteeseen {email}",
+ "Password to access %1$s was sent to you" : "Salasana kohteen %1$s käyttämiseksi lähetettiin sinulle",
"Password to access {file} was sent to you" : "Salasana tiedoston {file} käyttämiseksi lähetettiin sinulle",
+ "Share by mail" : "Jaa sähköpostitse",
+ "Sharing %1$s failed, because this item is already shared with user %2$s" : "Kohteen %1$s jakaminen epäonnistui, koska tämä kohde on jo jaettu käyttäjän %2$s kanssa",
+ "We cannot send you the auto-generated password. Please set a valid email address in your personal settings and try again." : "Automaattisesti muodostettua salasanaa ei voi lähettää sinulle. Aseta kelvollinen sähköpostiosoite henkilökohtaisiin asetuksiisi ja yritä uudelleen.",
+ "Failed to send share by email. Got an invalid email address" : "Jaon lähettäminen sähköpostitse epäonnistui. Virheellinen sähköpostiosoite",
"Failed to send share by email" : "Jaon lähettäminen sähköpostitse epäonnistui",
- "Click the button below to open it." : "Klikkaa alla olevaa linkkiä avataksesi sen.",
+ "%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 linkkiä avataksesi sen.",
"Open »%s«" : "Avaa »%s«",
+ "%1$s via %2$s" : "%1$s palvelun %2$s kautta",
+ "Password to access »%s«" : "Salasana kohteen »%s« käyttöön",
"It is protected with the following password:" : "Se on suojattu seuraavalla salasanalla:",
+ "This password will expire at %s" : "Tämä salasana vanhenee %s",
+ "%1$s shared »%2$s« with you and wants to add:" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä:",
+ "%1$s shared »%2$s« with you and wants to add" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä",
+ "»%s« added a note to a file shared with you" : "»%s« lisäsi huomion jakamaasi tiedostoon",
"This is the password:" : "Tämä on salasana:",
"You can choose a different password at any time in the share dialog." : "Voit valita muun salasanan koska tahansa jakovalikossa.",
"Could not find share" : "Jakoa ei löytynyt",
- "Share by mail" : "Jaa sähköpostitse",
"Allows users to share a personalized link to a file or folder by putting in an email address." : "Salli käyttäjien jakaa personoitu linkki tiedostoon tai kansioon syöttämällä sähköpostiosoitteen.",
"Send password by mail" : "Lähetä salasana sähköpostitse",
- "Enforce password protection" : "Pakota salasanasuojaus",
- "Sharing %s failed, this item is already shared with %s" : "Kohteen %s jakaminen epäonnistui, koska se on jo jaettu käyttäjälle %s",
- "%s shared »%s« with you" : "%s jakoi kohteen »%s« kanssasi",
- "%s shared »%s« with you." : "%s jakoi kohteen »%s« kanssasi.",
- "%s via %s" : "%s (palvelun %s kautta)",
- "It is protected with the following password: %s" : "Se on suojattu seuraavalla salasanalla: %s",
- "This is the password: %s" : "Tämä on salasana: %s"
+ "Reply to initiator" : "Vastaa aloitteentekijälle"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/composer.lock b/composer.lock
index 0176e90bcf5..46cdcd56358 100644
--- a/composer.lock
+++ b/composer.lock
@@ -9,16 +9,16 @@
"packages-dev": [
{
"name": "bamarni/composer-bin-plugin",
- "version": "1.8.0",
+ "version": "1.8.1",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
- "reference": "24764700027bcd3cb072e5f8005d4a150fe714fe"
+ "reference": "e12e9769c8ee97d036f7f98abf66b96cf3862346"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/24764700027bcd3cb072e5f8005d4a150fe714fe",
- "reference": "24764700027bcd3cb072e5f8005d4a150fe714fe",
+ "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/e12e9769c8ee97d036f7f98abf66b96cf3862346",
+ "reference": "e12e9769c8ee97d036f7f98abf66b96cf3862346",
"shasum": ""
},
"require": {
@@ -32,9 +32,9 @@
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.5",
- "symfony/console": "^5.4.7 || ^6.0.7",
- "symfony/finder": "^5.4.7 || ^6.0.7",
- "symfony/process": "^5.4.7 || ^6.0.7"
+ "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
},
"type": "composer-plugin",
"extra": {
@@ -60,9 +60,9 @@
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
- "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.0"
+ "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.1"
},
- "time": "2022-07-14T10:29:51+00:00"
+ "time": "2022-08-03T19:58:11+00:00"
}
],
"aliases": [],
diff --git a/lib/l10n/fi.js b/lib/l10n/fi.js
index 62ac7751f43..13ebcfcffeb 100644
--- a/lib/l10n/fi.js
+++ b/lib/l10n/fi.js
@@ -116,7 +116,11 @@ OC.L10N.register(
"Set an admin password." : "Aseta ylläpitäjän salasana.",
"Sharing backend %s not found" : "Jakamisen taustaosaa %s ei löytynyt",
"Sharing backend for %s not found" : "Jakamisen taustaosaa kohteelle %s ei löytynyt",
+ "%1$s shared »%2$s« with you and wants to add:" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä:",
+ "%1$s shared »%2$s« with you and wants to add" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä",
+ "»%s« added a note to a file shared with you" : "»%s« lisäsi huomion jakamaasi tiedostoon",
"Open »%s«" : "Avaa »%s«",
+ "%1$s via %2$s" : "%1$s palvelun %2$s kautta",
"You are not allowed to share %s" : "Oikeutesi eivät riitä kohteen %s jakamiseen.",
"Cannot increase permissions of %s" : "Kohteen %s käyttöoikeuksien lisääminen ei onnistu",
"Files cannot be shared with delete permissions" : "Tiedostoja ei voi jakaa poistamisoikeuksilla",
@@ -189,6 +193,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",
+ "Cannot download file" : "Tiedostoa ei voi ladata",
"Application is not enabled" : "Sovellusta ei ole otettu käyttöön",
"Authentication error" : "Tunnistautumisvirhe",
"Token expired. Please reload page." : "Valtuutus vanheni. Lataa sivu uudelleen.",
diff --git a/lib/l10n/fi.json b/lib/l10n/fi.json
index 975213c6cdc..2aa4fdcd0d5 100644
--- a/lib/l10n/fi.json
+++ b/lib/l10n/fi.json
@@ -114,7 +114,11 @@
"Set an admin password." : "Aseta ylläpitäjän salasana.",
"Sharing backend %s not found" : "Jakamisen taustaosaa %s ei löytynyt",
"Sharing backend for %s not found" : "Jakamisen taustaosaa kohteelle %s ei löytynyt",
+ "%1$s shared »%2$s« with you and wants to add:" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä:",
+ "%1$s shared »%2$s« with you and wants to add" : "%1$s jakoi kohteen »%2$s« kanssasi ja haluaa lisätä",
+ "»%s« added a note to a file shared with you" : "»%s« lisäsi huomion jakamaasi tiedostoon",
"Open »%s«" : "Avaa »%s«",
+ "%1$s via %2$s" : "%1$s palvelun %2$s kautta",
"You are not allowed to share %s" : "Oikeutesi eivät riitä kohteen %s jakamiseen.",
"Cannot increase permissions of %s" : "Kohteen %s käyttöoikeuksien lisääminen ei onnistu",
"Files cannot be shared with delete permissions" : "Tiedostoja ei voi jakaa poistamisoikeuksilla",
@@ -187,6 +191,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",
+ "Cannot download file" : "Tiedostoa ei voi ladata",
"Application is not enabled" : "Sovellusta ei ole otettu käyttöön",
"Authentication error" : "Tunnistautumisvirhe",
"Token expired. Please reload page." : "Valtuutus vanheni. Lataa sivu uudelleen.",
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php
index 333984bde71..ae4f19f5d18 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php
@@ -114,12 +114,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function comparison($x, string $operator, $y, $type = null): IQueryFunction {
+ public function comparison($x, string $operator, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->comparison($x, $operator, $y));
+ return $this->expressionBuilder->comparison($x, $operator, $y);
}
/**
@@ -137,12 +137,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function eq($x, $y, $type = null): IQueryFunction {
+ public function eq($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->eq($x, $y));
+ return $this->expressionBuilder->eq($x, $y);
}
/**
@@ -159,12 +159,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function neq($x, $y, $type = null): IQueryFunction {
+ public function neq($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->neq($x, $y));
+ return $this->expressionBuilder->neq($x, $y);
}
/**
@@ -181,12 +181,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function lt($x, $y, $type = null): IQueryFunction {
+ public function lt($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->lt($x, $y));
+ return $this->expressionBuilder->lt($x, $y);
}
/**
@@ -203,12 +203,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function lte($x, $y, $type = null): IQueryFunction {
+ public function lte($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->lte($x, $y));
+ return $this->expressionBuilder->lte($x, $y);
}
/**
@@ -225,12 +225,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function gt($x, $y, $type = null): IQueryFunction {
+ public function gt($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->gt($x, $y));
+ return $this->expressionBuilder->gt($x, $y);
}
/**
@@ -247,12 +247,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function gte($x, $y, $type = null): IQueryFunction {
+ public function gte($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->gte($x, $y));
+ return $this->expressionBuilder->gte($x, $y);
}
/**
@@ -260,11 +260,11 @@ class ExpressionBuilder implements IExpressionBuilder {
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NULL.
*
- * @return IQueryFunction
+ * @return string
*/
- public function isNull($x): IQueryFunction {
+ public function isNull($x): string {
$x = $this->helper->quoteColumnName($x);
- return new QueryFunction($this->expressionBuilder->isNull($x));
+ return $this->expressionBuilder->isNull($x);
}
/**
@@ -272,11 +272,11 @@ class ExpressionBuilder implements IExpressionBuilder {
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NOT NULL.
*
- * @return IQueryFunction
+ * @return string
*/
- public function isNotNull($x): IQueryFunction {
+ public function isNotNull($x): string {
$x = $this->helper->quoteColumnName($x);
- return new QueryFunction($this->expressionBuilder->isNotNull($x));
+ return $this->expressionBuilder->isNotNull($x);
}
/**
@@ -287,12 +287,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function like($x, $y, $type = null): IQueryFunction {
+ public function like($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->like($x, $y));
+ return $this->expressionBuilder->like($x, $y);
}
/**
@@ -303,11 +303,11 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 9.0.0
*/
- public function iLike($x, $y, $type = null): IQueryFunction {
- return new QueryFunction($this->expressionBuilder->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y)));
+ public function iLike($x, $y, $type = null): string {
+ return $this->expressionBuilder->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
}
/**
@@ -318,12 +318,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function notLike($x, $y, $type = null): IQueryFunction {
+ public function notLike($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->notLike($x, $y));
+ return $this->expressionBuilder->notLike($x, $y);
}
/**
@@ -334,12 +334,12 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function in($x, $y, $type = null): IQueryFunction {
+ public function in($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnNames($y);
- return new QueryFunction($this->expressionBuilder->in($x, $y));
+ return $this->expressionBuilder->in($x, $y);
}
/**
@@ -350,34 +350,34 @@ class ExpressionBuilder implements IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
*/
- public function notIn($x, $y, $type = null): IQueryFunction {
+ public function notIn($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnNames($y);
- return new QueryFunction($this->expressionBuilder->notIn($x, $y));
+ return $this->expressionBuilder->notIn($x, $y);
}
/**
* Creates a $x = '' statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
- * @return IQueryFunction
+ * @return string
* @since 13.0.0
*/
- public function emptyString($x): IQueryFunction {
- return new QueryFunction($this->eq($x, $this->literal('', IQueryBuilder::PARAM_STR)));
+ public function emptyString($x): string {
+ return $this->eq($x, $this->literal('', IQueryBuilder::PARAM_STR));
}
/**
* Creates a `$x <> ''` statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
- * @return IQueryFunction
+ * @return string
* @since 13.0.0
*/
- public function nonEmptyString($x): IQueryFunction {
- return new QueryFunction($this->neq($x, $this->literal('', IQueryBuilder::PARAM_STR)));
+ public function nonEmptyString($x): string {
+ return $this->neq($x, $this->literal('', IQueryBuilder::PARAM_STR));
}
/**
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php
index 74209d0c3da..3bb54d4b26e 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php
@@ -49,10 +49,10 @@ class MySqlExpressionBuilder extends ExpressionBuilder {
/**
* @inheritdoc
*/
- public function iLike($x, $y, $type = null): IQueryFunction {
+ public function iLike($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->comparison($x, ' COLLATE ' . $this->collation . ' 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 20d68b30b33..f9b58d7d8ed 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php
@@ -49,101 +49,101 @@ class OCIExpressionBuilder extends ExpressionBuilder {
/**
* @inheritdoc
*/
- public function comparison($x, string $operator, $y, $type = null): IQueryFunction {
+ public function comparison($x, string $operator, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->comparison($x, $operator, $y));
+ return $this->expressionBuilder->comparison($x, $operator, $y);
}
/**
* @inheritdoc
*/
- public function eq($x, $y, $type = null): IQueryFunction {
+ public function eq($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->eq($x, $y));
+ return $this->expressionBuilder->eq($x, $y);
}
/**
* @inheritdoc
*/
- public function neq($x, $y, $type = null): IQueryFunction {
+ public function neq($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->neq($x, $y));
+ return $this->expressionBuilder->neq($x, $y);
}
/**
* @inheritdoc
*/
- public function lt($x, $y, $type = null): IQueryFunction {
+ public function lt($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->lt($x, $y));
+ return $this->expressionBuilder->lt($x, $y);
}
/**
* @inheritdoc
*/
- public function lte($x, $y, $type = null): IQueryFunction {
+ public function lte($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->lte($x, $y));
+ return $this->expressionBuilder->lte($x, $y);
}
/**
* @inheritdoc
*/
- public function gt($x, $y, $type = null): IQueryFunction {
+ public function gt($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->gt($x, $y));
+ return $this->expressionBuilder->gt($x, $y);
}
/**
* @inheritdoc
*/
- public function gte($x, $y, $type = null): IQueryFunction {
+ public function gte($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->gte($x, $y));
+ return $this->expressionBuilder->gte($x, $y);
}
/**
* @inheritdoc
*/
- public function in($x, $y, $type = null): IQueryFunction {
+ public function in($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->in($x, $y));
+ return $this->expressionBuilder->in($x, $y);
}
/**
* @inheritdoc
*/
- public function notIn($x, $y, $type = null): IQueryFunction {
+ public function notIn($x, $y, $type = null): string {
$x = $this->prepareColumn($x, $type);
$y = $this->prepareColumn($y, $type);
- return new QueryFunction($this->expressionBuilder->notIn($x, $y));
+ return $this->expressionBuilder->notIn($x, $y);
}
/**
* Creates a $x = '' statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
- * @return IQueryFunction
+ * @return string
* @since 13.0.0
*/
- public function emptyString($x): IQueryFunction {
+ public function emptyString($x): string {
return $this->isNull($x);
}
@@ -151,10 +151,10 @@ class OCIExpressionBuilder extends ExpressionBuilder {
* Creates a `$x <> ''` statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
- * @return IQueryFunction
+ * @return string
* @since 13.0.0
*/
- public function nonEmptyString($x): IQueryFunction {
+ public function nonEmptyString($x): string {
return $this->isNotNull($x);
}
@@ -182,14 +182,14 @@ class OCIExpressionBuilder extends ExpressionBuilder {
/**
* @inheritdoc
*/
- public function like($x, $y, $type = null): IQueryFunction {
- return new QueryFunction(parent::like($x, $y, $type) . " ESCAPE '\\'");
+ public function like($x, $y, $type = null): string {
+ return parent::like($x, $y, $type) . " ESCAPE '\\'";
}
/**
* @inheritdoc
*/
- public function iLike($x, $y, $type = null): IQueryFunction {
+ public function iLike($x, $y, $type = null): string {
return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
}
}
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php
index cbebe97ae87..0fba5363a28 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php
@@ -52,9 +52,9 @@ class PgSqlExpressionBuilder extends ExpressionBuilder {
/**
* @inheritdoc
*/
- public function iLike($x, $y, $type = null): IQueryFunction {
+ public function iLike($x, $y, $type = null): string {
$x = $this->helper->quoteColumnName($x);
$y = $this->helper->quoteColumnName($y);
- return new QueryFunction($this->expressionBuilder->comparison($x, 'ILIKE', $y));
+ return $this->expressionBuilder->comparison($x, 'ILIKE', $y);
}
}
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php
index 5425138fa6c..289aa09b003 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php
@@ -23,18 +23,15 @@
*/
namespace OC\DB\QueryBuilder\ExpressionBuilder;
-use OC\DB\QueryBuilder\QueryFunction;
-use OCP\DB\QueryBuilder\IQueryFunction;
-
class SqliteExpressionBuilder extends ExpressionBuilder {
/**
* @inheritdoc
*/
- public function like($x, $y, $type = null): IQueryFunction {
- return new QueryFunction(parent::like($x, $y, $type) . " ESCAPE '\\'");
+ public function like($x, $y, $type = null): string {
+ return parent::like($x, $y, $type) . " ESCAPE '\\'";
}
- public function iLike($x, $y, $type = null): IQueryFunction {
- return new QueryFunction($this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y), $type));
+ public function iLike($x, $y, $type = null): string {
+ return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y), $type);
}
}
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
index 408a879d624..e0a7549a0ad 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
@@ -121,15 +121,4 @@ class FunctionBuilder implements IFunctionBuilder {
public function least($x, $y): IQueryFunction {
return new QueryFunction('LEAST(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')');
}
-
- public function case(array $whens, $else): IQueryFunction {
- if (count($whens) < 1) {
- return new QueryFunction($this->helper->quoteColumnName($else));
- }
-
- $whenParts = array_map(function (array $when) {
- return 'WHEN ' . $this->helper->quoteColumnName($when['when']) . ' THEN ' . $this->helper->quoteColumnName($when['then']);
- }, $whens);
- return new QueryFunction('CASE ' . implode(' ', $whenParts) . ' ELSE ' . $this->helper->quoteColumnName($else) . ' END');
- }
}
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index d991cbd1dd5..e81ba61b3a7 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -715,12 +715,11 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
public function join($fromAlias, $join, $alias, $condition = null) {
- $condition = $condition !== null ? (string)$condition : null;
$this->queryBuilder->join(
$this->quoteAlias($fromAlias),
$this->getTableName($join),
@@ -744,12 +743,11 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
public function innerJoin($fromAlias, $join, $alias, $condition = null) {
- $condition = $condition !== null ? (string)$condition : null;
$this->queryBuilder->innerJoin(
$this->quoteAlias($fromAlias),
$this->getTableName($join),
@@ -773,12 +771,11 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
public function leftJoin($fromAlias, $join, $alias, $condition = null) {
- $condition = $condition !== null ? (string)$condition : null;
$this->queryBuilder->leftJoin(
$this->quoteAlias($fromAlias),
$this->getTableName($join),
@@ -802,12 +799,11 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
public function rightJoin($fromAlias, $join, $alias, $condition = null) {
- $condition = $condition !== null ? (string)$condition : null;
$this->queryBuilder->rightJoin(
$this->quoteAlias($fromAlias),
$this->getTableName($join),
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index f23635aa01b..ec284282178 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -875,26 +875,32 @@ class Cache implements ICache {
$id = $entry['fileid'];
$query = $this->getQueryBuilder();
- $query->selectAlias($query->func()->sum('size'), 'size_sum')
- ->selectAlias($query->func()->min('size'), 'size_min')
- // in case of encryption being enabled after some files are already uploaded, some entries will have an unencrypted_size of 0 and a non-zero size
- ->selectAlias($query->func()->sum(
- $query->func()->case([
- ['when' => $query->expr()->eq('unencrypted_size', $query->expr()->literal(0, IQueryBuilder::PARAM_INT)), 'then' => 'size'],
- ], 'unencrypted_size')
- ), 'unencrypted_sum')
- ->selectAlias($query->func()->min('unencrypted_size'), 'unencrypted_min')
- ->selectAlias($query->func()->max('unencrypted_size'), 'unencrypted_max')
+ $query->select('size', 'unencrypted_size')
->from('filecache')
- ->whereStorageId($this->getNumericStorageId())
->whereParent($id);
$result = $query->execute();
- $row = $result->fetch();
+ $rows = $result->fetchAll();
$result->closeCursor();
- if ($row) {
- ['size_sum' => $sum, 'size_min' => $min, 'unencrypted_sum' => $unencryptedSum, 'unencrypted_min' => $unencryptedMin, 'unencrypted_max' => $unencryptedMax] = $row;
+ if ($rows) {
+ $sizes = array_map(function (array $row) {
+ return (int)$row['size'];
+ }, $rows);
+ $unencryptedOnlySizes = array_map(function (array $row) {
+ return (int)$row['unencrypted_size'];
+ }, $rows);
+ $unencryptedSizes = array_map(function (array $row) {
+ return (int)(($row['unencrypted_size'] > 0) ? $row['unencrypted_size'] : $row['size']);
+ }, $rows);
+
+ $sum = array_sum($sizes);
+ $min = min($sizes);
+
+ $unencryptedSum = array_sum($unencryptedSizes);
+ $unencryptedMin = min($unencryptedSizes);
+ $unencryptedMax = max($unencryptedOnlySizes);
+
$sum = 0 + $sum;
$min = 0 + $min;
if ($min === -1) {
@@ -907,18 +913,22 @@ class Cache implements ICache {
} else {
$unencryptedTotal = $unencryptedSum;
}
- if ($entry['size'] !== $totalSize) {
- // only set unencrypted size for a folder if any child entries have it set
- if ($unencryptedMax > 0) {
- $this->update($id, [
- 'size' => $totalSize,
- 'unencrypted_size' => $unencryptedTotal,
- ]);
- } else {
- $this->update($id, [
- 'size' => $totalSize,
- ]);
- }
+ } else {
+ $totalSize = 0;
+ $unencryptedTotal = 0;
+ $unencryptedMax = 0;
+ }
+ if ($entry['size'] !== $totalSize) {
+ // only set unencrypted size for a folder if any child entries have it set, or the folder is empty
+ if ($unencryptedMax > 0 || $totalSize === 0) {
+ $this->update($id, [
+ 'size' => $totalSize,
+ 'unencrypted_size' => $unencryptedTotal,
+ ]);
+ } else {
+ $this->update($id, [
+ 'size' => $totalSize,
+ ]);
}
}
}
diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php
index a0953baa785..2909e998bf9 100644
--- a/lib/private/Files/Cache/Propagator.php
+++ b/lib/private/Files/Cache/Propagator.php
@@ -116,18 +116,18 @@ class Propagator implements IPropagator {
if ($this->storage->instanceOfStorage(Encryption::class)) {
// in case of encryption being enabled after some files are already uploaded, some entries will have an unencrypted_size of 0 and a non-zero size
+ $eq = $builder->expr()->eq('unencrypted_size', $builder->expr()->literal(0, IQueryBuilder::PARAM_INT));
+ $sizeColumn = $builder->getColumnName('size');
+ $unencryptedSizeColumn = $builder->getColumnName('unencrypted_size');
$builder->set('unencrypted_size', $builder->func()->greatest(
$builder->func()->add(
- $builder->func()->case([
- ['when' => $builder->expr()->eq('unencrypted_size', $builder->expr()->literal(0, IQueryBuilder::PARAM_INT)), 'then' => 'size']
- ], 'unencrypted_size'),
+ $builder->createFunction("CASE WHEN $eq THEN $unencryptedSizeColumn ELSE $sizeColumn END"),
$builder->createNamedParameter($sizeDifference)
),
$builder->createNamedParameter(-1, IQueryBuilder::PARAM_INT)
));
}
- $a = $builder->getSQL();
$builder->execute();
}
}
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php
index fb32b64c012..4799c3bff7d 100644
--- a/lib/private/Files/Cache/Scanner.php
+++ b/lib/private/Files/Cache/Scanner.php
@@ -339,7 +339,7 @@ class Scanner extends BasicEmitter implements IScanner {
try {
$data = $this->scanFile($path, $reuse, -1, null, $lock);
if ($data and $data['mimetype'] === 'httpd/unix-directory') {
- $size = $this->scanChildren($path, $recursive, $reuse, $data['fileid'], $lock);
+ $size = $this->scanChildren($path, $recursive, $reuse, $data['fileid'], $lock, $data);
$data['size'] = $size;
}
} finally {
@@ -376,9 +376,10 @@ class Scanner extends BasicEmitter implements IScanner {
* @param int $reuse
* @param int $folderId id for the folder to be scanned
* @param bool $lock set to false to disable getting an additional read lock during scanning
+ * @param array $data the data of the folder before (re)scanning the children
* @return int the size of the scanned folder or -1 if the size is unknown at this stage
*/
- protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderId = null, $lock = true) {
+ protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderId = null, $lock = true, array $data = []) {
if ($reuse === -1) {
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
}
@@ -397,7 +398,8 @@ class Scanner extends BasicEmitter implements IScanner {
$size += $childSize;
}
}
- if ($this->cacheActive) {
+ $oldSize = $data['size'] ?? null;
+ if ($this->cacheActive && $oldSize !== $size) {
$this->cache->update($folderId, ['size' => $size]);
}
$this->emit('\OC\Files\Cache\Scanner', 'postScanFolder', [$path, $this->storageId]);
@@ -409,6 +411,11 @@ class Scanner extends BasicEmitter implements IScanner {
$existingChildren = $this->getExistingChildren($folderId);
$newChildren = iterator_to_array($this->storage->getDirectoryContent($path));
+ if (count($existingChildren) === 0 && count($newChildren) === 0) {
+ // no need to do a transaction
+ return [];
+ }
+
if ($this->useTransactions) {
\OC::$server->getDatabaseConnection()->beginTransaction();
}
diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php
index b5f548dd563..1a8c3637063 100644
--- a/lib/private/Files/Cache/SearchBuilder.php
+++ b/lib/private/Files/Cache/SearchBuilder.php
@@ -54,7 +54,7 @@ class SearchBuilder {
ISearchComparison::COMPARE_GREATER_THAN => 'lte',
ISearchComparison::COMPARE_GREATER_THAN_EQUAL => 'lt',
ISearchComparison::COMPARE_LESS_THAN => 'gte',
- ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lt',
+ ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'gt',
];
public const TAG_FAVORITE = '_$!<Favorite>!$_';
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php
index 4053042edd9..834c9fd3d72 100644
--- a/lib/private/Files/Cache/Wrapper/CacheJail.php
+++ b/lib/private/Files/Cache/Wrapper/CacheJail.php
@@ -324,11 +324,13 @@ class CacheJail extends CacheWrapper {
}
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) ?: null;
+ if ($this->getGetUnjailedRoot() === '' || strpos($rawEntry->getPath(), $this->getGetUnjailedRoot()) === 0) {
+ $rawEntry = $this->getCache()->getCacheEntryFromSearchResult($rawEntry);
+ if ($rawEntry) {
+ $jailedPath = $this->getJailedPath($rawEntry->getPath());
+ if ($jailedPath !== null) {
+ return $this->formatCacheEntry(clone $rawEntry) ?: null;
+ }
}
}
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 685057a7860..3540b563742 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -90,7 +90,12 @@ class UserMountCache implements IUserMountCache {
$cachedMounts = $this->getMountsForUser($user);
if (is_array($mountProviderClasses)) {
- $cachedMounts = array_filter($cachedMounts, function (ICachedMountInfo $mountInfo) use ($mountProviderClasses) {
+ $cachedMounts = array_filter($cachedMounts, function (ICachedMountInfo $mountInfo) use ($mountProviderClasses, $newMounts) {
+ // for existing mounts that didn't have a mount provider set
+ // we still want the ones that map to new mounts
+ if ($mountInfo->getMountProvider() === '' && isset($newMounts[$mountInfo->getRootId()])) {
+ return true;
+ }
return in_array($mountInfo->getMountProvider(), $mountProviderClasses);
});
}
diff --git a/lib/private/Files/ObjectStore/NoopScanner.php b/lib/private/Files/ObjectStore/NoopScanner.php
index 3b8cbdb18bb..bdfc93758d4 100644
--- a/lib/private/Files/ObjectStore/NoopScanner.php
+++ b/lib/private/Files/ObjectStore/NoopScanner.php
@@ -68,7 +68,7 @@ class NoopScanner extends Scanner {
* @param array $folderData existing cache data for the folder to be scanned
* @return int the size of the scanned folder or -1 if the size is unknown at this stage
*/
- protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderId = null, $lock = true) {
+ protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderId = null, $lock = true, array $data = []) {
return 0;
}
diff --git a/lib/private/User/DisplayNameCache.php b/lib/private/User/DisplayNameCache.php
index 22a79863e49..5d1cc8940d7 100644
--- a/lib/private/User/DisplayNameCache.php
+++ b/lib/private/User/DisplayNameCache.php
@@ -47,7 +47,7 @@ class DisplayNameCache implements IEventListener {
$this->userManager = $userManager;
}
- public function getDisplayName(string $userId) {
+ public function getDisplayName(string $userId): ?string {
if (isset($this->cache[$userId])) {
return $this->cache[$userId];
}
@@ -61,7 +61,7 @@ class DisplayNameCache implements IEventListener {
if ($user) {
$displayName = $user->getDisplayName();
} else {
- $displayName = $userId;
+ $displayName = null;
}
$this->cache[$userId] = $displayName;
$this->memCache->set($userId, $displayName, 60 * 10); // 10 minutes
diff --git a/lib/private/User/LazyUser.php b/lib/private/User/LazyUser.php
index 118dd3d0699..096578b8f37 100644
--- a/lib/private/User/LazyUser.php
+++ b/lib/private/User/LazyUser.php
@@ -51,7 +51,7 @@ class LazyUser implements IUser {
}
public function getDisplayName() {
- return $this->userManager->getDisplayName($this->uid);
+ return $this->userManager->getDisplayName($this->uid) ?? $this->uid;
}
public function setDisplayName($displayName) {
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index 55ac663f3ec..be5151313c4 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -188,7 +188,7 @@ class Manager extends PublicEmitter implements IUserManager {
return null;
}
- public function getDisplayName(string $uid): string {
+ public function getDisplayName(string $uid): ?string {
return $this->displayNameCache->getDisplayName($uid);
}
diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
index 8f7cd10dee5..53dc1fa5a7f 100644
--- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
@@ -107,7 +107,7 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
@@ -115,7 +115,7 @@ interface IExpressionBuilder {
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function comparison($x, string $operator, $y, $type = null): IQueryFunction;
+ public function comparison($x, string $operator, $y, $type = null): string;
/**
* Creates an equality comparison expression with the given arguments.
@@ -132,14 +132,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function eq($x, $y, $type = null): IQueryFunction;
+ public function eq($x, $y, $type = null): string;
/**
* Creates a non equality comparison expression with the given arguments.
@@ -155,14 +155,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function neq($x, $y, $type = null): IQueryFunction;
+ public function neq($x, $y, $type = null): string;
/**
* Creates a lower-than comparison expression with the given arguments.
@@ -178,14 +178,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function lt($x, $y, $type = null): IQueryFunction;
+ public function lt($x, $y, $type = null): string;
/**
* Creates a lower-than-equal comparison expression with the given arguments.
@@ -201,14 +201,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function lte($x, $y, $type = null): IQueryFunction;
+ public function lte($x, $y, $type = null): string;
/**
* Creates a greater-than comparison expression with the given arguments.
@@ -224,14 +224,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function gt($x, $y, $type = null): IQueryFunction;
+ public function gt($x, $y, $type = null): string;
/**
* Creates a greater-than-equal comparison expression with the given arguments.
@@ -247,38 +247,38 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function gte($x, $y, $type = null): IQueryFunction;
+ public function gte($x, $y, $type = null): string;
/**
* Creates an IS NULL expression with the given arguments.
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NULL.
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0
*
* @psalm-taint-sink sql $x
*/
- public function isNull($x): IQueryFunction;
+ public function isNull($x): string;
/**
* Creates an IS NOT NULL expression with the given arguments.
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NOT NULL.
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0
*
* @psalm-taint-sink sql $x
*/
- public function isNotNull($x): IQueryFunction;
+ public function isNotNull($x): string;
/**
* Creates a LIKE() comparison expression with the given arguments.
@@ -288,14 +288,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function like($x, $y, $type = null): IQueryFunction;
+ public function like($x, $y, $type = null): string;
/**
* Creates a NOT LIKE() comparison expression with the given arguments.
@@ -305,14 +305,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function notLike($x, $y, $type = null): IQueryFunction;
+ public function notLike($x, $y, $type = null): string;
/**
* Creates a ILIKE() comparison expression with the given arguments.
@@ -322,14 +322,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function iLike($x, $y, $type = null): IQueryFunction;
+ public function iLike($x, $y, $type = null): string;
/**
* Creates a IN () comparison expression with the given arguments.
@@ -339,14 +339,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function in($x, $y, $type = null): IQueryFunction;
+ public function in($x, $y, $type = null): string;
/**
* Creates a NOT IN () comparison expression with the given arguments.
@@ -356,36 +356,36 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function notIn($x, $y, $type = null): IQueryFunction;
+ public function notIn($x, $y, $type = null): string;
/**
* Creates a $x = '' statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
- * @return IQueryFunction
+ * @return string
* @since 13.0.0
*
* @psalm-taint-sink sql $x
*/
- public function emptyString($x): IQueryFunction;
+ public function emptyString($x): string;
/**
* Creates a `$x <> ''` statement, because Oracle needs a different check
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison.
- * @return IQueryFunction
+ * @return string
* @since 13.0.0
*
* @psalm-taint-sink sql $x
*/
- public function nonEmptyString($x): IQueryFunction;
+ public function nonEmptyString($x): string;
/**
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 811e8d06aaf..d4edc8ea9f8 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -188,16 +188,4 @@ interface IFunctionBuilder {
* @since 18.0.0
*/
public function least($x, $y): IQueryFunction;
-
- /**
- * Takes the minimum of multiple values
- *
- * If you want to get the minimum value of all rows in a column, use `min` instead
- *
- * @param array<array{"when": string|ILiteral|IParameter|IQueryFunction, "then": string|ILiteral|IParameter|IQueryFunction}> $whens
- * @param string|ILiteral|IParameter|IQueryFunction $else
- * @return IQueryFunction
- * @since 18.0.0
- */
- public function case(array $whens, $else): IQueryFunction;
}
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index 446e9a00b4c..218b7d8cb2d 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -503,7 +503,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -528,7 +528,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -553,7 +553,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -578,7 +578,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php
index c107b2c5025..af0d5f08809 100644
--- a/lib/public/IUserManager.php
+++ b/lib/public/IUserManager.php
@@ -87,13 +87,11 @@ interface IUserManager {
/**
* Get the display name of a user
*
- * Note that this will return the uid if the user is not found instead of throwing an exception
- *
* @param string $uid
- * @return string
+ * @return string|null
* @since 25.0.0
*/
- public function getDisplayName(string $uid): string;
+ public function getDisplayName(string $uid): ?string;
/**
* check if a user exists
diff --git a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php
index 0ea6e69c956..08392b09d8d 100644
--- a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php
@@ -501,21 +501,4 @@ class FunctionBuilderTest extends TestCase {
$result->closeCursor();
$this->assertEquals(1, $row);
}
-
- public function testCase() {
- $query = $this->connection->getQueryBuilder();
-
- $query->select($query->func()->case([
- ['when' => $query->expr()->gt($query->expr()->literal(1, IQueryBuilder::PARAM_INT), $query->expr()->literal(2, IQueryBuilder::PARAM_INT)), 'then' => $query->expr()->literal('first')],
- ['when' => $query->expr()->lt($query->expr()->literal(1, IQueryBuilder::PARAM_INT), $query->expr()->literal(2, IQueryBuilder::PARAM_INT)), 'then' => $query->expr()->literal('second')],
- ['when' => $query->expr()->eq($query->expr()->literal(1, IQueryBuilder::PARAM_INT), $query->expr()->literal(2, IQueryBuilder::PARAM_INT)), 'then' => $query->expr()->literal('third')],
- ], $query->createNamedParameter('else')));
- $query->from('appconfig')
- ->setMaxResults(1);
-
- $result = $query->execute();
- $row = $result->fetchOne();
- $result->closeCursor();
- $this->assertEquals('second', $row);
- }
}
diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php
index 29e619cd09b..e4c052f6025 100644
--- a/tests/lib/Files/Cache/ScannerTest.php
+++ b/tests/lib/Files/Cache/ScannerTest.php
@@ -8,7 +8,14 @@
namespace Test\Files\Cache;
+use OC;
+use OC\Files\Cache\Cache;
use OC\Files\Cache\CacheEntry;
+use OC\Files\Cache\Scanner;
+use OC\Files\Storage\Storage;
+use OC\Files\Storage\Temporary;
+use OCP\Files\Cache\IScanner;
+use Test\TestCase;
/**
* Class ScannerTest
@@ -17,34 +24,21 @@ use OC\Files\Cache\CacheEntry;
*
* @package Test\Files\Cache
*/
-class ScannerTest extends \Test\TestCase {
- /**
- * @var \OC\Files\Storage\Storage $storage
- */
- private $storage;
-
- /**
- * @var \OC\Files\Cache\Scanner $scanner
- */
- private $scanner;
-
- /**
- * @var \OC\Files\Cache\Cache $cache
- */
- private $cache;
+class ScannerTest extends TestCase {
+ private Storage $storage;
+ private Scanner $scanner;
+ private Cache $cache;
protected function setUp(): void {
parent::setUp();
- $this->storage = new \OC\Files\Storage\Temporary([]);
- $this->scanner = new \OC\Files\Cache\Scanner($this->storage);
- $this->cache = new \OC\Files\Cache\Cache($this->storage);
+ $this->storage = new Temporary([]);
+ $this->scanner = new Scanner($this->storage);
+ $this->cache = new Cache($this->storage);
}
protected function tearDown(): void {
- if ($this->cache) {
- $this->cache->clear();
- }
+ $this->cache->clear();
parent::tearDown();
}
@@ -60,7 +54,7 @@ class ScannerTest extends \Test\TestCase {
$this->assertEquals($cachedData['mimetype'], 'text/plain');
$this->assertNotEquals($cachedData['parent'], -1); //parent folders should be scanned automatically
- $data = file_get_contents(\OC::$SERVERROOT . '/core/img/logo/logo.png');
+ $data = file_get_contents(OC::$SERVERROOT . '/core/img/logo/logo.png');
$this->storage->file_put_contents('foo.png', $data);
$this->scanner->scanFile('foo.png');
@@ -74,7 +68,7 @@ class ScannerTest extends \Test\TestCase {
$data = "dummy file data\n";
$this->storage->file_put_contents('foo🙈.txt', $data);
- if (\OC::$server->getDatabaseConnection()->supports4ByteText()) {
+ if (OC::$server->getDatabaseConnection()->supports4ByteText()) {
$this->assertNotNull($this->scanner->scanFile('foo🙈.txt'));
$this->assertTrue($this->cache->inCache('foo🙈.txt'), true);
@@ -98,7 +92,7 @@ class ScannerTest extends \Test\TestCase {
private function fillTestFolders() {
$textData = "dummy file data\n";
- $imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo/logo.png');
+ $imgData = file_get_contents(OC::$SERVERROOT . '/core/img/logo/logo.png');
$this->storage->mkdir('folder');
$this->storage->file_put_contents('foo.txt', $textData);
$this->storage->file_put_contents('foo.png', $imgData);
@@ -130,7 +124,7 @@ class ScannerTest extends \Test\TestCase {
public function testShallow() {
$this->fillTestFolders();
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW);
$this->assertEquals($this->cache->inCache(''), true);
$this->assertEquals($this->cache->inCache('foo.txt'), true);
$this->assertEquals($this->cache->inCache('foo.png'), true);
@@ -143,7 +137,7 @@ class ScannerTest extends \Test\TestCase {
$this->assertEquals(-1, $cachedDataFolder['size']);
$this->assertEquals(-1, $cachedDataFolder2['size']);
- $this->scanner->scan('folder', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('folder', IScanner::SCAN_SHALLOW);
$cachedDataFolder2 = $this->cache->get('folder');
@@ -160,7 +154,7 @@ class ScannerTest extends \Test\TestCase {
$this->storage->mkdir('folder2');
$this->storage->file_put_contents('folder2/bar.txt', 'foobar');
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW);
$this->assertFalse($this->cache->inCache('folder/bar.txt'));
$this->assertFalse($this->cache->inCache('folder/2bar.txt'));
$cachedData = $this->cache->get('');
@@ -182,7 +176,7 @@ class ScannerTest extends \Test\TestCase {
$this->storage->mkdir('folder2');
$this->storage->file_put_contents('folder2/bar.txt', 'foobar');
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW);
$this->assertFalse($this->cache->inCache('folder/bar.txt'));
$this->assertFalse($this->cache->inCache('folder/2bar.txt'));
$this->assertFalse($this->cache->inCache('folder2/bar.txt'));
@@ -191,7 +185,7 @@ class ScannerTest extends \Test\TestCase {
$cachedData = $this->cache->get('');
$this->assertEquals(-1, $cachedData['size']);
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE_INCOMPLETE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);
+ $this->scanner->scan('', IScanner::SCAN_RECURSIVE_INCOMPLETE, IScanner::REUSE_ETAG | IScanner::REUSE_SIZE);
$this->assertTrue($this->cache->inCache('folder/bar.txt'));
$this->assertTrue($this->cache->inCache('folder/bar.txt'));
@@ -248,7 +242,7 @@ class ScannerTest extends \Test\TestCase {
$oldData = $this->cache->get('');
$this->storage->unlink('folder/bar.txt');
$this->cache->put('folder', ['mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')]);
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW, IScanner::REUSE_SIZE);
$newData = $this->cache->get('');
$this->assertIsString($oldData['etag']);
$this->assertIsString($newData['etag']);
@@ -256,25 +250,25 @@ class ScannerTest extends \Test\TestCase {
$this->assertEquals($oldData['size'], $newData['size']);
$oldData = $newData;
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW, IScanner::REUSE_ETAG);
$newData = $this->cache->get('');
$this->assertSame($oldData['etag'], $newData['etag']);
$this->assertEquals(-1, $newData['size']);
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE);
+ $this->scanner->scan('', IScanner::SCAN_RECURSIVE);
$oldData = $this->cache->get('');
$this->assertNotEquals(-1, $oldData['size']);
- $this->scanner->scanFile('', \OC\Files\Cache\Scanner::REUSE_ETAG + \OC\Files\Cache\Scanner::REUSE_SIZE);
+ $this->scanner->scanFile('', IScanner::REUSE_ETAG + IScanner::REUSE_SIZE);
$newData = $this->cache->get('');
$this->assertSame($oldData['etag'], $newData['etag']);
$this->assertEquals($oldData['size'], $newData['size']);
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG + \OC\Files\Cache\Scanner::REUSE_SIZE);
+ $this->scanner->scan('', IScanner::SCAN_RECURSIVE, IScanner::REUSE_ETAG + IScanner::REUSE_SIZE);
$newData = $this->cache->get('');
$this->assertSame($oldData['etag'], $newData['etag']);
$this->assertEquals($oldData['size'], $newData['size']);
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG + \OC\Files\Cache\Scanner::REUSE_SIZE);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW, IScanner::REUSE_ETAG + IScanner::REUSE_SIZE);
$newData = $this->cache->get('');
$this->assertSame($oldData['etag'], $newData['etag']);
$this->assertEquals($oldData['size'], $newData['size']);
@@ -286,7 +280,7 @@ class ScannerTest extends \Test\TestCase {
$this->scanner->scan('');
$this->assertTrue($this->cache->inCache('foo.txt'));
$this->storage->unlink('foo.txt');
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW);
$this->assertFalse($this->cache->inCache('foo.txt'));
}
@@ -296,7 +290,7 @@ class ScannerTest extends \Test\TestCase {
$this->scanner->scan('');
$this->assertTrue($this->cache->inCache('folder/bar.txt'));
$this->storage->rmdir('/folder');
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW);
$this->assertFalse($this->cache->inCache('folder'));
$this->assertFalse($this->cache->inCache('folder/bar.txt'));
}
@@ -317,7 +311,7 @@ class ScannerTest extends \Test\TestCase {
$this->scanner->scan('folder/bar.txt');
// manipulate etag to simulate an empty etag
- $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG);
+ $this->scanner->scan('', IScanner::SCAN_SHALLOW, IScanner::REUSE_ETAG);
/** @var CacheEntry $data0 */
$data0 = $this->cache->get('folder/bar.txt');
$this->assertIsString($data0['etag']);
@@ -329,7 +323,7 @@ class ScannerTest extends \Test\TestCase {
$this->cache->put('folder/bar.txt', $data0->getData());
// rescan
- $this->scanner->scan('folder/bar.txt', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG);
+ $this->scanner->scan('folder/bar.txt', IScanner::SCAN_SHALLOW, IScanner::REUSE_ETAG);
// verify cache content
$newData0 = $this->cache->get('folder/bar.txt');
@@ -344,7 +338,7 @@ class ScannerTest extends \Test\TestCase {
$oldFolderId = $this->cache->getId('folder');
// delete the folder without removing the children
- $query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+ $query = OC::$server->getDatabaseConnection()->getQueryBuilder();
$query->delete('filecache')
->where($query->expr()->eq('fileid', $query->createNamedParameter($oldFolderId)));
$query->execute();
@@ -370,7 +364,7 @@ class ScannerTest extends \Test\TestCase {
$oldFolderId = $this->cache->getId('folder');
// delete the folder without removing the children
- $query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+ $query = OC::$server->getDatabaseConnection()->getQueryBuilder();
$query->delete('filecache')
->where($query->expr()->eq('fileid', $query->createNamedParameter($oldFolderId)));
$query->execute();
@@ -379,7 +373,7 @@ class ScannerTest extends \Test\TestCase {
$this->assertEquals($oldFolderId, $cachedData['parent']);
$this->assertFalse($this->cache->inCache('folder'));
- $this->scanner->scan('folder', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->scanner->scan('folder', IScanner::SCAN_SHALLOW);
$this->assertTrue($this->cache->inCache('folder'));
$newFolderId = $this->cache->getId('folder');
diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php
index 8b26b309daa..f1206781c5e 100644
--- a/tests/lib/Files/Config/UserMountCacheTest.php
+++ b/tests/lib/Files/Config/UserMountCacheTest.php
@@ -507,4 +507,29 @@ class UserMountCacheTest extends TestCase {
$result = $this->cache->getUsedSpaceForUsers([$user1, $user2]);
$this->assertEquals(['u1' => 100], $result);
}
+
+
+ public function testMigrateMountProvider() {
+ $user1 = $this->userManager->get('u1');
+
+ [$storage1, $rootId] = $this->getStorage(2);
+ $rootId = $this->createCacheEntry('', 2);
+ $mount1 = new MountPoint($storage1, '/foo/');
+ $this->cache->registerMounts($user1, [$mount1]);
+
+ $this->clearCache();
+
+ $cachedMounts = $this->cache->getMountsForUser($user1);
+ $this->assertCount(1, $cachedMounts);
+ $this->assertEquals('', $cachedMounts[0]->getMountProvider());
+
+ $mount1 = new MountPoint($storage1, '/foo/', null, null, null, null, 'dummy');
+ $this->cache->registerMounts($user1, [$mount1], ['dummy']);
+
+ $this->clearCache();
+
+ $cachedMounts = $this->cache->getMountsForUser($user1);
+ $this->assertCount(1, $cachedMounts);
+ $this->assertEquals('dummy', $cachedMounts[0]->getMountProvider());
+ }
}
diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php
index a7a95d53375..fd451dc3c01 100644
--- a/tests/lib/Files/ObjectStore/S3Test.php
+++ b/tests/lib/Files/ObjectStore/S3Test.php
@@ -176,7 +176,7 @@ class S3Test extends ObjectStoreTest {
// end of file reached
fseek($result, $size);
- self:self::assertTrue(feof($result));
+ self::assertTrue(feof($result));
$this->assertNoUpload('testfilesizes');
}