Instance setting to make replies to public posts unlisted

main
Bob Mottram 2023-09-20 19:16:19 +01:00
parent 5e8cb2673e
commit 1f8258d33d
29 changed files with 83 additions and 27 deletions

View File

@ -6808,6 +6808,29 @@ class PubServer(BaseHTTPRequestHandler):
'closed')
self.server.registration = False
# change public replies unlisted
pub_replies_unlisted = False
if self.server.public_replies_unlisted or \
get_config_param(base_dir,
"publicRepliesUnlisted") is True:
pub_replies_unlisted = True
if fields.get('publicRepliesUnlisted'):
if fields['publicRepliesUnlisted'] != \
pub_replies_unlisted:
pub_replies_unlisted = \
fields['publicRepliesUnlisted']
set_config_param(base_dir,
'publicRepliesUnlisted',
True)
self.server.public_replies_unlisted = \
pub_replies_unlisted
else:
if pub_replies_unlisted:
set_config_param(base_dir,
'publicRepliesUnlisted',
False)
self.server.public_replies_unlisted = False
# change registrations remaining
reg_str = "registrationsRemaining"
remaining = get_config_param(base_dir, reg_str)

View File

@ -639,5 +639,6 @@
"Memorials": "النصب التذكارية",
"places": "أماكن",
"offline": "غير متصل على الانترنت",
"Mutuals": "التعاضد"
"Mutuals": "التعاضد",
"Public replies default to unlisted scope": "الردود العامة افتراضية للنطاق غير المدرج"
}

View File

@ -639,5 +639,6 @@
"Memorials": "স্মারক",
"places": "জায়গা",
"offline": "অফলাইন",
"Mutuals": "পারস্পরিক"
"Mutuals": "পারস্পরিক",
"Public replies default to unlisted scope": "অতালিকাভুক্ত সুযোগে সর্বজনীন উত্তর ডিফল্ট"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Memorials",
"places": "llocs",
"offline": "fora de línia",
"Mutuals": "Mútues"
"Mutuals": "Mútues",
"Public replies default to unlisted scope": "Les respostes públiques són per defecte a l'abast no llistat"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Cofebau",
"places": "lleoedd",
"offline": "all-lein",
"Mutuals": "Cydfuddiol"
"Mutuals": "Cydfuddiol",
"Public replies default to unlisted scope": "Ymatebion cyhoeddus rhagosodedig i gwmpas heb ei restru"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Denkmäler",
"places": "setzt",
"offline": "offline",
"Mutuals": "Gegenseitigkeitsgesellschaften"
"Mutuals": "Gegenseitigkeitsgesellschaften",
"Public replies default to unlisted scope": "Öffentliche Antworten werden standardmäßig auf den nicht aufgeführten Bereich übertragen"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Μνημείων",
"places": "μέρη",
"offline": "εκτός σύνδεσης",
"Mutuals": "Αμοιβαία"
"Mutuals": "Αμοιβαία",
"Public replies default to unlisted scope": "Οι δημόσιες απαντήσεις από προεπιλογή στο μη καταχωρισμένο εύρος"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Memorials",
"places": "places",
"offline": "offline",
"Mutuals": "Mutuals"
"Mutuals": "Mutuals",
"Public replies default to unlisted scope": "Public replies default to unlisted scope"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Memoriales",
"places": "lugares",
"offline": "desconectada",
"Mutuals": "Mutuales"
"Mutuals": "Mutuales",
"Public replies default to unlisted scope": "Las respuestas públicas tienen por defecto un alcance no listado"
}

View File

@ -639,5 +639,6 @@
"Memorials": "یادبودها",
"places": "مکان ها",
"offline": "آفلاین",
"Mutuals": "متقابل"
"Mutuals": "متقابل",
"Public replies default to unlisted scope": "پاسخ‌های عمومی به‌طور پیش‌فرض به محدوده فهرست نشده است"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Mémoriaux",
"places": "lieux",
"offline": "hors ligne",
"Mutuals": "Mutuelles"
"Mutuals": "Mutuelles",
"Public replies default to unlisted scope": "Les réponses publiques ont par défaut une portée non répertoriée"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Cuimhneacháin",
"places": "áiteanna",
"offline": "as líne",
"Mutuals": "Comhpháirteacha"
"Mutuals": "Comhpháirteacha",
"Public replies default to unlisted scope": "Freagraí poiblí réamhshocraithe ar scóip neamhliostaithe"
}

View File

@ -639,5 +639,6 @@
"Memorials": "אנדרטאות",
"places": "מקומות",
"offline": "במצב לא מקוון",
"Mutuals": "הדדיות"
"Mutuals": "הדדיות",
"Public replies default to unlisted scope": "תשובות ציבוריות כברירת מחדל להיקף לא רשום"
}

View File

