Skip to content
Snippets Groups Projects
0206-removed-obsolete-require_once-config.php-from-recapt.patch 2.57 KiB
Newer Older
From 54c5277ba96294f6ad3ee970c894896d41d4d537 Mon Sep 17 00:00:00 2001
From: lucha <lucha@paranoici.org>
Date: Tue, 28 Nov 2017 19:46:42 -0800
Subject: [PATCH 206/229] removed obsolete require_once('config.php') from
 recaptcha-bp plugin

the configuration directive has been moved to wp-config.php, so it was
duplicated. Should solve part of
https://git.autistici.org/ai/noblogs-wp/issues/13
---
 wp-content/plugins/wp-recaptcha-bp/recaptcha.php | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
index 96d4fee0..0ba2fab2 100644
--- a/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
+++ b/wp-content/plugins/wp-recaptcha-bp/recaptcha.php
@@ -11,7 +11,6 @@
  * @link      http://www.google.com/recaptcha
  */
 
-require_once('config.php');
 require_once('wp-plugin.php');
 
 if (class_exists('ReCAPTCHAPlugin'))
@@ -138,7 +137,7 @@ class ReCAPTCHAPlugin extends WPPlugin
                $option_defaults['comments_theme'] = 'standard';
                $option_defaults['recaptcha_language'] = $old_options['recaptcha_language'];
                $option_defaults['no_response_error'] = $old_options['no_response_error'];
-           } else {           
+           } else {
                $option_defaults['site_key'] = GLOBAL_RECAPTCHA_KEY;
                $option_defaults['secret'] = GLOBAL_RECAPTCHA_PRIVATE_KEY;
                $option_defaults['comments_theme'] = 'standard';
@@ -302,7 +301,7 @@ class ReCAPTCHAPlugin extends WPPlugin
             <noscript>
             <style type='text/css'>#submit {display:none;}</style>
             <input name="submit" type="submit" id="submit-alt" tabindex="6"
-                value="Submit Comment"/> 
+                value="Submit Comment"/>
             </noscript>
 COMMENT_FORM;
 
@@ -321,7 +320,7 @@ COMMENT_FORM;
             document.getElementById('recaptcha-submit-btn-area').appendChild (sub);
             document.getElementById('submit').tabIndex = 6;
             if ( typeof _recaptcha_wordpress_savedcomment != 'undefined') {
-                document.getElementById('comment').value = 
+                document.getElementById('comment').value =
                     _recaptcha_wordpress_savedcomment;
             }
             </script>
@@ -406,7 +405,7 @@ JS;
             wp_delete_comment($comment->comment_ID);
         }
     }
- 
+
    // add a settings link to the plugin in the plugin list
     function show_settings_link($links, $file) {
         if ($file == plugin_basename($this->path_to_plugin_directory() .
-- 
2.17.1