Skip to content

Commit 6e43c9a

Browse files
committed
feat: some adjustments
Signed-off-by: Crisciany Souza <crisciany.souza@librecode.coop>
1 parent d82ee30 commit 6e43c9a

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

lib/Db/SignRequestMapper.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,12 @@ public function getMyLibresignFile(string $userId, ?array $filter = []): File {
565565
return $file->fromRow($row);
566566
}
567567

568-
private function getFilesAssociatedFilesWithMeQueryBuilder(string $userId, array $filter = [], bool $count = false, array $sort = []): IQueryBuilder {
568+
private function getFilesAssociatedFilesWithMeQueryBuilder(
569+
string $userId,
570+
array $filter = [],
571+
bool $count = false,
572+
array $sort = []
573+
): IQueryBuilder {
569574
$qb = $this->db->getQueryBuilder();
570575
$qb->from('libresign_file', 'f')
571576
->leftJoin('f', 'libresign_sign_request', 'sr', 'sr.file_id = f.id')

lib/Search/FileSearchProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public function search(IUser $user, ISearchQuery $query): SearchResult {
7979
);
8080
}
8181

82-
private function formatResult(File $file, IUser $user): SearchResultEntry {
83-
$userFolder = $this->rootFolder->getUserFolder($user->getUID());
82+
private function formatResult(File $file): SearchResultEntry {
83+
$userFolder = $this->rootFolder->getUserFolder($file->getUserId());
8484
$thumbnailUrl = '';
8585
$subline = '';
8686
$icon = '';
@@ -115,7 +115,7 @@ private function formatResult(File $file, IUser $user): SearchResultEntry {
115115

116116
$searchResultEntry = new SearchResultEntry(
117117
$thumbnailUrl,
118-
$file->getName() ?? $this->l10n->t('Unnamed document'),
118+
$file->getName(),
119119
$subline,
120120
$this->urlGenerator->getAbsoluteURL($link),
121121
$icon,
@@ -130,6 +130,7 @@ private function formatResult(File $file, IUser $user): SearchResultEntry {
130130
private function formatSubline(string $path): string {
131131
if (strrpos($path, '/') > 0) {
132132
$path = ltrim(dirname($path), '/');
133+
// TRANSLATORS This string indicates the location of a file in a given path.
133134
return $this->l10n->t('in %s', [$path]);
134135
} else {
135136
return '';

0 commit comments

Comments
 (0)