From a7dca60d78e055700c29cb8a4315dc5f61f8b76a Mon Sep 17 00:00:00 2001 From: Achim Ennenbach Date: Wed, 23 Jan 2019 19:32:34 +0100 Subject: [PATCH 1/2] fixes #3639: Added description to GDPR prefs Added check in shortcode to disable the GDPR message in case the prefs are empty --- e107_admin/prefs.php | 7 +++++++ e107_core/shortcodes/batch/signup_shortcodes.php | 5 +++++ e107_languages/English/admin/lan_prefs.php | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index 2945de857..0de862676 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -575,6 +575,13 @@ $text .= "
".PRFLAN_279."
+ + + + +
".nl2br(PRFLAN_281)."
+ + ".pref_submit('display')." diff --git a/e107_core/shortcodes/batch/signup_shortcodes.php b/e107_core/shortcodes/batch/signup_shortcodes.php index 4b21497dd..ab441d5c4 100755 --- a/e107_core/shortcodes/batch/signup_shortcodes.php +++ b/e107_core/shortcodes/batch/signup_shortcodes.php @@ -651,6 +651,11 @@ class signup_shortcodes extends e_shortcode */ function sc_signup_gdpr_info() { + if (!e107::getPref('gdpr_termsandconditions', '') || !e107::getPref('gdpr_privacypolicy', '')) + { + return ''; + } + $text = e107::getParser()->lanVars(LAN_SIGNUP_124, array($this->sc_signup_gdpr_privacypolicy_link(), $this->sc_signup_gdpr_termsandconditions_link())); return $text; diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php index aa757801d..d5ac80844 100644 --- a/e107_languages/English/admin/lan_prefs.php +++ b/e107_languages/English/admin/lan_prefs.php @@ -300,3 +300,11 @@ define("PRFLAN_277", "GDPR Settings"); define("PRFLAN_278", "URL to the Privacy Policy"); define("PRFLAN_279", "Make sure the url exists! It's best to use an absolute url. This setting will be used on all places that require a consent from the user (e.g. signup, contact form/menu, etc.)."); define("PRFLAN_280", "URL to the website terms and conditions"); +define("PRFLAN_281", << Date: Thu, 24 Jan 2019 13:27:38 +0100 Subject: [PATCH 2/2] fixes #3639: Fixed GDPR info lan --- e107_languages/English/admin/lan_prefs.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php index d5ac80844..33abcfc0c 100644 --- a/e107_languages/English/admin/lan_prefs.php +++ b/e107_languages/English/admin/lan_prefs.php @@ -300,11 +300,4 @@ define("PRFLAN_277", "GDPR Settings"); define("PRFLAN_278", "URL to the Privacy Policy"); define("PRFLAN_279", "Make sure the url exists! It's best to use an absolute url. This setting will be used on all places that require a consent from the user (e.g. signup, contact form/menu, etc.)."); define("PRFLAN_280", "URL to the website terms and conditions"); -define("PRFLAN_281", <<