@ -639,5 +639,6 @@
"Memorials": "इतिवृत्त",
"places": "स्थानों",
"offline": "ऑफलाइन",
"Mutuals": "पारस्परिक"
"Mutuals": "पारस्परिक",
"Public replies default to unlisted scope": "सार्वजनिक उत्तर डिफ़ॉल्ट रूप से असूचीबद्ध दायरे में आते हैं"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Memoriali",
"places": "luoghi",
"offline": "disconnessa",
"Mutuals": "Mutui"
"Mutuals": "Mutui",
"Public replies default to unlisted scope": "Per impostazione predefinita, le risposte pubbliche hanno un ambito non elencato"
}

View File

@ -639,5 +639,6 @@
"Memorials": "記念碑",
"places": "場所",
"offline": "オフライン",
"Mutuals": "相互作用"
"Mutuals": "相互作用",
"Public replies default to unlisted scope": "パブリック返信はデフォルトで非公開スコープになります"
}

View File

@ -639,5 +639,6 @@
"Memorials": "기록",
"places": "장소",
"offline": "오프라인",
"Mutuals": "상호"
"Mutuals": "상호",
"Public replies default to unlisted scope": "공개 답글은 기본적으로 비공개 범위로 설정됩니다."
}

View File

@ -639,5 +639,6 @@
"Memorials": "Memorials",
"places": "cihên",
"offline": "offline",
"Mutuals": "Mutuals"
"Mutuals": "Mutuals",
"Public replies default to unlisted scope": "Bersivên gelemperî ji bo çarçoveyek nelîstekirî xwerû dide"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Gedenktekens",
"places": "plaatsen",
"offline": "offline",
"Mutuals": "Mutualiteiten"
"Mutuals": "Mutualiteiten",
"Public replies default to unlisted scope": "Openbare antwoorden hebben standaard een niet-vermeld bereik"
}

View File

@ -635,5 +635,6 @@
"Memorials": "Memorials",
"places": "places",
"offline": "offline",
"Mutuals": "Mutuals"
"Mutuals": "Mutuals",
"Public replies default to unlisted scope": "Public replies default to unlisted scope"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Pamiętnik",
"places": "miejsca",
"offline": "nieaktywny",
"Mutuals": "Wzajemne relacje"
"Mutuals": "Wzajemne relacje",
"Public replies default to unlisted scope": "Odpowiedzi publiczne domyślnie mają zakres niepubliczny"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Memoriais",
"places": "lugares",
"offline": "desligada",
"Mutuals": "Mútuas"
"Mutuals": "Mútuas",
"Public replies default to unlisted scope": "As respostas públicas são padronizadas para escopo não listado"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Мемориалы",
"places": "места",
"offline": "не в сети",
"Mutuals": "Взаимные отношения"
"Mutuals": "Взаимные отношения",
"Public replies default to unlisted scope": "Публичные ответы по умолчанию имеют скрытую область действия."
}

View File

@ -639,5 +639,6 @@
"Memorials": "Makumbusho",
"places": "maeneo",
"offline": "nje ya mtandao",
"Mutuals": "Kuheshimiana"
"Mutuals": "Kuheshimiana",
"Public replies default to unlisted scope": "Majibu ya umma kwa chaguomsingi kwa upeo ambao haujaorodheshwa"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Anıtlar",
"places": "yer",
"offline": "çevrimdışı",
"Mutuals": "Karşılıklar"
"Mutuals": "Karşılıklar",
"Public replies default to unlisted scope": "Genel yanıtlar varsayılan olarak liste dışı kapsama alınır"
}

View File

@ -639,5 +639,6 @@
"Memorials": "Меморіали",
"places": "місць",
"offline": "офлайн",
"Mutuals": "Мутуали"
"Mutuals": "Мутуали",
"Public replies default to unlisted scope": "Загальнодоступні відповіді за умовчанням мають приватний обсяг"
}

View File

@ -639,5 +639,6 @@
"Memorials": "מעמאָריאַלן",
"places": "ערטער",
"offline": "אָפפלינע",
"Mutuals": "קעגנצייַטיק"
"Mutuals": "קעגנצייַטיק",
"Public replies default to unlisted scope": "ציבור ענטפֿערס פעליקייַט צו אַנליסטעד פאַרנעם"
}

View File

@ -639,5 +639,6 @@
"Memorials": "纪念馆",
"places": "地方",
"offline": "离线",
"Mutuals": "互助基金"
"Mutuals": "互助基金",
"Public replies default to unlisted scope": "公开回复默认为不公开范围"
}

View File

@ -1839,6 +1839,12 @@ def _html_edit_profile_instance(base_dir: str, translate: {},
translate['Instance Logo'] + '</label>' + \
' <input type="file" id="instanceLogo" name="instanceLogo"' + \
' accept="' + image_formats + '"><br>\n <br>\n'
public_replies_unlisted = False
if get_config_param(base_dir, "publicRepliesUnlisted") is True:
public_replies_unlisted = True
instance_str += \
edit_check_box(translate['Public replies default to unlisted scope'],
'publicRepliesUnlisted', public_replies_unlisted)
registrations_open = False
if get_config_param(base_dir, "registration") == 'open':
registrations_open = True