From 038eb25887261552f68154affc880c510d2acf5d Mon Sep 17 00:00:00 2001
From: joe <joe@autistici.org>
Date: Thu, 19 Sep 2013 00:18:18 +0200
Subject: [PATCH 168/229] set the correct recaptcha key where you have an empty
 one

---
 wp-content/plugins/wp-recaptcha-bp/recaptcha.php | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
index 7c16045e..a9ea1d6c 100644
--- a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
+++ b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
@@ -111,8 +111,14 @@ class ReCAPTCHAPlugin extends WPPlugin
 
     // set the default options
     function register_default_options() {
-        if ($this->options)
+        if ($this->options) {
+            if ($this->keys_missing()) {
+                $this->options['site_key'] = GLOBAL_RECAPTCHA_KEY;
+                $this->options['secret'] = GLOBAL_RECAPTCHA_PRIVATE_KEY;
+                WPPlugin::add_options($this->options_name, $this->options);
+            }
             return;
+        }
         $option_defaults = array();
         $old_options = WPPlugin::retrieve_options("recaptcha");
         if ($old_options) {
@@ -172,9 +178,11 @@ class ReCAPTCHAPlugin extends WPPlugin
     }
 
     function missing_keys_notice() {
+        /*
         if ($this->keys_missing()) {
             $this->create_error_notice('reCAPTCHA API Keys are missing.');
         }
+        */
     }
 
     function validate_dropdown($array, $key, $value) {
-- 
2.17.1