andre преди 4 години
родител
ревизия
7537a3bdaa
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. 7 1
      action.php

+ 7 - 1
action.php

@@ -157,9 +157,15 @@ class action {
 
     public function blackList($ip) {
         $this->deWhiteList($ip);
+        $this->deList($ip);
         $dbAction = $this->db->prepare("INSERT IGNORE INTO blacklist VALUES (?)");
         $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) {