PluginProbe
The WP Remote WordPress Plugin / 6.76
The WP Remote WordPress Plugin v6.76
6.76 6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 All 54 releases
← All changes | protect/ipstore/fs.php +8 -8 6.656.76 View file →
@@ -1,9 +1,9 @@
1 1 <?php
2 2 if (!defined('ABSPATH') && !defined('MCDATAPATH')) exit;
3 3
4 -if (!class_exists('WPRProtectIpstoreFS_V665')) :
5 - class WPRProtectIpstoreFS_V665 {
4 +if (!class_exists('WPRProtectIpstoreFS_V676')) :
5 + class WPRProtectIpstoreFS_V676 {
6 6 private $whitelisted_ips;
7 7 private $blacklisted_ips;
8 8
9 9 const IP_TYPE_BLACKLISTED = 0;
@@ -10,23 +10,23 @@
10 10 const IP_TYPE_WHITELISTED = 1;
11 11
12 12 function __construct() {
13 13 $ip_store_file = MCDATAPATH . MCCONFKEY . '-' . 'mc_ips.conf';
14 - $ips = WPRProtectUtils_V665::parseFile($ip_store_file);
14 + $ips = WPRProtectUtils_V676::parseFile($ip_store_file);
15 15 $this->whitelisted_ips = array_key_exists('whitelisted', $ips) ? $ips['whitelisted'] : array();
16 16 $this->blacklisted_ips = array_key_exists('blacklisted', $ips) ? $ips['blacklisted'] : array();
17 17 }
18 18
19 19 public function getTypeIfBlacklistedIP($ip) {
20 - return $this->getIPType($ip, WPRProtectIpstoreFS_V665::IP_TYPE_BLACKLISTED);
20 + return $this->getIPType($ip, WPRProtectIpstoreFS_V676::IP_TYPE_BLACKLISTED);
21 21 }
22 22
23 23 public function isFWIPBlacklisted($ip) {
24 - return $this->checkIPPresent($ip, WPRProtectIpstoreFS_V665::IP_TYPE_BLACKLISTED);
24 + return $this->checkIPPresent($ip, WPRProtectIpstoreFS_V676::IP_TYPE_BLACKLISTED);
25 25 }
26 26
27 27 public function isFWIPWhitelisted($ip) {
28 - return $this->checkIPPresent($ip, WPRProtectIpstoreFS_V665::IP_TYPE_WHITELISTED);
28 + return $this->checkIPPresent($ip, WPRProtectIpstoreFS_V676::IP_TYPE_WHITELISTED);
29 29 }
30 30
31 31 private function checkIPPresent($ip, $type) {
32 32 $ip_category = $this->getIPType($ip, $type);
@@ -35,12 +35,12 @@
35 35
36 36 #XNOTE: getIPCategory or getIPType?
37 37 private function getIPType($ip, $type) {
38 38 switch ($type) {
39 - case WPRProtectIpstoreFS_V665::IP_TYPE_BLACKLISTED:
39 + case WPRProtectIpstoreFS_V676::IP_TYPE_BLACKLISTED:
40 40 return isset($this->blacklisted_ips[$ip]) ? $this->blacklisted_ips[$ip] : null;
41 - case WPRProtectIpstoreFS_V665::IP_TYPE_WHITELISTED:
41 + case WPRProtectIpstoreFS_V676::IP_TYPE_WHITELISTED:
42 42 return isset($this->whitelisted_ips[$ip]) ? $this->whitelisted_ips[$ip] : null;
43 43 }
44 44 }
45 45 }
46 46 endif;