aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/en_GB.js4
-rw-r--r--lib/l10n/en_GB.json4
-rw-r--r--lib/l10n/es.js16
-rw-r--r--lib/l10n/es.json16
-rw-r--r--lib/l10n/fi.js4
-rw-r--r--lib/l10n/fi.json4
-rw-r--r--lib/l10n/hu.js5
-rw-r--r--lib/l10n/hu.json5
-rw-r--r--lib/l10n/it.js4
-rw-r--r--lib/l10n/it.json4
-rw-r--r--lib/l10n/ka_GE.js5
-rw-r--r--lib/l10n/ka_GE.json5
-rw-r--r--lib/l10n/nl.js4
-rw-r--r--lib/l10n/nl.json4
-rw-r--r--lib/l10n/ru.js9
-rw-r--r--lib/l10n/ru.json9
-rw-r--r--lib/l10n/tr.js5
-rw-r--r--lib/l10n/tr.json5
-rw-r--r--lib/private/Files/SimpleFS/SimpleFile.php36
-rw-r--r--lib/private/Files/Storage/Common.php3
-rw-r--r--lib/private/Mail/Attachment.php9
-rw-r--r--lib/private/Mail/EMailTemplate.php35
-rw-r--r--lib/private/Mail/Mailer.php21
-rw-r--r--lib/private/Mail/Message.php45
-rw-r--r--lib/public/Files/SimpleFS/ISimpleFile.php3
-rw-r--r--lib/public/Mail/IAttachment.php13
-rw-r--r--lib/public/Mail/IEMailTemplate.php25
-rw-r--r--lib/public/Mail/IMailer.php13
-rw-r--r--lib/public/Mail/IMessage.php29
29 files changed, 236 insertions, 108 deletions
diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js
index 7e7c77430ae..52b6644338d 100644
--- a/lib/l10n/en_GB.js
+++ b/lib/l10n/en_GB.js
@@ -67,6 +67,10 @@ OC.L10N.register(
"Unknown user" : "Unknown user",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Create",
+ "Change" : "Change",
+ "Delete" : "Delete",
+ "Share" : "Share",
"Basic settings" : "Basic settings",
"Sharing" : "Sharing",
"Security" : "Security",
diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json
index 393cf15a33a..484b6b4efa6 100644
--- a/lib/l10n/en_GB.json
+++ b/lib/l10n/en_GB.json
@@ -65,6 +65,10 @@
"Unknown user" : "Unknown user",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Create",
+ "Change" : "Change",
+ "Delete" : "Delete",
+ "Share" : "Share",
"Basic settings" : "Basic settings",
"Sharing" : "Sharing",
"Security" : "Security",
diff --git a/lib/l10n/es.js b/lib/l10n/es.js
index 1a50381de6c..7d7cfbdab26 100644
--- a/lib/l10n/es.js
+++ b/lib/l10n/es.js
@@ -103,15 +103,15 @@ OC.L10N.register(
"Sharing %s failed, because the backend does not allow shares from type %i" : "No se pudo compartir %s porque el repositorio no permite recursos compartidos del tipo %i",
"Sharing %s failed, because the file does not exist" : "No se pudo compartir %s porque el archivo no existe",
"You are not allowed to share %s" : "Usted no está autorizado para compartir %s",
- "Sharing %s failed, because you can not share with yourself" : "Se falló al compartir %s, porque no puedes compartir contigo mismo",
+ "Sharing %s failed, because you can not share with yourself" : "Fallo al compartir %s, porque no puedes compartir contigo mismo",
"Sharing %s failed, because the user %s does not exist" : "Se ha fallado al compartir %s, ya que el usuario %s no existe",
"Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Se ha fallado al compartir %s, ya que el usuario %s no es miembro de ningún grupo del que %s sea miembro",
- "Sharing %s failed, because this item is already shared with %s" : "Se falló al compartir %s, ya que este elemento ya está compartido con %s",
- "Sharing %s failed, because this item is already shared with user %s" : "Compartiendo %s falló, porque este objeto ya se comparte con el usuario %s",
- "Sharing %s failed, because the group %s does not exist" : "Se falló al compartir %s, ya que el grupo %s no existe",
- "Sharing %s failed, because %s is not a member of the group %s" : "Se falló al compartir %s, ya que %s no es miembro del grupo %s",
+ "Sharing %s failed, because this item is already shared with %s" : "Fallo al compartir %s, ya que este elemento ya está compartido con %s",
+ "Sharing %s failed, because this item is already shared with user %s" : "Fallo al compartir %s, porque este objeto ya se comparte con el usuario %s",
+ "Sharing %s failed, because the group %s does not exist" : "Fallo al compartir %s, ya que el grupo %s no existe",
+ "Sharing %s failed, because %s is not a member of the group %s" : "Fallo al compartir %s, ya que %s no es miembro del grupo %s",
"You need to provide a password to create a public link, only protected links are allowed" : "Es necesario definir una contraseña para crear un enlace publico. Solo los enlaces protegidos están permitidos",
- "Sharing %s failed, because sharing with links is not allowed" : "Se falló al compartir %s, ya que no está permitida la compartición con enlaces",
+ "Sharing %s failed, because sharing with links is not allowed" : "Fallo al compartir %s, ya que no se permite compartir con enlaces",
"Not allowed to create a federated share with the same user" : "No se permite crear un recurso compartido federado con el mismo usuario",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Fallo al compartir %s. No se ha podido encontrar %s, quizás haya un problema de conexión con el servidor.",
"Share type %s is not valid for %s" : "El tipo de recurso compartido %s no es válido para %s",
@@ -124,7 +124,7 @@ OC.L10N.register(
"Sharing %s failed, because the permissions exceed permissions granted to %s" : "Se ha fallado al compartir %s, ya que los permisos superan los permisos otorgados a %s",
"Sharing %s failed, because resharing is not allowed" : "Fallo al compartir %s, ya que no está permitido volverlo a compartir",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Se ha fallado al compartir %s porque el motor compartido para %s podría no encontrar su origen",
- "Sharing %s failed, because the file could not be found in the file cache" : "Se ha fallado al compartir %s, ya que el archivo no pudo ser encontrado en el cache de archivo",
+ "Sharing %s failed, because the file could not be found in the file cache" : "Fallo al compartir %s, ya que el archivo no se ha encontrado en el caché de archivo",
"Can’t increase permissions of %s" : "No se pueden aumentar los permisos de %s",
"Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado",
"Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación",
@@ -205,7 +205,7 @@ OC.L10N.register(
"Cannot create \"data\" directory" : "No se puede crear el directorio \"data\"",
"This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Habitualmente, esto puede arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s",
"Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Habitualmente, los permisos pueden arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s",
- "Setting locale to %s failed" : "Falló la activación del idioma %s ",
+ "Setting locale to %s failed" : "Ha fallado la activación del idioma %s ",
"Please install one of these locales on your system and restart your webserver." : "Instale uno de estos idiomas en su sistema y reinicie su servidor web.",
"Please ask your server administrator to install the module." : "Consulte al administrador de su servidor para instalar el módulo.",
"PHP module %s not installed." : "El módulo PHP %s no está instalado.",
diff --git a/lib/l10n/es.json b/lib/l10n/es.json
index c626ecc891a..eb2c549695d 100644
--- a/lib/l10n/es.json
+++ b/lib/l10n/es.json
@@ -101,15 +101,15 @@
"Sharing %s failed, because the backend does not allow shares from type %i" : "No se pudo compartir %s porque el repositorio no permite recursos compartidos del tipo %i",
"Sharing %s failed, because the file does not exist" : "No se pudo compartir %s porque el archivo no existe",
"You are not allowed to share %s" : "Usted no está autorizado para compartir %s",
- "Sharing %s failed, because you can not share with yourself" : "Se falló al compartir %s, porque no puedes compartir contigo mismo",
+ "Sharing %s failed, because you can not share with yourself" : "Fallo al compartir %s, porque no puedes compartir contigo mismo",
"Sharing %s failed, because the user %s does not exist" : "Se ha fallado al compartir %s, ya que el usuario %s no existe",
"Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Se ha fallado al compartir %s, ya que el usuario %s no es miembro de ningún grupo del que %s sea miembro",
- "Sharing %s failed, because this item is already shared with %s" : "Se falló al compartir %s, ya que este elemento ya está compartido con %s",
- "Sharing %s failed, because this item is already shared with user %s" : "Compartiendo %s falló, porque este objeto ya se comparte con el usuario %s",
- "Sharing %s failed, because the group %s does not exist" : "Se falló al compartir %s, ya que el grupo %s no existe",
- "Sharing %s failed, because %s is not a member of the group %s" : "Se falló al compartir %s, ya que %s no es miembro del grupo %s",
+ "Sharing %s failed, because this item is already shared with %s" : "Fallo al compartir %s, ya que este elemento ya está compartido con %s",
+ "Sharing %s failed, because this item is already shared with user %s" : "Fallo al compartir %s, porque este objeto ya se comparte con el usuario %s",
+ "Sharing %s failed, because the group %s does not exist" : "Fallo al compartir %s, ya que el grupo %s no existe",
+ "Sharing %s failed, because %s is not a member of the group %s" : "Fallo al compartir %s, ya que %s no es miembro del grupo %s",
"You need to provide a password to create a public link, only protected links are allowed" : "Es necesario definir una contraseña para crear un enlace publico. Solo los enlaces protegidos están permitidos",
- "Sharing %s failed, because sharing with links is not allowed" : "Se falló al compartir %s, ya que no está permitida la compartición con enlaces",
+ "Sharing %s failed, because sharing with links is not allowed" : "Fallo al compartir %s, ya que no se permite compartir con enlaces",
"Not allowed to create a federated share with the same user" : "No se permite crear un recurso compartido federado con el mismo usuario",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Fallo al compartir %s. No se ha podido encontrar %s, quizás haya un problema de conexión con el servidor.",
"Share type %s is not valid for %s" : "El tipo de recurso compartido %s no es válido para %s",
@@ -122,7 +122,7 @@
"Sharing %s failed, because the permissions exceed permissions granted to %s" : "Se ha fallado al compartir %s, ya que los permisos superan los permisos otorgados a %s",
"Sharing %s failed, because resharing is not allowed" : "Fallo al compartir %s, ya que no está permitido volverlo a compartir",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Se ha fallado al compartir %s porque el motor compartido para %s podría no encontrar su origen",
- "Sharing %s failed, because the file could not be found in the file cache" : "Se ha fallado al compartir %s, ya que el archivo no pudo ser encontrado en el cache de archivo",
+ "Sharing %s failed, because the file could not be found in the file cache" : "Fallo al compartir %s, ya que el archivo no se ha encontrado en el caché de archivo",
"Can’t increase permissions of %s" : "No se pueden aumentar los permisos de %s",
"Files can’t be shared with delete permissions" : "Los archivos no se pueden compartir con permisos de borrado",
"Files can’t be shared with create permissions" : "Los archivos no se pueden compartir con permisos de creación",
@@ -203,7 +203,7 @@
"Cannot create \"data\" directory" : "No se puede crear el directorio \"data\"",
"This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Habitualmente, esto puede arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s",
"Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Habitualmente, los permisos pueden arreglarse dando al servidor web acceso de escritura al directorio raíz. Véase %s",
- "Setting locale to %s failed" : "Falló la activación del idioma %s ",
+ "Setting locale to %s failed" : "Ha fallado la activación del idioma %s ",
"Please install one of these locales on your system and restart your webserver." : "Instale uno de estos idiomas en su sistema y reinicie su servidor web.",
"Please ask your server administrator to install the module." : "Consulte al administrador de su servidor para instalar el módulo.",
"PHP module %s not installed." : "El módulo PHP %s no está instalado.",
diff --git a/lib/l10n/fi.js b/lib/l10n/fi.js
index 118d0e02f28..d474e7c8df2 100644
--- a/lib/l10n/fi.js
+++ b/lib/l10n/fi.js
@@ -60,6 +60,10 @@ OC.L10N.register(
"Unknown user" : "Tuntematon käyttäjä",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Luo",
+ "Change" : "Muuta",
+ "Delete" : "Poista",
+ "Share" : "Jaa",
"Basic settings" : "Perusasetukset",
"Sharing" : "Jakaminen",
"Security" : "Turvallisuus",
diff --git a/lib/l10n/fi.json b/lib/l10n/fi.json
index 716eefdd5c9..e03f2c3b1ee 100644
--- a/lib/l10n/fi.json
+++ b/lib/l10n/fi.json
@@ -58,6 +58,10 @@
"Unknown user" : "Tuntematon käyttäjä",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Luo",
+ "Change" : "Muuta",
+ "Delete" : "Poista",
+ "Share" : "Jaa",
"Basic settings" : "Perusasetukset",
"Sharing" : "Jakaminen",
"Security" : "Turvallisuus",
diff --git a/lib/l10n/hu.js b/lib/l10n/hu.js
index 2f3f5e8d9df..0384a02b158 100644
--- a/lib/l10n/hu.js
+++ b/lib/l10n/hu.js
@@ -27,6 +27,7 @@ OC.L10N.register(
"Following platforms are supported: %s" : "Ezek a platformok támogatottak: %s",
"Server version %s or higher is required." : "%s vagy újabb szerver verzió szükséges.",
"Server version %s or lower is required." : "%s vagy régebbi szerver verzió szükséges.",
+ "Logged in user must be an admin" : "Adminnak kell bejelentkeznie",
"Unknown filetype" : "Ismeretlen fájl típus",
"Invalid image" : "Hibás kép",
"Avatar image is not square" : "Az avatár kép nem négyzetes.",
@@ -66,6 +67,10 @@ OC.L10N.register(
"Unknown user" : "Ismeretlen felhasználó",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Létrehozás",
+ "Change" : "Változtatás",
+ "Delete" : "Törlés",
+ "Share" : "Megosztás",
"Basic settings" : "Alapvető beállítások",
"Sharing" : "Megosztás",
"Security" : "Biztonság",
diff --git a/lib/l10n/hu.json b/lib/l10n/hu.json
index 37e2d31362e..794d9eff0f2 100644
--- a/lib/l10n/hu.json
+++ b/lib/l10n/hu.json
@@ -25,6 +25,7 @@
"Following platforms are supported: %s" : "Ezek a platformok támogatottak: %s",
"Server version %s or higher is required." : "%s vagy újabb szerver verzió szükséges.",
"Server version %s or lower is required." : "%s vagy régebbi szerver verzió szükséges.",
+ "Logged in user must be an admin" : "Adminnak kell bejelentkeznie",
"Unknown filetype" : "Ismeretlen fájl típus",
"Invalid image" : "Hibás kép",
"Avatar image is not square" : "Az avatár kép nem négyzetes.",
@@ -64,6 +65,10 @@
"Unknown user" : "Ismeretlen felhasználó",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Létrehozás",
+ "Change" : "Változtatás",
+ "Delete" : "Törlés",
+ "Share" : "Megosztás",
"Basic settings" : "Alapvető beállítások",
"Sharing" : "Megosztás",
"Security" : "Biztonság",
diff --git a/lib/l10n/it.js b/lib/l10n/it.js
index b8f07f33e5a..390215ebff5 100644
--- a/lib/l10n/it.js
+++ b/lib/l10n/it.js
@@ -67,6 +67,10 @@ OC.L10N.register(
"Unknown user" : "Utente sconosciuto",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Crea",
+ "Change" : "Modifica",
+ "Delete" : "Elimina",
+ "Share" : "Condividi",
"Basic settings" : "Impostazioni di base",
"Sharing" : "Condivisione",
"Security" : "Sicurezza",
diff --git a/lib/l10n/it.json b/lib/l10n/it.json
index 32dbd8c787e..e19dc10ab30 100644
--- a/lib/l10n/it.json
+++ b/lib/l10n/it.json
@@ -65,6 +65,10 @@
"Unknown user" : "Utente sconosciuto",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Crea",
+ "Change" : "Modifica",
+ "Delete" : "Elimina",
+ "Share" : "Condividi",
"Basic settings" : "Impostazioni di base",
"Sharing" : "Condivisione",
"Security" : "Sicurezza",
diff --git a/lib/l10n/ka_GE.js b/lib/l10n/ka_GE.js
index 9f34f56d86d..4bf2a9506b0 100644
--- a/lib/l10n/ka_GE.js
+++ b/lib/l10n/ka_GE.js
@@ -27,6 +27,7 @@ OC.L10N.register(
"Following platforms are supported: %s" : "მხარდაჭერია შემდეგი პლატფორმები: %s",
"Server version %s or higher is required." : "საჭიროა სერვერი ვერსიით %s ან მეტი.",
"Server version %s or lower is required." : "საჭიროა სერვერი ვერსიით %s ან ნაკლები.",
+ "Logged in user must be an admin" : "ავტორიზირებული მომხმარებელი უნდა იყოს ადმინისტრატორი",
"Unknown filetype" : "ამოუცნობი ფაილის ტიპი",
"Invalid image" : "არასწორი სურათი",
"Avatar image is not square" : "ავატარის სურათი არაა კვადრატი",
@@ -66,6 +67,10 @@ OC.L10N.register(
"Unknown user" : "ამოუცნობი მომხმარებელი",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "შექმნა",
+ "Change" : "შეცვლა",
+ "Delete" : "გაუქმება",
+ "Share" : "გაზიარება",
"Basic settings" : "ძირითადი პარამეტრები",
"Sharing" : "გაზიარება",
"Security" : "უსაფრთხოება",
diff --git a/lib/l10n/ka_GE.json b/lib/l10n/ka_GE.json
index 509e94340cd..81ba596f141 100644
--- a/lib/l10n/ka_GE.json
+++ b/lib/l10n/ka_GE.json
@@ -25,6 +25,7 @@
"Following platforms are supported: %s" : "მხარდაჭერია შემდეგი პლატფორმები: %s",
"Server version %s or higher is required." : "საჭიროა სერვერი ვერსიით %s ან მეტი.",
"Server version %s or lower is required." : "საჭიროა სერვერი ვერსიით %s ან ნაკლები.",
+ "Logged in user must be an admin" : "ავტორიზირებული მომხმარებელი უნდა იყოს ადმინისტრატორი",
"Unknown filetype" : "ამოუცნობი ფაილის ტიპი",
"Invalid image" : "არასწორი სურათი",
"Avatar image is not square" : "ავატარის სურათი არაა კვადრატი",
@@ -64,6 +65,10 @@
"Unknown user" : "ამოუცნობი მომხმარებელი",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "შექმნა",
+ "Change" : "შეცვლა",
+ "Delete" : "გაუქმება",
+ "Share" : "გაზიარება",
"Basic settings" : "ძირითადი პარამეტრები",
"Sharing" : "გაზიარება",
"Security" : "უსაფრთხოება",
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js
index a13c99f77d8..340c12b4fee 100644
--- a/lib/l10n/nl.js
+++ b/lib/l10n/nl.js
@@ -66,6 +66,10 @@ OC.L10N.register(
"Unknown user" : "Onbekende gebruiker",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Aanmaken",
+ "Change" : "Wijzigen",
+ "Delete" : "Verwijderen",
+ "Share" : "Delen",
"Basic settings" : "Basis-instellingen",
"Sharing" : "Delen",
"Security" : "Beveiliging",
diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json
index 3cd3b329711..8d5c3fd1099 100644
--- a/lib/l10n/nl.json
+++ b/lib/l10n/nl.json
@@ -64,6 +64,10 @@
"Unknown user" : "Onbekende gebruiker",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Aanmaken",
+ "Change" : "Wijzigen",
+ "Delete" : "Verwijderen",
+ "Share" : "Delen",
"Basic settings" : "Basis-instellingen",
"Sharing" : "Delen",
"Security" : "Beveiliging",
diff --git a/lib/l10n/ru.js b/lib/l10n/ru.js
index 76c7165d87c..447da2bbe24 100644
--- a/lib/l10n/ru.js
+++ b/lib/l10n/ru.js
@@ -27,6 +27,7 @@ OC.L10N.register(
"Following platforms are supported: %s" : "Поддерживаются следующие платформы: %s",
"Server version %s or higher is required." : "Требуется сервер версии %s или выше.",
"Server version %s or lower is required." : "Требуется сервер версии %s или ниже.",
+ "Logged in user must be an admin" : "Залогинившийся пользователь должен быть администратором",
"Unknown filetype" : "Неизвестный тип файла",
"Invalid image" : "Изображение повреждено",
"Avatar image is not square" : "Изображение аватара не квадратное",
@@ -66,6 +67,10 @@ OC.L10N.register(
"Unknown user" : "Неизвестный пользователь",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Создать",
+ "Change" : "Изменить",
+ "Delete" : "Удалить",
+ "Share" : "Поделиться",
"Basic settings" : "Основные настройки",
"Sharing" : "Общий доступ",
"Security" : "Безопасность",
@@ -231,6 +236,10 @@ OC.L10N.register(
"Personal" : "Личное",
"Admin" : "Администратор",
"DB Error: \"%s\"" : "Ошибка БД: «%s»",
+ "Offending command was: \"%s\"" : "Нарушившая команда была: \"%s\"",
+ "Offending command was: \"%s\", name: %s, password: %s" : "Нарушившая команда была: \"%s\", имя: %s, пароль: %s",
+ "Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "Не удалось настроить права доступа для %s, указанные права доступа превышают предоставленные для %s",
+ "Setting permissions for %s failed, because the item was not found" : "Не удалось настроить права доступа для %s, элемент не найден.",
"Cannot clear expiration date. Shares are required to have an expiration date." : "Невозможно очистить дату истечения срока действия. Общие ресурсы должны иметь срок действия.",
"Cannot increase permissions of %s" : "Невозможно повысить права доступа %s",
"Files can't be shared with delete permissions" : "Права на удаление файлов не позволяют открывать общий доступ к ним",
diff --git a/lib/l10n/ru.json b/lib/l10n/ru.json
index 1ae1702af49..fe7d126ef10 100644
--- a/lib/l10n/ru.json
+++ b/lib/l10n/ru.json
@@ -25,6 +25,7 @@
"Following platforms are supported: %s" : "Поддерживаются следующие платформы: %s",
"Server version %s or higher is required." : "Требуется сервер версии %s или выше.",
"Server version %s or lower is required." : "Требуется сервер версии %s или ниже.",
+ "Logged in user must be an admin" : "Залогинившийся пользователь должен быть администратором",
"Unknown filetype" : "Неизвестный тип файла",
"Invalid image" : "Изображение повреждено",
"Avatar image is not square" : "Изображение аватара не квадратное",
@@ -64,6 +65,10 @@
"Unknown user" : "Неизвестный пользователь",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Создать",
+ "Change" : "Изменить",
+ "Delete" : "Удалить",
+ "Share" : "Поделиться",
"Basic settings" : "Основные настройки",
"Sharing" : "Общий доступ",
"Security" : "Безопасность",
@@ -229,6 +234,10 @@
"Personal" : "Личное",
"Admin" : "Администратор",
"DB Error: \"%s\"" : "Ошибка БД: «%s»",
+ "Offending command was: \"%s\"" : "Нарушившая команда была: \"%s\"",
+ "Offending command was: \"%s\", name: %s, password: %s" : "Нарушившая команда была: \"%s\", имя: %s, пароль: %s",
+ "Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "Не удалось настроить права доступа для %s, указанные права доступа превышают предоставленные для %s",
+ "Setting permissions for %s failed, because the item was not found" : "Не удалось настроить права доступа для %s, элемент не найден.",
"Cannot clear expiration date. Shares are required to have an expiration date." : "Невозможно очистить дату истечения срока действия. Общие ресурсы должны иметь срок действия.",
"Cannot increase permissions of %s" : "Невозможно повысить права доступа %s",
"Files can't be shared with delete permissions" : "Права на удаление файлов не позволяют открывать общий доступ к ним",
diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js
index 446e16f8023..56cefdc56c8 100644
--- a/lib/l10n/tr.js
+++ b/lib/l10n/tr.js
@@ -27,6 +27,7 @@ OC.L10N.register(
"Following platforms are supported: %s" : "Şu platformlar destekleniyor: %s",
"Server version %s or higher is required." : "Sunucu %s ya da daha sonraki bir sürüm olmalıdır.",
"Server version %s or lower is required." : "Sunucu %s ya da daha önceki bir sürüm olmalıdır.",
+ "Logged in user must be an admin" : "Oturum açmış kullanıcı bir yönetici olmalıdır",
"Unknown filetype" : "Dosya türü bilinmiyor",
"Invalid image" : "Görsel geçersiz",
"Avatar image is not square" : "Avatar görseli kare değil",
@@ -66,6 +67,10 @@ OC.L10N.register(
"Unknown user" : "Kullanıcı bilinmiyor",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Ekle",
+ "Change" : "Düzenle",
+ "Delete" : "Sil",
+ "Share" : "Paylaş",
"Basic settings" : "Temel Ayarlar",
"Sharing" : "Paylaşım",
"Security" : "Güvenlik",
diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json
index 08385b3d2e7..ee06b2c9a1d 100644
--- a/lib/l10n/tr.json
+++ b/lib/l10n/tr.json
@@ -25,6 +25,7 @@
"Following platforms are supported: %s" : "Şu platformlar destekleniyor: %s",
"Server version %s or higher is required." : "Sunucu %s ya da daha sonraki bir sürüm olmalıdır.",
"Server version %s or lower is required." : "Sunucu %s ya da daha önceki bir sürüm olmalıdır.",
+ "Logged in user must be an admin" : "Oturum açmış kullanıcı bir yönetici olmalıdır",
"Unknown filetype" : "Dosya türü bilinmiyor",
"Invalid image" : "Görsel geçersiz",
"Avatar image is not square" : "Avatar görseli kare değil",
@@ -64,6 +65,10 @@
"Unknown user" : "Kullanıcı bilinmiyor",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "Ekle",
+ "Change" : "Düzenle",
+ "Delete" : "Sil",
+ "Share" : "Paylaş",
"Basic settings" : "Temel Ayarlar",
"Sharing" : "Paylaşım",
"Security" : "Güvenlik",
diff --git a/lib/private/Files/SimpleFS/SimpleFile.php b/lib/private/Files/SimpleFS/SimpleFile.php
index 5eadfd98b60..1f2b497a192 100644
--- a/lib/private/Files/SimpleFS/SimpleFile.php
+++ b/lib/private/Files/SimpleFS/SimpleFile.php
@@ -23,6 +23,7 @@
namespace OC\Files\SimpleFS;
use OCP\Files\File;
+use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\SimpleFS\ISimpleFile;
@@ -79,10 +80,18 @@ class SimpleFile implements ISimpleFile {
/**
* Get the content
*
+ * @throws NotPermittedException
+ * @throws NotFoundException
* @return string
*/
public function getContent() {
- return $this->file->getContent();
+ $result = $this->file->getContent();
+
+ if ($result === false) {
+ $this->checkFile();
+ }
+
+ return $result;
}
/**
@@ -96,6 +105,31 @@ class SimpleFile implements ISimpleFile {
}
/**
+ * Sometimes there are some issues with the AppData. Most of them are from
+ * user error. But we should handle them gracefull anyway.
+ *
+ * If for some reason the current file can't be found. We remove it.
+ * Then traverse up and check all folders if they exists. This so that the
+ * next request will have a valid appdata structure again.
+ *
+ * @throws NotFoundException
+ */
+ private function checkFile() {
+ $cur = $this->file;
+
+ while ($cur->stat() === false) {
+ $parent = $cur->getParent();
+ $cur->delete();
+ $cur = $parent;
+ }
+
+ if ($cur !== $this->file) {
+ throw new NotFoundException('File does not exist');
+ }
+ }
+
+
+ /**
* Delete the file
*
* @throws NotPermittedException
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 56d683ffa25..c9a91a7c56a 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -449,8 +449,11 @@ abstract class Common implements Storage, ILockingStorage {
if ($this->stat('')) {
return true;
}
+ \OC::$server->getLogger()->info("External storage not available: stat() failed");
return false;
} catch (\Exception $e) {
+ \OC::$server->getLogger()->info("External storage not available: " . $e->getMessage());
+ \OC::$server->getLogger()->logException($e, ['level' => \OCP\Util::DEBUG]);
return false;
}
}
diff --git a/lib/private/Mail/Attachment.php b/lib/private/Mail/Attachment.php
index 822fca5a24e..b696451e41c 100644
--- a/lib/private/Mail/Attachment.php
+++ b/lib/private/Mail/Attachment.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -45,7 +46,7 @@ class Attachment implements IAttachment {
* @return $this
* @since 13.0.0
*/
- public function setFilename($filename) {
+ public function setFilename(string $filename): IAttachment {
$this->swiftAttachment->setFilename($filename);
return $this;
}
@@ -55,7 +56,7 @@ class Attachment implements IAttachment {
* @return $this
* @since 13.0.0
*/
- public function setContentType($contentType) {
+ public function setContentType(string $contentType): IAttachment {
$this->swiftAttachment->setContentType($contentType);
return $this;
}
@@ -65,7 +66,7 @@ class Attachment implements IAttachment {
* @return $this
* @since 13.0.0
*/
- public function setBody($body) {
+ public function setBody(string $body): IAttachment {
$this->swiftAttachment->setBody($body);
return $this;
}
@@ -73,7 +74,7 @@ class Attachment implements IAttachment {
/**
* @return \Swift_Mime_Attachment
*/
- public function getSwiftAttachment() {
+ public function getSwiftAttachment(): \Swift_Mime_Attachment {
return $this->swiftAttachment;
}
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index 38205af366e..0ba411d6926 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright 2017, Morris Jobke <hey@morrisjobke.de>
* @copyright 2017, Lukas Reschke <lukas@statuscode.ch>
@@ -367,7 +368,7 @@ EOF;
*
* @param string $subject
*/
- public function setSubject($subject) {
+ public function setSubject(string $subject) {
$this->subject = $subject;
}
@@ -391,7 +392,7 @@ EOF;
* @param string|bool $plainTitle Title that is used in the plain text email
* if empty the $title is used, if false none will be used
*/
- public function addHeading($title, $plainTitle = '') {
+ public function addHeading(string $title, $plainTitle = '') {
if ($this->footerAdded) {
return;
}
@@ -424,7 +425,7 @@ EOF;
* @param string|bool $plainText Text that is used in the plain text email
* if empty the $text is used, if false none will be used
*/
- public function addBodyText($text, $plainText = '') {
+ public function addBodyText(string $text, $plainText = '') {
if ($this->footerAdded) {
return;
}
@@ -447,13 +448,13 @@ EOF;
* @param string $text Note: When $plainText falls back to this, HTML is automatically escaped in the HTML email
* @param string $metaInfo Note: When $plainMetaInfo falls back to this, HTML is automatically escaped in the HTML email
* @param string $icon Absolute path, must be 16*16 pixels
- * @param string $plainText Text that is used in the plain text email
+ * @param string|bool $plainText Text that is used in the plain text email
* if empty the $text is used, if false none will be used
- * @param string $plainMetaInfo Meta info that is used in the plain text email
+ * @param string|bool $plainMetaInfo Meta info that is used in the plain text email
* if empty the $metaInfo is used, if false none will be used
* @since 12.0.0
*/
- public function addBodyListItem($text, $metaInfo = '', $icon = '', $plainText = '', $plainMetaInfo = '') {
+ public function addBodyListItem(string $text, string $metaInfo = '', string $icon = '', $plainText = '', $plainMetaInfo = '') {
$this->ensureBodyListOpened();
if ($plainText === '') {
@@ -513,12 +514,12 @@ EOF;
* @param string $plainTextLeft Text of left button that is used in the plain text version - if unset the $textLeft is used
* @param string $plainTextRight Text of right button that is used in the plain text version - if unset the $textRight is used
*/
- public function addBodyButtonGroup($textLeft,
- $urlLeft,
- $textRight,
- $urlRight,
- $plainTextLeft = '',
- $plainTextRight = '') {
+ public function addBodyButtonGroup(string $textLeft,
+ string $urlLeft,
+ string $textRight,
+ string $urlRight,
+ string $plainTextLeft = '',
+ string $plainTextRight = '') {
if ($this->footerAdded) {
return;
}
@@ -554,7 +555,7 @@ EOF;
*
* @since 12.0.0
*/
- public function addBodyButton($text, $url, $plainText = '') {
+ public function addBodyButton(string $text, string $url, $plainText = '') {
if ($this->footerAdded) {
return;
}
@@ -598,7 +599,7 @@ EOF;
*
* @param string $text If the text is empty the default "Name - Slogan<br>This is an automatically sent email" will be used
*/
- public function addFooter($text = '') {
+ public function addFooter(string $text = '') {
if($text === '') {
$text = $this->themingDefaults->getName() . ' - ' . $this->themingDefaults->getSlogan() . '<br>' . $this->l10n->t('This is an automatically sent email, please do not reply.');
}
@@ -621,7 +622,7 @@ EOF;
*
* @return string
*/
- public function renderSubject() {
+ public function renderSubject(): string {
return $this->subject;
}
@@ -630,7 +631,7 @@ EOF;
*
* @return string
*/
- public function renderHtml() {
+ public function renderHtml(): string {
if (!$this->footerAdded) {
$this->footerAdded = true;
$this->ensureBodyIsClosed();
@@ -644,7 +645,7 @@ EOF;
*
* @return string
*/
- public function renderText() {
+ public function renderText(): string {
if (!$this->footerAdded) {
$this->footerAdded = true;
$this->ensureBodyIsClosed();
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 3637bb1e27d..5a054d2efd2 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -91,7 +92,7 @@ class Mailer implements IMailer {
*
* @return IMessage
*/
- public function createMessage() {
+ public function createMessage(): IMessage {
return new Message(new \Swift_Message());
}
@@ -102,7 +103,7 @@ class Mailer implements IMailer {
* @return IAttachment
* @since 13.0.0
*/
- public function createAttachment($data = null, $filename = null, $contentType = null) {
+ public function createAttachment($data = null, $filename = null, $contentType = null): IAttachment {
return new Attachment(\Swift_Attachment::newInstance($data, $filename, $contentType));
}
@@ -112,7 +113,7 @@ class Mailer implements IMailer {
* @return IAttachment
* @since 13.0.0
*/
- public function createAttachmentFromPath($path, $contentType = null) {
+ public function createAttachmentFromPath(string $path, $contentType = null): IAttachment {
return new Attachment(\Swift_Attachment::fromPath($path, $contentType));
}
@@ -124,7 +125,7 @@ class Mailer implements IMailer {
* @return IEMailTemplate
* @since 12.0.0
*/
- public function createEMailTemplate($emailId, array $data = []) {
+ public function createEMailTemplate(string $emailId, array $data = []): IEMailTemplate {
$class = $this->config->getSystemValue('mail_template_class', '');
if ($class !== '' && class_exists($class) && is_a($class, EMailTemplate::class, true)) {
@@ -156,7 +157,7 @@ class Mailer implements IMailer {
* @throws \Exception In case it was not possible to send the message. (for example if an invalid mail address
* has been supplied.)
*/
- public function send(IMessage $message) {
+ public function send(IMessage $message): array {
$debugMode = $this->config->getSystemValue('mail_smtpdebug', false);
if (empty($message->getFrom())) {
@@ -191,7 +192,7 @@ class Mailer implements IMailer {
* @param string $email Email address to be validated
* @return bool True if the mail address is valid, false otherwise
*/
- public function validateMailAddress($email) {
+ public function validateMailAddress(string $email): bool {
return \Swift_Validate::email($this->convertEmail($email));
}
@@ -203,7 +204,7 @@ class Mailer implements IMailer {
* @param string $email
* @return string Converted mail address if `idn_to_ascii` exists
*/
- protected function convertEmail($email) {
+ protected function convertEmail(string $email): string {
if (!function_exists('idn_to_ascii') || strpos($email, '@') === false) {
return $email;
}
@@ -246,7 +247,7 @@ class Mailer implements IMailer {
*
* @return \Swift_SmtpTransport
*/
- protected function getSmtpInstance() {
+ protected function getSmtpInstance(): \Swift_SmtpTransport {
$transport = \Swift_SmtpTransport::newInstance();
$transport->setTimeout($this->config->getSystemValue('mail_smtptimeout', 10));
$transport->setHost($this->config->getSystemValue('mail_smtphost', '127.0.0.1'));
@@ -269,7 +270,7 @@ class Mailer implements IMailer {
*
* @return \Swift_SendmailTransport
*/
- protected function getSendMailInstance() {
+ protected function getSendMailInstance(): \Swift_SendmailTransport {
switch ($this->config->getSystemValue('mail_smtpmode', 'php')) {
case 'qmail':
$binaryPath = '/var/qmail/bin/sendmail';
@@ -287,7 +288,7 @@ class Mailer implements IMailer {
*
* @return \Swift_MailTransport
*/
- protected function getMailInstance() {
+ protected function getMailInstance(): \Swift_MailTransport {
return \Swift_MailTransport::newInstance();
}
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php
index c695f0f4fb1..622c18a9116 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -51,7 +52,7 @@ class Message implements IMessage {
* @return $this
* @since 13.0.0
*/
- public function attach(IAttachment $attachment) {
+ public function attach(IAttachment $attachment): IMessage {
/** @var Attachment $attachment */
$this->swiftMessage->attach($attachment->getSwiftAttachment());
return $this;
@@ -64,12 +65,12 @@ class Message implements IMessage {
* @param array $addresses Array of mail addresses, key will get converted
* @return array Converted addresses if `idn_to_ascii` exists
*/
- protected function convertAddresses($addresses) {
+ protected function convertAddresses(array $addresses): array {
if (!function_exists('idn_to_ascii')) {
return $addresses;
}
- $convertedAddresses = array();
+ $convertedAddresses = [];
foreach($addresses as $email => $readableName) {
if(!is_numeric($email)) {
@@ -94,7 +95,7 @@ class Message implements IMessage {
* @param array $addresses Example: array('sender@domain.org', 'other@domain.org' => 'A name')
* @return $this
*/
- public function setFrom(array $addresses) {
+ public function setFrom(array $addresses): IMessage {
$addresses = $this->convertAddresses($addresses);
$this->swiftMessage->setFrom($addresses);
@@ -106,7 +107,7 @@ class Message implements IMessage {
*
* @return array
*/
- public function getFrom() {
+ public function getFrom(): array {
return $this->swiftMessage->getFrom();
}
@@ -116,7 +117,7 @@ class Message implements IMessage {
* @param array $addresses
* @return $this
*/
- public function setReplyTo(array $addresses) {
+ public function setReplyTo(array $addresses): IMessage {
$addresses = $this->convertAddresses($addresses);
$this->swiftMessage->setReplyTo($addresses);
@@ -126,9 +127,9 @@ class Message implements IMessage {
/**
* Returns the Reply-To address of this message
*
- * @return array
+ * @return string
*/
- public function getReplyTo() {
+ public function getReplyTo(): string {
return $this->swiftMessage->getReplyTo();
}
@@ -138,7 +139,7 @@ class Message implements IMessage {
* @param array $recipients Example: array('recipient@domain.org', 'other@domain.org' => 'A name')
* @return $this
*/
- public function setTo(array $recipients) {
+ public function setTo(array $recipients): IMessage {
$recipients = $this->convertAddresses($recipients);
$this->swiftMessage->setTo($recipients);
@@ -150,7 +151,7 @@ class Message implements IMessage {
*
* @return array
*/
- public function getTo() {
+ public function getTo(): array {
return $this->swiftMessage->getTo();
}
@@ -160,7 +161,7 @@ class Message implements IMessage {
* @param array $recipients Example: array('recipient@domain.org', 'other@domain.org' => 'A name')
* @return $this
*/
- public function setCc(array $recipients) {
+ public function setCc(array $recipients): IMessage {
$recipients = $this->convertAddresses($recipients);
$this->swiftMessage->setCc($recipients);
@@ -172,7 +173,7 @@ class Message implements IMessage {
*
* @return array
*/
- public function getCc() {
+ public function getCc(): array {
return $this->swiftMessage->getCc();
}
@@ -182,7 +183,7 @@ class Message implements IMessage {
* @param array $recipients Example: array('recipient@domain.org', 'other@domain.org' => 'A name')
* @return $this
*/
- public function setBcc(array $recipients) {
+ public function setBcc(array $recipients): IMessage {
$recipients = $this->convertAddresses($recipients);
$this->swiftMessage->setBcc($recipients);
@@ -194,17 +195,17 @@ class Message implements IMessage {
*
* @return array
*/
- public function getBcc() {
+ public function getBcc(): array {
return $this->swiftMessage->getBcc();
}
/**
* Set the subject of this message.
*
- * @param $subject
- * @return $this
+ * @param string $subject
+ * @return IMessage
*/
- public function setSubject($subject) {
+ public function setSubject(string $subject): IMessage {
$this->swiftMessage->setSubject($subject);
return $this;
}
@@ -214,7 +215,7 @@ class Message implements IMessage {
*
* @return string
*/
- public function getSubject() {
+ public function getSubject(): string {
return $this->swiftMessage->getSubject();
}
@@ -224,7 +225,7 @@ class Message implements IMessage {
* @param string $body
* @return $this
*/
- public function setPlainBody($body) {
+ public function setPlainBody(string $body): IMessage {
$this->swiftMessage->setBody($body);
return $this;
}
@@ -234,7 +235,7 @@ class Message implements IMessage {
*
* @return string
*/
- public function getPlainBody() {
+ public function getPlainBody(): string {
return $this->swiftMessage->getBody();
}
@@ -253,7 +254,7 @@ class Message implements IMessage {
* Get's the underlying SwiftMessage
* @return Swift_Message
*/
- public function getSwiftMessage() {
+ public function getSwiftMessage(): Swift_Message {
return $this->swiftMessage;
}
@@ -271,7 +272,7 @@ class Message implements IMessage {
* @param IEMailTemplate $emailTemplate
* @return $this
*/
- public function useTemplate(IEMailTemplate $emailTemplate) {
+ public function useTemplate(IEMailTemplate $emailTemplate): IMessage {
$this->setSubject($emailTemplate->renderSubject());
$this->setPlainBody($emailTemplate->renderText());
$this->setHtmlBody($emailTemplate->renderHtml());
diff --git a/lib/public/Files/SimpleFS/ISimpleFile.php b/lib/public/Files/SimpleFS/ISimpleFile.php
index e9182377cb5..e03509d7abf 100644
--- a/lib/public/Files/SimpleFS/ISimpleFile.php
+++ b/lib/public/Files/SimpleFS/ISimpleFile.php
@@ -22,6 +22,7 @@
*/
namespace OCP\Files\SimpleFS;
+use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
/**
@@ -67,6 +68,8 @@ interface ISimpleFile {
/**
* Get the content
*
+ * @throws NotPermittedException
+ * @throws NotFoundException
* @return string
* @since 11.0.0
*/
diff --git a/lib/public/Mail/IAttachment.php b/lib/public/Mail/IAttachment.php
index 4b617d67f5e..71fa841b26c 100644
--- a/lib/public/Mail/IAttachment.php
+++ b/lib/public/Mail/IAttachment.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -33,23 +34,23 @@ interface IAttachment {
/**
* @param string $filename
- * @return $this
+ * @return IAttachment
* @since 13.0.0
*/
- public function setFilename($filename);
+ public function setFilename(string $filename): IAttachment;
/**
* @param string $contentType
- * @return $this
+ * @return IAttachment
* @since 13.0.0
*/
- public function setContentType($contentType);
+ public function setContentType(string $contentType): IAttachment;
/**
* @param string $body
- * @return $this
+ * @return IAttachment
* @since 13.0.0
*/
- public function setBody($body);
+ public function setBody(string $body): IAttachment;
}
diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php
index 6d37c21ada1..1c0ddbe54d4 100644
--- a/lib/public/Mail/IEMailTemplate.php
+++ b/lib/public/Mail/IEMailTemplate.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright 2017, Morris Jobke <hey@morrisjobke.de>
*
@@ -62,7 +63,7 @@ interface IEMailTemplate {
*
* @since 13.0.0
*/
- public function setSubject($subject);
+ public function setSubject(string $subject);
/**
* Adds a header to the email
@@ -80,7 +81,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addHeading($title, $plainTitle = '');
+ public function addHeading(string $title, $plainTitle = '');
/**
* Adds a paragraph to the body of the email
@@ -91,7 +92,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addBodyText($text, $plainText = '');
+ public function addBodyText(string $text, $plainText = '');
/**
* Adds a list item to the body of the email
@@ -99,13 +100,13 @@ interface IEMailTemplate {
* @param string $text; Note: When $plainText falls back to this, HTML is automatically escaped in the HTML email
* @param string $metaInfo; Note: When $plainMetaInfo falls back to this, HTML is automatically escaped in the HTML email
* @param string $icon Absolute path, must be 16*16 pixels
- * @param string $plainText Text that is used in the plain text email
+ * @param string|bool $plainText Text that is used in the plain text email
* if empty the $text is used, if false none will be used
- * @param string $plainMetaInfo Meta info that is used in the plain text email
+ * @param string|bool $plainMetaInfo Meta info that is used in the plain text email
* if empty the $metaInfo is used, if false none will be used
* @since 12.0.0
*/
- public function addBodyListItem($text, $metaInfo = '', $icon = '', $plainText = '', $plainMetaInfo = '');
+ public function addBodyListItem(string $text, string $metaInfo = '', string $icon = '', $plainText = '', $plainMetaInfo = '');
/**
* Adds a button group of two buttons to the body of the email
@@ -119,7 +120,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addBodyButtonGroup($textLeft, $urlLeft, $textRight, $urlRight, $plainTextLeft = '', $plainTextRight = '');
+ public function addBodyButtonGroup(string $textLeft, string $urlLeft, string $textRight, string $urlRight, string $plainTextLeft = '', string $plainTextRight = '');
/**
* Adds a button to the body of the email
@@ -131,7 +132,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addBodyButton($text, $url, $plainText = '');
+ public function addBodyButton(string $text, string $url, $plainText = '');
/**
* Adds a logo and a text to the footer. <br> in the text will be replaced by new lines in the plain text email
@@ -140,7 +141,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function addFooter($text = '');
+ public function addFooter(string $text = '');
/**
* Returns the rendered email subject as string
@@ -149,7 +150,7 @@ interface IEMailTemplate {
*
* @since 13.0.0
*/
- public function renderSubject();
+ public function renderSubject(): string;
/**
* Returns the rendered HTML email as string
@@ -158,7 +159,7 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function renderHtml();
+ public function renderHtml(): string;
/**
* Returns the rendered plain text email as string
@@ -167,5 +168,5 @@ interface IEMailTemplate {
*
* @since 12.0.0
*/
- public function renderText();
+ public function renderText(): string;
}
diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php
index 10096548256..e8f5d6e7d03 100644
--- a/lib/public/Mail/IMailer.php
+++ b/lib/public/Mail/IMailer.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -51,7 +52,7 @@ interface IMailer {
* @return IMessage
* @since 8.1.0
*/
- public function createMessage();
+ public function createMessage(): IMessage;
/**
* @param string|null $data
@@ -60,7 +61,7 @@ interface IMailer {
* @return IAttachment
* @since 13.0.0
*/
- public function createAttachment($data = null, $filename = null, $contentType = null);
+ public function createAttachment($data = null, $filename = null, $contentType = null): IAttachment;
/**
* @param string $path
@@ -68,7 +69,7 @@ interface IMailer {
* @return IAttachment
* @since 13.0.0
*/
- public function createAttachmentFromPath($path, $contentType = null);
+ public function createAttachmentFromPath(string $path, $contentType = null): IAttachment;
/**
* Creates a new email template object
@@ -78,7 +79,7 @@ interface IMailer {
* @return IEMailTemplate
* @since 12.0.0 Parameters added in 12.0.3
*/
- public function createEMailTemplate($emailId, array $data = []);
+ public function createEMailTemplate(string $emailId, array $data = []): IEMailTemplate;
/**
* Send the specified message. Also sets the from address to the value defined in config.php
@@ -91,7 +92,7 @@ interface IMailer {
* has been supplied.)
* @since 8.1.0
*/
- public function send(IMessage $message);
+ public function send(IMessage $message): array;
/**
* Checks if an e-mail address is valid
@@ -100,5 +101,5 @@ interface IMailer {
* @return bool True if the mail address is valid, false otherwise
* @since 8.1.0
*/
- public function validateMailAddress($email);
+ public function validateMailAddress(string $email): bool;
}
diff --git a/lib/public/Mail/IMessage.php b/lib/public/Mail/IMessage.php
index cec47adc19d..638fd9d103f 100644
--- a/lib/public/Mail/IMessage.php
+++ b/lib/public/Mail/IMessage.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -33,10 +34,10 @@ interface IMessage {
/**
* @param IAttachment $attachment
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function attach(IAttachment $attachment);
+ public function attach(IAttachment $attachment): IMessage;
/**
* Set the from address of this message.
@@ -44,51 +45,51 @@ interface IMessage {
* If no "From" address is used \OC\Mail\Mailer will use mail_from_address and mail_domain from config.php
*
* @param array $addresses Example: array('sender@domain.org', 'other@domain.org' => 'A name')
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function setFrom(array $addresses);
+ public function setFrom(array $addresses): IMessage;
/**
* Set the Reply-To address of this message
*
* @param array $addresses
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function setReplyTo(array $addresses);
+ public function setReplyTo(array $addresses): IMessage;
/**
* Set the to addresses of this message.
*
* @param array $recipients Example: array('recipient@domain.org', 'other@domain.org' => 'A name')
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function setTo(array $recipients);
+ public function setTo(array $recipients): IMessage;
/**
* Set the CC recipients of this message.
*
* @param array $recipients Example: array('recipient@domain.org', 'other@domain.org' => 'A name')
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function setCc(array $recipients);
+ public function setCc(array $recipients): IMessage;
/**
* Set the BCC recipients of this message.
*
* @param array $recipients Example: array('recipient@domain.org', 'other@domain.org' => 'A name')
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function setBcc(array $recipients);
+ public function setBcc(array $recipients): IMessage;
/**
* @param IEMailTemplate $emailTemplate
- * @return $this
+ * @return IMessage
* @since 13.0.0
*/
- public function useTemplate(IEMailTemplate $emailTemplate);
+ public function useTemplate(IEMailTemplate $emailTemplate): IMessage;
}