Better explanation on how to provide and obtain the reCAPTCHA key
authorAlexander Ebert <ebert@woltlab.com>
Mon, 12 Feb 2018 14:10:15 +0000 (15:10 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 12 Feb 2018 14:10:15 +0000 (15:10 +0100)
wcfsetup/install/files/lib/acp/page/IndexPage.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 59b827a847df5ca458bcfa35bc576c4d7be8fff3..f478b337f11204e6fea267baa50ceb0ae34dad42 100755 (executable)
@@ -1,7 +1,9 @@
 <?php
 namespace wcf\acp\page;
 use wcf\page\AbstractPage;
+use wcf\system\cache\builder\OptionCacheBuilder;
 use wcf\system\package\PackageInstallationDispatcher;
+use wcf\system\request\LinkHandler;
 use wcf\system\request\RequestHandler;
 use wcf\system\WCF;
 
@@ -62,13 +64,25 @@ class IndexPage extends AbstractPage {
                }
                
                $recaptchaWithoutKey = false;
+               $recaptchaKeyLink = '';
                if (CAPTCHA_TYPE == 'com.woltlab.wcf.recaptcha' && (!RECAPTCHA_PUBLICKEY || !RECAPTCHA_PRIVATEKEY)) {
                        $recaptchaWithoutKey = true;
+                       
+                       $optionCategories = OptionCacheBuilder::getInstance()->getData(array(), 'categories');
+                       $categorySecurity = $optionCategories['security'];
+                       $recaptchaKeyLink = LinkHandler::getInstance()->getLink(
+                               'Option',
+                               array(
+                                       'id' => $categorySecurity->categoryID,
+                                       'optionName' => 'recaptcha_publickey'
+                               ), '#security.antispam'
+                       );
                }
                
                WCF::getTPL()->assign(array(
                        'inRescueMode' => RequestHandler::getInstance()->inRescueMode(),
                        'recaptchaWithoutKey' => $recaptchaWithoutKey,
+                       'recaptchaKeyLink' => $recaptchaKeyLink,
                        'server' => $this->server,
                        'usersAwaitingApproval' => $usersAwaitingApproval
                ));
index 57f40466d574c43f951de642d6f7a469f5c885d8..8d545aebcbf50ea36b7c1cb6e2a5c5cad20f65d8 100644 (file)
                <item name="wcf.acp.index.woltlab.forums"><![CDATA[Supportforum]]></item>
                <item name="wcf.acp.index.woltlab.tickets"><![CDATA[Ticket-Support]]></item>
                <item name="wcf.acp.index.woltlab.pluginStore"><![CDATA[Plugin-Store]]></item>
-               <item name="wcf.acp.index.recaptchaWithoutKey"><![CDATA[Die Nutzung von ReCAPTCHA ohne einen individuelle Website-Schlüssel wird von Google nicht mehr unterstützt.]]></item>
+               <item name="wcf.acp.index.recaptchaWithoutKey"><![CDATA[Die Nutzung von reCAPTCHA ohne einen individuelle Website-Schlüssel wird von Google nicht mehr unterstützt.<br><br>Für eine weitere Nutzung müssen Sie <a href="{$recaptchaKeyLink}">einen Schlüssel in den Optionen hinterlegen</a>, unterhalb des Eingabefeldes befindet sich eine Anleitung zum Anfordern des Schlüssels.]]></item>
        </category>
        
        <category name="wcf.acp.label">
index 4e178ec2c896908d3e7f5fdf48253f6b005506a9..4aa2cb3b7838a4a1a7a2cff6f375d886f9d775c7 100644 (file)
                <item name="wcf.acp.index.woltlab.forums"><![CDATA[Support Forums]]></item>
                <item name="wcf.acp.index.woltlab.tickets"><![CDATA[Ticket Support]]></item>
                <item name="wcf.acp.index.woltlab.pluginStore"><![CDATA[Plugin Store]]></item>
-               <item name="wcf.acp.index.recaptchaWithoutKey"><![CDATA[Using ReCAPTCHA without an individual website key is no longer supported by Google.]]></item>
+               <item name="wcf.acp.index.recaptchaWithoutKey"><![CDATA[Using reCAPTCHA without an individual website key is no longer supported by Google.<br><br>For further use you need to <a href="{$recaptchaKeyLink}">provide a key in your options</a>, please follow the instructions below the input field to obtain a key.]]></item>
        </category>
        
        <category name="wcf.acp.label">