Allow configuration of Base URL via website (#5656)

* Allow configuration of Base URL via website

* Fix alphabetization of CREDITS

* Apply suggestions from code review

* Add Automatic recommendation

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
Sam Cohen 2023-09-13 14:58:10 -06:00 committed by GitHub
parent 0bf33abac8
commit 52d87c3eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 108 additions and 1 deletions

View File

@ -186,6 +186,7 @@ People are sorted by name so please keep this order.
* [Rosemary Le Faive](https://github.com/rosiel): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:rosiel)
* [ryoku-cha](https://github.com/ryoku-cha): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:ryoku-cha)
* [Sadetdin EYILI](https://github.com/sad270): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:sad270)
* [Sam Cohen](https://github.com/samc1213): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:samc1213)
* [Sandro Jäckel](https://github.com/SuperSandro2000): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:SuperSandro2000), [Web](https://supersandro.de/)
* [Sebastian K](https://github.com/skrollme): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:skrollme)
* [shn7798](https://github.com/shn7798): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:shn7798), [Web](http://www.code2talk.com/)

View File

@ -474,6 +474,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
FreshRSS_Context::$system_conf->title = Minz_Request::paramString('instance-name') ?: 'FreshRSS';
FreshRSS_Context::$system_conf->auto_update_url = Minz_Request::paramString('auto-update-url');
FreshRSS_Context::$system_conf->force_email_validation = Minz_Request::paramBoolean('force-email-validation');
FreshRSS_Context::$system_conf->base_url = Minz_Request::paramString('base-url');
FreshRSS_Context::$system_conf->save();
invalidateHttpCache();

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Nastavení systému',
'auto-update-url' => 'Adresa URL serveru pro automatické aktualizace',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'v sekundách',
'number' => 'Trvání ponechání přihlášení',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Systemeinstellungen',
'auto-update-url' => 'Auto-Update URL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'in Sekunden',
'number' => 'Eingeloggt bleiben für',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Ρυθμίσεις συστήματος',
'auto-update-url' => 'Αυτόματη ενημέρωση URL διακομιστή',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'σε δευτερόλεπτα',
'number' => 'Διάρκεια παραμονής σε σύνδεση',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'System configuration', // IGNORE
'auto-update-url' => 'Auto-update server URL', // IGNORE
'base-url' => array(
'_' => 'Base URL', // IGNORE
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // IGNORE
),
'cookie-duration' => array(
'help' => 'in seconds', // IGNORE
'number' => 'Duration to keep logged in', // IGNORE

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'System configuration',
'auto-update-url' => 'Auto-update server URL',
'base-url' => array(
'_' => 'Base URL',
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>',
),
'cookie-duration' => array(
'help' => 'in seconds',
'number' => 'Duration to keep logged in',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Configuración del sistema',
'auto-update-url' => 'URL de auto-actualización',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'en segundos',
'number' => 'Duración para mantenerse conectado',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => ' پیکربندی سیستم',
'auto-update-url' => ' به روز رسانی خودکار URL سرور',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => ' در ثانیه',
'number' => ' مدت زمان ورود به سیستم',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Configuration du système',
'auto-update-url' => 'URL du service de mise à jour',
'base-url' => array(
'_' => 'URL de la racine',
'recommendation' => 'Recommandation automatique: <kbd>%s</kbd>',
),
'cookie-duration' => array(
'help' => 'en secondes',
'number' => 'Durée avant expiration de la session',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'System configuration', // TODO
'auto-update-url' => 'Auto-update server URL', // TODO
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'in seconds', // TODO
'number' => 'Duration to keep logged in', // TODO

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Rendszer konfiguráció',
'auto-update-url' => 'Szerver URL automata frissítése',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'másodpercekben',
'number' => 'Bejelentkezési sütik megtartási ideje',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Sistem konfigurasi',
'auto-update-url' => 'Auto-update server URL', // TODO
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'dalam hitungan detik',
'number' => 'Durasi untuk terus masuk',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Configurazione di sistema',
'auto-update-url' => 'Aggiorna automaticamente lURL del server',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'in secondi',
'number' => 'Tempo in cui rimanere loggati',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'システム設定',
'auto-update-url' => '自動アップグレードするサーバーのURL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => '秒',
'number' => 'ログを残す間隔',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => '시스템 설정',
'auto-update-url' => '자동 업데이트 서버 URL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => '초',
'number' => '로그인 유지 시간',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Sistēmas konfigurācija',
'auto-update-url' => 'Automātiskās atjaunināšanas servera URL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'sekundēs',
'number' => 'Pieteikšanās ilgums',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Systeem configuratie',
'auto-update-url' => 'Automatische update server URL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'in seconden',
'number' => 'Tijdsduur om ingelogd te blijven',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Configuracion sistèma',
'auto-update-url' => 'URL del servici de mesa a jorn',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'en segondas',
'number' => 'Durada de téner désser connectat',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Konfiguracja serwisu',
'auto-update-url' => 'Adres serwera automatycznej aktualizacji',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'w sekundach',
'number' => 'Czas przez który użytkownik pozostanie zalogowany',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Configuração do sistema',
'auto-update-url' => 'URL do servidor para atualização automática',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'em segundos',
'number' => 'Manter seção ativa durante',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Системные настройки',
'auto-update-url' => 'URL сервера для автоматического обновления',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'в секундах',
'number' => 'Оставаться в системе на протяжении',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Nastavenia systému',
'auto-update-url' => 'Odkaz na aktualizačný server',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'v sekundách',
'number' => 'Dobra, počas ktorej ste prihlásený',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => 'Sistem yapılandırması',
'auto-update-url' => 'Otomatik güncelleme sunucu URL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => 'saniye',
'number' => 'Oturum açık kalma süresi',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => '系统配置',
'auto-update-url' => '自动更新服务器 URL',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => '单位:秒',
'number' => '保持登录的时长',

View File

@ -159,6 +159,10 @@ return array(
'system' => array(
'_' => '系統配置',
'auto-update-url' => '自動升級伺服器地址',
'base-url' => array(
'_' => 'Base URL', // TODO
'recommendation' => 'Automatic recommendation: <kbd>%s</kbd>', // TODO
),
'cookie-duration' => array(
'help' => '單位(秒)',
'number' => '保持登錄的時長',

View File

@ -21,6 +21,15 @@
</div>
</div>
<div class="form-group">
<label class="group-name" for="base-url"><?= _t('admin.system.base-url') ?></label>
<div class="group-controls">
<input type="text" id="base-url" name="base-url" value="<?= FreshRSS_Context::$system_conf->base_url ?>"
data-leave-validation="<?= FreshRSS_Context::$system_conf->base_url ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('admin.system.base-url.recommendation', dirname(Minz_Request::guessBaseUrl())) ?></p>
</div>
</div>
<div class="form-group">
<label class="group-name" for="auto-update-url"><?= _t('admin.system.auto-update-url') ?></label>
<div class="group-controls">

View File

@ -2,7 +2,7 @@
/**
* Manage configuration for the application.
* @property-read string $base_url
* @property string $base_url
* @property array{'type':string,'host':string,'user':string,'password':string,'base':string,'prefix':string,
* 'connection_uri_params':string,'pdo_options':array<int,int|string|bool>} $db
* @property-read string $disable_update