Plugin Directory

Changeset 3281107


Ignore:
Timestamp:
04/24/2025 03:11:57 PM (11 months ago)
Author:
foomagoo
Message:

Fixing database error on activation for multisite installs.

Location:
honeypot-toolkit
Files:
24 added
3 edited

Legend:

Unmodified
Added
Removed
  • honeypot-toolkit/trunk/honeypot-toolkit.php

    r3280722 r3281107  
    33Plugin Name: Honeypot Toolkit
    44Plugin URI: https://www.sterup.com/wordpress-plugins/honeypot-toolkit/
    5 Description: Automates the placement of honeypot links for Project Honeypot. Also blocks IP Addresses who have a bad rating on Project Honeypot and Spamcop. Monitors bad logins and 404 errors.
    6 Version: 5.0.1
     5Description: Automates the placement of honeypot links for Project Honeypot. Also blocks IP Addresses who have a bad rating on Project Honeypot, Spamcop, and the SANS Internet Storm Center API. Monitors bad logins and 404 errors.
     6Version: 5.0.2
    77Author: Jeff Sterup
    88Author URI: https://www.sterup.com
  • honeypot-toolkit/trunk/lib/HoneypotToolkit.class.php

    r3280722 r3281107  
    693693                foreach($networkSites as $site) {
    694694                    switch_to_blog($site->blog_id);
    695                     if ($wpdb->prefix != $wpdb->base_prefix) {
     695                    if ($wpdb->prefix != $wpdb->base_prefix && $wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."ht_ip_list'") == $wpdb->prefix."ht_ip_list") {
    696696                        $blocklistEntries = $wpdb->get_results("SELECT ip_id, ip_address_start, ip_address_end, ip_number_start, ip_number_end, offense_level, notes FROM ".$wpdb->prefix."ht_ip_list WHERE offense_level > 3", ARRAY_A);
    697697                   
     
    772772                            }
    773773                        }
    774                         $wpdb->query("DROP TABLE IF EXISTS `".$wpdb->prefix."ht_ip_list");
    775                         $wpdb->query("DROP TABLE IF EXISTS `".$wpdb->prefix."ht_activity");
     774                        $wpdb->query("DROP TABLE IF EXISTS ".$wpdb->prefix."ht_ip_list");
     775                        $wpdb->query("DROP TABLE IF EXISTS ".$wpdb->prefix."ht_activity");
    776776
    777777                        delete_option("ht_restrict_to_allowlist");
     
    876876        }
    877877
    878         update_site_option('ht_plugin_version', "5.0.1");
     878        update_site_option('ht_plugin_version', "5.0.2");
    879879    }
    880880
    881881    function check_version() {
    882         if (get_site_option('ht_plugin_version') != "5.0.1") {
     882        if (get_site_option('ht_plugin_version') != "5.0.2") {
    883883            $this->activate();
    884884        }
  • honeypot-toolkit/trunk/readme.txt

    r3280722 r3281107  
    55Requires at least: 4.6.0
    66Tested up to: 6.8
    7 Stable tag: 5.0.1
     7Stable tag: 5.0.2
    88License: GPLv2
    99
     
    3838
    3939== Changelog ==
     40
     41= 5.0.2 =
     42Fixing database error on activation for multisite installs.
    4043
    4144= 5.0.1 =
     
    198201== Upgrade Notice ==
    199202
    200 = 5.0.1 =
    201 Added option to automatically retrieve the IP ranges for Googlebot and Bingbot from their developer sites and add them to the allowlist.
    202 Added text length restriction to IP note textareas.
     203= 5.0.2 =
     204Fixing database error on activation for multisite installs.
Note: See TracChangeset for help on using the changeset viewer.