| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | if (!defined('ABSPATH') && !defined('MCDATAPATH')) exit; |
| 3 | 3 | |
| 4 | -if (!class_exists('WPRProtectIpstore_V568')) : | |
| 4 | +if (!class_exists('WPRProtectIpstore_V672')) : | |
| 5 | 5 | require_once dirname( __FILE__ ) . '/request.php'; |
| 6 | 6 | require_once dirname( __FILE__ ) . '/ipstore/fs.php'; |
| 7 | 7 | require_once dirname( __FILE__ ) . '/ipstore/db.php'; |
| 8 | 8 | |
| 9 | -class WPRProtectIpstore_V568 { | |
| 9 | +class WPRProtectIpstore_V672 { | |
| 10 | 10 | private $storage; |
| 11 | 11 | private $storage_type; |
| 12 | 12 | |
| 13 | 13 | const STORAGE_TYPE_FS = 0; |
| @@ -12,29 +12,29 @@ | ||
| 12 | 12 | |
| 13 | 13 | const STORAGE_TYPE_FS = 0; |
| 14 | 14 | const STORAGE_TYPE_DB = 1; |
| 15 | 15 | |
| 16 | - function __construct($storage_type = WPRProtectIpstore_V568::STORAGE_TYPE_DB) { | |
| 16 | + function __construct($storage_type = WPRProtectIpstore_V672::STORAGE_TYPE_DB) { | |
| 17 | 17 | $this->storage_type = $storage_type; |
| 18 | - if ($this->storage_type == WPRProtectIpstore_V568::STORAGE_TYPE_FS) { | |
| 19 | - $this->storage = new WPRProtectIpstoreFS_V568(); | |
| 18 | + if ($this->storage_type == WPRProtectIpstore_V672::STORAGE_TYPE_FS) { | |
| 19 | + $this->storage = new WPRProtectIpstoreFS_V672(); | |
| 20 | 20 | } else { |
| 21 | - $this->storage = new WPRProtectIpstoreDB_V568(); | |
| 21 | + $this->storage = new WPRProtectIpstoreDB_V672(); | |
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public static function uninstall() { |
| 26 | - WPRProtectIpstoreDB_V568::uninstall(); | |
| 26 | + WPRProtectIpstoreDB_V672::uninstall(); | |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function isLPIPBlacklisted($ip) { |
| 30 | - if ($this->storage_type == WPRProtectIpstore_V568::STORAGE_TYPE_DB) { | |
| 30 | + if ($this->storage_type == WPRProtectIpstore_V672::STORAGE_TYPE_DB) { | |
| 31 | 31 | return $this->storage->isLPIPBlacklisted($ip); |
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | public function isLPIPWhitelisted($ip) { |
| 36 | - if ($this->storage_type == WPRProtectIpstore_V568::STORAGE_TYPE_DB) { | |
| 36 | + if ($this->storage_type == WPRProtectIpstore_V672::STORAGE_TYPE_DB) { | |
| 37 | 37 | return $this->storage->isLPIPWhitelisted($ip); |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |