summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2019-04-26 10:36:37 -0300
committerVitor Mattos <vitor@php.rio>2019-04-26 10:36:37 -0300
commit09f7de0a39fec057dda44f25542a3033ba042db3 (patch)
treee80feb78eaf0efc9d7b22c64ced98813a40035ee /lib
parent35465ca90c9a7e90e0836fd9def62b0e7a6bf81c (diff)
parentafbf6ef0901ca2fbe23be898c3ee7c0660da4244 (diff)
downloadnextcloud-server-09f7de0a39fec057dda44f25542a3033ba042db3.tar.gz
nextcloud-server-09f7de0a39fec057dda44f25542a3033ba042db3.zip
Merge remote-tracking branch 'nextcloud/master' into bugfix-create-database-user
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/ca.js60
-rw-r--r--lib/l10n/ca.json60
-rw-r--r--lib/l10n/gl.js2
-rw-r--r--lib/l10n/gl.json2
-rw-r--r--lib/private/Files/ObjectStore/Swift.php11
-rw-r--r--lib/private/Share/Share.php74
-rw-r--r--lib/private/User/Database.php2
-rw-r--r--lib/public/Share.php15
8 files changed, 102 insertions, 124 deletions
diff --git a/lib/l10n/ca.js b/lib/l10n/ca.js
index 41c71b86504..05a823baad8 100644
--- a/lib/l10n/ca.js
+++ b/lib/l10n/ca.js
@@ -212,25 +212,51 @@ OC.L10N.register(
"Action \"%s\" not supported or implemented." : "L'acció \"%s\" no està suportada o implementada.",
"Authentication failed, wrong token or provider ID given" : "Ha fallat l’autenticació, s’ha donat un identificador de proveïdor o un testimoni incorrecte",
"Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Falten paràmetres per completar la sol·licitud. Els paràmetres que falten són: \"%s\"",
+ "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "L'ID \"%1$s\" ja es fa servir pel proveïdor de la federació del núvol \"%2$s\"",
+ "Cloud Federation Provider with ID: \"%s\" does not exist." : "El Proveïdor de la Federació de Núvol amb ID: \"%s\" no existeix.",
"Could not obtain lock type %d on \"%s\"." : "No s'ha pogut obtenir un bloqueig tipus %d a \"%s\".",
- "Sharing %s failed, because the file does not exist" : "Ha fallat en compartir %s, perquè el fitxer no existeix",
- "Sharing %s failed, because the user %s does not exist" : "Ha fallat en compartir %s, perquè l'usuari %s no existeix",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Ha fallat en compartir %s, perquè l'usuari %s no és membre de cap grup dels que %s és membre",
- "Sharing %s failed, because this item is already shared with %s" : "Ha fallat en compartir %s, perquè l'element ja està compartit amb %s",
- "Sharing %s failed, because the group %s does not exist" : "Ha fallat en compartir %s, perquè el grup %s no existeix",
- "Sharing %s failed, because %s is not a member of the group %s" : "Ha fallat en compartir %s, perquè %s no és membre del grup %s",
- "You need to provide a password to create a public link, only protected links are allowed" : "Heu de proporcionar una contrasenya per crear un enllaç públic. Només es permeten enllaços segurs.",
- "Sharing %s failed, because sharing with links is not allowed" : "Ha fallat en compartir %s, perquè no es permet compartir amb enllaços",
+ "Storage unauthorized. %s" : "Emmagatzematge no autoritzat. %s",
+ "Storage incomplete configuration. %s" : "Configuració d'emmagatzematge incompleta. %s",
+ "Storage connection error. %s" : "Error de connexió d’emmagatzematge. %s",
+ "Storage is temporarily not available" : "Emmagatzematge temporalment no disponible",
+ "Storage connection timeout. %s" : "Temps d’espera exhaurit en la connexió d’emmagatzematge. %s",
+ "Library %s with a version higher than %s is required - available version %s." : "Es requereix la llibreria %s amb una versió superior a %s - la versió disponible és %s.",
+ "Library %s with a version lower than %s is required - available version %s." : "Es requereix la llibreria %s amb una versió inferior a %s - la versió disponible és %s.",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "No s'ha pogut compartir %s perquè l'aplicació de fons no permet comparticions del tipus %i",
+ "Sharing %s failed, because the file does not exist" : "No s'ha pogut compartir %s, perquè el fitxer no existeix",
+ "Sharing %s failed, because you can not share with yourself" : "No s'ha pogut compartir %s, perquè no us podeu auto-compartir.",
+ "Sharing %s failed, because the user %s does not exist" : "No s'ha pogut compartir %s, perquè l'usuari %s no existeix",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "No s'ha pogut compartir %s, perquè l'usuari %s no és membre de cap grup dels que %s n'és membre",
+ "Sharing %s failed, because this item is already shared with %s" : "No s'ha pogut compartir %s, perquè l'element ja està compartit amb %s",
+ "Sharing %s failed, because this item is already shared with user %s" : "No s'ha pogut compartir %s, perquè l'element ja està compartit amb l'usuari %s",
+ "Sharing %s failed, because the group %s does not exist" : "No s'ha pogut compartir %s, perquè el grup %s no existeix",
+ "Sharing %s failed, because %s is not a member of the group %s" : "No s'ha pogut compartir %s, perquè %s no és membre del grup %s",
+ "You need to provide a password to create a public link, only protected links are allowed" : "Heu de proporcionar una contrasenya per crear un enllaç públic. Només es permeten els enllaços protegits",
+ "Sharing %s failed, because sharing with links is not allowed" : "No s'ha pogut compartir %s, perquè no es permet compartir amb enllaços",
"Not allowed to create a federated share with the same user" : "No està permés crear una compartició federada amb el mateix usuari",
- "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "La compartició de %s ha fallat, no es pot trobar %s, potser el servidor està actualment innacessible.",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "La compartició de %s ha fallat, no es pot trobar %s, potser el servidor és inaccessible actualment.",
"Share type %s is not valid for %s" : "La compartició tipus %s no és vàlida per %s",
- "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "No es pot guardar la data d'expiració. Els fitxers o carpetes compartits no poden expirar més tard de %s després d'haver-se compratit.",
- "Cannot set expiration date. Expiration date is in the past" : "No es pot guardar la data d'expiració. La data d'expiració ja ha passat.",
- "Sharing %s failed, because the permissions exceed permissions granted to %s" : "Ha fallat en compartir %s perquè els permisos excedeixen els permesos per a %s",
- "Sharing %s failed, because resharing is not allowed" : "Ha fallat en compartir %s, perquè no es permet compartir de nou",
- "Sharing %s failed, because the sharing backend for %s could not find its source" : "Ha fallat en compartir %s, perquè el rerefons de compartir per %s no pot trobar la seva font",
- "Sharing %s failed, because the file could not be found in the file cache" : "Ha fallat en compartir %s, perquè el fitxer no s'ha trobat en el fitxer cau",
- "%s shared »%s« with you" : "%s ha compartit »%s« amb tu",
- "%s via %s" : "%s via %s"
+ "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "No es pot establir la data de caducitat. Els fitxers o carpetes compartits no poden caducar més tard de %s després d'haver-se compartit.",
+ "Cannot set expiration date. Expiration date is in the past" : "No es pot establir la data de caducitat. La data de caducitat és del passat.",
+ "Sharing failed, because the user %s is the original sharer" : "No s'ha pogut compartir, perquè l'usuari %s el l'autor original de la compartició",
+ "Sharing %s failed, because the permissions exceed permissions granted to %s" : "No s'ha pogut compartir %s perquè els permisos excedeixen els permesos per a %s",
+ "Sharing %s failed, because resharing is not allowed" : "No s'ha pogut compartir %s, perquè no es permet compartir de nou",
+ "Sharing %s failed, because the sharing backend for %s could not find its source" : "No s'ha pogut compartir %s, perquè el rerefons de compartir per %s no pot trobar la seva font",
+ "Sharing %s failed, because the file could not be found in the file cache" : "No s'ha pogut compartir %s, perquè el fitxer no s'ha trobat en el fitxer de memòria cau",
+ "%s shared »%s« with you" : "%s us ha compartit »%s«",
+ "%s shared »%s« with you." : "%s us ha compartit »%s«.",
+ "%s via %s" : "%s via %s",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "L’aplicació \"%s\" no es pot instal·lar perquè no es compleixen les següents dependències: %s",
+ "ID \"%s\" already used by cloud federation provider \"%s\"" : "L'ID \"%s\" ja es fa servir pel proveïdor de la federació del núvol \"%s\"",
+ "Sharing %1$s failed, because the user %2$s does not exist" : "No s'ha pogut compartir %1$s, perquè l'usuari %2$s no existeix",
+ "Sharing %1$s failed, because the user %2$s is not a member of any groups that %3$s is a member of" : "No s'ha pogut compartir %1$s, perquè l'usuari %2$s no és membre de cap grup dels que %3$s n'és membre",
+ "Sharing %1$s failed, because this item is already shared with %2$s" : "No s'ha pogut compartir %1$s, perquè aquest element ja està compartit amb %2$s",
+ "Sharing %1$s failed, because this item is already shared with user %2$s" : "No s'ha pogut compartir %1$s, perquè l'element ja està compartit amb l'usuari %2$s",
+ "Sharing %1$s failed, because the group %2$s does not exist" : "No s'ha pogut compartir %1$s, perquè el grup %2$s no existeix",
+ "Sharing %1$s failed, because %2$s is not a member of the group %3$s" : "No s'ha pogut compartir %1$s, perquè %2$s no és membre del grup %3$s",
+ "Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable." : "La compartició de %1$s ha fallat, no es pot trobar %2$s, potser el servidor és inaccessible actualment.",
+ "Share type %1$s is not valid for %2$s" : "La compartició tipus %1$s no és vàlida per %2$s",
+ "Sharing %1$s failed, because the permissions exceed permissions granted to %2$s" : "No s'ha pogut compartir %1$s perquè els permisos excedeixen els permesos per a %2$s",
+ "Sharing %1$s failed, because the sharing backend for %2$s could not find its source" : "No s'ha pogut compartir %1$s, perquè el rerefons de compartir per %2$s no pot trobar la seva font"
},
"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/ca.json b/lib/l10n/ca.json
index ab7cd3dbf7d..b797eac99aa 100644
--- a/lib/l10n/ca.json
+++ b/lib/l10n/ca.json
@@ -210,25 +210,51 @@
"Action \"%s\" not supported or implemented." : "L'acció \"%s\" no està suportada o implementada.",
"Authentication failed, wrong token or provider ID given" : "Ha fallat l’autenticació, s’ha donat un identificador de proveïdor o un testimoni incorrecte",
"Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Falten paràmetres per completar la sol·licitud. Els paràmetres que falten són: \"%s\"",
+ "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "L'ID \"%1$s\" ja es fa servir pel proveïdor de la federació del núvol \"%2$s\"",
+ "Cloud Federation Provider with ID: \"%s\" does not exist." : "El Proveïdor de la Federació de Núvol amb ID: \"%s\" no existeix.",
"Could not obtain lock type %d on \"%s\"." : "No s'ha pogut obtenir un bloqueig tipus %d a \"%s\".",
- "Sharing %s failed, because the file does not exist" : "Ha fallat en compartir %s, perquè el fitxer no existeix",
- "Sharing %s failed, because the user %s does not exist" : "Ha fallat en compartir %s, perquè l'usuari %s no existeix",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Ha fallat en compartir %s, perquè l'usuari %s no és membre de cap grup dels que %s és membre",
- "Sharing %s failed, because this item is already shared with %s" : "Ha fallat en compartir %s, perquè l'element ja està compartit amb %s",
- "Sharing %s failed, because the group %s does not exist" : "Ha fallat en compartir %s, perquè el grup %s no existeix",
- "Sharing %s failed, because %s is not a member of the group %s" : "Ha fallat en compartir %s, perquè %s no és membre del grup %s",
- "You need to provide a password to create a public link, only protected links are allowed" : "Heu de proporcionar una contrasenya per crear un enllaç públic. Només es permeten enllaços segurs.",
- "Sharing %s failed, because sharing with links is not allowed" : "Ha fallat en compartir %s, perquè no es permet compartir amb enllaços",
+ "Storage unauthorized. %s" : "Emmagatzematge no autoritzat. %s",
+ "Storage incomplete configuration. %s" : "Configuració d'emmagatzematge incompleta. %s",
+ "Storage connection error. %s" : "Error de connexió d’emmagatzematge. %s",
+ "Storage is temporarily not available" : "Emmagatzematge temporalment no disponible",
+ "Storage connection timeout. %s" : "Temps d’espera exhaurit en la connexió d’emmagatzematge. %s",
+ "Library %s with a version higher than %s is required - available version %s." : "Es requereix la llibreria %s amb una versió superior a %s - la versió disponible és %s.",
+ "Library %s with a version lower than %s is required - available version %s." : "Es requereix la llibreria %s amb una versió inferior a %s - la versió disponible és %s.",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "No s'ha pogut compartir %s perquè l'aplicació de fons no permet comparticions del tipus %i",
+ "Sharing %s failed, because the file does not exist" : "No s'ha pogut compartir %s, perquè el fitxer no existeix",
+ "Sharing %s failed, because you can not share with yourself" : "No s'ha pogut compartir %s, perquè no us podeu auto-compartir.",
+ "Sharing %s failed, because the user %s does not exist" : "No s'ha pogut compartir %s, perquè l'usuari %s no existeix",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "No s'ha pogut compartir %s, perquè l'usuari %s no és membre de cap grup dels que %s n'és membre",
+ "Sharing %s failed, because this item is already shared with %s" : "No s'ha pogut compartir %s, perquè l'element ja està compartit amb %s",
+ "Sharing %s failed, because this item is already shared with user %s" : "No s'ha pogut compartir %s, perquè l'element ja està compartit amb l'usuari %s",
+ "Sharing %s failed, because the group %s does not exist" : "No s'ha pogut compartir %s, perquè el grup %s no existeix",
+ "Sharing %s failed, because %s is not a member of the group %s" : "No s'ha pogut compartir %s, perquè %s no és membre del grup %s",
+ "You need to provide a password to create a public link, only protected links are allowed" : "Heu de proporcionar una contrasenya per crear un enllaç públic. Només es permeten els enllaços protegits",
+ "Sharing %s failed, because sharing with links is not allowed" : "No s'ha pogut compartir %s, perquè no es permet compartir amb enllaços",
"Not allowed to create a federated share with the same user" : "No està permés crear una compartició federada amb el mateix usuari",
- "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "La compartició de %s ha fallat, no es pot trobar %s, potser el servidor està actualment innacessible.",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "La compartició de %s ha fallat, no es pot trobar %s, potser el servidor és inaccessible actualment.",
"Share type %s is not valid for %s" : "La compartició tipus %s no és vàlida per %s",
- "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "No es pot guardar la data d'expiració. Els fitxers o carpetes compartits no poden expirar més tard de %s després d'haver-se compratit.",
- "Cannot set expiration date. Expiration date is in the past" : "No es pot guardar la data d'expiració. La data d'expiració ja ha passat.",
- "Sharing %s failed, because the permissions exceed permissions granted to %s" : "Ha fallat en compartir %s perquè els permisos excedeixen els permesos per a %s",
- "Sharing %s failed, because resharing is not allowed" : "Ha fallat en compartir %s, perquè no es permet compartir de nou",
- "Sharing %s failed, because the sharing backend for %s could not find its source" : "Ha fallat en compartir %s, perquè el rerefons de compartir per %s no pot trobar la seva font",
- "Sharing %s failed, because the file could not be found in the file cache" : "Ha fallat en compartir %s, perquè el fitxer no s'ha trobat en el fitxer cau",
- "%s shared »%s« with you" : "%s ha compartit »%s« amb tu",
- "%s via %s" : "%s via %s"
+ "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "No es pot establir la data de caducitat. Els fitxers o carpetes compartits no poden caducar més tard de %s després d'haver-se compartit.",
+ "Cannot set expiration date. Expiration date is in the past" : "No es pot establir la data de caducitat. La data de caducitat és del passat.",
+ "Sharing failed, because the user %s is the original sharer" : "No s'ha pogut compartir, perquè l'usuari %s el l'autor original de la compartició",
+ "Sharing %s failed, because the permissions exceed permissions granted to %s" : "No s'ha pogut compartir %s perquè els permisos excedeixen els permesos per a %s",
+ "Sharing %s failed, because resharing is not allowed" : "No s'ha pogut compartir %s, perquè no es permet compartir de nou",
+ "Sharing %s failed, because the sharing backend for %s could not find its source" : "No s'ha pogut compartir %s, perquè el rerefons de compartir per %s no pot trobar la seva font",
+ "Sharing %s failed, because the file could not be found in the file cache" : "No s'ha pogut compartir %s, perquè el fitxer no s'ha trobat en el fitxer de memòria cau",
+ "%s shared »%s« with you" : "%s us ha compartit »%s«",
+ "%s shared »%s« with you." : "%s us ha compartit »%s«.",
+ "%s via %s" : "%s via %s",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "L’aplicació \"%s\" no es pot instal·lar perquè no es compleixen les següents dependències: %s",
+ "ID \"%s\" already used by cloud federation provider \"%s\"" : "L'ID \"%s\" ja es fa servir pel proveïdor de la federació del núvol \"%s\"",
+ "Sharing %1$s failed, because the user %2$s does not exist" : "No s'ha pogut compartir %1$s, perquè l'usuari %2$s no existeix",
+ "Sharing %1$s failed, because the user %2$s is not a member of any groups that %3$s is a member of" : "No s'ha pogut compartir %1$s, perquè l'usuari %2$s no és membre de cap grup dels que %3$s n'és membre",
+ "Sharing %1$s failed, because this item is already shared with %2$s" : "No s'ha pogut compartir %1$s, perquè aquest element ja està compartit amb %2$s",
+ "Sharing %1$s failed, because this item is already shared with user %2$s" : "No s'ha pogut compartir %1$s, perquè l'element ja està compartit amb l'usuari %2$s",
+ "Sharing %1$s failed, because the group %2$s does not exist" : "No s'ha pogut compartir %1$s, perquè el grup %2$s no existeix",
+ "Sharing %1$s failed, because %2$s is not a member of the group %3$s" : "No s'ha pogut compartir %1$s, perquè %2$s no és membre del grup %3$s",
+ "Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable." : "La compartició de %1$s ha fallat, no es pot trobar %2$s, potser el servidor és inaccessible actualment.",
+ "Share type %1$s is not valid for %2$s" : "La compartició tipus %1$s no és vàlida per %2$s",
+ "Sharing %1$s failed, because the permissions exceed permissions granted to %2$s" : "No s'ha pogut compartir %1$s perquè els permisos excedeixen els permesos per a %2$s",
+ "Sharing %1$s failed, because the sharing backend for %2$s could not find its source" : "No s'ha pogut compartir %1$s, perquè el rerefons de compartir per %2$s no pot trobar la seva font"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/lib/l10n/gl.js b/lib/l10n/gl.js
index 8dc993f37e9..1c38703cfa1 100644
--- a/lib/l10n/gl.js
+++ b/lib/l10n/gl.js
@@ -180,7 +180,7 @@ OC.L10N.register(
"Application is not enabled" : "O aplicativo non está activado",
"Authentication error" : "Produciuse un erro de autenticación",
"Token expired. Please reload page." : "Marca caducada. Recargue a páxina.",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "Non hay controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "Non hai controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
"Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»",
"Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»",
"This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio dos aplicativos ou desactivando a tenda de aplicativos no ficheiro de configuración. Vexa %s",
diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json
index 0f6d1bfd388..852ef456abc 100644
--- a/lib/l10n/gl.json
+++ b/lib/l10n/gl.json
@@ -178,7 +178,7 @@
"Application is not enabled" : "O aplicativo non está activado",
"Authentication error" : "Produciuse un erro de autenticación",
"Token expired. Please reload page." : "Marca caducada. Recargue a páxina.",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "Non hay controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "Non hai controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
"Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»",
"Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»",
"This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio dos aplicativos ou desactivando a tenda de aplicativos no ficheiro de configuración. Vexa %s",
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php
index 7e4654b6eb2..fd416157635 100644
--- a/lib/private/Files/ObjectStore/Swift.php
+++ b/lib/private/Files/ObjectStore/Swift.php
@@ -76,14 +76,9 @@ class Swift implements IObjectStore {
* @throws \Exception from openstack lib when something goes wrong
*/
public function writeObject($urn, $stream) {
- $handle = $stream;
-
- $meta = stream_get_meta_data($stream);
- if (!(isset($meta['seekable']) && $meta['seekable'] === true)) {
- $tmpFile = \OC::$server->getTempManager()->getTemporaryFile('swiftwrite');
- file_put_contents($tmpFile, $stream);
- $handle = fopen($tmpFile, 'rb');
- }
+ $tmpFile = \OC::$server->getTempManager()->getTemporaryFile('swiftwrite');
+ file_put_contents($tmpFile, $stream);
+ $handle = fopen($tmpFile, 'rb');
$this->getContainer()->createObject([
'name' => $urn,
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index a09dd2b565f..424fe8a2382 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -257,49 +257,6 @@ class Share extends Constants {
}
/**
- * Based on the given token the share information will be returned - password protected shares will be verified
- * @param string $token
- * @param bool $checkPasswordProtection
- * @return array|boolean false will be returned in case the token is unknown or unauthorized
- */
- public static function getShareByToken($token, $checkPasswordProtection = true) {
- $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?', 1);
- $result = $query->execute(array($token));
- if ($result === false) {
- \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage() . ', token=' . $token, ILogger::ERROR);
- }
- $row = $result->fetchRow();
- if ($row === false) {
- return false;
- }
- if (is_array($row) and self::expireItem($row)) {
- return false;
- }
-
- // password protected shares need to be authenticated
- if ($checkPasswordProtection && !\OC\Share\Share::checkPasswordProtectedShare($row)) {
- return false;
- }
-
- return $row;
- }
-
- /**
- * Get the shared items of item type owned by the current user
- * @param string $itemType
- * @param int $format (optional) Format type must be defined by the backend
- * @param mixed $parameters
- * @param int $limit Number of items to return (optional) Returns all by default
- * @param boolean $includeCollections
- * @return mixed Return depends on format
- */
- public static function getItemsShared($itemType, $format = self::FORMAT_NONE, $parameters = null,
- $limit = -1, $includeCollections = false) {
- return self::getItems($itemType, null, null, null, \OC_User::getUser(), $format,
- $parameters, $limit, $includeCollections);
- }
-
- /**
* Get the shared item of item type owned by the current user
* @param string $itemType
* @param string $itemSource
@@ -421,29 +378,6 @@ class Share extends Constants {
}
/**
- * sent status if users got informed by mail about share
- * @param string $itemType
- * @param string $itemSource
- * @param int $shareType SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK
- * @param string $recipient with whom was the file shared
- * @param boolean $status
- */
- public static function setSendMailStatus($itemType, $itemSource, $shareType, $recipient, $status) {
- $status = $status ? 1 : 0;
-
- $query = \OC_DB::prepare(
- 'UPDATE `*PREFIX*share`
- SET `mail_send` = ?
- WHERE `item_type` = ? AND `item_source` = ? AND `share_type` = ? AND `share_with` = ?');
-
- $result = $query->execute(array($status, $itemType, $itemSource, $shareType, $recipient));
-
- if($result === false) {
- \OCP\Util::writeLog('OCP\Share', 'Couldn\'t set send mail status', ILogger::ERROR);
- }
- }
-
- /**
* Checks whether a share has expired, calls unshareItem() if yes.
* @param array $item Share data (usually database row)
* @return boolean True if item was expired, false otherwise.
@@ -1617,14 +1551,6 @@ class Share extends Constants {
}
/**
- * @return bool
- */
- public static function isDefaultExpireDateEnabled() {
- $defaultExpireDateEnabled = \OC::$server->getConfig()->getAppValue('core', 'shareapi_default_expire_date', 'no');
- return $defaultExpireDateEnabled === 'yes';
- }
-
- /**
* @return int
*/
public static function getExpireInterval() {
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index 905a199a1a6..27dcb2fc331 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -59,7 +59,6 @@ namespace OC\User;
use OC\Cache\CappedMemoryCache;
use OCP\IDBConnection;
-use OCP\ILogger;
use OCP\User\Backend\ABackend;
use OCP\User\Backend\ICheckPasswordBackend;
use OCP\User\Backend\ICountUsersBackend;
@@ -68,7 +67,6 @@ use OCP\User\Backend\IGetDisplayNameBackend;
use OCP\User\Backend\IGetHomeBackend;
use OCP\User\Backend\ISetDisplayNameBackend;
use OCP\User\Backend\ISetPasswordBackend;
-use OCP\Util;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\GenericEvent;
diff --git a/lib/public/Share.php b/lib/public/Share.php
index 011d56ab5af..f433a35f17a 100644
--- a/lib/public/Share.php
+++ b/lib/public/Share.php
@@ -43,6 +43,7 @@ namespace OCP;
* It provides the following hooks:
* - post_shared
* @since 5.0.0
+ * @deprecated 17.0.0
*/
class Share extends \OC\Share\Constants {
@@ -54,6 +55,7 @@ class Share extends \OC\Share\Constants {
* @param string $owner Owner of the share
* @return array Return list of items with file_target, permissions and expiration
* @since 6.0.0 - parameter $owner was added in 8.0.0
+ * @deprecated 17.0.0
*/
public static function getItemSharedWithUser($itemType, $itemSource, $user, $owner = null) {
return \OC\Share\Share::getItemSharedWithUser($itemType, $itemSource, $user, $owner);
@@ -68,10 +70,11 @@ class Share extends \OC\Share\Constants {
* @param bool $includeCollections
* @return array
* @since 5.0.0
+ * @deprecated 17.0.0
*/
public static function getItemSharedWithBySource($itemType, $itemSource, $format = self::FORMAT_NONE,
$parameters = null, $includeCollections = false) {
- return \OC\Share\Share::getItemSharedWithBySource($itemType, $itemSource, $format, $parameters, $includeCollections);
+ // not used by any app - only here to not break apps syntax
}
/**
@@ -80,9 +83,10 @@ class Share extends \OC\Share\Constants {
* @param bool $checkPasswordProtection
* @return array|bool false will be returned in case the token is unknown or unauthorized
* @since 5.0.0 - parameter $checkPasswordProtection was added in 7.0.0
+ * @deprecated 17.0.0
*/
public static function getShareByToken($token, $checkPasswordProtection = true) {
- return \OC\Share\Share::getShareByToken($token, $checkPasswordProtection);
+ // not used by any app - only here to not break apps syntax
}
@@ -95,11 +99,12 @@ class Share extends \OC\Share\Constants {
* @param bool $includeCollections
* @return mixed Return depends on format
* @since 5.0.0
+ * @deprecated 17.0.0
*/
public static function getItemsShared($itemType, $format = self::FORMAT_NONE, $parameters = null,
$limit = -1, $includeCollections = false) {
- return \OC\Share\Share::getItemsShared($itemType, $format, $parameters, $limit, $includeCollections);
+ // only used by AppVNCSafe app (https://github.com/vnc-biz/nextcloud-appvncsafe/issues/2) - only here to not break apps syntax
}
/**
@@ -111,6 +116,7 @@ class Share extends \OC\Share\Constants {
* @param bool $includeCollections
* @return mixed Return depends on format
* @since 5.0.0
+ * @deprecated 17.0.0
*/
public static function getItemShared($itemType, $itemSource, $format = self::FORMAT_NONE,
$parameters = null, $includeCollections = false) {
@@ -126,8 +132,9 @@ class Share extends \OC\Share\Constants {
* @param string $recipient with whom was the item shared
* @param bool $status
* @since 6.0.0 - parameter $originIsSource was added in 8.0.0
+ * @deprecated 17.0.0
*/
public static function setSendMailStatus($itemType, $itemSource, $shareType, $recipient, $status) {
- return \OC\Share\Share::setSendMailStatus($itemType, $itemSource, $shareType, $recipient, $status);
+ // not used by any app - only here to not break apps syntax
}
}