Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of Base URL via website #5656

Merged
merged 4 commits into from Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Expand Up @@ -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/)
Expand Down
1 change: 1 addition & 0 deletions app/Controllers/configureController.php
Expand Up @@ -474,6 +474,7 @@ public function systemAction(): void {
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();
Expand Down
1 change: 1 addition & 0 deletions app/i18n/cz/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Nastavení systému',
'auto-update-url' => 'Adresa URL serveru pro automatické aktualizace',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'v sekundách',
'number' => 'Trvání ponechání přihlášení',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/de/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Systemeinstellungen',
'auto-update-url' => 'Auto-Update URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'in Sekunden',
'number' => 'Eingeloggt bleiben für',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/el/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Ρυθμίσεις συστήματος',
'auto-update-url' => 'Αυτόματη ενημέρωση URL διακομιστή',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'σε δευτερόλεπτα',
'number' => 'Διάρκεια παραμονής σε σύνδεση',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/en-us/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'System configuration', // IGNORE
'auto-update-url' => 'Auto-update server URL', // IGNORE
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'in seconds', // IGNORE
'number' => 'Duration to keep logged in', // IGNORE
Expand Down
1 change: 1 addition & 0 deletions app/i18n/en/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'System configuration',
'auto-update-url' => 'Auto-update server URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'in seconds',
'number' => 'Duration to keep logged in',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/es/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Configuración del sistema',
'auto-update-url' => 'URL de auto-actualización',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'en segundos',
'number' => 'Duración para mantenerse conectado',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/fa/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => ' پیکربندی سیستم',
'auto-update-url' => ' به روز رسانی خودکار URL سرور',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => ' در ثانیه',
'number' => ' مدت زمان ورود به سیستم',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/fr/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Configuration du système',
'auto-update-url' => 'URL du service de mise à jour',
'base-url' => 'Base URL', // TODO
Alkarex marked this conversation as resolved.
Show resolved Hide resolved
'cookie-duration' => array(
'help' => 'en secondes',
'number' => 'Durée avant expiration de la session',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/he/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'System configuration', // TODO
'auto-update-url' => 'Auto-update server URL', // TODO
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'in seconds', // TODO
'number' => 'Duration to keep logged in', // TODO
Expand Down
1 change: 1 addition & 0 deletions app/i18n/hu/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Rendszer konfiguráció',
'auto-update-url' => 'Szerver URL automata frissítése',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'másodpercekben',
'number' => 'Bejelentkezési sütik megtartási ideje',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/id/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Sistem konfigurasi',
'auto-update-url' => 'Auto-update server URL', // TODO
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'dalam hitungan detik',
'number' => 'Durasi untuk terus masuk',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/it/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Configurazione di sistema',
'auto-update-url' => 'Aggiorna automaticamente l’URL del server',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'in secondi',
'number' => 'Tempo in cui rimanere loggati',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/ja/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'システム設定',
'auto-update-url' => '自動アップグレードするサーバーのURL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => '秒',
'number' => 'ログを残す間隔',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/ko/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => '시스템 설정',
'auto-update-url' => '자동 업데이트 서버 URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => '초',
'number' => '로그인 유지 시간',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/lv/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Sistēmas konfigurācija',
'auto-update-url' => 'Automātiskās atjaunināšanas servera URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'sekundēs',
'number' => 'Pieteikšanās ilgums',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/nl/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Systeem configuratie',
'auto-update-url' => 'Automatische update server URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'in seconden',
'number' => 'Tijdsduur om ingelogd te blijven',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/oc/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Configuracion sistèma',
'auto-update-url' => 'URL del servici de mesa a jorn',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'en segondas',
'number' => 'Durada de téner d’ésser connectat',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/pl/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Konfiguracja serwisu',
'auto-update-url' => 'Adres serwera automatycznej aktualizacji',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'w sekundach',
'number' => 'Czas przez który użytkownik pozostanie zalogowany',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/pt-br/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Configuração do sistema',
'auto-update-url' => 'URL do servidor para atualização automática',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'em segundos',
'number' => 'Manter seção ativa durante',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/ru/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Системные настройки',
'auto-update-url' => 'URL сервера для автоматического обновления',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'в секундах',
'number' => 'Оставаться в системе на протяжении',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/sk/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Nastavenia systému',
'auto-update-url' => 'Odkaz na aktualizačný server',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'v sekundách',
'number' => 'Dobra, počas ktorej ste prihlásený',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/tr/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => 'Sistem yapılandırması',
'auto-update-url' => 'Otomatik güncelleme sunucu URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => 'saniye',
'number' => 'Oturum açık kalma süresi',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/zh-cn/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => '系统配置',
'auto-update-url' => '自动更新服务器 URL',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => '单位:秒',
'number' => '保持登录的时长',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/zh-tw/admin.php
Expand Up @@ -159,6 +159,7 @@
'system' => array(
'_' => '系統配置',
'auto-update-url' => '自動升級伺服器地址',
'base-url' => 'Base URL', // TODO
'cookie-duration' => array(
'help' => '單位(秒)',
'number' => '保持登錄的時長',
Expand Down
8 changes: 8 additions & 0 deletions app/views/configure/system.phtml
Expand Up @@ -54,6 +54,14 @@
</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->limits['cookie_duration'] ?>"/>
Alkarex marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>

<legend><?= _t('admin.system.registration.title') ?></legend>

<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion lib/Minz/Configuration.php
Expand Up @@ -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
Expand Down