mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-15 21:10:22 +01:00
revert: remove federatedDescription category field, closes #13757
This commit is contained in:
@@ -15,9 +15,6 @@
|
||||
"handle": "Category Handle",
|
||||
"handle.help": "Your category handle is used as a representation of this category across other networks, similar to a username. A category handle must not match an existing username or user group.",
|
||||
"description": "Category Description",
|
||||
"federatedDescription": "Federated Description",
|
||||
"federatedDescription.help": "This text will be appended to the category description when queried by other websites/apps.",
|
||||
"federatedDescription.default": "This is a forum category containing topical discussion. You can start new discussions by mentioning this category.",
|
||||
"topic-template": "Topic Template",
|
||||
"topic-template.help": "Define a template for new topics created in this category.",
|
||||
"bg-color": "Background Colour",
|
||||
|
||||
@@ -521,11 +521,11 @@ Mocks.actors.user = async (uid) => {
|
||||
};
|
||||
|
||||
Mocks.actors.category = async (cid) => {
|
||||
let {
|
||||
const {
|
||||
name, handle: preferredUsername, slug,
|
||||
descriptionParsed: summary, federatedDescription, backgroundImage,
|
||||
descriptionParsed: summary, backgroundImage,
|
||||
} = await categories.getCategoryFields(cid,
|
||||
['name', 'handle', 'slug', 'description', 'descriptionParsed', 'federatedDescription', 'backgroundImage']);
|
||||
['name', 'handle', 'slug', 'description', 'descriptionParsed', 'backgroundImage']);
|
||||
const publicKey = await activitypub.getPublicKey('cid', cid);
|
||||
|
||||
let icon;
|
||||
@@ -546,10 +546,6 @@ Mocks.actors.category = async (cid) => {
|
||||
};
|
||||
}
|
||||
|
||||
// Append federated desc.
|
||||
const fallback = await translator.translate('[[admin/manage/categories:federatedDescription.default]]');
|
||||
summary += `<hr /><p dir="auto">${federatedDescription || fallback}</p>\n`;
|
||||
|
||||
return {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
|
||||
@@ -117,7 +117,7 @@ function modifyCategory(category, fields) {
|
||||
|
||||
db.parseIntFields(category, intFields, fields);
|
||||
|
||||
const escapeFields = ['name', 'nickname', 'description', 'federatedDescription', 'color', 'bgColor', 'backgroundImage', 'imageClass', 'class', 'link'];
|
||||
const escapeFields = ['name', 'nickname', 'description', 'color', 'bgColor', 'backgroundImage', 'imageClass', 'class', 'link'];
|
||||
escapeFields.forEach((field) => {
|
||||
if (category.hasOwnProperty(field)) {
|
||||
category[field] = validator.escape(String(category[field] || ''));
|
||||
|
||||
@@ -36,16 +36,6 @@
|
||||
<textarea id="cid-{category.cid}-description" data-name="description" class="form-control category_description description" rows="4" />{category.description}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="cid-{category.cid}-federatedDescription">
|
||||
[[admin/manage/categories:federatedDescription]]
|
||||
</label>
|
||||
<textarea id="cid-{category.cid}-federatedDescription" data-name="federatedDescription" class="form-control" rows="2" placeholder="[[admin/manage/categories:federatedDescription.default]]" />{category.federatedDescription}</textarea>
|
||||
<p class="form-text">
|
||||
[[admin/manage/categories:federatedDescription.help]]
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="cid-{category.cid}-topic-template">
|
||||
[[admin/manage/categories:topic-template]]
|
||||
|
||||
Reference in New Issue
Block a user