Plugin Directory

Changeset 497064


Ignore:
Timestamp:
01/29/2012 09:46:24 PM (14 years ago)
Author:
windyjonas
Message:

Version 0.3. Fixed nasty activation error

Location:
no-soup
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • no-soup/tags/0.3/no-soup.php

    r496824 r497064  
    44Plugin URI: http://jonasnordstrom.se/plugins/no-soup/
    55Description: Blocks user from IP-ranges that you specify and sends them to another page
    6 Version: 0.2
     6Version: 0.3
    77Author: Jonas Nordstrom
    88Author URI: http://jonasnordstrom.se/
     
    3939        public function NoSoup() {
    4040            $this->bad_ip_ranges = get_option('_no_soup_bad_ip_ranges', '');
    41             $this->eat_that = get_option('_no_soup_eat_that', 'http://jonasnordstrom.se/');         
     41            $this->eat_that = get_option('_no_soup_eat_that', '');         
    4242        }
    4343        public function init_admin() {
     
    5656                <div class="updated"><p><strong><?php _e('Settings saved.', 'nosoup' ); ?></strong></p></div>
    5757                <?php
    58 
    5958            }
    6059           
    61             // The form, with all names and a checkbox in front
    6260            ?>
    6361            <div class="wrap">
     
    112110            foreach ( $networks as $range ) :
    113111                if ( false === strpos($range, '-')) :
    114                     if ( $this->in_cidr( $range, $ip ) ) :
    115                         return true;
     112                    if ( 3 <= substr_count( $range, '.' ) && $this->in_cidr( $range, $ip ) ) :
     113                        return true;
    116114                    endif;
    117115                else :
     
    161159}
    162160
    163 add_action( 'admin_menu', array(&$nosoup, 'init_admin' ) );
     161add_action( 'admin_menu', array(&$nosoup, 'init_admin') );
    164162add_action( 'init', array(&$nosoup, 'check_ip') );
  • no-soup/tags/0.3/readme.txt

    r496827 r497064  
    1818
    1919== Changelog ==
     20
     21= 0.3 =
     22Fixed activation error, empty settings will now be ignored.
    2023
    2124= 0.2 =
  • no-soup/trunk/no-soup.php

    r496824 r497064  
    44Plugin URI: http://jonasnordstrom.se/plugins/no-soup/
    55Description: Blocks user from IP-ranges that you specify and sends them to another page
    6 Version: 0.2
     6Version: 0.3
    77Author: Jonas Nordstrom
    88Author URI: http://jonasnordstrom.se/
     
    3939        public function NoSoup() {
    4040            $this->bad_ip_ranges = get_option('_no_soup_bad_ip_ranges', '');
    41             $this->eat_that = get_option('_no_soup_eat_that', 'http://jonasnordstrom.se/');         
     41            $this->eat_that = get_option('_no_soup_eat_that', '');         
    4242        }
    4343        public function init_admin() {
     
    5656                <div class="updated"><p><strong><?php _e('Settings saved.', 'nosoup' ); ?></strong></p></div>
    5757                <?php
    58 
    5958            }
    6059           
    61             // The form, with all names and a checkbox in front
    6260            ?>
    6361            <div class="wrap">
     
    112110            foreach ( $networks as $range ) :
    113111                if ( false === strpos($range, '-')) :
    114                     if ( $this->in_cidr( $range, $ip ) ) :
    115                         return true;
     112                    if ( 3 <= substr_count( $range, '.' ) && $this->in_cidr( $range, $ip ) ) :
     113                        return true;
    116114                    endif;
    117115                else :
     
    161159}
    162160
    163 add_action( 'admin_menu', array(&$nosoup, 'init_admin' ) );
     161add_action( 'admin_menu', array(&$nosoup, 'init_admin') );
    164162add_action( 'init', array(&$nosoup, 'check_ip') );
  • no-soup/trunk/readme.txt

    r496827 r497064  
    1818
    1919== Changelog ==
     20
     21= 0.3 =
     22Fixed activation error, empty settings will now be ignored.
    2023
    2124= 0.2 =
Note: See TracChangeset for help on using the changeset viewer.