Plugin Directory

Changeset 3385639


Ignore:
Timestamp:
10/28/2025 07:11:16 AM (4 months ago)
Author:
TechGasp
Message:

Version 7.7.0

Location:
spam-master
Files:
136 added
4 edited

Legend:

Unmodified
Added
Removed
  • spam-master/trunk/class-spammaster.php

    r3385038 r3385639  
    33 * Plugin Name: Spam Master
    44 * Plugin URI: https://www.spammaster.org
    5  * Version: 7.6.9
     5 * Version: 7.7.0
    66 * Author: TechGasp
    77 * Author URI: https://www.techgasp.com
     
    3434
    3535// Define plugin constants.
    36 define( 'SPAM_MASTER_VERSION', '7.6.9' );
     36define( 'SPAM_MASTER_VERSION', '7.7.0' );
    3737define( 'SPAM_MASTER_NAME', 'Spam Master' );
    3838define( 'SPAM_MASTER_DOMAIN', 'SpamMaster.org' );
  • spam-master/trunk/includes/controllers/class-spammasteractioncontroller.php

    r3385038 r3385639  
    8484                            case 'White':
    8585                                $this->repo->add_to_whitelist( $data['pack'], $data['value'] );
    86                                 $this->repo->delete_by_fields( 'Buffer', 'Cache', $data['pack'] );
     86                                $this->repo->delete_by_fields( 'Buffer', 'Cache', $data['pack'], $data['value'] );
    8787                                break;
    8888                            case 'Option':
    89                                 $this->repo->update_option_by_type( $data['type'], $data['value'] );
     89                                $this->repo->insert_option_by_type( $data['type'], $data['value'] );
    9090                                break;
    9191                        }
     
    9393
    9494                    case 'Remove':
    95                         $this->repo->delete_by_fields( $data['where'], $data['type'], $data['pack'] );
     95                        $this->repo->delete_by_fields( $data['where'], $data['type'], $data['pack'], $data['value'] );
    9696                        break;
    9797
  • spam-master/trunk/includes/controllers/class-spammasterrepository.php

    r3385038 r3385639  
    777777
    778778    /**
     779     * Insert new spam master option value by type.
     780     *
     781     * Inserts a new option row into the table for the given type and value.
     782     * If the row already exists (same spamkey and spamtype), this function will fail.
     783     *
     784     * @param string $type  Option type.
     785     * @param mixed  $value Option value.
     786     * @return bool Success (true) or failure (false).
     787     */
     788    public function insert_option_by_type( $type, $value ) {
     789        global $wpdb;
     790        $data = array(
     791            'time'      => current_datetime()->format( 'Y-m-d H:i:s' ),
     792            'spamkey'   => 'Option',
     793            'spamtype'  => $type,
     794            'spamy'     => 'localhost',
     795            'spamvalue' => $value,
     796        );
     797        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
     798        $result = $wpdb->insert( $this->table_name, $data );
     799        return ( false !== $result && 0 !== $result );
     800    }
     801
     802    /**
    779803     * Delete entry by fields.
    780804     *
  • spam-master/trunk/readme.txt

    r3385038 r3385639  
    55Tested up to: 6.8.3
    66Requires PHP: 7.0
    7 Stable tag: 7.6.9
     7Stable tag: 7.7.0
    88License: GPLv2 or later
    99
     
    107107
    108108== Changelog ==
     109
     110= 7.7.0 =
     111* Fixing action controller update, insert option
     112* New repo insert_option_by_type
    109113
    110114= 7.6.9 =
Note: See TracChangeset for help on using the changeset viewer.