diff --git a/config/vufind/config.ini b/config/vufind/config.ini index f2af7aeba5d3b3415bb767a8893c7b21eacdcfd8..973a708cabd6b4b9e5e0dff7ca0cbb6a5998dd34 100644 --- a/config/vufind/config.ini +++ b/config/vufind/config.ini @@ -1003,7 +1003,7 @@ era = true ; allow browsing of era subdivisions ; <result_limit> most popular entries -- it only affects display order. ;alphabetical_order = true -; This section controls the availability of export methods. +; This section controls the availability of export methods. ; ; Each entry may be a comma-separated list of contexts in which the export ; option will be presented. Valid options: @@ -1259,8 +1259,7 @@ treeSearchLimit = 100 ;secretKey = "https://www.google.com/recaptcha/admin/create" ; Valid theme values: dark, light ;theme = light -; Valid forms values: changePassword, email, newAccount, -; passwordRecovery, sms, UserComments +; Valid forms values: changePassword, email, newAccount, passwordRecovery, sms ; Use * for all supported forms ;forms = changePassword, email, newAccount, passwordRecovery, sms diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php index 38498c5e0f9c415899af0878e6febf2550baef2a..7c3cc7aa35fce7e6eb278220301336f4412b899f 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php +++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php @@ -113,12 +113,6 @@ class AbstractRecord extends AbstractBase ); } - $captcha = $this->recaptcha()->active('UserComments'); - if (!$this->formWasSubmitted('comment', $captcha)) { - $this->flashMessenger()->addMessage('recaptcha_not_passed', 'error'); - return $this->redirectToRecord('', 'UserComments'); - } - // Obtain the current record object: $driver = $this->loadRecord(); diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index f729e95218a3a0e146b549d9db71eae0f20fef14..d8ccc7db0f6ec3831fe673b0d8caf3c13e642630 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -969,13 +969,6 @@ class AjaxController extends AbstractBase $id = $this->params()->fromPost('id'); $comment = $this->params()->fromPost('comment'); - - $captcha = $this->recaptcha()->active('UserComments'); - if (!$this->formWasSubmitted('comment', $captcha)) { - return $this->output( - $this->translate('recaptcha_not_passed'), self::STATUS_ERROR - ); - } if (empty($id) || empty($comment)) { return $this->output( $this->translate('An error has occurred'), self::STATUS_ERROR diff --git a/themes/bootstrap3/templates/RecordTab/usercomments.phtml b/themes/bootstrap3/templates/RecordTab/usercomments.phtml index b1215d1a4783f9dfa2adad2d789ac3beb1a2b978..4ec13a48f4a99a6866867df707f3573e6a9da1b7 100644 --- a/themes/bootstrap3/templates/RecordTab/usercomments.phtml +++ b/themes/bootstrap3/templates/RecordTab/usercomments.phtml @@ -17,15 +17,9 @@ <? $user = $this->auth()->isLoggedIn() ?> <? if($user): ?> <textarea id="comment" name="comment" class="form-control" rows="3" required></textarea><br/> - <? if ($this->recaptcha()->active('UserComments')): ?> - <?=$this->recaptcha()->html(true) ?><br/> - <? endif; ?> <input class="btn btn-primary" data-loading-text="<?=$this->transEsc('Submitting') ?>..." type="submit" value="<?=$this->transEsc("Add your comment")?>"/> <? else: ?> <textarea id="comment" name="comment" class="form-control" rows="3" disabled></textarea><br/> - <? if ($this->recaptcha()->active('UserComments')): ?> - <?=$this->recaptcha()->html(true) ?><br/> - <? endif; ?> <input onClick="Lightbox.get('MyResearch', 'UserLogin'); return false;" class="btn btn-primary" type="submit" value="<?=$this->transEsc("You must be logged in first")?>"/> <? endif; ?> </div>