From 4f20ff5369f5e1cec59597b35147b6c65a98941c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 5 Feb 2018 14:22:42 +0100 Subject: [PATCH] Added warning when using ReCAPTCHA w/o a key --- wcfsetup/install/files/acp/templates/index.tpl | 4 ++++ wcfsetup/install/files/lib/acp/page/IndexPage.class.php | 6 ++++++ wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 4 files changed, 12 insertions(+) diff --git a/wcfsetup/install/files/acp/templates/index.tpl b/wcfsetup/install/files/acp/templates/index.tpl index f60bbe28f5..baef77b165 100644 --- a/wcfsetup/install/files/acp/templates/index.tpl +++ b/wcfsetup/install/files/acp/templates/index.tpl @@ -20,6 +20,10 @@

{lang}wcf.acp.index.tmpBroken{/lang}

{/if} +{if $recaptchaWithoutKey} +

{lang}wcf.acp.index.recaptchaWithoutKey{/lang}

+{/if} + {if $usersAwaitingApproval}

{lang}wcf.acp.user.usersAwaitingApprovalInfo{/lang}

{/if} diff --git a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php index e34de6bea3..59b827a847 100755 --- a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php @@ -61,8 +61,14 @@ class IndexPage extends AbstractPage { $usersAwaitingApproval = $row['count']; } + $recaptchaWithoutKey = false; + if (CAPTCHA_TYPE == 'com.woltlab.wcf.recaptcha' && (!RECAPTCHA_PUBLICKEY || !RECAPTCHA_PRIVATEKEY)) { + $recaptchaWithoutKey = true; + } + WCF::getTPL()->assign(array( 'inRescueMode' => RequestHandler::getInstance()->inRescueMode(), + 'recaptchaWithoutKey' => $recaptchaWithoutKey, 'server' => $this->server, 'usersAwaitingApproval' => $usersAwaitingApproval )); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 008a821066..57f40466d5 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -470,6 +470,7 @@ + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index e8efef4529..4e178ec2c8 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -467,6 +467,7 @@ + -- 2.20.1