diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-10-07 18:16:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-10-07 18:16:41 +0000 |
commit | 22c889e7c05b1c2dd98ad5e6b3547234a3f6596f (patch) | |
tree | 8b63c79053762af3284384a7e8c54a2d3e9b0d45 /modules/throttle.module | |
parent | fbc674f14301fd92f97f2506a72c22b7d51c1c43 (diff) | |
download | brdo-22c889e7c05b1c2dd98ad5e6b3547234a3f6596f.tar.gz brdo-22c889e7c05b1c2dd98ad5e6b3547234a3f6596f.tar.bz2 |
- Help system improvements: eliminated the _system hook. Patch by Michael.
- Bloggerapi module fixes. Patch by Kjartan.
- Coding style fixes. Patch by Michael.
Diffstat (limited to 'modules/throttle.module')
-rw-r--r-- | modules/throttle.module | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/modules/throttle.module b/modules/throttle.module index ff19470fa..dd11a0dfb 100644 --- a/modules/throttle.module +++ b/modules/throttle.module @@ -1,16 +1,6 @@ <?php // $Id$ -function throttle_system($field) { - $output = ""; - - if ($field == "description") {$output = throttle_help("admin/system/modules"); } - else if ($field == "admin_help") {$output = throttle_help("admin/system/modules/throttle"); }; - - return $output; -} - - function throttle_perm() { /* ** throttle module defines the following permissions: @@ -22,11 +12,11 @@ function throttle_perm() { function throttle_help($section = "admin/throttle/help") { switch ($section) { - case "admin/system/modules": + case "admin/system/modules#description": $output = t("Allows configuration of congestion control auto-throttle mechanism."); break; case "admin/system/modules/throttle": - return t("If your site gets popular, or comes under a \"Denial of Service\" (DOS) attack, your hardware might become overwhelmed. These settings allow you to \"slow down\" the access to your site. To use throttle you need to have the %access enabled. For Drupal to preform throttling it needs to do an extra database query. This extra query happens on page displays. <b>Auto-throttle probability limiter</b> tells Drupal to do this extra DB query once every \"x\" page displays, where \"x\" is the percentage. So if it is set to 10%, the default, then for every 100 web pages it displays, it will preform the extra query ten time. ", array("%access" => l(t("access log"), "admin/system/modules/statistics") )); + return t("If your site gets popular, or comes under a \"Denial of Service\" (DOS) attack, your hardware might become overwhelmed. These settings allow you to \"slow down\" the access to your site. To use throttle you need to have the %access enabled. For Drupal to preform throttling it needs to do an extra database query. This extra query happens on page displays. <b>Auto-throttle probability limiter</b> tells Drupal to do this extra DB query once every \"x\" page displays, where \"x\" is the percentage. So if it is set to 10%, the default, then for every 100 web pages it displays, it will preform the extra query ten time. ", array("%access" => l(t("access log"), "admin/system/modules/statistics"))); case "admin/throttle/help": $output .= "<h3>Introduction</h3><p>This Drupal module allows you to enable and configure the auto-throttle congestion control mechanism offered by the %stats-mod. The auto-throttle mechanism allows your site to automatically adapt to different server levels.</p>"; $output .= "<p>This module also adds a block that displays the current status of the throttle. You must have \"%throttle-block\" privileges to view the block. As a general rule of thumb, only site administrators should be granted access to this block.</p>"; @@ -58,7 +48,7 @@ function throttle_help($section = "admin/throttle/help") { else { // throttle limit not reached, execute normally }</pre></p>"; - $output = t($output, array("%stats-mod" => l(t("statistics-module"), "admin/statistics"), "%throttle-block" => l(t("access throttle block"), "admin/user/permission"), "%modules-enable" => l(t("enabled"), "admin/ststem/modules"),"throttle-config" => l(t("configuration section"), "admin/system/modules/throttle"), "%stats-config" => l(t("statistcs.module"), "admin/system/modules/statistics"), "%throttle-access" => l(t("access throttle block"), "admin/user/permission"),"%throttle-block-enable" => l(t("here"), "admin/block"), "%permissions" => l(t("user permissions"), "admin/user/permission") )); + $output = t($output, array("%stats-mod" => l(t("statistics-module"), "admin/statistics"), "%throttle-block" => l(t("access throttle block"), "admin/user/permission"), "%modules-enable" => l(t("enabled"), "admin/ststem/modules"), "throttle-config" => l(t("configuration section"), "admin/system/modules/throttle"), "%stats-config" => l(t("statistcs.module"), "admin/system/modules/statistics"), "%throttle-access" => l(t("access throttle block"), "admin/user/permission"), "%throttle-block-enable" => l(t("here"), "admin/block"), "%permissions" => l(t("user permissions"), "admin/user/permission"))); break; } |