summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/autoload_classmap.php8
-rw-r--r--lib/composer/composer/autoload_static.php8
-rw-r--r--lib/l10n/en_GB.js9
-rw-r--r--lib/l10n/en_GB.json9
-rw-r--r--lib/l10n/es.js11
-rw-r--r--lib/l10n/es.json11
-rw-r--r--lib/l10n/is.js10
-rw-r--r--lib/l10n/is.json10
-rw-r--r--lib/l10n/zh_TW.js7
-rw-r--r--lib/l10n/zh_TW.json7
-rw-r--r--lib/private/Collaboration/AutoComplete/Manager.php81
-rw-r--r--lib/private/Collaboration/Collaborators/SearchResult.php8
-rw-r--r--lib/private/DB/MDB2SchemaManager.php2
-rw-r--r--lib/private/DB/NoCheckMigrator.php39
-rw-r--r--lib/private/DB/OracleMigrator.php148
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php10
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php13
-rw-r--r--lib/private/Files/Storage/Local.php3
-rw-r--r--lib/private/Files/Type/Detection.php4
-rw-r--r--lib/private/Log.php6
-rw-r--r--lib/private/Mail/Attachment.php78
-rw-r--r--lib/private/Mail/Mailer.php22
-rw-r--r--lib/private/Mail/Message.php12
-rw-r--r--lib/private/Server.php10
-rw-r--r--lib/private/Share20/Manager.php2
-rw-r--r--lib/private/SystemConfig.php8
-rw-r--r--lib/private/legacy/app.php2
-rw-r--r--lib/public/Collaboration/AutoComplete/IManager.php46
-rw-r--r--lib/public/Collaboration/AutoComplete/ISorter.php50
-rw-r--r--lib/public/IRequest.php10
-rw-r--r--lib/public/Mail/IAttachment.php53
-rw-r--r--lib/public/Mail/IMailer.php17
-rw-r--r--lib/public/Mail/IMessage.php10
33 files changed, 639 insertions, 85 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index cea600bf59c..cfd52fd6dfc 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -68,6 +68,8 @@ return array(
'OCP\\BackgroundJob\\IJobList' => $baseDir . '/lib/public/BackgroundJob/IJobList.php',
'OCP\\Capabilities\\ICapability' => $baseDir . '/lib/public/Capabilities/ICapability.php',
'OCP\\Capabilities\\IPublicCapability' => $baseDir . '/lib/public/Capabilities/IPublicCapability.php',
+ 'OCP\\Collaboration\\AutoComplete\\IManager' => $baseDir . '/lib/public/Collaboration/AutoComplete/IManager.php',
+ 'OCP\\Collaboration\\AutoComplete\\ISorter' => $baseDir . '/lib/public/Collaboration/AutoComplete/ISorter.php',
'OCP\\Collaboration\\Collaborators\\ISearch' => $baseDir . '/lib/public/Collaboration/Collaborators/ISearch.php',
'OCP\\Collaboration\\Collaborators\\ISearchPlugin' => $baseDir . '/lib/public/Collaboration/Collaborators/ISearchPlugin.php',
'OCP\\Collaboration\\Collaborators\\ISearchResult' => $baseDir . '/lib/public/Collaboration/Collaborators/ISearchResult.php',
@@ -224,6 +226,7 @@ return array(
'OCP\\Lock\\ILockingProvider' => $baseDir . '/lib/public/Lock/ILockingProvider.php',
'OCP\\Lock\\LockedException' => $baseDir . '/lib/public/Lock/LockedException.php',
'OCP\\Lockdown\\ILockdownManager' => $baseDir . '/lib/public/Lockdown/ILockdownManager.php',
+ 'OCP\\Mail\\IAttachment' => $baseDir . '/lib/public/Mail/IAttachment.php',
'OCP\\Mail\\IEMailTemplate' => $baseDir . '/lib/public/Mail/IEMailTemplate.php',
'OCP\\Mail\\IMailer' => $baseDir . '/lib/public/Mail/IMailer.php',
'OCP\\Mail\\IMessage' => $baseDir . '/lib/public/Mail/IMessage.php',
@@ -389,6 +392,7 @@ return array(
'OC\\Cache\\CappedMemoryCache' => $baseDir . '/lib/private/Cache/CappedMemoryCache.php',
'OC\\Cache\\File' => $baseDir . '/lib/private/Cache/File.php',
'OC\\CapabilitiesManager' => $baseDir . '/lib/private/CapabilitiesManager.php',
+ 'OC\\Collaboration\\AutoComplete\\Manager' => $baseDir . '/lib/private/Collaboration/AutoComplete/Manager.php',
'OC\\Collaboration\\Collaborators\\GroupPlugin' => $baseDir . '/lib/private/Collaboration/Collaborators/GroupPlugin.php',
'OC\\Collaboration\\Collaborators\\LookupPlugin' => $baseDir . '/lib/private/Collaboration/Collaborators/LookupPlugin.php',
'OC\\Collaboration\\Collaborators\\MailPlugin' => $baseDir . '/lib/private/Collaboration/Collaborators/MailPlugin.php',
@@ -494,6 +498,7 @@ return array(
'OC\\Core\\Command\\User\\Report' => $baseDir . '/core/Command/User/Report.php',
'OC\\Core\\Command\\User\\ResetPassword' => $baseDir . '/core/Command/User/ResetPassword.php',
'OC\\Core\\Command\\User\\Setting' => $baseDir . '/core/Command/User/Setting.php',
+ 'OC\\Core\\Controller\\AutoCompleteController' => $baseDir . '/core/Controller/AutoCompleteController.php',
'OC\\Core\\Controller\\AvatarController' => $baseDir . '/core/Controller/AvatarController.php',
'OC\\Core\\Controller\\ClientFlowLoginController' => $baseDir . '/core/Controller/ClientFlowLoginController.php',
'OC\\Core\\Controller\\ContactsMenuController' => $baseDir . '/core/Controller/ContactsMenuController.php',
@@ -507,6 +512,7 @@ return array(
'OC\\Core\\Controller\\SetupController' => $baseDir . '/core/Controller/SetupController.php',
'OC\\Core\\Controller\\TwoFactorChallengeController' => $baseDir . '/core/Controller/TwoFactorChallengeController.php',
'OC\\Core\\Controller\\UserController' => $baseDir . '/core/Controller/UserController.php',
+ 'OC\\Core\\Controller\\WalledGardenController' => $baseDir . '/core/Controller/WalledGardenController.php',
'OC\\Core\\Middleware\\TwoFactorMiddleware' => $baseDir . '/core/Middleware/TwoFactorMiddleware.php',
'OC\\Core\\Migrations\\Version13000Date20170705121758' => $baseDir . '/core/Migrations/Version13000Date20170705121758.php',
'OC\\Core\\Migrations\\Version13000Date20170718121200' => $baseDir . '/core/Migrations/Version13000Date20170718121200.php',
@@ -528,7 +534,6 @@ return array(
'OC\\DB\\Migrator' => $baseDir . '/lib/private/DB/Migrator.php',
'OC\\DB\\MySQLMigrator' => $baseDir . '/lib/private/DB/MySQLMigrator.php',
'OC\\DB\\MySqlTools' => $baseDir . '/lib/private/DB/MySqlTools.php',
- 'OC\\DB\\NoCheckMigrator' => $baseDir . '/lib/private/DB/NoCheckMigrator.php',
'OC\\DB\\OCPostgreSqlPlatform' => $baseDir . '/lib/private/DB/OCPostgreSqlPlatform.php',
'OC\\DB\\OCSqlitePlatform' => $baseDir . '/lib/private/DB/OCSqlitePlatform.php',
'OC\\DB\\OracleConnection' => $baseDir . '/lib/private/DB/OracleConnection.php',
@@ -706,6 +711,7 @@ return array(
'OC\\Log\\File' => $baseDir . '/lib/private/Log/File.php',
'OC\\Log\\Rotate' => $baseDir . '/lib/private/Log/Rotate.php',
'OC\\Log\\Syslog' => $baseDir . '/lib/private/Log/Syslog.php',
+ 'OC\\Mail\\Attachment' => $baseDir . '/lib/private/Mail/Attachment.php',
'OC\\Mail\\EMailTemplate' => $baseDir . '/lib/private/Mail/EMailTemplate.php',
'OC\\Mail\\Mailer' => $baseDir . '/lib/private/Mail/Mailer.php',
'OC\\Mail\\Message' => $baseDir . '/lib/private/Mail/Message.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index f476777e667..675219c0126 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -98,6 +98,8 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OCP\\BackgroundJob\\IJobList' => __DIR__ . '/../../..' . '/lib/public/BackgroundJob/IJobList.php',
'OCP\\Capabilities\\ICapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/ICapability.php',
'OCP\\Capabilities\\IPublicCapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/IPublicCapability.php',
+ 'OCP\\Collaboration\\AutoComplete\\IManager' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/IManager.php',
+ 'OCP\\Collaboration\\AutoComplete\\ISorter' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/ISorter.php',
'OCP\\Collaboration\\Collaborators\\ISearch' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Collaborators/ISearch.php',
'OCP\\Collaboration\\Collaborators\\ISearchPlugin' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Collaborators/ISearchPlugin.php',
'OCP\\Collaboration\\Collaborators\\ISearchResult' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Collaborators/ISearchResult.php',
@@ -254,6 +256,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OCP\\Lock\\ILockingProvider' => __DIR__ . '/../../..' . '/lib/public/Lock/ILockingProvider.php',
'OCP\\Lock\\LockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/LockedException.php',
'OCP\\Lockdown\\ILockdownManager' => __DIR__ . '/../../..' . '/lib/public/Lockdown/ILockdownManager.php',
+ 'OCP\\Mail\\IAttachment' => __DIR__ . '/../../..' . '/lib/public/Mail/IAttachment.php',
'OCP\\Mail\\IEMailTemplate' => __DIR__ . '/../../..' . '/lib/public/Mail/IEMailTemplate.php',
'OCP\\Mail\\IMailer' => __DIR__ . '/../../..' . '/lib/public/Mail/IMailer.php',
'OCP\\Mail\\IMessage' => __DIR__ . '/../../..' . '/lib/public/Mail/IMessage.php',
@@ -419,6 +422,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Cache\\CappedMemoryCache' => __DIR__ . '/../../..' . '/lib/private/Cache/CappedMemoryCache.php',
'OC\\Cache\\File' => __DIR__ . '/../../..' . '/lib/private/Cache/File.php',
'OC\\CapabilitiesManager' => __DIR__ . '/../../..' . '/lib/private/CapabilitiesManager.php',
+ 'OC\\Collaboration\\AutoComplete\\Manager' => __DIR__ . '/../../..' . '/lib/private/Collaboration/AutoComplete/Manager.php',
'OC\\Collaboration\\Collaborators\\GroupPlugin' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Collaborators/GroupPlugin.php',
'OC\\Collaboration\\Collaborators\\LookupPlugin' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Collaborators/LookupPlugin.php',
'OC\\Collaboration\\Collaborators\\MailPlugin' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Collaborators/MailPlugin.php',
@@ -524,6 +528,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Core\\Command\\User\\Report' => __DIR__ . '/../../..' . '/core/Command/User/Report.php',
'OC\\Core\\Command\\User\\ResetPassword' => __DIR__ . '/../../..' . '/core/Command/User/ResetPassword.php',
'OC\\Core\\Command\\User\\Setting' => __DIR__ . '/../../..' . '/core/Command/User/Setting.php',
+ 'OC\\Core\\Controller\\AutoCompleteController' => __DIR__ . '/../../..' . '/core/Controller/AutoCompleteController.php',
'OC\\Core\\Controller\\AvatarController' => __DIR__ . '/../../..' . '/core/Controller/AvatarController.php',
'OC\\Core\\Controller\\ClientFlowLoginController' => __DIR__ . '/../../..' . '/core/Controller/ClientFlowLoginController.php',
'OC\\Core\\Controller\\ContactsMenuController' => __DIR__ . '/../../..' . '/core/Controller/ContactsMenuController.php',
@@ -537,6 +542,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Core\\Controller\\SetupController' => __DIR__ . '/../../..' . '/core/Controller/SetupController.php',
'OC\\Core\\Controller\\TwoFactorChallengeController' => __DIR__ . '/../../..' . '/core/Controller/TwoFactorChallengeController.php',
'OC\\Core\\Controller\\UserController' => __DIR__ . '/../../..' . '/core/Controller/UserController.php',
+ 'OC\\Core\\Controller\\WalledGardenController' => __DIR__ . '/../../..' . '/core/Controller/WalledGardenController.php',
'OC\\Core\\Middleware\\TwoFactorMiddleware' => __DIR__ . '/../../..' . '/core/Middleware/TwoFactorMiddleware.php',
'OC\\Core\\Migrations\\Version13000Date20170705121758' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170705121758.php',
'OC\\Core\\Migrations\\Version13000Date20170718121200' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170718121200.php',
@@ -558,7 +564,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\DB\\Migrator' => __DIR__ . '/../../..' . '/lib/private/DB/Migrator.php',
'OC\\DB\\MySQLMigrator' => __DIR__ . '/../../..' . '/lib/private/DB/MySQLMigrator.php',
'OC\\DB\\MySqlTools' => __DIR__ . '/../../..' . '/lib/private/DB/MySqlTools.php',
- 'OC\\DB\\NoCheckMigrator' => __DIR__ . '/../../..' . '/lib/private/DB/NoCheckMigrator.php',
'OC\\DB\\OCPostgreSqlPlatform' => __DIR__ . '/../../..' . '/lib/private/DB/OCPostgreSqlPlatform.php',
'OC\\DB\\OCSqlitePlatform' => __DIR__ . '/../../..' . '/lib/private/DB/OCSqlitePlatform.php',
'OC\\DB\\OracleConnection' => __DIR__ . '/../../..' . '/lib/private/DB/OracleConnection.php',
@@ -736,6 +741,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Log\\File' => __DIR__ . '/../../..' . '/lib/private/Log/File.php',
'OC\\Log\\Rotate' => __DIR__ . '/../../..' . '/lib/private/Log/Rotate.php',
'OC\\Log\\Syslog' => __DIR__ . '/../../..' . '/lib/private/Log/Syslog.php',
+ 'OC\\Mail\\Attachment' => __DIR__ . '/../../..' . '/lib/private/Mail/Attachment.php',
'OC\\Mail\\EMailTemplate' => __DIR__ . '/../../..' . '/lib/private/Mail/EMailTemplate.php',
'OC\\Mail\\Mailer' => __DIR__ . '/../../..' . '/lib/private/Mail/Mailer.php',
'OC\\Mail\\Message' => __DIR__ . '/../../..' . '/lib/private/Mail/Message.php',
diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js
index a169502af15..4713820e242 100644
--- a/lib/l10n/en_GB.js
+++ b/lib/l10n/en_GB.js
@@ -31,14 +31,23 @@ OC.L10N.register(
"Invalid image" : "Invalid image",
"Avatar image is not square" : "Avatar image is not square",
"today" : "today",
+ "tomorrow" : "tomorrow",
"yesterday" : "yesterday",
+ "_in %n day_::_in %n days_" : ["in %n day","in %n days"],
"_%n day ago_::_%n days ago_" : ["%n day ago","%n days ago"],
+ "next month" : "next month",
"last month" : "last month",
+ "_in %n month_::_in %n months_" : ["in %n month","in %n months"],
"_%n month ago_::_%n months ago_" : ["%n month ago","%n months ago"],
+ "next year" : "next year",
"last year" : "last year",
+ "_in %n year_::_in %n years_" : ["in %n year","in %n years"],
"_%n year ago_::_%n years ago_" : ["%n year ago","%n years ago"],
+ "_in %n hour_::_in %n hours_" : ["in %n hour","in %n hours"],
"_%n hour ago_::_%n hours ago_" : ["%n hour ago","%n hours ago"],
+ "_in %n minute_::_in %n minutes_" : ["in %n minute","in %n minutes"],
"_%n minute ago_::_%n minutes ago_" : ["%n minute ago","%n minutes ago"],
+ "in a few seconds" : "in a few seconds",
"seconds ago" : "seconds ago",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator.",
"File name is a reserved word" : "File name is a reserved word",
diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json
index bf08239be71..01590dbb688 100644
--- a/lib/l10n/en_GB.json
+++ b/lib/l10n/en_GB.json
@@ -29,14 +29,23 @@
"Invalid image" : "Invalid image",
"Avatar image is not square" : "Avatar image is not square",
"today" : "today",
+ "tomorrow" : "tomorrow",
"yesterday" : "yesterday",
+ "_in %n day_::_in %n days_" : ["in %n day","in %n days"],
"_%n day ago_::_%n days ago_" : ["%n day ago","%n days ago"],
+ "next month" : "next month",
"last month" : "last month",
+ "_in %n month_::_in %n months_" : ["in %n month","in %n months"],
"_%n month ago_::_%n months ago_" : ["%n month ago","%n months ago"],
+ "next year" : "next year",
"last year" : "last year",
+ "_in %n year_::_in %n years_" : ["in %n year","in %n years"],
"_%n year ago_::_%n years ago_" : ["%n year ago","%n years ago"],
+ "_in %n hour_::_in %n hours_" : ["in %n hour","in %n hours"],
"_%n hour ago_::_%n hours ago_" : ["%n hour ago","%n hours ago"],
+ "_in %n minute_::_in %n minutes_" : ["in %n minute","in %n minutes"],
"_%n minute ago_::_%n minutes ago_" : ["%n minute ago","%n minutes ago"],
+ "in a few seconds" : "in a few seconds",
"seconds ago" : "seconds ago",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator.",
"File name is a reserved word" : "File name is a reserved word",
diff --git a/lib/l10n/es.js b/lib/l10n/es.js
index 14eda42f187..5a50a527131 100644
--- a/lib/l10n/es.js
+++ b/lib/l10n/es.js
@@ -31,14 +31,23 @@ OC.L10N.register(
"Invalid image" : "Imagen inválida",
"Avatar image is not square" : "La imagen de avatar no es cuadrada",
"today" : "hoy",
+ "tomorrow" : "mañana",
"yesterday" : "ayer",
+ "_in %n day_::_in %n days_" : ["dentro de %n día","dentro de %n días"],
"_%n day ago_::_%n days ago_" : ["Hace %n día","hace %n días"],
+ "next month" : "mes siguiente",
"last month" : "mes pasado",
+ "_in %n month_::_in %n months_" : ["dentro de %n mes","dentro de %n meses"],
"_%n month ago_::_%n months ago_" : ["Hace %n mes","Hace %n meses"],
+ "next year" : "año que viene",
"last year" : "año pasado",
+ "_in %n year_::_in %n years_" : ["dentro de %n año","dentro de %n años"],
"_%n year ago_::_%n years ago_" : ["Hace %n año","hace %n años"],
+ "_in %n hour_::_in %n hours_" : ["dentro de %n hora","dentro de %n horas"],
"_%n hour ago_::_%n hours ago_" : ["Hace %n hora","Hace %n horas"],
+ "_in %n minute_::_in %n minutes_" : ["dentro de %n minuto","dentro de %n minutos"],
"_%n minute ago_::_%n minutes ago_" : ["Hace %n minuto","Hace %n minutos"],
+ "in a few seconds" : "en unos segundos",
"seconds ago" : "hace segundos",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "El módulo con ID %s no existe. Por favor, actívalo en la configuración de apps o contacta con tu administrador.",
"File name is a reserved word" : "El nombre de archivo es una palabra reservada",
@@ -56,7 +65,7 @@ OC.L10N.register(
"Users" : "Usuarios",
"APCu" : "APCu",
"Redis" : "Redis",
- "Basic settings" : "Ajustes Basicas",
+ "Basic settings" : "Ajustes Basicos",
"Sharing" : "Compartir",
"Security" : "Seguridad",
"Encryption" : "Cifrado",
diff --git a/lib/l10n/es.json b/lib/l10n/es.json
index 23227e69ac6..c8ec965fcfe 100644
--- a/lib/l10n/es.json
+++ b/lib/l10n/es.json
@@ -29,14 +29,23 @@
"Invalid image" : "Imagen inválida",
"Avatar image is not square" : "La imagen de avatar no es cuadrada",
"today" : "hoy",
+ "tomorrow" : "mañana",
"yesterday" : "ayer",
+ "_in %n day_::_in %n days_" : ["dentro de %n día","dentro de %n días"],
"_%n day ago_::_%n days ago_" : ["Hace %n día","hace %n días"],
+ "next month" : "mes siguiente",
"last month" : "mes pasado",
+ "_in %n month_::_in %n months_" : ["dentro de %n mes","dentro de %n meses"],
"_%n month ago_::_%n months ago_" : ["Hace %n mes","Hace %n meses"],
+ "next year" : "año que viene",
"last year" : "año pasado",
+ "_in %n year_::_in %n years_" : ["dentro de %n año","dentro de %n años"],
"_%n year ago_::_%n years ago_" : ["Hace %n año","hace %n años"],
+ "_in %n hour_::_in %n hours_" : ["dentro de %n hora","dentro de %n horas"],
"_%n hour ago_::_%n hours ago_" : ["Hace %n hora","Hace %n horas"],
+ "_in %n minute_::_in %n minutes_" : ["dentro de %n minuto","dentro de %n minutos"],
"_%n minute ago_::_%n minutes ago_" : ["Hace %n minuto","Hace %n minutos"],
+ "in a few seconds" : "en unos segundos",
"seconds ago" : "hace segundos",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "El módulo con ID %s no existe. Por favor, actívalo en la configuración de apps o contacta con tu administrador.",
"File name is a reserved word" : "El nombre de archivo es una palabra reservada",
@@ -54,7 +63,7 @@
"Users" : "Usuarios",
"APCu" : "APCu",
"Redis" : "Redis",
- "Basic settings" : "Ajustes Basicas",
+ "Basic settings" : "Ajustes Basicos",
"Sharing" : "Compartir",
"Security" : "Seguridad",
"Encryption" : "Cifrado",
diff --git a/lib/l10n/is.js b/lib/l10n/is.js
index 155f3d56a3a..7f3dc4a7075 100644
--- a/lib/l10n/is.js
+++ b/lib/l10n/is.js
@@ -31,14 +31,23 @@ OC.L10N.register(
"Invalid image" : "Ógild mynd",
"Avatar image is not square" : "Auðkennismynd er ekki ferningslaga",
"today" : "í dag",
+ "tomorrow" : "á morgun",
"yesterday" : "í gær",
+ "_in %n day_::_in %n days_" : ["eftir %n dag","eftir %n daga"],
"_%n day ago_::_%n days ago_" : ["fyrir %n degi síðan","fyrir %n dögum síðan"],
+ "next month" : "í næsta mánuði",
"last month" : "í síðasta mánuði",
+ "_in %n month_::_in %n months_" : ["eftir %n mánuð","eftir %n mánuði"],
"_%n month ago_::_%n months ago_" : ["fyrir %n mánuði","fyrir %n mánuðum"],
+ "next year" : "á næsta ári",
"last year" : "síðasta ári",
+ "_in %n year_::_in %n years_" : ["eftir %n ár","eftir %n ár"],
"_%n year ago_::_%n years ago_" : ["fyrir %n degi síðan","fyrir %n árum síðan"],
+ "_in %n hour_::_in %n hours_" : ["eftir %n klukkustund","eftir %n klukkustundir"],
"_%n hour ago_::_%n hours ago_" : ["fyrir %n klukkustund síðan","fyrir %n klukkustundum síðan"],
+ "_in %n minute_::_in %n minutes_" : ["eftir %n mínútu","eftir %n mínútur"],
"_%n minute ago_::_%n minutes ago_" : ["fyrir %n mínútu síðan","fyrir %n mínútum síðan"],
+ "in a few seconds" : "eftir örfáar sekúndur",
"seconds ago" : "sekúndum síðan",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Eining með auðkenni: %s er ekki til. Virkjaðu hana í forritastillingum eða hafðu samband við kerfisstjóra.",
"File name is a reserved word" : "Skráarheiti er þegar frátekið orð",
@@ -84,6 +93,7 @@ OC.L10N.register(
"Set an admin username." : "Stilltu notandanafn kerfisstjóra.",
"Set an admin password." : "Stilltu lykilorð kerfisstjóra.",
"Can't create or write into the data directory %s" : "Gat ekki búið til eða skrifað í gagnamöppuna %s",
+ "Given database host is invalid and must not contain the port: %s" : "Uppgefinn hýsill gagnagrunns er ógildur og má ekki innihalda gáttina: %s",
"Invalid Federated Cloud ID" : "Ógilt skýjasambandsauðkenni (Federated Cloud ID)",
"Sharing %s failed, because the backend does not allow shares from type %i" : "Deiling %s mistókst, því bakvinnslukerfið leyfir ekki sameignir af gerðinni %i",
"Sharing %s failed, because the file does not exist" : "Deiling %s mistókst, því skráin er ekki til",
diff --git a/lib/l10n/is.json b/lib/l10n/is.json
index f106f993f88..ca3c9f19e41 100644
--- a/lib/l10n/is.json
+++ b/lib/l10n/is.json
@@ -29,14 +29,23 @@
"Invalid image" : "Ógild mynd",
"Avatar image is not square" : "Auðkennismynd er ekki ferningslaga",
"today" : "í dag",
+ "tomorrow" : "á morgun",
"yesterday" : "í gær",
+ "_in %n day_::_in %n days_" : ["eftir %n dag","eftir %n daga"],
"_%n day ago_::_%n days ago_" : ["fyrir %n degi síðan","fyrir %n dögum síðan"],
+ "next month" : "í næsta mánuði",
"last month" : "í síðasta mánuði",
+ "_in %n month_::_in %n months_" : ["eftir %n mánuð","eftir %n mánuði"],
"_%n month ago_::_%n months ago_" : ["fyrir %n mánuði","fyrir %n mánuðum"],
+ "next year" : "á næsta ári",
"last year" : "síðasta ári",
+ "_in %n year_::_in %n years_" : ["eftir %n ár","eftir %n ár"],
"_%n year ago_::_%n years ago_" : ["fyrir %n degi síðan","fyrir %n árum síðan"],
+ "_in %n hour_::_in %n hours_" : ["eftir %n klukkustund","eftir %n klukkustundir"],
"_%n hour ago_::_%n hours ago_" : ["fyrir %n klukkustund síðan","fyrir %n klukkustundum síðan"],
+ "_in %n minute_::_in %n minutes_" : ["eftir %n mínútu","eftir %n mínútur"],
"_%n minute ago_::_%n minutes ago_" : ["fyrir %n mínútu síðan","fyrir %n mínútum síðan"],
+ "in a few seconds" : "eftir örfáar sekúndur",
"seconds ago" : "sekúndum síðan",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Eining með auðkenni: %s er ekki til. Virkjaðu hana í forritastillingum eða hafðu samband við kerfisstjóra.",
"File name is a reserved word" : "Skráarheiti er þegar frátekið orð",
@@ -82,6 +91,7 @@
"Set an admin username." : "Stilltu notandanafn kerfisstjóra.",
"Set an admin password." : "Stilltu lykilorð kerfisstjóra.",
"Can't create or write into the data directory %s" : "Gat ekki búið til eða skrifað í gagnamöppuna %s",
+ "Given database host is invalid and must not contain the port: %s" : "Uppgefinn hýsill gagnagrunns er ógildur og má ekki innihalda gáttina: %s",
"Invalid Federated Cloud ID" : "Ógilt skýjasambandsauðkenni (Federated Cloud ID)",
"Sharing %s failed, because the backend does not allow shares from type %i" : "Deiling %s mistókst, því bakvinnslukerfið leyfir ekki sameignir af gerðinni %i",
"Sharing %s failed, because the file does not exist" : "Deiling %s mistókst, því skráin er ekki til",
diff --git a/lib/l10n/zh_TW.js b/lib/l10n/zh_TW.js
index 55ebf18c052..be68a268db4 100644
--- a/lib/l10n/zh_TW.js
+++ b/lib/l10n/zh_TW.js
@@ -7,6 +7,8 @@ OC.L10N.register(
"This can usually be fixed by giving the webserver write access to the config directory. See %s" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題,詳見 %s",
"Sample configuration detected" : "偵測到範本設定",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "看來您直接複製了範本設定來使用,這可能會毀掉你的安裝,請閱讀說明文件後對 config.php 進行適當的修改",
+ "%1$s and %2$s" : "%1$s 和 %2$s",
+ "%1$s, %2$s and %3$s" : "%1$s, %2$s 和 %3$s",
"PHP %s or higher is required." : "需要 PHP %s 或更高版本",
"PHP with a version lower than %s is required." : "需要 PHP 版本低於 %s ",
"%sbit or higher PHP required." : "%s 或需要更高階版本的php",
@@ -22,10 +24,15 @@ OC.L10N.register(
"Invalid image" : "無效的圖片",
"Avatar image is not square" : "頭像不是正方形",
"today" : "今天",
+ "tomorrow" : "明天",
"yesterday" : "昨天",
+ "_in %n day_::_in %n days_" : ["在 %n 天內"],
"_%n day ago_::_%n days ago_" : ["%n 天前"],
+ "next month" : "下個月",
"last month" : "上個月",
+ "_in %n month_::_in %n months_" : ["在 %n 月內"],
"_%n month ago_::_%n months ago_" : ["%n 個月前"],
+ "next year" : "明年",
"last year" : "去年",
"_%n year ago_::_%n years ago_" : ["%n 幾年前"],
"_%n hour ago_::_%n hours ago_" : ["%n 小時前"],
diff --git a/lib/l10n/zh_TW.json b/lib/l10n/zh_TW.json
index 103d0e25965..519ca314b93 100644
--- a/lib/l10n/zh_TW.json
+++ b/lib/l10n/zh_TW.json
@@ -5,6 +5,8 @@
"This can usually be fixed by giving the webserver write access to the config directory. See %s" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題,詳見 %s",
"Sample configuration detected" : "偵測到範本設定",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "看來您直接複製了範本設定來使用,這可能會毀掉你的安裝,請閱讀說明文件後對 config.php 進行適當的修改",
+ "%1$s and %2$s" : "%1$s 和 %2$s",
+ "%1$s, %2$s and %3$s" : "%1$s, %2$s 和 %3$s",
"PHP %s or higher is required." : "需要 PHP %s 或更高版本",
"PHP with a version lower than %s is required." : "需要 PHP 版本低於 %s ",
"%sbit or higher PHP required." : "%s 或需要更高階版本的php",
@@ -20,10 +22,15 @@
"Invalid image" : "無效的圖片",
"Avatar image is not square" : "頭像不是正方形",
"today" : "今天",
+ "tomorrow" : "明天",
"yesterday" : "昨天",
+ "_in %n day_::_in %n days_" : ["在 %n 天內"],
"_%n day ago_::_%n days ago_" : ["%n 天前"],
+ "next month" : "下個月",
"last month" : "上個月",
+ "_in %n month_::_in %n months_" : ["在 %n 月內"],
"_%n month ago_::_%n months ago_" : ["%n 個月前"],
+ "next year" : "明年",
"last year" : "去年",
"_%n year ago_::_%n years ago_" : ["%n 幾年前"],
"_%n hour ago_::_%n hours ago_" : ["%n 小時前"],
diff --git a/lib/private/Collaboration/AutoComplete/Manager.php b/lib/private/Collaboration/AutoComplete/Manager.php
new file mode 100644
index 00000000000..eedc4fb5b40
--- /dev/null
+++ b/lib/private/Collaboration/AutoComplete/Manager.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Collaboration\AutoComplete;
+
+use OCP\Collaboration\AutoComplete\IManager;
+use OCP\Collaboration\AutoComplete\ISorter;
+use OCP\IServerContainer;
+
+class Manager implements IManager {
+ /** @var string[] */
+ protected $sorters =[];
+
+ /** @var ISorter[] */
+ protected $sorterInstances = [];
+ /** @var IServerContainer */
+ private $c;
+
+ public function __construct(IServerContainer $container) {
+ $this->c = $container;
+ }
+
+ public function runSorters(array $sorters, array &$sortArray, array $context) {
+ $sorterInstances = $this->getSorters();
+ while($sorter = array_shift($sorters)) {
+ if(isset($sorterInstances[$sorter])) {
+ $sorterInstances[$sorter]->sort($sortArray, $context);
+ } else {
+ $this->c->getLogger()->warning('No sorter for ID "{id}", skipping', [
+ 'app' => 'core', 'id' => $sorter
+ ]);
+ }
+ }
+ }
+
+ public function registerSorter($className) {
+ $this->sorters[] = $className;
+ }
+
+ protected function getSorters() {
+ if(count($this->sorterInstances) === 0) {
+ foreach ($this->sorters as $sorter) {
+ /** @var ISorter $instance */
+ $instance = $this->c->resolve($sorter);
+ if(!$instance instanceof ISorter) {
+ $this->c->getLogger()->notice('Skipping sorter which is not an instance of ISorter. Class name: {class}',
+ ['app' => 'core', 'class' => $sorter]);
+ continue;
+ }
+ $sorterId = trim($instance->getId());
+ if(trim($sorterId) === '') {
+ $this->c->getLogger()->notice('Skipping sorter with empty ID. Class name: {class}',
+ ['app' => 'core', 'class' => $sorter]);
+ continue;
+ }
+ $this->sorterInstances[$sorterId] = $instance;
+ }
+ }
+ return $this->sorterInstances;
+ }
+}
diff --git a/lib/private/Collaboration/Collaborators/SearchResult.php b/lib/private/Collaboration/Collaborators/SearchResult.php
index 7b32b388203..184c1f69a1b 100644
--- a/lib/private/Collaboration/Collaborators/SearchResult.php
+++ b/lib/private/Collaboration/Collaborators/SearchResult.php
@@ -52,7 +52,7 @@ class SearchResult implements ISearchResult {
$this->exactIdMatches[$type->getLabel()] = 1;
}
- public function hasExactIdMatch(SearchResultType$type) {
+ public function hasExactIdMatch(SearchResultType $type) {
return isset($this->exactIdMatches[$type->getLabel()]);
}
@@ -64,8 +64,10 @@ class SearchResult implements ISearchResult {
$resultArrays = [$this->result['exact'][$type], $this->result[$type]];
foreach($resultArrays as $resultArray) {
- if ($resultArray['value']['shareWith'] === $collaboratorId) {
- return true;
+ foreach ($resultArray as $result) {
+ if ($result['value']['shareWith'] === $collaboratorId) {
+ return true;
+ }
}
}
diff --git a/lib/private/DB/MDB2SchemaManager.php b/lib/private/DB/MDB2SchemaManager.php
index 89b0d153212..ad3f93a2643 100644
--- a/lib/private/DB/MDB2SchemaManager.php
+++ b/lib/private/DB/MDB2SchemaManager.php
@@ -89,7 +89,7 @@ class MDB2SchemaManager {
} else if ($platform instanceof PostgreSqlPlatform) {
return new PostgreSqlMigrator($this->conn, $random, $config, $dispatcher);
} else {
- return new NoCheckMigrator($this->conn, $random, $config, $dispatcher);
+ return new Migrator($this->conn, $random, $config, $dispatcher);
}
}
diff --git a/lib/private/DB/NoCheckMigrator.php b/lib/private/DB/NoCheckMigrator.php
deleted file mode 100644
index 723653511b9..00000000000
--- a/lib/private/DB/NoCheckMigrator.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OC\DB;
-
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * migrator for database platforms that don't support the upgrade check
- *
- * @package OC\DB
- */
-class NoCheckMigrator extends Migrator {
- /**
- * @param \Doctrine\DBAL\Schema\Schema $targetSchema
- * @throws \OC\DB\MigrationException
- */
- public function checkMigrate(Schema $targetSchema) {}
-}
diff --git a/lib/private/DB/OracleMigrator.php b/lib/private/DB/OracleMigrator.php
index 2735529b5e2..f5e06b50d99 100644
--- a/lib/private/DB/OracleMigrator.php
+++ b/lib/private/DB/OracleMigrator.php
@@ -30,8 +30,79 @@ use Doctrine\DBAL\Schema\ColumnDiff;
use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
+use Doctrine\DBAL\Schema\ForeignKeyConstraint;
+
+class OracleMigrator extends Migrator {
+
+ /**
+ * Quote a column's name but changing the name requires recreating
+ * the column instance and copying over all properties.
+ *
+ * @param Column $column old column
+ * @return Column new column instance with new name
+ */
+ protected function quoteColumn(Column $column) {
+ $newColumn = new Column(
+ $this->connection->quoteIdentifier($column->getName()),
+ $column->getType()
+ );
+ $newColumn->setAutoincrement($column->getAutoincrement());
+ $newColumn->setColumnDefinition($column->getColumnDefinition());
+ $newColumn->setComment($column->getComment());
+ $newColumn->setDefault($column->getDefault());
+ $newColumn->setFixed($column->getFixed());
+ $newColumn->setLength($column->getLength());
+ $newColumn->setNotnull($column->getNotnull());
+ $newColumn->setPrecision($column->getPrecision());
+ $newColumn->setScale($column->getScale());
+ $newColumn->setUnsigned($column->getUnsigned());
+ $newColumn->setPlatformOptions($column->getPlatformOptions());
+ $newColumn->setCustomSchemaOptions($column->getPlatformOptions());
+ return $newColumn;
+ }
+
+ /**
+ * Quote an index's name but changing the name requires recreating
+ * the index instance and copying over all properties.
+ *
+ * @param Index $index old index
+ * @return Index new index instance with new name
+ */
+ protected function quoteIndex($index) {
+ return new Index(
+ //TODO migrate existing uppercase indexes, then $this->connection->quoteIdentifier($index->getName()),
+ $index->getName(),
+ array_map(function($columnName) {
+ return $this->connection->quoteIdentifier($columnName);
+ }, $index->getColumns()),
+ $index->isUnique(),
+ $index->isPrimary(),
+ $index->getFlags(),
+ $index->getOptions()
+ );
+ }
+
+ /**
+ * Quote an ForeignKeyConstraint's name but changing the name requires recreating
+ * the ForeignKeyConstraint instance and copying over all properties.
+ *
+ * @param ForeignKeyConstraint $fkc old fkc
+ * @return ForeignKeyConstraint new fkc instance with new name
+ */
+ protected function quoteForeignKeyConstraint($fkc) {
+ return new ForeignKeyConstraint(
+ array_map(function($columnName) {
+ return $this->connection->quoteIdentifier($columnName);
+ }, $fkc->getLocalColumns()),
+ $this->connection->quoteIdentifier($fkc->getForeignTableName()),
+ array_map(function($columnName) {
+ return $this->connection->quoteIdentifier($columnName);
+ }, $fkc->getForeignColumns()),
+ $fkc->getName(),
+ $fkc->getOptions()
+ );
+ }
-class OracleMigrator extends NoCheckMigrator {
/**
* @param Schema $targetSchema
* @param \Doctrine\DBAL\Connection $connection
@@ -46,37 +117,14 @@ class OracleMigrator extends NoCheckMigrator {
return new Table(
$this->connection->quoteIdentifier($table->getName()),
array_map(function(Column $column) {
- $newColumn = new Column(
- $this->connection->quoteIdentifier($column->getName()),
- $column->getType()
- );
- $newColumn->setAutoincrement($column->getAutoincrement());
- $newColumn->setColumnDefinition($column->getColumnDefinition());
- $newColumn->setComment($column->getComment());
- $newColumn->setDefault($column->getDefault());
- $newColumn->setFixed($column->getFixed());
- $newColumn->setLength($column->getLength());
- $newColumn->setNotnull($column->getNotnull());
- $newColumn->setPrecision($column->getPrecision());
- $newColumn->setScale($column->getScale());
- $newColumn->setUnsigned($column->getUnsigned());
- $newColumn->setPlatformOptions($column->getPlatformOptions());
- $newColumn->setCustomSchemaOptions($column->getPlatformOptions());
- return $newColumn;
+ return $this->quoteColumn($column);
}, $table->getColumns()),
array_map(function(Index $index) {
- return new Index(
- $this->connection->quoteIdentifier($index->getName()),
- array_map(function($columnName) {
- return $this->connection->quoteIdentifier($columnName);
- }, $index->getColumns()),
- $index->isUnique(),
- $index->isPrimary(),
- $index->getFlags(),
- $index->getOptions()
- );
+ return $this->quoteIndex($index);
}, $table->getIndexes()),
- $table->getForeignKeys(),
+ array_map(function(ForeignKeyConstraint $fck) {
+ return $this->quoteForeignKeyConstraint($fck);
+ }, $table->getForeignKeys()),
0,
$table->getOptions()
);
@@ -95,14 +143,56 @@ class OracleMigrator extends NoCheckMigrator {
foreach ($schemaDiff->changedTables as $tableDiff) {
$tableDiff->name = $this->connection->quoteIdentifier($tableDiff->name);
+
+ $tableDiff->addedColumns = array_map(function(Column $column) {
+ return $this->quoteColumn($column);
+ }, $tableDiff->addedColumns);
+
foreach ($tableDiff->changedColumns as $column) {
$column->oldColumnName = $this->connection->quoteIdentifier($column->oldColumnName);
// auto increment is not relevant for oracle and can anyhow not be applied on change
$column->changedProperties = array_diff($column->changedProperties, ['autoincrement', 'unsigned']);
}
+ // remove columns that no longer have changed (because autoincrement and unsigned are not supported)
$tableDiff->changedColumns = array_filter($tableDiff->changedColumns, function (ColumnDiff $column) {
return count($column->changedProperties) > 0;
});
+
+ $tableDiff->removedColumns = array_map(function(Column $column) {
+ return $this->quoteColumn($column);
+ }, $tableDiff->removedColumns);
+
+ $tableDiff->renamedColumns = array_map(function(Column $column) {
+ return $this->quoteColumn($column);
+ }, $tableDiff->renamedColumns);
+
+ $tableDiff->addedIndexes = array_map(function(Index $index) {
+ return $this->quoteIndex($index);
+ }, $tableDiff->addedIndexes);
+
+ $tableDiff->changedIndexes = array_map(function(Index $index) {
+ return $this->quoteIndex($index);
+ }, $tableDiff->changedIndexes);
+
+ $tableDiff->removedIndexes = array_map(function(Index $index) {
+ return $this->quoteIndex($index);
+ }, $tableDiff->removedIndexes);
+
+ $tableDiff->renamedIndexes = array_map(function(Index $index) {
+ return $this->quoteIndex($index);
+ }, $tableDiff->renamedIndexes);
+
+ $tableDiff->addedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) {
+ return $this->quoteForeignKeyConstraint($fkc);
+ }, $tableDiff->addedForeignKeys);
+
+ $tableDiff->changedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) {
+ return $this->quoteForeignKeyConstraint($fkc);
+ }, $tableDiff->changedForeignKeys);
+
+ $tableDiff->removedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) {
+ return $this->quoteForeignKeyConstraint($fkc);
+ }, $tableDiff->removedForeignKeys);
}
return $schemaDiff;
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index ded69e8079b..15df808684b 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -390,7 +390,15 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
$stat['size'] = filesize($tmpFile);
$stat['mtime'] = $mTime;
$stat['storage_mtime'] = $mTime;
- $stat['mimetype'] = \OC::$server->getMimeTypeDetector()->detect($tmpFile);
+
+ // run path based detection first, to use file extension because $tmpFile is only a random string
+ $mimetypeDetector = \OC::$server->getMimeTypeDetector();
+ $mimetype = $mimetypeDetector->detectPath($path);
+ if ($mimetype === 'application/octet-stream') {
+ $mimetype = $mimetypeDetector->detect($tmpFile);
+ }
+
+ $stat['mimetype'] = $mimetype;
$stat['etag'] = $this->getETag($path);
$fileId = $this->getCache()->put($path, $stat);
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 6fb12265cb7..4bfa08a3e59 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -49,12 +49,15 @@ trait S3ObjectTrait {
'Bucket' => $this->bucket,
'Key' => $urn
]);
- $command['@http']['stream'] = true;
- $result = $client->execute($command);
- /** @var StreamInterface $body */
- $body = $result['Body'];
+ $request = \Aws\serialize($command);
+ $opts = [
+ 'http' => [
+ 'header' => $request->getHeaders()
+ ]
+ ];
- return $body->detach();
+ $context = stream_context_create($opts);
+ return fopen($request->getUri(), 'r', false, $context);
}
/**
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 0577093712e..c9cb6f246d7 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -408,10 +408,11 @@ class Local extends \OC\Files\Storage\Common {
* @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
+ * @param bool $preserveMtime
* @return bool
*/
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
- if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')) {
+ if ($sourceStorage->instanceOfStorage(Local::class)) {
if ($sourceStorage->instanceOfStorage(Jail::class)) {
/**
* @var \OC\Files\Storage\Wrapper\Jail $sourceStorage
diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php
index cd4ddc2f067..928c68251cf 100644
--- a/lib/private/Files/Type/Detection.php
+++ b/lib/private/Files/Type/Detection.php
@@ -173,6 +173,10 @@ class Detection implements IMimeTypeDetector {
// note: leading dot doesn't qualify as extension
if (strpos($fileName, '.') > 0) {
+
+ // remove versioning extension: name.v1508946057 and transfer extension: name.ocTransferId2057600214.part
+ $fileName = preg_replace('!((\.v\d+)|((.ocTransferId\d+)?.part))$!', '', $fileName);
+
//try to guess the type by the file extension
$extension = strtolower(strrchr($fileName, '.'));
$extension = substr($extension, 1); //remove leading .
diff --git a/lib/private/Log.php b/lib/private/Log.php
index 39577d2387a..25ff26daffa 100644
--- a/lib/private/Log.php
+++ b/lib/private/Log.php
@@ -69,6 +69,8 @@ class Log implements ILogger {
'loginWithPassword',
'updatePrivateKeyPassword',
'validateUserPass',
+ 'loginWithToken',
+ '\{closure\}',
// TokenProvider
'getToken',
@@ -96,6 +98,10 @@ class Log implements ILogger {
'bind',
'areCredentialsValid',
'invokeLDAPMethod',
+
+ // Encryption
+ 'storeKeyPair',
+ 'setupUser',
];
/**
diff --git a/lib/private/Mail/Attachment.php b/lib/private/Mail/Attachment.php
new file mode 100644
index 00000000000..7b85ad1dbb9
--- /dev/null
+++ b/lib/private/Mail/Attachment.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Mail;
+
+use OCP\Mail\IAttachment;
+
+/**
+ * Class Attachment
+ *
+ * @package OC\Mail
+ * @since 13.0.0
+ */
+class Attachment implements IAttachment {
+
+ /** @var \Swift_Mime_Attachment */
+ protected $swiftAttachment;
+
+ public function __construct(\Swift_Mime_Attachment $attachment) {
+ $this->swiftAttachment = $attachment;
+ }
+
+ /**
+ * @param string $filename
+ * @return $this
+ * @since 13.0.0
+ */
+ public function setFilename($filename) {
+ $this->swiftAttachment->setFilename($filename);
+ return $this;
+ }
+
+ /**
+ * @param string $contentType
+ * @return $this
+ * @since 13.0.0
+ */
+ public function setContentType($contentType) {
+ $this->swiftAttachment->setContentType($contentType);
+ return $this;
+ }
+
+ /**
+ * @param string $body
+ * @return $this
+ * @since 13.0.0
+ */
+ public function setBody($body) {
+ $this->swiftAttachment->setBody($body);
+ return $this;
+ }
+
+ /**
+ * @return \Swift_Mime_Attachment
+ */
+ public function getSwiftAttachment() {
+ return $this->swiftAttachment;
+ }
+
+}
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index 43fdb07b810..ad59d640b3e 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -26,6 +26,7 @@ use OCP\Defaults;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
+use OCP\Mail\IAttachment;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
use OCP\ILogger;
@@ -92,6 +93,27 @@ class Mailer implements IMailer {
}
/**
+ * @param string|null $data
+ * @param string|null $filename
+ * @param string|null $contentType
+ * @return IAttachment
+ * @since 13.0.0
+ */
+ public function createAttachment($data = null, $filename = null, $contentType = null) {
+ return new Attachment(\Swift_Attachment::newInstance($data, $filename, $contentType));
+ }
+
+ /**
+ * @param string $path
+ * @param string|null $contentType
+ * @return IAttachment
+ * @since 13.0.0
+ */
+ public function createAttachmentFromPath($path, $contentType = null) {
+ return new Attachment(\Swift_Attachment::fromPath($path, $contentType));
+ }
+
+ /**
* Creates a new email template object
*
* @param string $emailId
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php
index b4d1e4dbe7a..dcd4a66e996 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -23,6 +23,7 @@
namespace OC\Mail;
+use OCP\Mail\IAttachment;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMessage;
use Swift_Message;
@@ -44,6 +45,17 @@ class Message implements IMessage {
}
/**
+ * @param IAttachment $attachment
+ * @return $this
+ * @since 13.0.0
+ */
+ public function attach(IAttachment $attachment) {
+ /** @var Attachment $attachment */
+ $this->swiftMessage->attach($attachment->getSwiftAttachment());
+ return $this;
+ }
+
+ /**
* SwiftMailer does currently not work with IDN domains, this function therefore converts the domains
* FIXME: Remove this once SwiftMailer supports IDN
*
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 84c09c8e6db..c461d3842cd 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -106,6 +106,7 @@ use OCA\Theming\ThemingDefaults;
use OCP\App\IAppManager;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\Collaboration\AutoComplete\IManager;
use OCP\Defaults;
use OCA\Theming\Util;
use OCP\Federation\ICloudIdManager;
@@ -1011,6 +1012,8 @@ class Server extends ServerContainer implements IServerContainer {
});
$this->registerAlias('CollaboratorSearch', \OCP\Collaboration\Collaborators\ISearch::class);
+ $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);
+
$this->registerService('SettingsManager', function (Server $c) {
$manager = new \OC\Settings\Manager(
$c->getLogger(),
@@ -1802,6 +1805,13 @@ class Server extends ServerContainer implements IServerContainer {
}
/**
+ * @return \OCP\Collaboration\AutoComplete\IManager
+ */
+ public function getAutoCompleteManager(){
+ return $this->query(IManager::class);
+ }
+
+ /**
* Returns the LDAP Provider
*
* @return \OCP\LDAP\ILDAPProvider
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index bcef85bd17a..379d87633ab 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1322,7 +1322,7 @@ class Manager implements IManager {
*
* @param \OCP\Files\Node $path
* @param bool $recursive Should we check all parent folders as well
- * @param bool $currentAccess Should the user have currently access to the file
+ * @param bool $currentAccess Ensure the recipient has access to the file (e.g. did not unshare it)
* @return array
*/
public function getAccessList(\OCP\Files\Node $path, $recursive = true, $currentAccess = false) {
diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php
index 3610486140d..91afbeb8967 100644
--- a/lib/private/SystemConfig.php
+++ b/lib/private/SystemConfig.php
@@ -37,22 +37,30 @@ class SystemConfig {
/** @var array */
protected $sensitiveValues = [
+ 'instanceid' => true,
+ 'trusted_domains' => true,
+ 'datadirectory' => true,
+ 'overwrite.cli.url' => true,
'dbname' => true,
+ 'dbhost' => true,
'dbpassword' => true,
'dbuser' => true,
'mail_from_address' => true,
'mail_domain' => true,
+ 'mail_smtphost' => true,
'mail_smtpname' => true,
'mail_smtppassword' => true,
'passwordsalt' => true,
'secret' => true,
'updater.secret' => true,
+ 'trusted_proxies' => true,
'proxyuserpwd' => true,
'log.condition' => [
'shared_secret' => true,
],
'license-key' => true,
'redis' => [
+ 'host' => true,
'password' => true,
],
'objectstore' => [
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 519bb2cad2e..49fac2f4d96 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -185,6 +185,8 @@ class OC_App {
'class' => $plugin['@value'],
];
\OC::$server->getCollaboratorSearch()->registerPlugin($pluginInfo);
+ } else if ($plugin['@attributes']['type'] === 'autocomplete-sort') {
+ \OC::$server->getAutoCompleteManager()->registerSorter($plugin['@value']);
}
}
}
diff --git a/lib/public/Collaboration/AutoComplete/IManager.php b/lib/public/Collaboration/AutoComplete/IManager.php
new file mode 100644
index 00000000000..e9f33727cd2
--- /dev/null
+++ b/lib/public/Collaboration/AutoComplete/IManager.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Collaboration\AutoComplete;
+
+/**
+ * Interface IManager
+ *
+ * @package OCP\Collaboration\AutoComplete
+ * @since 13.0.0
+ */
+interface IManager {
+ /**
+ * @param string $className – class name of the ISorter implementation
+ * @since 13.0.0
+ */
+ public function registerSorter($className);
+
+ /**
+ * @param array $sorters list of sorter IDs, seperated by "|"
+ * @param array $sortArray array representation of OCP\Collaboration\Collaborators\ISearchResult
+ * @param array $context context info of the search, keys: itemType, itemId
+ * @since 13.0.0
+ */
+ public function runSorters(array $sorters, array &$sortArray, array $context);
+}
diff --git a/lib/public/Collaboration/AutoComplete/ISorter.php b/lib/public/Collaboration/AutoComplete/ISorter.php
new file mode 100644
index 00000000000..538ca41003d
--- /dev/null
+++ b/lib/public/Collaboration/AutoComplete/ISorter.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Collaboration\AutoComplete;
+
+/**
+ * Interface ISorter
+ *
+ * Sorts the list of .e.g users for auto completion
+ *
+ * @package OCP\Collaboration\AutoComplete
+ * @since 13.0.0
+ */
+interface ISorter {
+
+ /**
+ * @return string The ID of the sorter, e.g. commenters
+ * @since 13.0.0
+ */
+ public function getId();
+
+ /**
+ * executes the sort action
+ *
+ * @param array $sortArray the array to be sorted, provided as reference
+ * @param array $context carries key 'itemType' and 'itemId' of the source object (e.g. a file)
+ * @since 13.0.0
+ */
+ public function sort(array &$sortArray, array $context);
+}
diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php
index 98d8f5bb83a..262b595acc7 100644
--- a/lib/public/IRequest.php
+++ b/lib/public/IRequest.php
@@ -69,6 +69,11 @@ interface IRequest {
const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
/**
+ * @since 13.0.0
+ */
+ const USER_AGENT_TALK_ANDROID = '/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk v.*$/';
+
+ /**
* @since 9.1.0
*/
const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
@@ -79,6 +84,11 @@ interface IRequest {
const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/';
/**
+ * @since 13.0.0
+ */
+ const USER_AGENT_TALK_IOS = '/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk v.*$/';
+
+ /**
* @param string $name
*
* @return string
diff --git a/lib/public/Mail/IAttachment.php b/lib/public/Mail/IAttachment.php
new file mode 100644
index 00000000000..32348e7a309
--- /dev/null
+++ b/lib/public/Mail/IAttachment.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Mail;
+
+/**
+ * Interface IAttachment
+ *
+ * @package OCP\Mail
+ * @since 13.0.0
+ */
+interface IAttachment {
+
+ /**
+ * @param string $filename
+ * @return $this
+ * @since 13.0.0
+ */
+ public function setFilename($filename);
+
+ /**
+ * @param string $contentType
+ * @return $this
+ * @since 13.0.0
+ */
+ public function setContentType($contentType);
+
+ /**
+ * @param string $body
+ * @return $this
+ * @since 13.0.0
+ */
+ public function setBody($body);
+
+}
diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php
index 35189c22a69..10096548256 100644
--- a/lib/public/Mail/IMailer.php
+++ b/lib/public/Mail/IMailer.php
@@ -54,6 +54,23 @@ interface IMailer {
public function createMessage();
/**
+ * @param string|null $data
+ * @param string|null $filename
+ * @param string|null $contentType
+ * @return IAttachment
+ * @since 13.0.0
+ */
+ public function createAttachment($data = null, $filename = null, $contentType = null);
+
+ /**
+ * @param string $path
+ * @param string|null $contentType
+ * @return IAttachment
+ * @since 13.0.0
+ */
+ public function createAttachmentFromPath($path, $contentType = null);
+
+ /**
* Creates a new email template object
*
* @param string $emailId
diff --git a/lib/public/Mail/IMessage.php b/lib/public/Mail/IMessage.php
index 20e4ea19c4c..e82b4ff93a9 100644
--- a/lib/public/Mail/IMessage.php
+++ b/lib/public/Mail/IMessage.php
@@ -22,12 +22,20 @@
namespace OCP\Mail;
/**
- * Class Message
+ * Interface IMessage
*
* @package OCP\Mail
* @since 13.0.0
*/
interface IMessage {
+
+ /**
+ * @param IAttachment $attachment
+ * @return $this
+ * @since 13.0.0
+ */
+ public function attach(IAttachment $attachment);
+
/**
* Set the from address of this message.
*