Plugin Directory

Changeset 1258674


Ignore:
Timestamp:
10/03/2015 08:12:21 AM (11 years ago)
Author:
achbed
Message:
  • Block on Page Load setting now retrieved properly
  • All lists support commenting via # (hash)
Location:
botnet-blocker/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • botnet-blocker/trunk/botnet-blocker.php

    r1256638 r1258674  
    55Description: Free botnet IP blocker according to public DNSBL bases. Based on public DNSBL class.
    66Author: Dennis Wallace
    7 Version: 1.2.1
     7Version: 1.2.2
    88License: GPLv2 or later
    99*/
     
    5959         */     
    6060        public static function uninstall() {
    61         }
    62        
     61        }   
    6362        /**
    6463         * Things that run during the WP init action
  • botnet-blocker/trunk/class.bnblocker-config.php

    r1256638 r1258674  
    135135        public function preplist( $list, $ip = true ) {
    136136            $a = $list;
    137             $a = str_replace( array("\r","\n","\t"," "), ";", $a );
     137            $a = str_replace( array("\r", "\n"), "\n", $a );
    138138            if ( $ip ) {
    139                 $a = preg_replace( '/[^.0-9\/]+/', ";", $list );
     139                $a = preg_replace( '/[^.0-9\/]+/', "\n", $list );
    140140            } else {
    141141                $a = strtolower( $a );
    142142            }
    143143            $a = trim( $a );
    144             $a = trim( $a, ';' );
    145             $a = explode( ';', $a );
     144            $a = explode( "\n", $a );
    146145            $b = array();
    147146            foreach ( $a as $i ) {
    148147                if ( ! empty ( $i ) ) {
     148                    $n = strpos( $i, "#" );
     149                    if ( $n !== false ) {
     150                        $i = substr( $i, 0, $n - 1 );
     151                    }
    149152                    $b[$i] = true;
    150153                }
     
    163166            // Get the checked options
    164167            $this->skipself = $this->get_option( 'bnblocker_skipself', 'bnblocker_core', 'on' );
    165             $this->onload = $this->get_option( 'bnblocker_onload', 'bnblocker_onload', '' );
     168            $this->onload = $this->get_option( 'bnblocker_onload', 'bnblocker_core', '' );
    166169           
    167170            // Get the skip list
  • botnet-blocker/trunk/readme.txt

    r1256638 r1258674  
    44Requires at least: 4.0.0
    55Tested up to: 4.3.1
    6 Stable tag: 1.2.1
     6Stable tag: 1.2.3
    77License: GPLv2
    88
     
    3939== Upgrade Notice ==
    4040
     41= 1.2.2 =
     42Added commenting in lists, now respects the Block on Page Load setting
     43
    4144= 1.2.1 =
    4245Fixed preg_match errors in DNS matching
     
    5457== Changelog ==
    5558
     59= 1.2.2 =
     60* Block on Page Load setting now retrieved properly
     61* All lists support commenting via # (hash)
    5662
    5763= 1.2.1 =
Note: See TracChangeset for help on using the changeset viewer.