diff --git a/modules/throttle.module b/modules/throttle.module
index 5186fd60ed8..f94a79f79c7 100644
--- a/modules/throttle.module
+++ b/modules/throttle.module
@@ -155,9 +155,11 @@ function throttle_display_throttle_block() {
$output .= t("Current level: %level (%min+)", array("%level" => $throttle, "%min" => $minimum)) ."
\n";
}
$output .= t("Probability: %probability%", array("%probability" => $probability)) ."
\n";
- $recent_activity = db_fetch_object(db_query("SELECT COUNT(timestamp) AS hits FROM {accesslog} WHERE timestamp >= %d", (time() - 60)));
- $output .= "
". t("This site has served %hits in the past minute.", array("%hits" => format_plural($recent_activity->hits , "1 page", "%count pages")));
- _throttle_update($recent_activity->hits);
+ if ($throttle < 5) {
+ $recent_activity = db_fetch_object(db_query("SELECT COUNT(timestamp) AS hits FROM {accesslog} WHERE timestamp >= %d", (time() - 60)));
+ $output .= "
". t("This site has served %pages in the past minute.", array("%pages" => format_plural($recent_activity->hits , "1 page", "%count pages")));
+ _throttle_update($recent_activity->hits);
+ }
}
else {
$output .= t("Throttle: %status", array("%status" => l(t("disabled"), "admin/system/modules/throttle"))) ."
\n";
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index 5186fd60ed8..f94a79f79c7 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -155,9 +155,11 @@ function throttle_display_throttle_block() {
$output .= t("Current level: %level (%min+)", array("%level" => $throttle, "%min" => $minimum)) ."
\n";
}
$output .= t("Probability: %probability%", array("%probability" => $probability)) ."
\n";
- $recent_activity = db_fetch_object(db_query("SELECT COUNT(timestamp) AS hits FROM {accesslog} WHERE timestamp >= %d", (time() - 60)));
- $output .= "
". t("This site has served %hits in the past minute.", array("%hits" => format_plural($recent_activity->hits , "1 page", "%count pages")));
- _throttle_update($recent_activity->hits);
+ if ($throttle < 5) {
+ $recent_activity = db_fetch_object(db_query("SELECT COUNT(timestamp) AS hits FROM {accesslog} WHERE timestamp >= %d", (time() - 60)));
+ $output .= "
". t("This site has served %pages in the past minute.", array("%pages" => format_plural($recent_activity->hits , "1 page", "%count pages")));
+ _throttle_update($recent_activity->hits);
+ }
}
else {
$output .= t("Throttle: %status", array("%status" => l(t("disabled"), "admin/system/modules/throttle"))) ."
\n";