Skip to content

Commit

Permalink
Removes unnecessary parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
codeling committed Jun 28, 2013
1 parent 8351dbb commit f1e6117
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bfstop.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function getRealDurationFromDBDuration($duration)
: $duration;
}

function getBlockInterval($ipaddress)
function getBlockInterval()
{
$blockDuration = (int)$this->params->get('blockDuration',
BFStopNotifier::$ONE_DAY);
Expand All @@ -104,7 +104,7 @@ function getBlockInterval($ipaddress)

function blockIfTooManyAttempts($logEntry)
{
$interval = $this->getBlockInterval($logEntry->ipaddress);
$interval = $this->getBlockInterval();
$maxNumber = (int)$this->params->get('blockNumber', 15);
if ($this->db->getNumberOfFailedLogins(
$interval,
Expand Down Expand Up @@ -142,7 +142,7 @@ function notifyOfRemainingAttempts($logEntry)
}
$allowedAttempts = (int)$this->params->get('blockNumber', 15);
$numberOfFailedLogins = $this->db->getNumberOfFailedLogins(
$this->getBlockInterval($logEntry->ipaddress),
$this->getBlockInterval(),
$logEntry->ipaddress, $logEntry->logtime);
$attemptsLeft = $allowedAttempts - $numberOfFailedLogins;
$this->logger->log("Failed logins: $numberOfFailedLogins; allowed: $allowedAttempts", JLog::DEBUG);
Expand Down

0 comments on commit f1e6117

Please sign in to comment.