aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar rupak <nnew234567@gmail.com> 2026-01-24 20:16:43 +0545
committerGravatar GitHub <noreply@github.com> 2026-01-24 15:31:43 +0100
commit85f14f92fdb5c375f0ae4100f50a529a62b480ec (patch)
treece31496afc85b2b8f44eda7db288da68161eb261
parentcb3ea904904b5b170313f285bee884be3df2ff91 (diff)
Message for closed registration (#8462)
* Add closed msg field i18n fix * Display based on registration type * Save as FreshRSS_Context::systemConf()->closed_registration_message instead * Improve messages * Revert unrelated changes * make fix-all * Minor whitespace * Simplify logic * Fix invalid use of empty() and sympler syntax --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
-rw-r--r--README.fr.md8
-rw-r--r--README.md8
-rw-r--r--app/Controllers/configureController.php1
-rw-r--r--app/Controllers/userController.php2
-rw-r--r--app/Models/SystemConfiguration.php1
-rw-r--r--app/i18n/cs/admin.php2
-rw-r--r--app/i18n/de/admin.php2
-rw-r--r--app/i18n/el/admin.php2
-rw-r--r--app/i18n/en-US/admin.php2
-rw-r--r--app/i18n/en/admin.php2
-rw-r--r--app/i18n/es/admin.php2
-rw-r--r--app/i18n/fa/admin.php2
-rw-r--r--app/i18n/fi/admin.php2
-rw-r--r--app/i18n/fr/admin.php2
-rw-r--r--app/i18n/he/admin.php2
-rw-r--r--app/i18n/hu/admin.php2
-rw-r--r--app/i18n/id/admin.php2
-rw-r--r--app/i18n/it/admin.php2
-rw-r--r--app/i18n/ja/admin.php2
-rw-r--r--app/i18n/ko/admin.php2
-rw-r--r--app/i18n/lv/admin.php2
-rw-r--r--app/i18n/nl/admin.php2
-rw-r--r--app/i18n/oc/admin.php2
-rw-r--r--app/i18n/pl/admin.php2
-rw-r--r--app/i18n/pt-BR/admin.php2
-rw-r--r--app/i18n/pt-PT/admin.php2
-rw-r--r--app/i18n/ru/admin.php2
-rw-r--r--app/i18n/sk/admin.php2
-rw-r--r--app/i18n/tr/admin.php2
-rw-r--r--app/i18n/uk/admin.php2
-rw-r--r--app/i18n/zh-CN/admin.php2
-rw-r--r--app/i18n/zh-TW/admin.php2
-rw-r--r--app/views/auth/formLogin.phtml17
-rw-r--r--app/views/configure/system.phtml10
34 files changed, 87 insertions, 14 deletions
diff --git a/README.fr.md b/README.fr.md
index 280f0bf04..146348969 100644
--- a/README.fr.md
+++ b/README.fr.md
@@ -242,13 +242,13 @@ Voir le [dépôt dédié à ces extensions](https://github.com/FreshRSS/Extensio
| 日本語 (ja) | ■■■■■■■■■・ 90% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fja+%2F%28TODO%7CDIRTY%29%24%2F) |
| 한국어 (ko) | ■■■■■■■■・・ 84% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fko+%2F%28TODO%7CDIRTY%29%24%2F) |
| Latviešu (lv) | ■■■■■■■・・・ 78% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Flv+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Nederlands (nl) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Nederlands (nl) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |
| Occitan (oc) | ■■■■■■■・・・ 76% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Foc+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Polski (pl) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Português (Brasil) (pt-BR) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-BR+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Polski (pl) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Português (Brasil) (pt-BR) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-BR+%2F%28TODO%7CDIRTY%29%24%2F) |
| Português (Portugal) (pt-PT) | ■■■■■■■■・・ 83% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-PT+%2F%28TODO%7CDIRTY%29%24%2F) |
| Русский (ru) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fru+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Slovenčina (sk) | ■■■■■■■■・・ 84% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Slovenčina (sk) | ■■■■■■■■・・ 83% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) |
| Türkçe (tr) | ■■■■■■■■■・ 91% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ftr+%2F%28TODO%7CDIRTY%29%24%2F) |
| Українська (uk) | ■■■■■■■■■・ 94% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fuk+%2F%28TODO%7CDIRTY%29%24%2F) |
| 简体中文 (zh-CN) | ■■■■■■■■■・ 99% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fzh-CN+%2F%28TODO%7CDIRTY%29%24%2F) |
diff --git a/README.md b/README.md
index 9257f70dc..0e4839ccf 100644
--- a/README.md
+++ b/README.md
@@ -138,13 +138,13 @@ See the [repository dedicated to those extensions](https://github.com/FreshRSS/E
| 日本語 (ja) | ■■■■■■■■■・ 90% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fja+%2F%28TODO%7CDIRTY%29%24%2F) |
| 한국어 (ko) | ■■■■■■■■・・ 84% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fko+%2F%28TODO%7CDIRTY%29%24%2F) |
| Latviešu (lv) | ■■■■■■■・・・ 78% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Flv+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Nederlands (nl) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Nederlands (nl) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fnl+%2F%28TODO%7CDIRTY%29%24%2F) |
| Occitan (oc) | ■■■■■■■・・・ 76% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Foc+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Polski (pl) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Português (Brasil) (pt-BR) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-BR+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Polski (pl) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpl+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Português (Brasil) (pt-BR) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-BR+%2F%28TODO%7CDIRTY%29%24%2F) |
| Português (Portugal) (pt-PT) | ■■■■■■■■・・ 83% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fpt-PT+%2F%28TODO%7CDIRTY%29%24%2F) |
| Русский (ru) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fru+%2F%28TODO%7CDIRTY%29%24%2F) |
-| Slovenčina (sk) | ■■■■■■■■・・ 84% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) |
+| Slovenčina (sk) | ■■■■■■■■・・ 83% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fsk+%2F%28TODO%7CDIRTY%29%24%2F) |
| Türkçe (tr) | ■■■■■■■■■・ 91% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ftr+%2F%28TODO%7CDIRTY%29%24%2F) |
| Українська (uk) | ■■■■■■■■■・ 94% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fuk+%2F%28TODO%7CDIRTY%29%24%2F) |
| 简体中文 (zh-CN) | ■■■■■■■■■・ 99% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fzh-CN+%2F%28TODO%7CDIRTY%29%24%2F) |
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 98a201e26..893fa5478 100644
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -609,6 +609,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
FreshRSS_Context::systemConf()->limits = $limits;
FreshRSS_Context::systemConf()->title = Minz_Request::paramString('instance-name') ?: 'FreshRSS';
FreshRSS_Context::systemConf()->force_email_validation = Minz_Request::paramBoolean('force-email-validation');
+ FreshRSS_Context::systemConf()->closed_registration_message = Minz_Request::paramString('closed_registration_message') ?: '';
FreshRSS_Context::systemConf()->save();
invalidateHttpCache();
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index 6f5b27280..e634c3992 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -65,7 +65,7 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
* Return if the maximum number of registrations has been reached.
* Note a max_registrations of 0 means there is no limit.
*
- * @return bool true if number of users >= max registrations, false else.
+ * @return bool true if number of users >= max registrations, false otherwise.
*/
public static function max_registrations_reached(): bool {
$limit_registrations = FreshRSS_Context::systemConf()->limits['max_registrations'];
diff --git a/app/Models/SystemConfiguration.php b/app/Models/SystemConfiguration.php
index a11142f80..e366cbb8b 100644
--- a/app/Models/SystemConfiguration.php
+++ b/app/Models/SystemConfiguration.php
@@ -19,6 +19,7 @@ declare(strict_types=1);
* @property-read bool $http_auth_auto_register
* @property-read string $http_auth_auto_register_email_field
* @property string $language
+ * @property string $closed_registration_message
* @property array<string,int> $limits
* @property-read string $logo_html
* @property-read string $meta_description
diff --git a/app/i18n/cs/admin.php b/app/i18n/cs/admin.php
index bef8028ba..8aa9c45c1 100644
--- a/app/i18n/cs/admin.php
+++ b/app/i18n/cs/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Základní adresa URL',
'recommendation' => 'Automatické doporučení: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'v sekundách',
'number' => 'Trvání ponechání přihlášení',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Vynutit ověření e-mailové adresy',
'instance-name' => 'Název instance',
'max-categories' => 'Maximální počet kategorií na uživatele',
diff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.php
index 2bb5ebe52..72a9f1925 100644
--- a/app/i18n/de/admin.php
+++ b/app/i18n/de/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // IGNORE
'recommendation' => 'Automatische Empfehlung: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'in Sekunden',
'number' => 'Eingeloggt bleiben für',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'E-Mail Adressvalidierung erzwingen',
'instance-name' => 'Bezeichnung',
'max-categories' => 'Anzahl erlaubter Kategorien pro Benutzer',
diff --git a/app/i18n/el/admin.php b/app/i18n/el/admin.php
index 3a1a1b79c..56efd9fe5 100644
--- a/app/i18n/el/admin.php
+++ b/app/i18n/el/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'σε δευτερόλεπτα',
'number' => 'Διάρκεια παραμονής σε σύνδεση',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Επιβολή επιβεβαίωσης διεύθυνσης email',
'instance-name' => 'Instance name', // TODO
'max-categories' => 'Μέγιστος αριθμός κατηγοριών ανά χρήστη',
diff --git a/app/i18n/en-US/admin.php b/app/i18n/en-US/admin.php
index 768e6bcfa..30e875253 100644
--- a/app/i18n/en-US/admin.php
+++ b/app/i18n/en-US/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // IGNORE
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // IGNORE
),
+ 'closed_registration_message' => 'Message if registrations are closed', // IGNORE
'cookie-duration' => array(
'help' => 'in seconds', // IGNORE
'number' => 'Duration to keep logged in', // IGNORE
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // IGNORE
'force_email_validation' => 'Force email address validation', // IGNORE
'instance-name' => 'Instance name', // IGNORE
'max-categories' => 'Max number of categories per user', // IGNORE
diff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.php
index f905a2030..76428bd67 100644
--- a/app/i18n/en/admin.php
+++ b/app/i18n/en/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL',
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed',
'cookie-duration' => array(
'help' => 'in seconds',
'number' => 'Duration to keep logged in',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.',
'force_email_validation' => 'Force email address validation',
'instance-name' => 'Instance name',
'max-categories' => 'Max number of categories per user',
diff --git a/app/i18n/es/admin.php b/app/i18n/es/admin.php
index 5a951162f..641ffaaf0 100644
--- a/app/i18n/es/admin.php
+++ b/app/i18n/es/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL Base',
'recommendation' => 'Recomendación automática: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'en segundos',
'number' => 'Duración para mantenerse conectado',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Forzar la validación de direcciones de correo electrónico',
'instance-name' => 'Nombre de la fuente',
'max-categories' => 'Límite de categorías por usuario',
diff --git a/app/i18n/fa/admin.php b/app/i18n/fa/admin.php
index 5e63eb4d2..a50ec88f8 100644
--- a/app/i18n/fa/admin.php
+++ b/app/i18n/fa/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'آدرس پایه',
'recommendation' => 'توصیه: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => ' در ثانیه',
'number' => ' مدت زمان ورود به سیستم',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => ' اعتبارسنجی آدرس ایمیل اجباری',
'instance-name' => ' نام نمونه',
'max-categories' => ' حداکثر تعداد دسته ها برای هر کاربر',
diff --git a/app/i18n/fi/admin.php b/app/i18n/fi/admin.php
index 83998c429..321409de2 100644
--- a/app/i18n/fi/admin.php
+++ b/app/i18n/fi/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL-pääosoite',
'recommendation' => 'Automaattinen suositus: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'sekunteina',
'number' => 'Sisäänkirjauksen kesto',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Pakota sähköpostiosoitteen vahvistus',
'instance-name' => 'Instanssin nimi',
'max-categories' => 'Luokkien enimmäismäärä käyttäjää kohti',
diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.php
index 8924f749c..ccdf11865 100644
--- a/app/i18n/fr/admin.php
+++ b/app/i18n/fr/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL de la racine',
'recommendation' => 'Recommandation automatique : <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message si les nouvelles inscriptions sont fermées',
'cookie-duration' => array(
'help' => 'en secondes',
'number' => 'Durée avant expiration de la session',
),
+ 'default_closed_registration_message' => 'Ce serveur n’accepte plus de nouvelles inscriptions pour le moment.',
'force_email_validation' => 'Forcer la validation des adresses email',
'instance-name' => 'Nom de l’instance',
'max-categories' => 'Limite de catégories par utilisateur',
diff --git a/app/i18n/he/admin.php b/app/i18n/he/admin.php
index a29e0d804..f0be03998 100644
--- a/app/i18n/he/admin.php
+++ b/app/i18n/he/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'in seconds', // TODO
'number' => 'Duration to keep logged in', // TODO
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Force email address validation', // TODO
'instance-name' => 'Instance name', // TODO
'max-categories' => 'Max number of categories per user', // TODO
diff --git a/app/i18n/hu/admin.php b/app/i18n/hu/admin.php
index fb09f7a72..dab0dc9af 100644
--- a/app/i18n/hu/admin.php
+++ b/app/i18n/hu/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Alap URL',
'recommendation' => 'Automatikus ajánlás: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'másodpercekben',
'number' => 'Bejelentkezve maradás időtartam',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Kötelező email cím visszaigazolás',
'instance-name' => 'Instance név',
'max-categories' => 'Maximális kategóriák száma felhasználónkét',
diff --git a/app/i18n/id/admin.php b/app/i18n/id/admin.php
index 8e5dcfe1c..398bb21e6 100644
--- a/app/i18n/id/admin.php
+++ b/app/i18n/id/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL peladen',
'recommendation' => 'Rekomendasi Otomatis: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'dalam detik',
'number' => 'Durasi untuk terus masuk',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Paksa verifikasi alamat surel',
'instance-name' => 'Nama peladen',
'max-categories' => 'Jumlah kategori maksimal per pengguna',
diff --git a/app/i18n/it/admin.php b/app/i18n/it/admin.php
index 0d835f13e..0a999502a 100644
--- a/app/i18n/it/admin.php
+++ b/app/i18n/it/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL base',
'recommendation' => 'Suggerimento automatico: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'in secondi',
'number' => 'Tempo in cui rimanere loggati',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Forza la validazione dell’indirizzo mail',
'instance-name' => 'Nome istanza',
'max-categories' => 'Limite categorie per utente',
diff --git a/app/i18n/ja/admin.php b/app/i18n/ja/admin.php
index bd504258c..8c90ac2a5 100644
--- a/app/i18n/ja/admin.php
+++ b/app/i18n/ja/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'ベースURL',
'recommendation' => '自動的に推薦: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => '秒',
'number' => 'ログイン状態維持時間',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Eメールアドレスの検証を強制します',
'instance-name' => 'インスタンス名',
'max-categories' => '1ユーザーごとのカテゴリの最大値',
diff --git a/app/i18n/ko/admin.php b/app/i18n/ko/admin.php
index 1ed50f5a7..f8b29cfdd 100644
--- a/app/i18n/ko/admin.php
+++ b/app/i18n/ko/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // IGNORE
'recommendation' => '자동 추천: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => '초',
'number' => '로그인 유지 시간',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => '이메일 주소 확인 강제화',
'instance-name' => '인스턴스 이름',
'max-categories' => '사용자별 카테고리 개수 제한',
diff --git a/app/i18n/lv/admin.php b/app/i18n/lv/admin.php
index b87337f71..118b6d682 100644
--- a/app/i18n/lv/admin.php
+++ b/app/i18n/lv/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'sekundēs',
'number' => 'Pieteikšanās ilgums',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Piespiedu e-pasta adreses validēšana',
'instance-name' => 'Instances nosaukums',
'max-categories' => 'Maksimālais kategoriju skaits vienam lietotājam',
diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.php
index f354c7a2f..95b346293 100644
--- a/app/i18n/nl/admin.php
+++ b/app/i18n/nl/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Basis-url',
'recommendation' => 'Automatische aanbeveling: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'in seconden',
'number' => 'Tijdsduur om ingelogd te blijven',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Emailadresvalidatie forceren',
'instance-name' => 'Voorbeeld naam',
'max-categories' => 'Categorielimiet per gebruiker',
diff --git a/app/i18n/oc/admin.php b/app/i18n/oc/admin.php
index 2dc8f1ddf..9a8ddc22f 100644
--- a/app/i18n/oc/admin.php
+++ b/app/i18n/oc/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'en segondas',
'number' => 'Durada de téner d’ésser connectat',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Forçar la validacion de las adreças electronicas',
'instance-name' => 'Nom de l’instància',
'max-categories' => 'Limita de categoria per utilizaire',
diff --git a/app/i18n/pl/admin.php b/app/i18n/pl/admin.php
index e54403a1b..cae8d8ad3 100644
--- a/app/i18n/pl/admin.php
+++ b/app/i18n/pl/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Baza URL-a',
'recommendation' => 'Automatyczne zalecenie: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'w sekundach',
'number' => 'Czas przez który użytkownik pozostanie zalogowany',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Wymuś weryfikację adresu e-mail',
'instance-name' => 'Nazwa instancji',
'max-categories' => 'Maksymalna liczba kategorii na użytkownika',
diff --git a/app/i18n/pt-BR/admin.php b/app/i18n/pt-BR/admin.php
index 3a873935d..e26419538 100644
--- a/app/i18n/pt-BR/admin.php
+++ b/app/i18n/pt-BR/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL Base',
'recommendation' => 'Recomendação automática: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'em segundos',
'number' => 'Manter seção ativa durante',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Força verificação do endereço de email',
'instance-name' => 'Nome da instância',
'max-categories' => 'Limite de categorias por usuário',
diff --git a/app/i18n/pt-PT/admin.php b/app/i18n/pt-PT/admin.php
index d5956a310..edfcd5986 100644
--- a/app/i18n/pt-PT/admin.php
+++ b/app/i18n/pt-PT/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'URL Base',
'recommendation' => 'Recomendação automática: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'em segundos',
'number' => 'Manter seção ativa durante',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Força verificação do endereço de email',
'instance-name' => 'Nome da instância',
'max-categories' => 'Limite de categorias por utilizador',
diff --git a/app/i18n/ru/admin.php b/app/i18n/ru/admin.php
index 226994d57..473cc6b48 100644
--- a/app/i18n/ru/admin.php
+++ b/app/i18n/ru/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Основной URL-адрес',
'recommendation' => 'Автоматическая рекомендация: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'в секундах',
'number' => 'Оставаться в системе на протяжении',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Обязать подтверждать адрес электронной почты',
'instance-name' => 'Название экземпляра',
'max-categories' => 'Максимальное количество категорий на пользователя',
diff --git a/app/i18n/sk/admin.php b/app/i18n/sk/admin.php
index cf193403c..621c9463c 100644
--- a/app/i18n/sk/admin.php
+++ b/app/i18n/sk/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Základná URL',
'recommendation' => 'Automatické odporúčanie: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'v sekundách',
'number' => 'Dobra, počas ktorej ste prihlásený',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Vynútiť overenie e-mailovej adresy',
'instance-name' => 'Názov inštancie',
'max-categories' => 'Limit počtu kategórií pre používateľa',
diff --git a/app/i18n/tr/admin.php b/app/i18n/tr/admin.php
index e12930b58..e77585a8d 100644
--- a/app/i18n/tr/admin.php
+++ b/app/i18n/tr/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Temel URL',
'recommendation' => 'Otomatik öneri: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'saniye cinsinden',
'number' => 'Oturum açık kalma süresi',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'E-posta adresi doğrulamasını zorunlu kıl',
'instance-name' => 'Örnek adı',
'max-categories' => 'Kullanıcı başına maksimum kategori sayısı',
diff --git a/app/i18n/uk/admin.php b/app/i18n/uk/admin.php
index dbd77af63..9ba2e803a 100644
--- a/app/i18n/uk/admin.php
+++ b/app/i18n/uk/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => 'Базова URL-адреса',
'recommendation' => 'Автоматична порада: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => 'секунд',
'number' => 'Тривалість сеансу',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => 'Підтверджувати адресу електронної пошти',
'instance-name' => 'Назва сервера',
'max-categories' => 'Максимум категорій у користувача',
diff --git a/app/i18n/zh-CN/admin.php b/app/i18n/zh-CN/admin.php
index 2a2fc0459..20aa6d7af 100644
--- a/app/i18n/zh-CN/admin.php
+++ b/app/i18n/zh-CN/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => '基础 URL',
'recommendation' => '推荐: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => '单位:秒',
'number' => '保持登录的时长',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => '强制验证邮箱地址',
'instance-name' => '实例名称',
'max-categories' => '各用户分类数限制',
diff --git a/app/i18n/zh-TW/admin.php b/app/i18n/zh-TW/admin.php
index 2bfa2799b..4b790ab5d 100644
--- a/app/i18n/zh-TW/admin.php
+++ b/app/i18n/zh-TW/admin.php
@@ -83,10 +83,12 @@ return array(
'_' => '基本URL',
'recommendation' => '自動推薦: <kbd>%s</kbd>',
),
+ 'closed_registration_message' => 'Message if registrations are closed', // TODO
'cookie-duration' => array(
'help' => '單位(秒)',
'number' => '保持登錄的時長',
),
+ 'default_closed_registration_message' => 'This server does not accept new registrations at the moment.', // TODO
'force_email_validation' => '強制驗證郵箱地址',
'instance-name' => '實例名稱',
'max-categories' => '各使用者分類數限制',
diff --git a/app/views/auth/formLogin.phtml b/app/views/auth/formLogin.phtml
index 658adc912..91a3d05a3 100644
--- a/app/views/auth/formLogin.phtml
+++ b/app/views/auth/formLogin.phtml
@@ -5,11 +5,18 @@
<main class="prompt">
<h1><?= _t('gen.auth.login') ?></h1>
- <?php if (!FreshRSS_user_Controller::max_registrations_reached()) { ?>
- <div class="link-registration">
- <a href="<?= _url('auth', 'register') ?>"><?= _t('gen.auth.registration.ask') ?></a>
- </div>
- <?php } ?>
+ <?php if ((FreshRSS_Context::systemConf()->limits['max_registrations'] ?? 1) !== 1): ?>
+ <?php if (FreshRSS_user_Controller::max_registrations_reached()): ?>
+ <div><?=
+ FreshRSS_Context::systemConf()->attributeString('closed_registration_message') ?:
+ _t('admin.system.default_closed_registration_message')
+ ?></div>
+ <?php else: ?>
+ <div class="link-registration">
+ <a href="<?= _url('auth', 'register') ?>"><?= _t('gen.auth.registration.ask') ?></a>
+ </div>
+ <?php endif; ?>
+ <?php endif; ?>
<form class="crypto-form" method="post" action="<?= _url('auth', 'login') ?>">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml
index 2bee35227..7097126ed 100644
--- a/app/views/configure/system.phtml
+++ b/app/views/configure/system.phtml
@@ -93,6 +93,16 @@
</div>
<div class="form-group">
+ <label class="group-name" for="closed_registration_message"><?= _t('admin.system.closed_registration_message') ?></label>
+ <div class="group-controls">
+ <textarea id="closed_registration_message" name="closed_registration_message" rows="4" cols="50"><?=
+ FreshRSS_Context::systemConf()->attributeString('closed_registration_message') ?:
+ _t('admin.system.default_closed_registration_message')
+ ?></textarea>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name"><?= _t('index.tos.title') ?></label>
<div class="group-controls">
<?php if (file_exists(TOS_FILENAME)) { ?>