mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 01:39:15 +02:00
remove configurable dir for traffic & purge limiters
This commit is contained in:
parent
ae486d651b
commit
3429d293d3
11 changed files with 2 additions and 24 deletions
|
@ -52,7 +52,6 @@ class PurgeLimiter extends AbstractPersistence
|
|||
public static function setConfiguration(Configuration $conf)
|
||||
{
|
||||
self::setLimit($conf->getKey('limit', 'purge'));
|
||||
self::setPath($conf->getKey('dir', 'purge'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,7 +70,7 @@ class PurgeLimiter extends AbstractPersistence
|
|||
}
|
||||
|
||||
$now = time();
|
||||
$pl = (int) self::$_store->getValue('purge_limiter');
|
||||
$pl = (int) self::$_store->getValue('purge_limiter');
|
||||
if ($pl + self::$_limit >= $now) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,6 @@ class TrafficLimiter extends AbstractPersistence
|
|||
public static function setConfiguration(Configuration $conf)
|
||||
{
|
||||
self::setLimit($conf->getKey('limit', 'traffic'));
|
||||
self::setPath($conf->getKey('dir', 'traffic'));
|
||||
self::setExemptedIp($conf->getKey('exemptedIp', 'traffic'));
|
||||
|
||||
if (($option = $conf->getKey('header', 'traffic')) !== null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue