Skip to content

Commit 77a3579

Browse files
authored
Merge pull request #14615 from nextcloud/fix/dev-manual-critical
2 parents d8e01cf + cad71d4 commit 77a3579

4 files changed

Lines changed: 30 additions & 12 deletions

File tree

developer_manual/basics/public_share_template.rst

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,37 @@ It is possible to override the default public share view. This is possible by im
6464
...; // More initial state that you might need in your view.
6565
6666
// OpenGraph Support: http://ogp.me/
67-
Util::addHeader('meta', ['property' => "og:title", 'content' => $this->l10n->t("Encrypted share")]);
68-
Util::addHeader('meta', ['property' => "og:description", 'content' => $this->defaults->getName() . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')]);
69-
Util::addHeader('meta', ['property' => "og:site_name", 'content' => $this->defaults->getName()]);
70-
Util::addHeader('meta', ['property' => "og:url", 'content' => $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.showShare', ['token' => $token])]);
71-
Util::addHeader('meta', ['property' => "og:type", 'content' => "object"]);
72-
73-
$csp->addAllowedFrameDomain('\'self\'');
74-
$response->setContentSecurityPolicy($csp);
67+
Util::addHeader('meta', [
68+
'property' => "og:title",
69+
'content' => $this->l10n->t("Encrypted share"),
70+
]);
71+
Util::addHeader('meta', [
72+
'property' => "og:description",
73+
'content' => $this->defaults->getName()
74+
. ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : ''),
75+
]);
76+
Util::addHeader('meta', [
77+
'property' => "og:site_name",
78+
'content' => $this->defaults->getName(),
79+
]);
80+
Util::addHeader('meta', [
81+
'property' => "og:url",
82+
'content' => $this->urlGenerator->linkToRouteAbsolute(
83+
'files_sharing.sharecontroller.showShare',
84+
['token' => $token]
85+
),
86+
]);
87+
Util::addHeader('meta', [
88+
'property' => "og:type",
89+
'content' => "object",
90+
]);
7591
7692
$response = new PublicTemplateResponse(Application::APP_ID, 'myCustomTemplateFileName', []);
7793
$response->setHeaderTitle($this->l10n->t("My custom title"));
7894
7995
$csp = new ContentSecurityPolicy();
96+
$csp->addAllowedFrameDomain('\'self\'');
97+
$response->setContentSecurityPolicy($csp);
8098
8199
return $response;
82100
}

developer_manual/basics/storage/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ To create a mapper, inherit from the mapper base class and call the parent const
172172
->setMaxResults($limit)
173173
->setFirstResult($offset);
174174
175-
return $this->findEntities($sql);
175+
return $this->findEntities($qb);
176176
}
177177
178178

developer_manual/digging_deeper/projects.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ In order to add your own resource type, we need to create a class implementing t
5858
'id' => $resource->getId(),
5959
'name' => $item->getTitle(),
6060
'link' => $resourceUrl,
61-
'iconUrl' => $favicon,
61+
'iconUrl' => $icon,
6262
];
6363
}
6464

developer_manual/digging_deeper/users.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ Nextcloud users can be defined as managers of other users. This is an informatio
218218
$managers = array_map(function(string $uid) {
219219
return $this->userManager->get($uid);
220220
}, $managerUids));
221-
// Remove and managers that no longer exist as user
221+
// Remove any managers that no longer exist as users
222222
$existingManagers = array_filter($managers);
223223
$user->setManagerUids(array_map(function(IUser $admin) {
224-
return $user->getUID();
224+
return $admin->getUID();
225225
}, $existingManagers));
226226
}
227227
}

0 commit comments

Comments
 (0)