Version Description
- Statistics required wp-config.php in a specific place bug smashed.
Download this release
Release Info
Developer | iqpascal |
Plugin | iQ Block Country |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- iq-block-country.php +1 -1
- libs/blockcountry-logging.php +0 -1
- libs/blockcountry-settings.php +4 -4
- readme.txt +5 -1
iq-block-country.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: iQ Block Country
|
4 |
Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
|
5 |
-
Version: 1.1.
|
6 |
Author: Pascal
|
7 |
Author URI: http://www.redeo.nl/
|
8 |
Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
|
2 |
/*
|
3 |
Plugin Name: iQ Block Country
|
4 |
Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
|
5 |
+
Version: 1.1.5
|
6 |
Author: Pascal
|
7 |
Author URI: http://www.redeo.nl/
|
8 |
Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
|
libs/blockcountry-logging.php
CHANGED
@@ -52,7 +52,6 @@ function iqblockcountry_update_db_check() {
|
|
52 |
|
53 |
function iqblockcountry_logging($ipaddress,$country,$banend)
|
54 |
{
|
55 |
-
require_once( ABSPATH . 'wp-config.php');
|
56 |
global $wpdb;
|
57 |
|
58 |
$urlRequested = (isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : '/' );
|
52 |
|
53 |
function iqblockcountry_logging($ipaddress,$country,$banend)
|
54 |
{
|
|
|
55 |
global $wpdb;
|
56 |
|
57 |
$urlRequested = (isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : '/' );
|
libs/blockcountry-settings.php
CHANGED
@@ -167,6 +167,7 @@ function iqblockcountry_settings_tools() {
|
|
167 |
* Function: Import/Export settings
|
168 |
*/
|
169 |
function iqblockcountry_settings_importexport() {
|
|
|
170 |
if (!isset($_POST['export']) && !isset($_POST['import'])) {
|
171 |
?>
|
172 |
<div class="wrap">
|
@@ -212,7 +213,6 @@ function iqblockcountry_settings_importexport() {
|
|
212 |
|
213 |
$json_file = json_encode($need_options); // Encode data into json data
|
214 |
|
215 |
-
$dir = wp_upload_dir();
|
216 |
|
217 |
if ( !$handle = fopen( $dir['path'] . '/' . 'iqblockcountry.ini', 'w' ) )
|
218 |
wp_die(__("Something went wrong exporting this file", 'iqblockcountry'));
|
@@ -250,16 +250,16 @@ function iqblockcountry_settings_importexport() {
|
|
250 |
else {
|
251 |
require_once( ABSPATH . 'wp-admin/includes/class-pclzip.php' );
|
252 |
$zip = new PclZip( $_FILES['import']['tmp_name'] );
|
253 |
-
$unzipped = $zip->extract( $p_path =
|
254 |
if ( $unzipped[0]['stored_filename'] == 'iqblockcountry.ini' ) {
|
255 |
-
$encode_options = file_get_contents(
|
256 |
$options = json_decode($encode_options, true);
|
257 |
foreach ($options as $key => $value) {
|
258 |
if (in_array($key,$optarr)) {
|
259 |
update_option($key, $value);
|
260 |
}
|
261 |
}
|
262 |
-
unlink(
|
263 |
// check if file exists first.
|
264 |
|
265 |
echo "<div class='updated'><p>" . __("All options are restored successfully.", 'iqblockcountry') . "</p></div>";
|
167 |
* Function: Import/Export settings
|
168 |
*/
|
169 |
function iqblockcountry_settings_importexport() {
|
170 |
+
$dir = wp_upload_dir();
|
171 |
if (!isset($_POST['export']) && !isset($_POST['import'])) {
|
172 |
?>
|
173 |
<div class="wrap">
|
213 |
|
214 |
$json_file = json_encode($need_options); // Encode data into json data
|
215 |
|
|
|
216 |
|
217 |
if ( !$handle = fopen( $dir['path'] . '/' . 'iqblockcountry.ini', 'w' ) )
|
218 |
wp_die(__("Something went wrong exporting this file", 'iqblockcountry'));
|
250 |
else {
|
251 |
require_once( ABSPATH . 'wp-admin/includes/class-pclzip.php' );
|
252 |
$zip = new PclZip( $_FILES['import']['tmp_name'] );
|
253 |
+
$unzipped = $zip->extract( $p_path = $dir['path'] );
|
254 |
if ( $unzipped[0]['stored_filename'] == 'iqblockcountry.ini' ) {
|
255 |
+
$encode_options = file_get_contents($dir['path'] . '/iqblockcountry.ini');
|
256 |
$options = json_decode($encode_options, true);
|
257 |
foreach ($options as $key => $value) {
|
258 |
if (in_array($key,$optarr)) {
|
259 |
update_option($key, $value);
|
260 |
}
|
261 |
}
|
262 |
+
unlink($dir['path'] . '/iqblockcountry.ini');
|
263 |
// check if file exists first.
|
264 |
|
265 |
echo "<div class='updated'><p>" . __("All options are restored successfully.", 'iqblockcountry') . "</p></div>";
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.unicef.org/
|
|
4 |
Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
|
5 |
Requires at least: 3.5.2
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -163,6 +163,10 @@ If this does not help you out deselect "Send headers when user is blocked". This
|
|
163 |
|
164 |
== Changelog ==
|
165 |
|
|
|
|
|
|
|
|
|
166 |
= 1.1.4 =
|
167 |
|
168 |
* Added import/export function.
|
4 |
Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
|
5 |
Requires at least: 3.5.2
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.1.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
163 |
|
164 |
== Changelog ==
|
165 |
|
166 |
+
= 1.1.5 =
|
167 |
+
|
168 |
+
* Statistics required wp-config.php in a specific place bug smashed.
|
169 |
+
|
170 |
= 1.1.4 =
|
171 |
|
172 |
* Added import/export function.
|