| @@ -49,9 +49,9 @@ | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | public function getIPs($table, $auto_increment_offset, $type, $category) { |
| 52 | 52 | $query = "SELECT `start_ip_range` FROM $table WHERE id < $auto_increment_offset AND `type` in (" . implode(',', $type) . ") AND "; |
| 53 | - $query .= ($category == WPRProtectIpstoreDB_V556::CATEGORY_FW) ? "`is_fw` = true;" : "`is_lp` = true;"; | |
| 53 | + $query .= ($category == WPRProtectIpstoreDB_V636::CATEGORY_FW) ? "`is_fw` = true;" : "`is_lp` = true;"; | |
| 54 | 54 | return $this->db->getCol($query); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function getIPStoreOffset($table, $auto_increment_offset) { |
| @@ -63,15 +63,15 @@ | ||
| 63 | 63 | $db = $this->db; |
| 64 | 64 | $info = array(); |
| 65 | 65 | |
| 66 | 66 | $info['fw_blacklisted_ips'] = $this->getIPs($table, $auto_increment_offset, |
| 67 | - WPRProtectIpstoreDB_V556::blacklistedTypes(), WPRProtectIpstoreDB_V556::CATEGORY_FW); | |
| 67 | + WPRProtectIpstoreDB_V636::blacklistedTypes(), WPRProtectIpstoreDB_V636::CATEGORY_FW); | |
| 68 | 68 | $info['lp_blacklisted_ips'] = $this->getIPs($table, $auto_increment_offset, |
| 69 | - WPRProtectIpstoreDB_V556::blacklistedTypes(), WPRProtectIpstoreDB_V556::CATEGORY_LP); | |
| 69 | + WPRProtectIpstoreDB_V636::blacklistedTypes(), WPRProtectIpstoreDB_V636::CATEGORY_LP); | |
| 70 | 70 | $info['fw_whitelisted_ips'] = $this->getIPs($table, $auto_increment_offset, |
| 71 | - WPRProtectIpstoreDB_V556::whitelistedTypes(), WPRProtectIpstoreDB_V556::CATEGORY_FW); | |
| 71 | + WPRProtectIpstoreDB_V636::whitelistedTypes(), WPRProtectIpstoreDB_V636::CATEGORY_FW); | |
| 72 | 72 | $info['lp_whitelisted_ips'] = $this->getIPs($table, $auto_increment_offset, |
| 73 | - WPRProtectIpstoreDB_V556::whitelistedTypes(), WPRProtectIpstoreDB_V556::CATEGORY_LP); | |
| 73 | + WPRProtectIpstoreDB_V636::whitelistedTypes(), WPRProtectIpstoreDB_V636::CATEGORY_LP); | |
| 74 | 74 | $info['ip_store_offset'] = $this->getIPStoreOffset($table, $auto_increment_offset); |
| 75 | 75 | $info['country_ips_size'] = intval($db->getVar("SELECT COUNT(id) FROM $table WHERE id >= $auto_increment_offset")); |
| 76 | 76 | |
| 77 | 77 | return $info; |