Can be combined and makes code look nicer.
authorRoland Häder <roland@mxchange.org>
Tue, 26 Jul 2016 07:35:00 +0000 (09:35 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 26 Jul 2016 07:35:00 +0000 (09:35 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
ctracker.php

index 62adbd1a9b8c6b259c6d2cbaad223723019744cf..1cf268a205a50586711e5df371f73daf032b9d5e 100644 (file)
@@ -53,16 +53,10 @@ crackerTrackerUpdateDatabaseScheme();
 if (isCrackerTrackerWormDetected()) {
        // Send the email, this must be the last line in this if() block because it contains a exit()
        sendCrackerTrackerMail();
-} // END - if
-
-// Suspicious POST data detected?
-if (isCrackerTrackerPostAttackDetected()) {
+} elseif (isCrackerTrackerPostAttackDetected()) {
        // Send the email, this must be the last line in this if() block because it contains a exit()
        sendCrackerTrackerPostMail();
-} // END - if
-
-// Does the current IP produce some blocked requests but not now?
-if ((getCrackerTrackerConfig('ctracker_alert_user') == 'Y') && (isCrackerTrackerIpSuspicious())) {
+} elseif ((getCrackerTrackerConfig('ctracker_alert_user') == 'Y') && (isCrackerTrackerIpSuspicious())) {
        // This IP is suspicious, so we alert him/her
        crackerTrackerAlertCurrentUser();
 } // END - if