aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/comments/l10n/ru.js4
-rw-r--r--apps/comments/l10n/ru.json4
-rw-r--r--apps/dav/l10n/sk.js5
-rw-r--r--apps/dav/l10n/sk.json5
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php6
-rw-r--r--apps/federatedfilesharing/lib/AppInfo/Application.php3
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php14
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php12
-rw-r--r--apps/files/js/file-upload.js18
-rw-r--r--apps/files/l10n/ru.js4
-rw-r--r--apps/files/l10n/ru.json4
-rw-r--r--apps/files_external/l10n/ru.js2
-rw-r--r--apps/files_external/l10n/ru.json2
-rw-r--r--apps/files_external/lib/Service/LegacyStoragesService.php6
-rw-r--r--apps/files_sharing/l10n/ru.js2
-rw-r--r--apps/files_sharing/l10n/ru.json2
-rw-r--r--apps/files_sharing/lib/ShareBackend/File.php2
-rw-r--r--apps/files_sharing/lib/SharedMount.php8
-rw-r--r--apps/files_trashbin/lib/Trashbin.php10
-rw-r--r--apps/files_versions/lib/Storage.php9
-rw-r--r--apps/systemtags/l10n/ru.js2
-rw-r--r--apps/systemtags/l10n/ru.json2
-rw-r--r--apps/updatenotification/l10n/sk.js1
-rw-r--r--apps/updatenotification/l10n/sk.json1
-rw-r--r--apps/updatenotification/l10n/sr.js1
-rw-r--r--apps/updatenotification/l10n/sr.json1
-rw-r--r--apps/user_ldap/l10n/ru.js2
-rw-r--r--apps/user_ldap/l10n/ru.json2
-rw-r--r--apps/workflowengine/l10n/ru.js4
-rw-r--r--apps/workflowengine/l10n/ru.json4
-rw-r--r--config/config.sample.php6
-rw-r--r--core/l10n/ru.js8
-rw-r--r--core/l10n/ru.json8
-rw-r--r--core/l10n/sk.js1
-rw-r--r--core/l10n/sk.json1
-rw-r--r--core/l10n/sr.js5
-rw-r--r--core/l10n/sr.json5
-rw-r--r--cron.php4
-rw-r--r--lib/composer/composer/autoload_classmap.php8
-rw-r--r--lib/composer/composer/autoload_static.php8
-rw-r--r--lib/l10n/zh_TW.js24
-rw-r--r--lib/l10n/zh_TW.json24
-rw-r--r--lib/private/Comments/Manager.php117
-rw-r--r--lib/private/DB/ConnectionFactory.php34
-rw-r--r--lib/private/Files/ObjectStore/SwiftFactory.php2
-rw-r--r--lib/private/Files/Storage/DAV.php2
-rw-r--r--lib/private/Group/Database.php28
-rw-r--r--lib/private/Installer.php4
-rw-r--r--lib/public/Comments/ICommentsManager.php18
-rw-r--r--lib/public/Group/Backend/ABackend.php67
-rw-r--r--lib/public/Group/Backend/IAddToGroupBackend.php36
-rw-r--r--lib/public/Group/Backend/ICountUsersBackend.php36
-rw-r--r--lib/public/Group/Backend/ICreateGroupBackend.php36
-rw-r--r--lib/public/Group/Backend/IDeleteGroupBackend.php36
-rw-r--r--lib/public/Group/Backend/IGroupDetailsBackend.php36
-rw-r--r--lib/public/Group/Backend/IIsAdminBackend.php36
-rw-r--r--lib/public/Group/Backend/IRemoveFromGroupBackend.php36
-rw-r--r--settings/l10n/ru.js14
-rw-r--r--settings/l10n/ru.json14
-rw-r--r--settings/l10n/sk.js1
-rw-r--r--settings/l10n/sk.json1
-rw-r--r--tests/lib/Comments/FakeManager.php8
-rw-r--r--tests/lib/Comments/ManagerTest.php42
-rw-r--r--tests/lib/DB/ConnectionFactoryTest.php56
64 files changed, 788 insertions, 116 deletions
diff --git a/apps/comments/l10n/ru.js b/apps/comments/l10n/ru.js
index 26207ba1fe2..617f20a7904 100644
--- a/apps/comments/l10n/ru.js
+++ b/apps/comments/l10n/ru.js
@@ -4,12 +4,12 @@ OC.L10N.register(
"Comments" : "Комментарии",
"Edit comment" : "Редактировать комментарий",
"Delete comment" : "Удалить комментарий",
- "New comment …" : "Новый комментарий...",
+ "New comment …" : "Новый комментарий…",
"Post" : "Опубликовать",
"Cancel" : "Отмена",
"[Deleted user]" : "[Удалённый пользователь]",
"No comments yet, start the conversation!" : "Комментарии отсутствуют, начните обсуждение!",
- "More comments …" : "Ещё комментарии...",
+ "More comments …" : "Ещё комментарии…",
"Save" : "Сохранить",
"Allowed characters {count} of {max}" : "Допустимых символов {count} из {max}",
"Error occurred while retrieving comment with ID {id}" : "При получении комментария с ID {id} произошла ошибка",
diff --git a/apps/comments/l10n/ru.json b/apps/comments/l10n/ru.json
index ec7083fd01c..a4858bb008d 100644
--- a/apps/comments/l10n/ru.json
+++ b/apps/comments/l10n/ru.json
@@ -2,12 +2,12 @@
"Comments" : "Комментарии",
"Edit comment" : "Редактировать комментарий",
"Delete comment" : "Удалить комментарий",
- "New comment …" : "Новый комментарий...",
+ "New comment …" : "Новый комментарий…",
"Post" : "Опубликовать",
"Cancel" : "Отмена",
"[Deleted user]" : "[Удалённый пользователь]",
"No comments yet, start the conversation!" : "Комментарии отсутствуют, начните обсуждение!",
- "More comments …" : "Ещё комментарии...",
+ "More comments …" : "Ещё комментарии…",
"Save" : "Сохранить",
"Allowed characters {count} of {max}" : "Допустимых символов {count} из {max}",
"Error occurred while retrieving comment with ID {id}" : "При получении комментария с ID {id} произошла ошибка",
diff --git a/apps/dav/l10n/sk.js b/apps/dav/l10n/sk.js
index f5eae86c264..8122af1dcf0 100644
--- a/apps/dav/l10n/sk.js
+++ b/apps/dav/l10n/sk.js
@@ -41,7 +41,7 @@ OC.L10N.register(
"You reopened todo {todo} in list {calendar}" : "Otvorili ste znovu úlohu {todo} v {calendar}",
"A <strong>calendar</strong> was modified" : "<strong>kalendár</strong> bol upravený",
"A calendar <strong>event</strong> was modified" : "<strong>Udalosť</strong> v kalendári bola upravená",
- "A calendar <strong>todo</strong> was modified" : "<>",
+ "A calendar <strong>todo</strong> was modified" : "<strong>Pripomienka</strong> v kalendári bola upravená",
"Contact birthdays" : "Narodeniny kontaktu",
"Invitation canceled" : "Pozvánka bola zrušená",
"Hello %s," : "Ahoj %s,",
@@ -62,6 +62,7 @@ OC.L10N.register(
"Send invitations to attendees" : "Odoslanie pozvánok účastníkom",
"Please make sure to properly set up the email settings above." : "Uistite sa, že máte správne nastavené vyššie uvedené nastavenia e-mailu.",
"Automatically generate a birthday calendar" : "Automaticky generovať narodeninový kalendár",
- "Birthday calendars will be generated by a background job." : "Narodeninové kalendáre budú generované úlohou na pozadí."
+ "Birthday calendars will be generated by a background job." : "Narodeninové kalendáre budú generované úlohou na pozadí.",
+ "Hence they will not be available immediately after enabling but will show up after some time." : "Preto nebudú dostupné hneď po povolení, ale zobrazia sa po určitom čase"
},
"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;");
diff --git a/apps/dav/l10n/sk.json b/apps/dav/l10n/sk.json
index 9a256bad703..a30b68b0416 100644
--- a/apps/dav/l10n/sk.json
+++ b/apps/dav/l10n/sk.json
@@ -39,7 +39,7 @@
"You reopened todo {todo} in list {calendar}" : "Otvorili ste znovu úlohu {todo} v {calendar}",
"A <strong>calendar</strong> was modified" : "<strong>kalendár</strong> bol upravený",
"A calendar <strong>event</strong> was modified" : "<strong>Udalosť</strong> v kalendári bola upravená",
- "A calendar <strong>todo</strong> was modified" : "<>",
+ "A calendar <strong>todo</strong> was modified" : "<strong>Pripomienka</strong> v kalendári bola upravená",
"Contact birthdays" : "Narodeniny kontaktu",
"Invitation canceled" : "Pozvánka bola zrušená",
"Hello %s," : "Ahoj %s,",
@@ -60,6 +60,7 @@
"Send invitations to attendees" : "Odoslanie pozvánok účastníkom",
"Please make sure to properly set up the email settings above." : "Uistite sa, že máte správne nastavené vyššie uvedené nastavenia e-mailu.",
"Automatically generate a birthday calendar" : "Automaticky generovať narodeninový kalendár",
- "Birthday calendars will be generated by a background job." : "Narodeninové kalendáre budú generované úlohou na pozadí."
+ "Birthday calendars will be generated by a background job." : "Narodeninové kalendáre budú generované úlohou na pozadí.",
+ "Hence they will not be available immediately after enabling but will show up after some time." : "Preto nebudú dostupné hneď po povolení, ale zobrazia sa po určitom čase"
},"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index e577510b69e..45b31c2e11d 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -156,7 +156,7 @@ class File extends Node implements IFile {
try {
$target = $partStorage->fopen($internalPartPath, 'wb');
if ($target === false) {
- \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::fopen() failed', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('\OC\Files\Filesystem::fopen() failed', ['app' => 'webdav']);
// because we have no clue about the cause we can only throw back a 500/Internal Server Error
throw new Exception('Could not write file contents');
}
@@ -209,7 +209,7 @@ class File extends Node implements IFile {
$fileExists = $storage->file_exists($internalPath);
}
if (!$run || $renameOkay === false || $fileExists === false) {
- \OCP\Util::writeLog('webdav', 'renaming part file to final file failed ($run: ' . ( $run ? 'true' : 'false' ) . ', $renameOkay: ' . ( $renameOkay ? 'true' : 'false' ) . ', $fileExists: ' . ( $fileExists ? 'true' : 'false' ) . ')', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('renaming part file to final file failed ($run: ' . ( $run ? 'true' : 'false' ) . ', $renameOkay: ' . ( $renameOkay ? 'true' : 'false' ) . ', $fileExists: ' . ( $fileExists ? 'true' : 'false' ) . ')', ['app' => 'webdav']);
throw new Exception('Could not rename part file to final file');
}
} catch (ForbiddenException $ex) {
@@ -474,7 +474,7 @@ class File extends Node implements IFile {
$renameOkay = $targetStorage->moveFromStorage($partStorage, $partInternalPath, $targetInternalPath);
$fileExists = $targetStorage->file_exists($targetInternalPath);
if ($renameOkay === false || $fileExists === false) {
- \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::rename() failed', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('\OC\Files\Filesystem::rename() failed', ['app' => 'webdav']);
// only delete if an error occurred and the target file was already created
if ($fileExists) {
// set to null to avoid double-deletion when handling exception
diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php
index ba0126c3fa3..2c863de21c6 100644
--- a/apps/federatedfilesharing/lib/AppInfo/Application.php
+++ b/apps/federatedfilesharing/lib/AppInfo/Application.php
@@ -67,7 +67,8 @@ class Application extends App {
$notification,
$addressHandler,
$server->getUserManager(),
- $server->getCloudIdManager()
+ $server->getCloudIdManager(),
+ $server->getLogger()
);
});
}
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index 90346546a23..caf9e329abd 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -43,6 +43,7 @@ use OCP\Constants;
use OCP\Federation\ICloudIdManager;
use OCP\Files\NotFoundException;
use OCP\IDBConnection;
+use OCP\ILogger;
use OCP\IRequest;
use OCP\IUserManager;
use OCP\Share;
@@ -74,6 +75,9 @@ class RequestHandlerController extends OCSController {
/** @var ICloudIdManager */
private $cloudIdManager;
+ /** @var ILogger */
+ private $logger;
+
/**
* Server2Server constructor.
*
@@ -95,7 +99,8 @@ class RequestHandlerController extends OCSController {
Notifications $notifications,
AddressHandler $addressHandler,
IUserManager $userManager,
- ICloudIdManager $cloudIdManager
+ ICloudIdManager $cloudIdManager,
+ ILogger $logger
) {
parent::__construct($appName, $request);
@@ -106,6 +111,7 @@ class RequestHandlerController extends OCSController {
$this->addressHandler = $addressHandler;
$this->userManager = $userManager;
$this->cloudIdManager = $cloudIdManager;
+ $this->logger = $logger;
}
/**
@@ -140,13 +146,13 @@ class RequestHandlerController extends OCSController {
}
// FIXME this should be a method in the user management instead
- \OCP\Util::writeLog('files_sharing', 'shareWith before, ' . $shareWith, \OCP\Util::DEBUG);
+ $this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']);
\OCP\Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
array('uid' => &$shareWith)
);
- \OCP\Util::writeLog('files_sharing', 'shareWith after, ' . $shareWith, \OCP\Util::DEBUG);
+ $this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
if (!\OC::$server->getUserManager()->userExists($shareWith)) {
throw new OCSException('User does not exists', 400);
@@ -209,7 +215,7 @@ class RequestHandlerController extends OCSController {
return new Http\DataResponse();
} catch (\Exception $e) {
- \OC::$server->getLogger()->logException($e, [
+ $this->logger->logException($e, [
'message' => 'Server can not add remote share.',
'level' => \OCP\Util::ERROR,
'app' => 'files_sharing'
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index d76f93751a4..cb535f33c60 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -38,6 +38,7 @@ use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IConfig;
+use OCP\ILogger;
use OCP\IUserManager;
use OCP\Share\IShare;
@@ -79,6 +80,9 @@ class RequestHandlerControllerTest extends TestCase {
/** @var ICloudIdManager */
private $cloudIdManager;
+ /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ private $logger;
+
protected function setUp() {
parent::setUp();
@@ -103,6 +107,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->cloudIdManager = new CloudIdManager();
+ $this->logger = $this->createMock(ILogger::class);
+
$this->s2s = new RequestHandlerController(
'federatedfilesharing',
\OC::$server->getRequest(),
@@ -112,7 +118,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->notifications,
$this->addressHandler,
$this->userManager,
- $this->cloudIdManager
+ $this->cloudIdManager,
+ $this->logger
);
$this->connection = \OC::$server->getDatabaseConnection();
@@ -177,7 +184,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->notifications,
$this->addressHandler,
$this->userManager,
- $this->cloudIdManager
+ $this->cloudIdManager,
+ $this->logger,
]
)->setMethods(['executeDeclineShare', 'verifyShare'])->getMock();
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 6bee3c3bdc2..824f6a1fd56 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -576,7 +576,6 @@ OC.Uploader.prototype = _.extend({
* Clear uploads
*/
clear: function() {
- this._uploads = {};
this._knownDirs = {};
},
/**
@@ -595,6 +594,19 @@ OC.Uploader.prototype = _.extend({
return null;
},
+ /**
+ * Removes an upload from the list of known uploads.
+ *
+ * @param {OC.FileUpload} upload the upload to remove.
+ */
+ removeUpload: function(upload) {
+ if (!upload || !upload.data || !upload.data.uploadId) {
+ return;
+ }
+
+ delete this._uploads[upload.data.uploadId];
+ },
+
showUploadCancelMessage: _.debounce(function() {
OC.Notification.show(t('files', 'Upload cancelled.'), {timeout : 7, type: 'error'});
}, 500),
@@ -959,6 +971,8 @@ OC.Uploader.prototype = _.extend({
}
self.log('fail', e, upload);
+ self.removeUpload(upload);
+
if (data.textStatus === 'abort') {
self.showUploadCancelMessage();
} else if (status === 412) {
@@ -996,6 +1010,8 @@ OC.Uploader.prototype = _.extend({
var that = $(this);
self.log('done', e, upload);
+ self.removeUpload(upload);
+
var status = upload.getResponseStatus();
if (status < 200 || status >= 300) {
// trigger fail handler
diff --git a/apps/files/l10n/ru.js b/apps/files/l10n/ru.js
index a3a5900c461..7ca316d019f 100644
--- a/apps/files/l10n/ru.js
+++ b/apps/files/l10n/ru.js
@@ -16,8 +16,8 @@ OC.L10N.register(
"Not enough free space, you are uploading {size1} but only {size2} is left" : "Недостаточно свободного места, вы загружаете {size1}, но только {size2} доступно",
"Target folder \"{dir}\" does not exist any more" : "Целевой каталог «{dir}» более не существует",
"Not enough free space" : "Недостаточно свободного места",
- "Uploading …" : "Загрузка...",
- "…" : "...",
+ "Uploading …" : "Загрузка…",
+ "…" : "…",
"{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} из {totalSize} ({bitrate})",
"Target folder does not exist any more" : "Каталог больше не существует",
"Error when assembling chunks, status code {status}" : "Ошибка при сборке чанков, код ошибки {status}",
diff --git a/apps/files/l10n/ru.json b/apps/files/l10n/ru.json
index 9da1a3c121a..6d68758d928 100644
--- a/apps/files/l10n/ru.json
+++ b/apps/files/l10n/ru.json
@@ -14,8 +14,8 @@
"Not enough free space, you are uploading {size1} but only {size2} is left" : "Недостаточно свободного места, вы загружаете {size1}, но только {size2} доступно",
"Target folder \"{dir}\" does not exist any more" : "Целевой каталог «{dir}» более не существует",
"Not enough free space" : "Недостаточно свободного места",
- "Uploading …" : "Загрузка...",
- "…" : "...",
+ "Uploading …" : "Загрузка…",
+ "…" : "…",
"{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} из {totalSize} ({bitrate})",
"Target folder does not exist any more" : "Каталог больше не существует",
"Error when assembling chunks, status code {status}" : "Ошибка при сборке чанков, код ошибки {status}",
diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js
index 57f9ce60306..39e02bdabde 100644
--- a/apps/files_external/l10n/ru.js
+++ b/apps/files_external/l10n/ru.js
@@ -17,7 +17,7 @@ OC.L10N.register(
"Are you sure you want to delete this external storage?" : "Действительно удалить это внешнее хранилище?",
"Delete storage?" : "Удалить хранилище?",
"Saved" : "Сохранено",
- "Saving..." : "Сохранение...",
+ "Saving..." : "Сохранение…",
"Save" : "Сохранить",
"Empty response from the server" : "Получен пустой ответ сервера",
"Couldn't access. Please log out and in again to activate this mount point" : "Не удалось получить доступ. Для активации этой точки подключения выйдите и снова войдите в систему",
diff --git a/apps/files_external/l10n/ru.json b/apps/files_external/l10n/ru.json
index 3897c16dd26..387b9087209 100644
--- a/apps/files_external/l10n/ru.json
+++ b/apps/files_external/l10n/ru.json
@@ -15,7 +15,7 @@
"Are you sure you want to delete this external storage?" : "Действительно удалить это внешнее хранилище?",
"Delete storage?" : "Удалить хранилище?",
"Saved" : "Сохранено",
- "Saving..." : "Сохранение...",
+ "Saving..." : "Сохранение…",
"Save" : "Сохранить",
"Empty response from the server" : "Получен пустой ответ сервера",
"Couldn't access. Please log out and in again to activate this mount point" : "Не удалось получить доступ. Для активации этой точки подключения выйдите и снова войдите в систему",
diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php
index 65880514911..f1bd0b753ae 100644
--- a/apps/files_external/lib/Service/LegacyStoragesService.php
+++ b/apps/files_external/lib/Service/LegacyStoragesService.php
@@ -140,11 +140,7 @@ abstract class LegacyStoragesService {
$parts = explode('/', ltrim($rootMountPath, '/'), 3);
if (count($parts) < 3) {
// something went wrong, skip
- \OCP\Util::writeLog(
- 'files_external',
- 'Could not parse mount point "' . $rootMountPath . '"',
- \OCP\Util::ERROR
- );
+ \OC::$server->getLogger()->error('Could not parse mount point "' . $rootMountPath . '"', ['app' => 'files_external']);
continue;
}
$relativeMountPath = rtrim($parts[2], '/');
diff --git a/apps/files_sharing/l10n/ru.js b/apps/files_sharing/l10n/ru.js
index c70a83767ec..833d3278f9a 100644
--- a/apps/files_sharing/l10n/ru.js
+++ b/apps/files_sharing/l10n/ru.js
@@ -109,7 +109,7 @@ OC.L10N.register(
"Download %s" : "Скачать %s",
"Upload files to %s" : "Загрузка файлов пользователю %s",
"Select or drop files" : "Выберите или перетащите файлы",
- "Uploading files…" : "Файлы передаются на сервер...",
+ "Uploading files…" : "Файлы передаются на сервер…",
"Uploaded files:" : "Отправленные файлы:",
"%s is publicly shared" : "«%s» опубликован "
},
diff --git a/apps/files_sharing/l10n/ru.json b/apps/files_sharing/l10n/ru.json
index ddff78134fe..caeec95a05d 100644
--- a/apps/files_sharing/l10n/ru.json
+++ b/apps/files_sharing/l10n/ru.json
@@ -107,7 +107,7 @@
"Download %s" : "Скачать %s",
"Upload files to %s" : "Загрузка файлов пользователю %s",
"Select or drop files" : "Выберите или перетащите файлы",
- "Uploading files…" : "Файлы передаются на сервер...",
+ "Uploading files…" : "Файлы передаются на сервер…",
"Uploaded files:" : "Отправленные файлы:",
"%s is publicly shared" : "«%s» опубликован "
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
diff --git a/apps/files_sharing/lib/ShareBackend/File.php b/apps/files_sharing/lib/ShareBackend/File.php
index dc1018f88a5..bb28c1a33ac 100644
--- a/apps/files_sharing/lib/ShareBackend/File.php
+++ b/apps/files_sharing/lib/ShareBackend/File.php
@@ -229,7 +229,7 @@ class File implements \OCP\Share_Backend_File_Dependent {
if (isset($fileOwner)) {
$source['fileOwner'] = $fileOwner;
} else {
- \OCP\Util::writeLog('files_sharing', "No owner found for reshare", \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('No owner found for reshare', ['app' => 'files_sharing']);
}
return $source;
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index d90673421cd..1f5b7eaa13e 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -167,9 +167,7 @@ class SharedMount extends MountPoint implements MoveableMount {
// it is not a file relative to data/user/files
if (count($split) < 3 || $split[1] !== 'files') {
- \OCP\Util::writeLog('file sharing',
- 'Can not strip userid and "files/" from path: ' . $path,
- \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('Can not strip userid and "files/" from path: ' . $path, ['app' => 'files_sharing']);
throw new \OCA\Files_Sharing\Exceptions\BrokenPath('Path does not start with /user/files', 10);
}
@@ -198,9 +196,7 @@ class SharedMount extends MountPoint implements MoveableMount {
$this->setMountPoint($target);
$this->storage->setMountPoint($relTargetPath);
} catch (\Exception $e) {
- \OCP\Util::writeLog('file sharing',
- 'Could not rename mount point for shared folder "' . $this->getMountPoint() . '" to "' . $target . '"',
- \OCP\Util::ERROR);
+ \OC::$server->getLogger()->logException($e, ['app' => 'files_sharing', 'message' => 'Could not rename mount point for shared folder "' . $this->getMountPoint() . '" to "' . $target . '"']);
}
return $result;
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index 3c32e6446ca..bf396d40abf 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -195,7 +195,7 @@ class Trashbin {
$query = \OC_DB::prepare("INSERT INTO `*PREFIX*files_trash` (`id`,`timestamp`,`location`,`user`) VALUES (?,?,?,?)");
$result = $query->execute(array($targetFilename, $timestamp, $targetLocation, $user));
if (!$result) {
- \OCP\Util::writeLog('files_trashbin', 'trash bin database couldn\'t be updated for the files owner', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('trash bin database couldn\'t be updated for the files owner', ['app' => 'files_trashbin']);
}
}
}
@@ -257,7 +257,7 @@ class Trashbin {
if ($trashStorage->file_exists($trashInternalPath)) {
$trashStorage->unlink($trashInternalPath);
}
- \OCP\Util::writeLog('files_trashbin', 'Couldn\'t move ' . $file_path . ' to the trash bin', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('Couldn\'t move ' . $file_path . ' to the trash bin', ['app' => 'files_trashbin']);
}
if ($sourceStorage->file_exists($sourceInternalPath)) { // failed to delete the original file, abort
@@ -275,7 +275,7 @@ class Trashbin {
$query = \OC_DB::prepare("INSERT INTO `*PREFIX*files_trash` (`id`,`timestamp`,`location`,`user`) VALUES (?,?,?,?)");
$result = $query->execute(array($filename, $timestamp, $location, $owner));
if (!$result) {
- \OCP\Util::writeLog('files_trashbin', 'trash bin database couldn\'t be updated', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('trash bin database couldn\'t be updated', ['app' => 'files_trashbin']);
}
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_moveToTrash', array('filePath' => Filesystem::normalizePath($file_path),
'trashPath' => Filesystem::normalizePath($filename . '.d' . $timestamp)));
@@ -391,7 +391,7 @@ class Trashbin {
if ($timestamp) {
$location = self::getLocation($user, $filename, $timestamp);
if ($location === false) {
- \OCP\Util::writeLog('files_trashbin', 'trash bin database inconsistent! ($user: ' . $user . ' $filename: ' . $filename . ', $timestamp: ' . $timestamp . ')', \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('trash bin database inconsistent! ($user: ' . $user . ' $filename: ' . $filename . ', $timestamp: ' . $timestamp . ')', ['app' => 'files_trashbin']);
} else {
// if location no longer exists, restore file in the root directory
if ($location !== '/' &&
@@ -763,7 +763,7 @@ class Trashbin {
foreach ($files as $file) {
if ($availableSpace < 0 && $expiration->isExpired($file['mtime'], true)) {
$tmp = self::delete($file['name'], $user, $file['mtime']);
- \OCP\Util::writeLog('files_trashbin', 'remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota)', \OCP\Util::INFO);
+ \OC::$server->getLogger()->info('remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota)', ['app' => 'files_trashbin']);
$availableSpace += $tmp;
$size += $tmp;
} else {
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index f8a6636839a..52afdfdaa5a 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -658,7 +658,7 @@ class Storage {
//distance between two version too small, mark to delete
$toDelete[$key] = $version['path'] . '.v' . $version['version'];
$size += $version['size'];
- \OCP\Util::writeLog('files_versions', 'Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, \OCP\Util::INFO);
+ \OC::$server->getLogger()->info('Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, ['app' => 'files_versions']);
} else {
$nextVersion = $version['version'] - $step;
$prevTimestamp = $version['version'];
@@ -713,7 +713,7 @@ class Storage {
// get available disk space for user
$user = \OC::$server->getUserManager()->get($uid);
if (is_null($user)) {
- \OCP\Util::writeLog('files_versions', 'Backends provided no user object for ' . $uid, \OCP\Util::ERROR);
+ \OC::$server->getLogger()->error('Backends provided no user object for ' . $uid, ['app' => 'files_versions']);
throw new \OC\User\NoUserException('Backends provided no user object for ' . $uid);
}
@@ -782,12 +782,13 @@ class Storage {
$versionsSize = $versionsSize - $sizeOfDeletedVersions;
}
+ $logger = \OC::$server->getLogger();
foreach($toDelete as $key => $path) {
\OC_Hook::emit('\OCP\Versions', 'preDelete', array('path' => $path, 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
self::deleteVersion($versionsFileview, $path);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $path, 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
unset($allVersions[$key]); // update array with the versions we keep
- \OCP\Util::writeLog('files_versions', "Expire: " . $path, \OCP\Util::INFO);
+ $logger->info('Expire: ' . $path, ['app' => 'files_versions']);
}
// Check if enough space is available after versions are rearranged.
@@ -803,7 +804,7 @@ class Storage {
\OC_Hook::emit('\OCP\Versions', 'preDelete', array('path' => $version['path'].'.v'.$version['version'], 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
self::deleteVersion($versionsFileview, $version['path'] . '.v' . $version['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'].'.v'.$version['version'], 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
- \OCP\Util::writeLog('files_versions', 'running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'] , \OCP\Util::INFO);
+ \OC::$server->getLogger()->info('running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'], ['app' => 'files_versions']);
$versionsSize -= $version['size'];
$availableSpace += $version['size'];
next($allVersions);
diff --git a/apps/systemtags/l10n/ru.js b/apps/systemtags/l10n/ru.js
index e5c113e4b60..ced7dff857a 100644
--- a/apps/systemtags/l10n/ru.js
+++ b/apps/systemtags/l10n/ru.js
@@ -4,7 +4,7 @@ OC.L10N.register(
"Tags" : "Метки",
"Update" : "Обновить",
"Create" : "Создать",
- "Select tag…" : "Выберите метку...",
+ "Select tag…" : "Выберите метку…",
"Tagged files" : "Помеченные файлы",
"Select tags to filter by" : "Выберите метки для отбора",
"No tags found" : "Меток не найдено",
diff --git a/apps/systemtags/l10n/ru.json b/apps/systemtags/l10n/ru.json
index 30d0458b63d..070e505fd58 100644
--- a/apps/systemtags/l10n/ru.json
+++ b/apps/systemtags/l10n/ru.json
@@ -2,7 +2,7 @@
"Tags" : "Метки",
"Update" : "Обновить",
"Create" : "Создать",
- "Select tag…" : "Выберите метку...",
+ "Select tag…" : "Выберите метку…",
"Tagged files" : "Помеченные файлы",
"Select tags to filter by" : "Выберите метки для отбора",
"No tags found" : "Меток не найдено",
diff --git a/apps/updatenotification/l10n/sk.js b/apps/updatenotification/l10n/sk.js
index 7777f9de63e..b6e93e41e01 100644
--- a/apps/updatenotification/l10n/sk.js
+++ b/apps/updatenotification/l10n/sk.js
@@ -22,6 +22,7 @@ OC.L10N.register(
"Update for {app} to version %s is available." : "Pre {app} je dostupná aktualizácia na verziu %s.",
"Update notification" : "Aktualizovať hlásenie",
"A new version is available: %s" : "Je dostupná nová verzia: %s",
+ "The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible." : "Verzia, ktorú používate už nie je podporovaná. Čím skôr aktualizujte na podporovanú verziu prosím.",
"Download now" : "Stiahnuť teraz",
"Checked on %s" : "Skontrolované %s",
"The selected update channel makes dedicated notifications for the server obsolete." : "Pre vybraný aktualizačný kanál budú priradené upozornenia pre server zastarané.",
diff --git a/apps/updatenotification/l10n/sk.json b/apps/updatenotification/l10n/sk.json
index 3561bb4db4e..b3537282c72 100644
--- a/apps/updatenotification/l10n/sk.json
+++ b/apps/updatenotification/l10n/sk.json
@@ -20,6 +20,7 @@
"Update for {app} to version %s is available." : "Pre {app} je dostupná aktualizácia na verziu %s.",
"Update notification" : "Aktualizovať hlásenie",
"A new version is available: %s" : "Je dostupná nová verzia: %s",
+ "The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible." : "Verzia, ktorú používate už nie je podporovaná. Čím skôr aktualizujte na podporovanú verziu prosím.",
"Download now" : "Stiahnuť teraz",
"Checked on %s" : "Skontrolované %s",
"The selected update channel makes dedicated notifications for the server obsolete." : "Pre vybraný aktualizačný kanál budú priradené upozornenia pre server zastarané.",
diff --git a/apps/updatenotification/l10n/sr.js b/apps/updatenotification/l10n/sr.js
index b7f99f9bbcf..63e516a1875 100644
--- a/apps/updatenotification/l10n/sr.js
+++ b/apps/updatenotification/l10n/sr.js
@@ -32,6 +32,7 @@ OC.L10N.register(
"Update for {app} to version %s is available." : "Доступно је ажурирање апликације {app} на верзију %s.",
"Update notification" : "Обавештење о ажурирању",
"A new version is available: %s" : "Доступна је нова верзија: %s",
+ "The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible." : "Верзија коју тренутно користите се више не одржава. Постарајте се да ажурирате инсталацију на неку подржану верзију што је пре могуће.",
"Download now" : "Скини сада",
"Checked on %s" : "Проверено %s",
"The selected update channel makes dedicated notifications for the server obsolete." : "Уз означени канал за ажурирање нема смисла да имате обавештења о новим верзијама.",
diff --git a/apps/updatenotification/l10n/sr.json b/apps/updatenotification/l10n/sr.json
index 2c98a97ac14..514e35a04dd 100644
--- a/apps/updatenotification/l10n/sr.json
+++ b/apps/updatenotification/l10n/sr.json
@@ -30,6 +30,7 @@
"Update for {app} to version %s is available." : "Доступно је ажурирање апликације {app} на верзију %s.",
"Update notification" : "Обавештење о ажурирању",
"A new version is available: %s" : "Доступна је нова верзија: %s",
+ "The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible." : "Верзија коју тренутно користите се више не одржава. Постарајте се да ажурирате инсталацију на неку подржану верзију што је пре могуће.",
"Download now" : "Скини сада",
"Checked on %s" : "Проверено %s",
"The selected update channel makes dedicated notifications for the server obsolete." : "Уз означени канал за ажурирање нема смисла да имате обавештења о новим верзијама.",
diff --git a/apps/user_ldap/l10n/ru.js b/apps/user_ldap/l10n/ru.js
index 4402b312e20..ab53635b252 100644
--- a/apps/user_ldap/l10n/ru.js
+++ b/apps/user_ldap/l10n/ru.js
@@ -20,7 +20,7 @@ OC.L10N.register(
"Good password" : "Хороший пароль",
"Strong password" : "Надёжный пароль",
"The Base DN appears to be wrong" : "База поиска DN по всей видимости указана неправильно",
- "Testing configuration…" : "Проверка конфигурации...",
+ "Testing configuration…" : "Проверка конфигурации…",
"Configuration incorrect" : "Конфигурация некорректна",
"Configuration incomplete" : "Конфигурация не завершена",
"Configuration OK" : "Конфигурация в порядке",
diff --git a/apps/user_ldap/l10n/ru.json b/apps/user_ldap/l10n/ru.json
index 540740b67ef..5e09a313eac 100644
--- a/apps/user_ldap/l10n/ru.json
+++ b/apps/user_ldap/l10n/ru.json
@@ -18,7 +18,7 @@
"Good password" : "Хороший пароль",
"Strong password" : "Надёжный пароль",
"The Base DN appears to be wrong" : "База поиска DN по всей видимости указана неправильно",
- "Testing configuration…" : "Проверка конфигурации...",
+ "Testing configuration…" : "Проверка конфигурации…",
"Configuration incorrect" : "Конфигурация некорректна",
"Configuration incomplete" : "Конфигурация не завершена",
"Configuration OK" : "Конфигурация в порядке",
diff --git a/apps/workflowengine/l10n/ru.js b/apps/workflowengine/l10n/ru.js
index 1f96ea8763e..9c5010ff0f0 100644
--- a/apps/workflowengine/l10n/ru.js
+++ b/apps/workflowengine/l10n/ru.js
@@ -67,7 +67,7 @@ OC.L10N.register(
"Add rule" : "Добавить правило",
"Reset" : "Сбросить",
"Save" : "Сохранить",
- "Saving…" : "Сохранение...",
- "Loading…" : "Загрузка..."
+ "Saving…" : "Сохранение…",
+ "Loading…" : "Загрузка…"
},
"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
diff --git a/apps/workflowengine/l10n/ru.json b/apps/workflowengine/l10n/ru.json
index 17602ac7c0a..6764fda9843 100644
--- a/apps/workflowengine/l10n/ru.json
+++ b/apps/workflowengine/l10n/ru.json
@@ -65,7 +65,7 @@
"Add rule" : "Добавить правило",
"Reset" : "Сбросить",
"Save" : "Сохранить",
- "Saving…" : "Сохранение...",
- "Loading…" : "Загрузка..."
+ "Saving…" : "Сохранение…",
+ "Loading…" : "Загрузка…"
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
} \ No newline at end of file
diff --git a/config/config.sample.php b/config/config.sample.php
index b0ed2e7aa67..c9b9c9a1ede 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -639,12 +639,6 @@ $CONFIG = array(
'has_internet_connection' => true,
/**
- * Allows Nextcloud to verify a working WebDAV connection. This is done by
- * attempting to make a WebDAV request from PHP.
- */
-'check_for_working_webdav' => true,
-
-/**
* Allows Nextcloud to verify a working .well-known URL redirects. This is done
* by attempting to make a request from JS to
* https://your-domain.com/.well-known/caldav/
diff --git a/core/l10n/ru.js b/core/l10n/ru.js
index 148147dee02..b17dbf8d8f5 100644
--- a/core/l10n/ru.js
+++ b/core/l10n/ru.js
@@ -59,13 +59,13 @@ OC.L10N.register(
"Could not load your contacts" : "Ошибка получения контактов",
"Loading your contacts …" : "Загрузка контактов…",
"Looking for {term} …" : "Поиск {term}…",
- "<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\"> Были обнаружены проблемы с проверкой целостности кода. Подробнее ...",
+ "<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\"> Были обнаружены проблемы с проверкой целостности кода. Подробнее…",
"No action available" : "Нет доступных действий",
"Error fetching contact actions" : "Ошибка получения действий контакта",
"Settings" : "Настройки",
"Connection to server lost" : "Подключение к серверу потеряно",
"_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Возникла проблема при загрузке страницы, повторная попытка через %n секунду","Возникла проблема при загрузке страницы, повторная попытка через %n секунды","Возникла проблема при загрузке страницы, повторная попытка через %n секунд","Возникла проблема при загрузке страницы, повторная попытка через %n секунд"],
- "Saving..." : "Сохранение...",
+ "Saving..." : "Сохранение…",
"Dismiss" : "Закрыть",
"This action requires you to confirm your password" : "Это действие требует подтверждения вашего пароля",
"Authentication required" : "Требуется аутентификация ",
@@ -80,7 +80,7 @@ OC.L10N.register(
"I know what I'm doing" : "Я понимаю, что делаю",
"Password can not be changed. Please contact your administrator." : "Пароль не может быть изменён. Свяжитесь с вашим системным администратором.",
"Reset password" : "Сбросить пароль",
- "Sending email …" : "Отправка почты...",
+ "Sending email …" : "Отправка почты…",
"No" : "Нет",
"Yes" : "Да",
"No files in here" : "Здесь нет файлов",
@@ -259,7 +259,7 @@ OC.L10N.register(
"For larger installations we recommend to choose a different database backend." : "Для крупных проектов мы советуем выбрать другой тип базы данных.",
"Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "В частности не рекомендуется использовать SQLite при синхронизации файлов с использованием клиента для ПК.",
"Finish setup" : "Завершить установку",
- "Finishing …" : "Завершение...",
+ "Finishing …" : "Завершение…",
"Need help?" : "Требуется помощь?",
"See the documentation" : "Посмотреть документацию",
"This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page." : "Для корректной работы приложения требуется JavaScript. Пожалуйста, {linkstart}включите JavaScript{linkend} и обновите страницу.",
diff --git a/core/l10n/ru.json b/core/l10n/ru.json
index ba32cc3f69c..31e2abb701e 100644
--- a/core/l10n/ru.json
+++ b/core/l10n/ru.json
@@ -57,13 +57,13 @@
"Could not load your contacts" : "Ошибка получения контактов",
"Loading your contacts …" : "Загрузка контактов…",
"Looking for {term} …" : "Поиск {term}…",
- "<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\"> Были обнаружены проблемы с проверкой целостности кода. Подробнее ...",
+ "<a href=\"{docUrl}\">There were problems with the code integrity check. More information…</a>" : "<a href=\"{docUrl}\"> Были обнаружены проблемы с проверкой целостности кода. Подробнее…",
"No action available" : "Нет доступных действий",
"Error fetching contact actions" : "Ошибка получения действий контакта",
"Settings" : "Настройки",
"Connection to server lost" : "Подключение к серверу потеряно",
"_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Возникла проблема при загрузке страницы, повторная попытка через %n секунду","Возникла проблема при загрузке страницы, повторная попытка через %n секунды","Возникла проблема при загрузке страницы, повторная попытка через %n секунд","Возникла проблема при загрузке страницы, повторная попытка через %n секунд"],
- "Saving..." : "Сохранение...",
+ "Saving..." : "Сохранение…",
"Dismiss" : "Закрыть",
"This action requires you to confirm your password" : "Это действие требует подтверждения вашего пароля",
"Authentication required" : "Требуется аутентификация ",
@@ -78,7 +78,7 @@
"I know what I'm doing" : "Я понимаю, что делаю",
"Password can not be changed. Please contact your administrator." : "Пароль не может быть изменён. Свяжитесь с вашим системным администратором.",
"Reset password" : "Сбросить пароль",
- "Sending email …" : "Отправка почты...",
+ "Sending email …" : "Отправка почты…",
"No" : "Нет",
"Yes" : "Да",
"No files in here" : "Здесь нет файлов",
@@ -257,7 +257,7 @@
"For larger installations we recommend to choose a different database backend." : "Для крупных проектов мы советуем выбрать другой тип базы данных.",
"Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "В частности не рекомендуется использовать SQLite при синхронизации файлов с использованием клиента для ПК.",
"Finish setup" : "Завершить установку",
- "Finishing …" : "Завершение...",
+ "Finishing …" : "Завершение…",
"Need help?" : "Требуется помощь?",
"See the documentation" : "Посмотреть документацию",
"This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page." : "Для корректной работы приложения требуется JavaScript. Пожалуйста, {linkstart}включите JavaScript{linkend} и обновите страницу.",
diff --git a/core/l10n/sk.js b/core/l10n/sk.js
index ed27e9fe899..c0df39679b4 100644
--- a/core/l10n/sk.js
+++ b/core/l10n/sk.js
@@ -266,6 +266,7 @@ OC.L10N.register(
"More apps" : "Viac aplikácií",
"Search" : "Hľadať",
"Reset search" : "Vynuluj vyhľadávanie",
+ "Contacts" : "Kontakty",
"Confirm your password" : "Potvrďte svoje heslo",
"Server side authentication failed!" : "Autentifikácia na serveri zlyhala!",
"Please contact your administrator." : "Kontaktujte prosím vášho administrátora.",
diff --git a/core/l10n/sk.json b/core/l10n/sk.json
index 8df69fcf5e0..19499de9380 100644
--- a/core/l10n/sk.json
+++ b/core/l10n/sk.json
@@ -264,6 +264,7 @@
"More apps" : "Viac aplikácií",
"Search" : "Hľadať",
"Reset search" : "Vynuluj vyhľadávanie",
+ "Contacts" : "Kontakty",
"Confirm your password" : "Potvrďte svoje heslo",
"Server side authentication failed!" : "Autentifikácia na serveri zlyhala!",
"Please contact your administrator." : "Kontaktujte prosím vášho administrátora.",
diff --git a/core/l10n/sr.js b/core/l10n/sr.js
index 25f9c95f66b..b636dfc6ee7 100644
--- a/core/l10n/sr.js
+++ b/core/l10n/sr.js
@@ -264,8 +264,12 @@ OC.L10N.register(
"See the documentation" : "Погледајте документацију",
"This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page." : "Ова апликација захтева Јава скрипт за исправан рад. {linkstart}Омогућите Јава скрипт{linkend} и поново учитајте страницу.",
"More apps" : "Још апликација",
+ "More apps menu" : "Мени још апликација",
"Search" : "Претражи",
"Reset search" : "Ресетуј претрагу",
+ "Contacts" : "Контакти",
+ "Contacts menu" : "Мени контаката",
+ "Settings menu" : "Мени подешавања",
"Confirm your password" : "Потврдите лозинку",
"Server side authentication failed!" : "Потврда идентитета на серверу није успела!",
"Please contact your administrator." : "Контактирајте вашег администратора.",
@@ -294,6 +298,7 @@ OC.L10N.register(
"Error while validating your second factor" : "Грешка при провери Вашег другог фактора",
"Access through untrusted domain" : "Приступ кроз небезбедни домен",
"Please contact your administrator. If you are an administrator, edit the \"trusted_domains\" setting in config/config.php like the example in config.sample.php." : "Контактирајте Вашег администратора. Ако сте Ви администратор, измените \"trusted_domains\" подешавање у config/config.php као у примеру config.sample.php.",
+ "Further information how to configure this can be found in the %sdocumentation%s." : "Више информација о томе како ово подесити можете да нађете у %s документацији%s.",
"App update required" : "Потребно ажурирање апликације",
"%s will be updated to version %s" : "%s ће бити ажурирана на верзију %s",
"These apps will be updated:" : "Следеће апликације ће бити ажуриране:",
diff --git a/core/l10n/sr.json b/core/l10n/sr.json
index fbbc228d9ac..6c8e2231066 100644
--- a/core/l10n/sr.json
+++ b/core/l10n/sr.json
@@ -262,8 +262,12 @@
"See the documentation" : "Погледајте документацију",
"This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page." : "Ова апликација захтева Јава скрипт за исправан рад. {linkstart}Омогућите Јава скрипт{linkend} и поново учитајте страницу.",
"More apps" : "Још апликација",
+ "More apps menu" : "Мени још апликација",
"Search" : "Претражи",
"Reset search" : "Ресетуј претрагу",
+ "Contacts" : "Контакти",
+ "Contacts menu" : "Мени контаката",
+ "Settings menu" : "Мени подешавања",
"Confirm your password" : "Потврдите лозинку",
"Server side authentication failed!" : "Потврда идентитета на серверу није успела!",
"Please contact your administrator." : "Контактирајте вашег администратора.",
@@ -292,6 +296,7 @@
"Error while validating your second factor" : "Грешка при провери Вашег другог фактора",
"Access through untrusted domain" : "Приступ кроз небезбедни домен",
"Please contact your administrator. If you are an administrator, edit the \"trusted_domains\" setting in config/config.php like the example in config.sample.php." : "Контактирајте Вашег администратора. Ако сте Ви администратор, измените \"trusted_domains\" подешавање у config/config.php као у примеру config.sample.php.",
+ "Further information how to configure this can be found in the %sdocumentation%s." : "Више информација о томе како ово подесити можете да нађете у %s документацији%s.",
"App update required" : "Потребно ажурирање апликације",
"%s will be updated to version %s" : "%s ће бити ажурирана на верзију %s",
"These apps will be updated:" : "Следеће апликације ће бити ажуриране:",
diff --git a/cron.php b/cron.php
index b566f7ea340..aaa4419c1ce 100644
--- a/cron.php
+++ b/cron.php
@@ -41,11 +41,11 @@ try {
require_once __DIR__ . '/lib/base.php';
if (\OCP\Util::needUpgrade()) {
- \OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG);
+ \OC::$server->getLogger()->debug('Update required, skipping cron', ['app' => 'cron']);
exit;
}
if (\OC::$server->getSystemConfig()->getValue('maintenance', false)) {
- \OCP\Util::writeLog('cron', 'We are in maintenance mode, skipping cron', \OCP\Util::DEBUG);
+ \OC::$server->getLogger()->debug('We are in maintenance mode, skipping cron', ['app' => 'cron']);
exit;
}
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index c24b1832ec6..19cb583cc93 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -185,6 +185,14 @@ return array(
'OCP\\Files\\UnseekableException' => $baseDir . '/lib/public/Files/UnseekableException.php',
'OCP\\GlobalScale\\IConfig' => $baseDir . '/lib/public/GlobalScale/IConfig.php',
'OCP\\GroupInterface' => $baseDir . '/lib/public/GroupInterface.php',
+ 'OCP\\Group\\Backend\\ABackend' => $baseDir . '/lib/public/Group/Backend/ABackend.php',
+ 'OCP\\Group\\Backend\\IAddToGroupBackend' => $baseDir . '/lib/public/Group/Backend/IAddToGroupBackend.php',
+ 'OCP\\Group\\Backend\\ICountUsersBackend' => $baseDir . '/lib/public/Group/Backend/ICountUsersBackend.php',
+ 'OCP\\Group\\Backend\\ICreateGroupBackend' => $baseDir . '/lib/public/Group/Backend/ICreateGroupBackend.php',
+ 'OCP\\Group\\Backend\\IDeleteGroupBackend' => $baseDir . '/lib/public/Group/Backend/IDeleteGroupBackend.php',
+ 'OCP\\Group\\Backend\\IGroupDetailsBackend' => $baseDir . '/lib/public/Group/Backend/IGroupDetailsBackend.php',
+ 'OCP\\Group\\Backend\\IIsAdminBackend' => $baseDir . '/lib/public/Group/Backend/IIsAdminBackend.php',
+ 'OCP\\Group\\Backend\\IRemoveFromGroupBackend' => $baseDir . '/lib/public/Group/Backend/IRemoveFromGroupBackend.php',
'OCP\\Http\\Client\\IClient' => $baseDir . '/lib/public/Http/Client/IClient.php',
'OCP\\Http\\Client\\IClientService' => $baseDir . '/lib/public/Http/Client/IClientService.php',
'OCP\\Http\\Client\\IResponse' => $baseDir . '/lib/public/Http/Client/IResponse.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index b4af81e36ce..a913b0498b9 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -215,6 +215,14 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OCP\\Files\\UnseekableException' => __DIR__ . '/../../..' . '/lib/public/Files/UnseekableException.php',
'OCP\\GlobalScale\\IConfig' => __DIR__ . '/../../..' . '/lib/public/GlobalScale/IConfig.php',
'OCP\\GroupInterface' => __DIR__ . '/../../..' . '/lib/public/GroupInterface.php',
+ 'OCP\\Group\\Backend\\ABackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/ABackend.php',
+ 'OCP\\Group\\Backend\\IAddToGroupBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/IAddToGroupBackend.php',
+ 'OCP\\Group\\Backend\\ICountUsersBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/ICountUsersBackend.php',
+ 'OCP\\Group\\Backend\\ICreateGroupBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/ICreateGroupBackend.php',
+ 'OCP\\Group\\Backend\\IDeleteGroupBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/IDeleteGroupBackend.php',
+ 'OCP\\Group\\Backend\\IGroupDetailsBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/IGroupDetailsBackend.php',
+ 'OCP\\Group\\Backend\\IIsAdminBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/IIsAdminBackend.php',
+ 'OCP\\Group\\Backend\\IRemoveFromGroupBackend' => __DIR__ . '/../../..' . '/lib/public/Group/Backend/IRemoveFromGroupBackend.php',
'OCP\\Http\\Client\\IClient' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IClient.php',
'OCP\\Http\\Client\\IClientService' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IClientService.php',
'OCP\\Http\\Client\\IResponse' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IResponse.php',
diff --git a/lib/l10n/zh_TW.js b/lib/l10n/zh_TW.js
index b5e357b2576..62a3044c23b 100644
--- a/lib/l10n/zh_TW.js
+++ b/lib/l10n/zh_TW.js
@@ -5,8 +5,8 @@ OC.L10N.register(
"This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題",
"See %s" : "見 %s",
"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 進行適當的修改",
+ "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 或更高版本",
@@ -20,6 +20,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" : "頭像不是正方形",
@@ -34,9 +35,13 @@ OC.L10N.register(
"_%n month ago_::_%n months ago_" : ["%n 個月前"],
"next year" : "明年",
"last year" : "去年",
- "_%n year ago_::_%n years ago_" : ["%n 幾年前"],
+ "_in %n year_::_in %n years_" : ["%n 年後"],
+ "_%n year ago_::_%n years ago_" : ["%n 年前"],
+ "_in %n hour_::_in %n hours_" : ["%n 小時後"],
"_%n hour ago_::_%n hours ago_" : ["%n 小時前"],
+ "_in %n minute_::_in %n minutes_" : ["%n 分鐘後"],
"_%n minute ago_::_%n minutes ago_" : ["%n 分鐘前"],
+ "in a few seconds" : "幾秒後",
"seconds ago" : "幾秒前",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "名為 %s 的模組不存在,請在應用程式設定中啟用,或是聯絡系統管理員",
"File name is a reserved word" : "檔案名稱是保留字",
@@ -55,6 +60,10 @@ OC.L10N.register(
"Unknown user" : "未知的使用者",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "建立",
+ "Change" : "更改",
+ "Delete" : "刪除",
+ "Share" : "分享",
"Basic settings" : "基本設定",
"Sharing" : "分享",
"Security" : "安全性",
@@ -216,6 +225,13 @@ OC.L10N.register(
"Storage incomplete configuration. %s" : "儲存空間配置尚未完成。%s",
"Storage connection error. %s" : "儲存空間連線錯誤。%s",
"Storage is temporarily not available" : "儲存空間暫時無法使用",
- "Storage connection timeout. %s" : "儲存空間連線逾時。%s"
+ "Storage connection timeout. %s" : "儲存空間連線逾時。%s",
+ "Personal" : "個人",
+ "Admin" : "管理",
+ "DB Error: \"%s\"" : "資料庫錯誤: %s",
+ "Offending command was: \"%s\"" : "有問題的指令: %s",
+ "Offending command was: \"%s\", name: %s, password: %s" : "有問題的指令: %s,名字: %s,密碼: %s",
+ "No app name specified" : "沒有指定應用程式名稱",
+ "App '%s' could not be installed!" : "應用程式 \"%s\" 無法被安裝"
},
"nplurals=1; plural=0;");
diff --git a/lib/l10n/zh_TW.json b/lib/l10n/zh_TW.json
index 44246918fd5..e04fd1872de 100644
--- a/lib/l10n/zh_TW.json
+++ b/lib/l10n/zh_TW.json
@@ -3,8 +3,8 @@
"This can usually be fixed by giving the webserver write access to the config directory" : "允許網頁伺服器寫入 \"config\" 目錄通常可以解決這個問題",
"See %s" : "見 %s",
"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 進行適當的修改",
+ "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 或更高版本",
@@ -18,6 +18,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" : "頭像不是正方形",
@@ -32,9 +33,13 @@
"_%n month ago_::_%n months ago_" : ["%n 個月前"],
"next year" : "明年",
"last year" : "去年",
- "_%n year ago_::_%n years ago_" : ["%n 幾年前"],
+ "_in %n year_::_in %n years_" : ["%n 年後"],
+ "_%n year ago_::_%n years ago_" : ["%n 年前"],
+ "_in %n hour_::_in %n hours_" : ["%n 小時後"],
"_%n hour ago_::_%n hours ago_" : ["%n 小時前"],
+ "_in %n minute_::_in %n minutes_" : ["%n 分鐘後"],
"_%n minute ago_::_%n minutes ago_" : ["%n 分鐘前"],
+ "in a few seconds" : "幾秒後",
"seconds ago" : "幾秒前",
"Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "名為 %s 的模組不存在,請在應用程式設定中啟用,或是聯絡系統管理員",
"File name is a reserved word" : "檔案名稱是保留字",
@@ -53,6 +58,10 @@
"Unknown user" : "未知的使用者",
"APCu" : "APCu",
"Redis" : "Redis",
+ "Create" : "建立",
+ "Change" : "更改",
+ "Delete" : "刪除",
+ "Share" : "分享",
"Basic settings" : "基本設定",
"Sharing" : "分享",
"Security" : "安全性",
@@ -214,6 +223,13 @@
"Storage incomplete configuration. %s" : "儲存空間配置尚未完成。%s",
"Storage connection error. %s" : "儲存空間連線錯誤。%s",
"Storage is temporarily not available" : "儲存空間暫時無法使用",
- "Storage connection timeout. %s" : "儲存空間連線逾時。%s"
+ "Storage connection timeout. %s" : "儲存空間連線逾時。%s",
+ "Personal" : "個人",
+ "Admin" : "管理",
+ "DB Error: \"%s\"" : "資料庫錯誤: %s",
+ "Offending command was: \"%s\"" : "有問題的指令: %s",
+ "Offending command was: \"%s\", name: %s, password: %s" : "有問題的指令: %s,名字: %s,密碼: %s",
+ "No app name specified" : "沒有指定應用程式名稱",
+ "App '%s' could not be installed!" : "應用程式 \"%s\" 無法被安裝"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 2b43a27b7ac..d96c22aad51 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -377,6 +377,123 @@ class Manager implements ICommentsManager {
}
/**
+ * @param string $objectType the object type, e.g. 'files'
+ * @param string $objectId the id of the object
+ * @param int $lastKnownCommentId the last known comment (will be used as offset)
+ * @param string $sortDirection direction of the comments (`asc` or `desc`)
+ * @param int $limit optional, number of maximum comments to be returned. if
+ * set to 0, all comments are returned.
+ * @return IComment[]
+ * @return array
+ */
+ public function getForObjectSince(
+ string $objectType,
+ string $objectId,
+ int $lastKnownCommentId,
+ string $sortDirection = 'asc',
+ int $limit = 30
+ ): array {
+ $comments = [];
+
+ $query = $this->dbConn->getQueryBuilder();
+ $query->select('*')
+ ->from('comments')
+ ->where($query->expr()->eq('object_type', $query->createNamedParameter($objectType)))
+ ->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId)))
+ ->orderBy('creation_timestamp', $sortDirection === 'desc' ? 'DESC' : 'ASC')
+ ->addOrderBy('id', $sortDirection === 'desc' ? 'DESC' : 'ASC');
+
+ if ($limit > 0) {
+ $query->setMaxResults($limit);
+ }
+
+ $lastKnownComment = $lastKnownCommentId > 0 ? $this->getLastKnownComment(
+ $objectType,
+ $objectId,
+ $lastKnownCommentId
+ ) : null;
+ if ($lastKnownComment instanceof IComment) {
+ $lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime();
+ if ($sortDirection === 'desc') {
+ $query->andWhere(
+ $query->expr()->orX(
+ $query->expr()->lt(
+ 'creation_timestamp',
+ $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE),
+ IQueryBuilder::PARAM_DATE
+ ),
+ $query->expr()->andX(
+ $query->expr()->eq(
+ 'creation_timestamp',
+ $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE),
+ IQueryBuilder::PARAM_DATE
+ ),
+ $query->expr()->lt('id', $query->createNamedParameter($lastKnownCommentId))
+ )
+ )
+ );
+ } else {
+ $query->andWhere(
+ $query->expr()->orX(
+ $query->expr()->gt(
+ 'creation_timestamp',
+ $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE),
+ IQueryBuilder::PARAM_DATE
+ ),
+ $query->expr()->andX(
+ $query->expr()->eq(
+ 'creation_timestamp',
+ $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE),
+ IQueryBuilder::PARAM_DATE
+ ),
+ $query->expr()->gt('id', $query->createNamedParameter($lastKnownCommentId))
+ )
+ )
+ );
+ }
+ }
+
+ $resultStatement = $query->execute();
+ while ($data = $resultStatement->fetch()) {
+ $comment = new Comment($this->normalizeDatabaseData($data));
+ $this->cache($comment);
+ $comments[] = $comment;
+ }
+ $resultStatement->closeCursor();
+
+ return $comments;
+ }
+
+ /**
+ * @param string $objectType the object type, e.g. 'files'
+ * @param string $objectId the id of the object
+ * @param int $id the comment to look for
+ * @return Comment|null
+ */
+ protected function getLastKnownComment(string $objectType,
+ string $objectId,
+ int $id) {
+ $query = $this->dbConn->getQueryBuilder();
+ $query->select('*')
+ ->from('comments')
+ ->where($query->expr()->eq('object_type', $query->createNamedParameter($objectType)))
+ ->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId)))
+ ->andWhere($query->expr()->eq('id', $query->createNamedParameter($id, IQueryBuilder::PARAM_INT)));
+
+ $result = $query->execute();
+ $row = $result->fetch();
+ $result->closeCursor();
+
+ if ($row) {
+ $comment = new Comment($this->normalizeDatabaseData($row));
+ $this->cache($comment);
+ return $comment;
+ }
+
+ return null;
+ }
+
+ /**
* @param $objectType string the object type, e.g. 'files'
* @param $objectId string the id of the object
* @param \DateTime $notOlderThan optional, timestamp of the oldest comments
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php
index c841a36bb5a..9fc2ed42c33 100644
--- a/lib/private/DB/ConnectionFactory.php
+++ b/lib/private/DB/ConnectionFactory.php
@@ -193,16 +193,7 @@ class ConnectionFactory {
$connectionParams['path'] = $dataDir . '/' . $name . '.db';
} else {
$host = $this->config->getValue('dbhost', '');
- if (strpos($host, ':')) {
- // Host variable may carry a port or socket.
- list($host, $portOrSocket) = explode(':', $host, 2);
- if (ctype_digit($portOrSocket)) {
- $connectionParams['port'] = $portOrSocket;
- } else {
- $connectionParams['unix_socket'] = $portOrSocket;
- }
- }
- $connectionParams['host'] = $host;
+ $connectionParams = array_merge($connectionParams, $this->splitHostFromPortAndSocket($host));
$connectionParams['dbname'] = $name;
}
@@ -232,4 +223,27 @@ class ConnectionFactory {
return $connectionParams;
}
+
+ /**
+ * @param string $host
+ * @return array
+ */
+ protected function splitHostFromPortAndSocket($host): array {
+ $params = [
+ 'host' => $host,
+ ];
+
+ $matches = [];
+ if (preg_match('/^(.*):([^\]:]+)$/', $host, $matches)) {
+ // Host variable carries a port or socket.
+ $params['host'] = $matches[1];
+ if (is_numeric($matches[2])) {
+ $params['port'] = (int) $matches[2];
+ } else {
+ $params['unix_socket'] = $matches[2];
+ }
+ }
+
+ return $params;
+ }
}
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index 85bba573001..d10aaf467ae 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -199,7 +199,7 @@ class SwiftFactory {
'name' => $this->params['container']
]);
} else {
- throw new StorageNotAvailableException('Invalid response while trying to get container info', StorageNotAvailableException::STATUS_ERROR, $e);
+ throw new StorageNotAvailableException('Invalid response while trying to get container info', StorageNotAvailableException::STATUS_ERROR, $ex);
}
} catch (ConnectException $e) {
/** @var RequestInterface $request */
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index 1496fda5140..b3c2dc00189 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -770,7 +770,7 @@ class DAV extends Common {
if ($response === false) {
if ($path === '') {
// if root is gone it means the storage is not available
- throw new StorageNotAvailableException(get_class($e) . ': ' . $e->getMessage());
+ throw new StorageNotAvailableException('root is gone');
}
return false;
}
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php
index abd7f6ee6ee..639df3de0de 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -40,12 +40,23 @@
namespace OC\Group;
+use OCP\Group\Backend\ABackend;
+use OCP\Group\Backend\IAddToGroupBackend;
+use OCP\Group\Backend\ICountUsersBackend;
+use OCP\Group\Backend\ICreateGroupBackend;
+use OCP\Group\Backend\IDeleteGroupBackend;
+use OCP\Group\Backend\IRemoveFromGroupBackend;
use OCP\IDBConnection;
/**
* Class for group management in a SQL Database (e.g. MySQL, SQLite)
*/
-class Database extends Backend {
+class Database extends ABackend
+ implements IAddToGroupBackend,
+ ICountUsersBackend,
+ ICreateGroupBackend,
+ IDeleteGroupBackend,
+ IRemoveFromGroupBackend {
/** @var string[] */
private $groupCache = [];
@@ -79,7 +90,7 @@ class Database extends Backend {
* Tries to create a new group. If the group name already exists, false will
* be returned.
*/
- public function createGroup( $gid ) {
+ public function createGroup(string $gid): bool {
$this->fixDI();
// Add group
@@ -100,7 +111,7 @@ class Database extends Backend {
*
* Deletes a group and removes it from the group_user-table
*/
- public function deleteGroup( $gid ) {
+ public function deleteGroup(string $gid): bool {
$this->fixDI();
// Delete the group
@@ -160,7 +171,7 @@ class Database extends Backend {
*
* Adds a user to a group.
*/
- public function addToGroup( $uid, $gid ) {
+ public function addToGroup(string $uid, string $gid): bool {
$this->fixDI();
// No duplicate entries!
@@ -184,7 +195,7 @@ class Database extends Backend {
*
* removes the user from a group.
*/
- public function removeFromGroup( $uid, $gid ) {
+ public function removeFromGroup(string $uid, string $gid): bool {
$this->fixDI();
$qb = $this->dbConn->getQueryBuilder();
@@ -333,9 +344,9 @@ class Database extends Backend {
* get the number of all users matching the search string in a group
* @param string $gid
* @param string $search
- * @return int|false
+ * @return int
*/
- public function countUsersInGroup($gid, $search = '') {
+ public function countUsersInGroup(string $gid, string $search = ''): int {
$this->fixDI();
$query = $this->dbConn->getQueryBuilder();
@@ -355,7 +366,10 @@ class Database extends Backend {
if ($count !== false) {
$count = (int)$count;
+ } else {
+ $count = 0;
}
+
return $count;
}
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index 1b40b4955d6..391e98171cf 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -141,9 +141,7 @@ class Installer {
\OC_App::setupBackgroundJobs($info['background-jobs']);
//run appinfo/install.php
- if(!isset($data['noinstall']) or $data['noinstall']==false) {
- self::includeAppScript($basedir . '/appinfo/install.php');
- }
+ self::includeAppScript($basedir . '/appinfo/install.php');
$appData = OC_App::getAppInfo($appId);
OC_App::executeRepairSteps($appId, $appData['repair-steps']['install']);
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index bd9c4ff5ba6..b3ed176b3b5 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -121,6 +121,24 @@ interface ICommentsManager {
);
/**
+ * @param string $objectType the object type, e.g. 'files'
+ * @param string $objectId the id of the object
+ * @param int $lastKnownCommentId the last known comment (will be used as offset)
+ * @param string $sortDirection direction of the comments (`asc` or `desc`)
+ * @param int $limit optional, number of maximum comments to be returned. if
+ * set to 0, all comments are returned.
+ * @return IComment[]
+ * @since 14.0.0
+ */
+ public function getForObjectSince(
+ string $objectType,
+ string $objectId,
+ int $lastKnownCommentId,
+ string $sortDirection = 'asc',
+ int $limit = 30
+ ): array;
+
+ /**
* @param $objectType string the object type, e.g. 'files'
* @param $objectId string the id of the object
* @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments
diff --git a/lib/public/Group/Backend/ABackend.php b/lib/public/Group/Backend/ABackend.php
new file mode 100644
index 00000000000..507b9225501
--- /dev/null
+++ b/lib/public/Group/Backend/ABackend.php
@@ -0,0 +1,67 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+use OCP\GroupInterface;
+
+/**
+ * @since 14.0.0
+ */
+abstract class ABackend implements GroupInterface {
+
+ /**
+ * @deprecated 14.0.0
+ *
+ * @param int $actions The action to check for
+ * @return bool
+ */
+ public function implementsActions($actions): bool {
+ $implements = 0;
+
+ if ($this instanceof IAddToGroupBackend) {
+ $implements |= GroupInterface::ADD_TO_GROUP;
+ }
+ if ($this instanceof ICountUsersBackend) {
+ $implements |= GroupInterface::COUNT_USERS;
+ }
+ if ($this instanceof ICreateGroupBackend) {
+ $implements |= GroupInterface::CREATE_GROUP;
+ }
+ if ($this instanceof IDeleteGroupBackend) {
+ $implements |= GroupInterface::DELETE_GROUP;
+ }
+ if ($this instanceof IGroupDetailsBackend) {
+ $implements |= GroupInterface::GROUP_DETAILS;
+ }
+ if ($this instanceof IIsAdminBackend) {
+ $implements |= GroupInterface::IS_ADMIN;
+ }
+ if ($this instanceof IRemoveFromGroupBackend) {
+ $implements |= GroupInterface::REMOVE_FROM_GOUP;
+ }
+
+ return (bool)($actions & $implements);
+ }
+}
diff --git a/lib/public/Group/Backend/IAddToGroupBackend.php b/lib/public/Group/Backend/IAddToGroupBackend.php
new file mode 100644
index 00000000000..aba0444e9b6
--- /dev/null
+++ b/lib/public/Group/Backend/IAddToGroupBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface IAddToGroupBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function addToGroup(string $uid, string $gid): bool;
+}
diff --git a/lib/public/Group/Backend/ICountUsersBackend.php b/lib/public/Group/Backend/ICountUsersBackend.php
new file mode 100644
index 00000000000..1bdf54b4fd8
--- /dev/null
+++ b/lib/public/Group/Backend/ICountUsersBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface ICountUsersBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function countUsersInGroup(string $gid, string $search = ''): int;
+}
diff --git a/lib/public/Group/Backend/ICreateGroupBackend.php b/lib/public/Group/Backend/ICreateGroupBackend.php
new file mode 100644
index 00000000000..1a49bc221c0
--- /dev/null
+++ b/lib/public/Group/Backend/ICreateGroupBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface ICreateGroupBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function createGroup(string $gid): bool;
+}
diff --git a/lib/public/Group/Backend/IDeleteGroupBackend.php b/lib/public/Group/Backend/IDeleteGroupBackend.php
new file mode 100644
index 00000000000..09ca789d381
--- /dev/null
+++ b/lib/public/Group/Backend/IDeleteGroupBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface IDeleteGroupBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function deleteGroup(string $gid): bool;
+}
diff --git a/lib/public/Group/Backend/IGroupDetailsBackend.php b/lib/public/Group/Backend/IGroupDetailsBackend.php
new file mode 100644
index 00000000000..fd43510c6bf
--- /dev/null
+++ b/lib/public/Group/Backend/IGroupDetailsBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface IGroupDetailsBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function getGroupDetails(string $gid): array;
+}
diff --git a/lib/public/Group/Backend/IIsAdminBackend.php b/lib/public/Group/Backend/IIsAdminBackend.php
new file mode 100644
index 00000000000..e253a293dc9
--- /dev/null
+++ b/lib/public/Group/Backend/IIsAdminBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface IIsAdminBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function isAdmin(string $uid): bool;
+}
diff --git a/lib/public/Group/Backend/IRemoveFromGroupBackend.php b/lib/public/Group/Backend/IRemoveFromGroupBackend.php
new file mode 100644
index 00000000000..885a5bbcdca
--- /dev/null
+++ b/lib/public/Group/Backend/IRemoveFromGroupBackend.php
@@ -0,0 +1,36 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @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\Group\Backend;
+
+/**
+ * @since 14.0.0
+ */
+interface IRemoveFromGroupBackend {
+
+ /**
+ * @since 14.0.0
+ */
+ public function removeFromGroup(string $uid, string $gid);
+}
diff --git a/settings/l10n/ru.js b/settings/l10n/ru.js
index 39a1a48480d..6ebb6e5bea6 100644
--- a/settings/l10n/ru.js
+++ b/settings/l10n/ru.js
@@ -80,7 +80,7 @@ OC.L10N.register(
"Couldn't remove app." : "Не удалось удалить приложение.",
"Couldn't update app." : "Невозможно обновить приложение.",
"Migration in progress. Please wait until the migration is finished" : "Перенос выполняется, дождитесь завершения",
- "Migration started …" : "Начался перенос...",
+ "Migration started …" : "Начался перенос…",
"Not saved" : "Не сохранено",
"Sending…" : "Отправка…",
"Email sent" : "Письмо отправлено",
@@ -92,17 +92,17 @@ OC.L10N.register(
"Official apps are developed by and within the community. They offer central functionality and are ready for production use." : "Официальные приложения разработаны вместе с сообществом. Они предлагают базовую функциональность и готовы для использования.",
"Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use." : "Подтвержденные приложения разработаны доверенными разработчиками и прошли краткую проверку на наличие проблем с безопасностью. Они активно поддерживаются в открытых репозиториях и сопровождающие их разработчики подтверждают, что приложения достаточно стабильны для нормальной работы.",
"This app is not checked for security issues and is new or known to be unstable. Install at your own risk." : "Это приложение не проверялось на наличие проблем с безопасностью, также оно может работать нестабильно. Устанавливайте на свой страх и риск.",
- "Disabling app …" : "Отключение приложения...",
+ "Disabling app …" : "Отключение приложения…",
"Error while disabling app" : "Ошибка отключения приложения",
"Disable" : "Отключить",
"Enable" : "Включить",
- "Enabling app …" : "Включение приложения...",
+ "Enabling app …" : "Включение приложения…",
"Error while enabling app" : "Ошибка включения приложения",
"Error: This app can not be enabled because it makes the server unstable" : "Ошибка: это приложение не может быть включено, так как оно сделает сервер нестабильным",
"Error: Could not disable broken app" : "Ошибка: невозможно отключить «сломанное» приложение",
"Error while disabling broken app" : "Ошибка при отключении сломанного приложения",
"App up to date" : "Приложение не нуждается в обновлении",
- "Updating …" : "Обновление ...",
+ "Updating …" : "Обновление…",
"Could not update app" : "Не удалось обновить приложение",
"Updated" : "Обновлено",
"Removing …" : "Удаление…",
@@ -189,8 +189,8 @@ OC.L10N.register(
"Admin documentation" : "Документация для администратора",
"Visit website" : "Посетите веб-сайт",
"Report a bug" : "Сообщить об ошибке",
- "Show description …" : "Показать описание...",
- "Hide description …" : "Скрыть описание...",
+ "Show description …" : "Показать описание…",
+ "Hide description …" : "Скрыть описание…",
"This app has an update available." : "Для этого приложения доступно обновление.",
"This app has no minimum Nextcloud version assigned. This will be an error in the future." : "Для этого приложения не указана минимальная поддерживаемая версия Nextcloud, в будущем это будет считаться ошибкой.",
"This app has no maximum Nextcloud version assigned. This will be an error in the future." : "Для этого приложения не указана максимальная поддерживаемая версия Nextcloud, в будущем это будет считаться ошибкой.",
@@ -385,7 +385,7 @@ OC.L10N.register(
"Are you really sure you want add {domain} as trusted domain?" : "Вы действительно хотите добавить домен {domain} как доверенный?",
"Add trusted domain" : "Добавить доверенный домен",
"_You have %n app update pending_::_You have %n app updates pending_" : ["Доступно обновление для %n приложения","Доступны обновления для %n приложений","Доступны обновления для %n приложений","Доступны обновления для %nприложений"],
- "Updating...." : "Обновление...",
+ "Updating...." : "Обновление…",
"Error while updating app" : "Ошибка обновления приложения",
"Error while removing app" : "Ошибка удаления приложения",
"A valid password must be provided" : "Должен быть указан правильный пароль",
diff --git a/settings/l10n/ru.json b/settings/l10n/ru.json
index 1ecb5f8e6e3..81de625a37b 100644
--- a/settings/l10n/ru.json
+++ b/settings/l10n/ru.json
@@ -78,7 +78,7 @@
"Couldn't remove app." : "Не удалось удалить приложение.",
"Couldn't update app." : "Невозможно обновить приложение.",
"Migration in progress. Please wait until the migration is finished" : "Перенос выполняется, дождитесь завершения",
- "Migration started …" : "Начался перенос...",
+ "Migration started …" : "Начался перенос…",
"Not saved" : "Не сохранено",
"Sending…" : "Отправка…",
"Email sent" : "Письмо отправлено",
@@ -90,17 +90,17 @@
"Official apps are developed by and within the community. They offer central functionality and are ready for production use." : "Официальные приложения разработаны вместе с сообществом. Они предлагают базовую функциональность и готовы для использования.",
"Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use." : "Подтвержденные приложения разработаны доверенными разработчиками и прошли краткую проверку на наличие проблем с безопасностью. Они активно поддерживаются в открытых репозиториях и сопровождающие их разработчики подтверждают, что приложения достаточно стабильны для нормальной работы.",
"This app is not checked for security issues and is new or known to be unstable. Install at your own risk." : "Это приложение не проверялось на наличие проблем с безопасностью, также оно может работать нестабильно. Устанавливайте на свой страх и риск.",
- "Disabling app …" : "Отключение приложения...",
+ "Disabling app …" : "Отключение приложения…",
"Error while disabling app" : "Ошибка отключения приложения",
"Disable" : "Отключить",
"Enable" : "Включить",
- "Enabling app …" : "Включение приложения...",
+ "Enabling app …" : "Включение приложения…",
"Error while enabling app" : "Ошибка включения приложения",
"Error: This app can not be enabled because it makes the server unstable" : "Ошибка: это приложение не может быть включено, так как оно сделает сервер нестабильным",
"Error: Could not disable broken app" : "Ошибка: невозможно отключить «сломанное» приложение",
"Error while disabling broken app" : "Ошибка при отключении сломанного приложения",
"App up to date" : "Приложение не нуждается в обновлении",
- "Updating …" : "Обновление ...",
+ "Updating …" : "Обновление…",
"Could not update app" : "Не удалось обновить приложение",
"Updated" : "Обновлено",
"Removing …" : "Удаление…",
@@ -187,8 +187,8 @@
"Admin documentation" : "Документация для администратора",
"Visit website" : "Посетите веб-сайт",
"Report a bug" : "Сообщить об ошибке",
- "Show description …" : "Показать описание...",
- "Hide description …" : "Скрыть описание...",
+ "Show description …" : "Показать описание…",
+ "Hide description …" : "Скрыть описание…",
"This app has an update available." : "Для этого приложения доступно обновление.",
"This app has no minimum Nextcloud version assigned. This will be an error in the future." : "Для этого приложения не указана минимальная поддерживаемая версия Nextcloud, в будущем это будет считаться ошибкой.",
"This app has no maximum Nextcloud version assigned. This will be an error in the future." : "Для этого приложения не указана максимальная поддерживаемая версия Nextcloud, в будущем это будет считаться ошибкой.",
@@ -383,7 +383,7 @@
"Are you really sure you want add {domain} as trusted domain?" : "Вы действительно хотите добавить домен {domain} как доверенный?",
"Add trusted domain" : "Добавить доверенный домен",
"_You have %n app update pending_::_You have %n app updates pending_" : ["Доступно обновление для %n приложения","Доступны обновления для %n приложений","Доступны обновления для %n приложений","Доступны обновления для %nприложений"],
- "Updating...." : "Обновление...",
+ "Updating...." : "Обновление…",
"Error while updating app" : "Ошибка обновления приложения",
"Error while removing app" : "Ошибка удаления приложения",
"A valid password must be provided" : "Должен быть указан правильный пароль",
diff --git a/settings/l10n/sk.js b/settings/l10n/sk.js
index 1940fe1f53a..bac8c923232 100644
--- a/settings/l10n/sk.js
+++ b/settings/l10n/sk.js
@@ -157,6 +157,7 @@ OC.L10N.register(
"Good password" : "Dobré heslo",
"Strong password" : "Silné heslo",
"Groups" : "Skupiny",
+ "Unable to retrieve the group list" : "Nie je možné načítať zoznam skupín",
"Unable to delete {objName}" : "Nemožno vymazať {objName}",
"Error creating group: {message}" : "Chyba pri vytváraní skupiny: {message}",
"A valid group name must be provided" : "Musíte zadať platný názov skupiny",
diff --git a/settings/l10n/sk.json b/settings/l10n/sk.json
index 5b9bf3679e4..214525280e4 100644
--- a/settings/l10n/sk.json
+++ b/settings/l10n/sk.json
@@ -155,6 +155,7 @@
"Good password" : "Dobré heslo",
"Strong password" : "Silné heslo",
"Groups" : "Skupiny",
+ "Unable to retrieve the group list" : "Nie je možné načítať zoznam skupín",
"Unable to delete {objName}" : "Nemožno vymazať {objName}",
"Error creating group: {message}" : "Chyba pri vytváraní skupiny: {message}",
"A valid group name must be provided" : "Musíte zadať platný názov skupiny",
diff --git a/tests/lib/Comments/FakeManager.php b/tests/lib/Comments/FakeManager.php
index d3dd1dfb58a..3ba66e96692 100644
--- a/tests/lib/Comments/FakeManager.php
+++ b/tests/lib/Comments/FakeManager.php
@@ -22,6 +22,14 @@ class FakeManager implements ICommentsManager {
\DateTime $notOlderThan = null
) {}
+ public function getForObjectSince(
+ string $objectType,
+ string $objectId,
+ int $lastKnownCommentId,
+ string $sortDirection = 'asc',
+ int $limit = 30
+ ): array { return []; }
+
public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null) {}
public function create($actorType, $actorId, $objectType, $objectId) {}
diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php
index 671389232e2..28002ff42cc 100644
--- a/tests/lib/Comments/ManagerTest.php
+++ b/tests/lib/Comments/ManagerTest.php
@@ -354,6 +354,48 @@ class ManagerTest extends TestCase {
], $amount);
}
+ /**
+ * @dataProvider dataGetForObjectSince
+ * @param $lastKnown
+ * @param $order
+ * @param $limit
+ * @param $resultFrom
+ * @param $resultTo
+ */
+ public function testGetForObjectSince($lastKnown, $order, $limit, $resultFrom, $resultTo) {
+ $ids = [];
+ $ids[] = $this->addDatabaseEntry(0, 0);
+ $ids[] = $this->addDatabaseEntry(0, 0);
+ $ids[] = $this->addDatabaseEntry(0, 0);
+ $ids[] = $this->addDatabaseEntry(0, 0);
+ $ids[] = $this->addDatabaseEntry(0, 0);
+
+ $manager = $this->getManager();
+ $comments = $manager->getForObjectSince('files', 'file64', ($lastKnown === null ? 0 : $ids[$lastKnown]), $order, $limit);
+
+ $expected = array_slice($ids, $resultFrom, $resultTo - $resultFrom + 1);
+ if ($order === 'desc') {
+ $expected = array_reverse($expected);
+ }
+
+ $this->assertSame($expected, array_map(function(IComment $c) {
+ return (int) $c->getId();
+ }, $comments));
+ }
+
+ public function dataGetForObjectSince() {
+ return [
+ [null, 'asc', 20, 0, 4],
+ [null, 'asc', 2, 0, 1],
+ [null, 'desc', 20, 0, 4],
+ [null, 'desc', 2, 3, 4],
+ [1, 'asc', 20, 2, 4],
+ [1, 'asc', 2, 2, 3],
+ [3, 'desc', 20, 0, 2],
+ [3, 'desc', 2, 1, 2],
+ ];
+ }
+
public function invalidCreateArgsProvider() {
return [
['', 'aId-1', 'oType-1', 'oId-1'],
diff --git a/tests/lib/DB/ConnectionFactoryTest.php b/tests/lib/DB/ConnectionFactoryTest.php
new file mode 100644
index 00000000000..6a1a9b31c4b
--- /dev/null
+++ b/tests/lib/DB/ConnectionFactoryTest.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @copyright Copyright (c) 2018 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 Test\DB;
+
+use OC\DB\ConnectionFactory;
+use OC\SystemConfig;
+use Test\TestCase;
+
+class ConnectionFactoryTest extends TestCase {
+
+ public function splitHostFromPortAndSocketData() {
+ return [
+ ['127.0.0.1', ['host' => '127.0.0.1']],
+ ['db.example.org', ['host' => 'db.example.org']],
+ ['unix', ['host' => 'unix']],
+ ['[::1]', ['host' => '[::1]']],
+ ['127.0.0.1:3306', ['host' => '127.0.0.1', 'port' => 3306]],
+ ['db.example.org:3306', ['host' => 'db.example.org', 'port' => 3306]],
+ ['unix:3306', ['host' => 'unix', 'port' => 3306]],
+ ['[::1]:3306', ['host' => '[::1]', 'port' => 3306]],
+ ['unix:/socket', ['host' => 'unix', 'unix_socket' => '/socket']],
+ ];
+ }
+
+ /**
+ * @dataProvider splitHostFromPortAndSocketData
+ * @param string $host
+ * @param array $expected
+ */
+ public function testSplitHostFromPortAndSocket($host, array $expected) {
+ /** @var SystemConfig $config */
+ $config = $this->createMock(SystemConfig::class);
+ $factory = new ConnectionFactory($config);
+
+ $this->assertEquals($expected, self::invokePrivate($factory, 'splitHostFromPortAndSocket', [$host]));
+ }
+}