aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar yzqzss <30341059+yzqzss@users.noreply.github.com> 2023-12-29 03:06:26 +0800
committerGravatar GitHub <noreply@github.com> 2023-12-28 20:06:26 +0100
commit2bd9f6303014f67537230d507416df7460817f7f (patch)
treee4f705e2ffbe07d939fb4e004e6e691f6f2c9526
parent08345d0a95cf2435c24e3d40b196cd87aea46d0b (diff)
fix: `base_url` becomes empty after saving configuration (#5992)
* fix: `base_url` becomes empty after saving configuration * Just remove the line * Use read-ony instead https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly#attribute_interactions * Revert for websub * Changelog --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/Controllers/configureController.php1
-rw-r--r--app/views/configure/system.phtml2
3 files changed, 2 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3de89e2bb..76beda475 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
* Fix crash regression when enabling extensions [#5979](https://github.com/FreshRSS/FreshRSS/pull/5979)
* Fix crash regression during export when using MySQL [#5988](https://github.com/FreshRSS/FreshRSS/pull/5988)
* More robust assignment of categories to feeds [#5986](https://github.com/FreshRSS/FreshRSS/pull/5986)
+ * Fix `base_url` being cleared when saving settings [#5992](https://github.com/FreshRSS/FreshRSS/pull/5992)
* i18n
* Improve simplified Chinese [#5977](https://github.com/FreshRSS/FreshRSS/pull/5977)
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index c52a5d23c..8db36a899 100644
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -485,7 +485,6 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
FreshRSS_Context::systemConf()->title = Minz_Request::paramString('instance-name') ?: 'FreshRSS';
FreshRSS_Context::systemConf()->auto_update_url = Minz_Request::paramString('auto-update-url');
FreshRSS_Context::systemConf()->force_email_validation = Minz_Request::paramBoolean('force-email-validation');
- FreshRSS_Context::systemConf()->base_url = Minz_Request::paramString('base-url');
FreshRSS_Context::systemConf()->save();
invalidateHttpCache();
diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml
index 09d1fe188..809b869a9 100644
--- a/app/views/configure/system.phtml
+++ b/app/views/configure/system.phtml
@@ -25,7 +25,7 @@
<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::systemConf()->base_url ?>"
- data-leave-validation="<?= FreshRSS_Context::systemConf()->base_url ?>" disabled="disabled" />
+ data-leave-validation="<?= FreshRSS_Context::systemConf()->base_url ?>" readonly="readonly" />
<p class="help"><?= _i('help') ?> <?= _t('admin.system.base-url.recommendation', dirname(Minz_Request::guessBaseUrl())) ?></p>
<p class="help"><?= _i('help') ?> <?= _t('admin.system.sensitive-parameter') ?></p>
</div>