summaryrefslogtreecommitdiff
path: root/includes/functions
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-05-24 11:26:51 +0000
committerfisharebest <fisharebest@gmail.com>2010-05-24 11:26:51 +0000
commit2bf6a6072a5a4eb89143ffcdb4871d5a8396809b (patch)
treec32c7da548ff5f772bbbe2bab7a76f4f68ed1331 /includes/functions
parent83ca2149820bb3ec425c2d3309fc2d1f36da8b75 (diff)
downloadwebtrees-2bf6a6072a5a4eb89143ffcdb4871d5a8396809b.tar.gz
webtrees-2bf6a6072a5a4eb89143ffcdb4871d5a8396809b.tar.bz2
webtrees-2bf6a6072a5a4eb89143ffcdb4871d5a8396809b.zip
Remove page-rate limiter
Diffstat (limited to 'includes/functions')
-rw-r--r--includes/functions/functions.php29
1 files changed, 0 insertions, 29 deletions
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index 1eaba71ee0..d51db78928 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -2858,35 +2858,6 @@ function add_descendancy(&$list, $pid, $parents=false, $generations=-1) {
}
/**
- * check if the page view rate for a session has been exeeded.
- */
-function CheckPageViews() {
- global $SEARCH_SPIDER, $MAX_VIEWS, $MAX_VIEW_TIME;
-
- if ($MAX_VIEW_TIME == 0 || $MAX_VIEWS == 0 || !empty($SEARCH_SPIDER))
- return;
-
- // The media firewall should not be throttled
- if (WT_SCRIPT_NAME=='mediafirewall.php')
- return;
-
- if (!empty($_SESSION["pageviews"]["time"]) && !empty($_SESSION["pageviews"]["number"])) {
- $_SESSION["pageviews"]["number"] ++;
- if ($_SESSION["pageviews"]["number"] < $MAX_VIEWS)
- return;
- $sleepTime = $MAX_VIEW_TIME - time() + $_SESSION["pageviews"]["time"];
- if ($sleepTime > 0) {
- // The configured page view rate has been exceeded
- // - Log a message and then sleep to slow things down
- $text = "Permitted page view rate of {$MAX_VIEWS} per {$MAX_VIEW_TIME} seconds exceeded.";
- AddToLog($text, 'auth');
- sleep($sleepTime);
- }
- }
- $_SESSION["pageviews"] = array("time"=>time(), "number"=>1);
-}
-
-/**
* get the next available xref
* calculates the next available XREF id for the given type of record
* @param string $type the type of record, defaults to 'INDI'