|
@@ -157,9 +157,15 @@ class action {
|
|
|
|
|
|
|
|
public function blackList($ip) {
|
|
public function blackList($ip) {
|
|
|
$this->deWhiteList($ip);
|
|
$this->deWhiteList($ip);
|
|
|
|
|
+ $this->deList($ip);
|
|
|
$dbAction = $this->db->prepare("INSERT IGNORE INTO blacklist VALUES (?)");
|
|
$dbAction = $this->db->prepare("INSERT IGNORE INTO blacklist VALUES (?)");
|
|
|
$dbAction->bind_param('i',$ip);
|
|
$dbAction->bind_param('i',$ip);
|
|
|
- return $dbAction->execute();
|
|
|
|
|
|
|
+ if($dbAction->execute()) {
|
|
|
|
|
+ $this->deWhiteList($ip);
|
|
|
|
|
+ $this->deList($ip);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ };
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function deBlackList($ip) {
|
|
public function deBlackList($ip) {
|