aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/settings/lib/Controller/HelpController.php11
-rw-r--r--lib/private/Comments/Manager.php2
2 files changed, 10 insertions, 3 deletions
diff --git a/apps/settings/lib/Controller/HelpController.php b/apps/settings/lib/Controller/HelpController.php
index b8780ae40ba..38ce84843ed 100644
--- a/apps/settings/lib/Controller/HelpController.php
+++ b/apps/settings/lib/Controller/HelpController.php
@@ -33,6 +33,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IGroupManager;
+use OCP\IL10N;
use OCP\INavigationManager;
use OCP\IRequest;
use OCP\IURLGenerator;
@@ -45,6 +46,8 @@ class HelpController extends Controller {
private $urlGenerator;
/** @var IGroupManager */
private $groupManager;
+ /** @var IL10N */
+ private $l10n;
/** @var string */
private $userId;
@@ -55,13 +58,15 @@ class HelpController extends Controller {
INavigationManager $navigationManager,
IURLGenerator $urlGenerator,
?string $userId,
- IGroupManager $groupManager
+ IGroupManager $groupManager,
+ IL10N $l10n
) {
parent::__construct($appName, $request);
$this->navigationManager = $navigationManager;
$this->urlGenerator = $urlGenerator;
$this->userId = $userId;
$this->groupManager = $groupManager;
+ $this->l10n = $l10n;
}
/**
@@ -73,8 +78,9 @@ class HelpController extends Controller {
*/
public function help(string $mode = 'user'): TemplateResponse {
$this->navigationManager->setActiveEntry('help');
-
+ $pageTitle = $this->l10n->t('Administrator documentation');
if ($mode !== 'admin') {
+ $pageTitle = $this->l10n->t('User documentation');
$mode = 'user';
}
@@ -91,6 +97,7 @@ class HelpController extends Controller {
'urlUserDocs' => $urlUserDocs,
'urlAdminDocs' => $urlAdminDocs,
'mode' => $mode,
+ 'pageTitle' => $pageTitle,
]);
$policy = new ContentSecurityPolicy();
$policy->addAllowedFrameDomain('\'self\'');
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index 53603e51e56..3eb9aab6817 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -605,7 +605,7 @@ class Manager implements ICommentsManager {
public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array {
$objectIds = [];
if ($objectId) {
- $objectIds[] = $objectIds;
+ $objectIds[] = $objectId;
}
return $this->searchForObjects($search, $objectType, $objectIds, $verb, $offset, $limit);
}