diff options
| author | 2023-03-21 18:47:07 +0100 | |
|---|---|---|
| committer | 2023-03-21 18:47:07 +0100 | |
| commit | e679d3df0e55530c056d701b4773ff7e74f5c82c (patch) | |
| tree | 38c69b91a41c05b3f5893b90e7f71077db95b4c0 /app/Controllers | |
| parent | 34f62896ac729131dee25997307521bf259c5efc (diff) | |
Improved: show Terms of Service in config menu (#5215)
* Use constants for path to TOS
* improve comments
* TOS title moved to template
* TOS available via config menu
* CSS: improve handling of content of TOS/about
* give info about set/unset TOS in system config
* fix target
* i18n FR
* i18n DE
Diffstat (limited to 'app/Controllers')
| -rw-r--r-- | app/Controllers/authController.php | 2 | ||||
| -rw-r--r-- | app/Controllers/indexController.php | 6 | ||||
| -rw-r--r-- | app/Controllers/userController.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php index e8f6807bd..9f9d19623 100644 --- a/app/Controllers/authController.php +++ b/app/Controllers/authController.php @@ -239,7 +239,7 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController { Minz_Error::error(403); } - $this->view->show_tos_checkbox = file_exists(join_path(DATA_PATH, 'tos.html')); + $this->view->show_tos_checkbox = file_exists(TOS_FILENAME); $this->view->show_email_field = FreshRSS_Context::$system_conf->force_email_validation; $this->view->preferred_language = Minz_Translate::getLanguage(null, Minz_Request::getPreferredLanguages(), FreshRSS_Context::$system_conf->language); FreshRSS_View::prependTitle(_t('gen.auth.registration.title') . ' ยท '); diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 968518e3f..9cb235d21 100644 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -282,13 +282,13 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { } /** - * This action displays the EULA page of FreshRSS. + * This action displays the EULA/TOS (Terms of Service) page of FreshRSS. * This page is enabled only if admin created a data/tos.html file. * The content of the page is the content of data/tos.html. - * It returns 404 if there is no EULA. + * It returns 404 if there is no EULA/TOS. */ public function tosAction() { - $terms_of_service = file_get_contents(join_path(DATA_PATH, 'tos.html')); + $terms_of_service = file_get_contents(TOS_FILENAME); if (!$terms_of_service) { Minz_Error::error(404); } diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index ac8f3be82..01656099c 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -318,7 +318,7 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController { ); } - $tos_enabled = file_exists(join_path(DATA_PATH, 'tos.html')); + $tos_enabled = file_exists(TOS_FILENAME); $accept_tos = Minz_Request::param('accept_tos', false); if ($system_conf->force_email_validation && empty($email)) { |
