summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-01-19 22:11:46 +0000
committerDries Buytaert <dries@buytaert.net>2004-01-19 22:11:46 +0000
commit652fb3474adb707dff2e5f7899c5911b1c4ef85f (patch)
tree375e087f8b2a298abfff13f18ad9a881d6b15561
parent3714827685aa14ba51fdbcc431fa421b27abd314 (diff)
downloadbrdo-652fb3474adb707dff2e5f7899c5911b1c4ef85f.tar.gz
brdo-652fb3474adb707dff2e5f7899c5911b1c4ef85f.tar.bz2
- Removed instances of the 'throttle_enable' variable.
-rw-r--r--includes/module.inc2
-rw-r--r--modules/block.module4
-rw-r--r--modules/block/block.module4
-rw-r--r--modules/system.module2
-rw-r--r--modules/system/system.module2
5 files changed, 7 insertions, 7 deletions
diff --git a/includes/module.inc b/includes/module.inc
index cbc4bb0d5..d6dc5f358 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -59,7 +59,7 @@ function module_list($refresh = 0, $bootstrap = 0) {
** loaded based on server load. We have to directly access the
** throttle variables as the throttle.module may not be loaded yet.
*/
- $throttle = (variable_get("throttle_enable", 0) && $module->throttle && (variable_get("throttle_level", 0) >= 5));
+ $throttle = ($module->throttle && variable_get("throttle_level", 0) > 4);
if ($bootstrap && !$throttle) {
$list[$module->name] = array("name"=> $module->name, "bootstrap" => $module->bootstrap, "filename" => $module->filename);
}
diff --git a/modules/block.module b/modules/block.module
index 23fc3b0a1..e1a598747 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -168,7 +168,7 @@ function block_admin_display() {
$delete = "";
}
- $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][throttle", 1, $block["throttle"], NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"] ."][". $block["delta"] ."][weight", $block["weight"]), form_radios(NULL, $block["module"] ."][". $block["delta"] ."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"] ."][". $block["delta"] ."][path", $block["path"], 10, 255),
+ $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][throttle", 1, $block["throttle"], NULL, module_exist('throttle') ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"] ."][". $block["delta"] ."][weight", $block["weight"]), form_radios(NULL, $block["module"] ."][". $block["delta"] ."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"] ."][". $block["delta"] ."][path", $block["path"], 10, 255),
$edit, $delete);
}
@@ -382,7 +382,7 @@ function block_list($region) {
** Check the current throttle status and see if block should be displayed
** based on server load.
*/
- if (!($block['throttle'] && (module_invoke("throttle", "status") >= 5))) {
+ if (!($block['throttle'] && (module_invoke("throttle", "status") > 4))) {
$block = array_merge($block, module_invoke($block['module'], 'block', 'view', $block['delta']));
}
if (isset($block['content']) && $block['content']) {
diff --git a/modules/block/block.module b/modules/block/block.module
index 23fc3b0a1..e1a598747 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -168,7 +168,7 @@ function block_admin_display() {
$delete = "";
}
- $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][throttle", 1, $block["throttle"], NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"] ."][". $block["delta"] ."][weight", $block["weight"]), form_radios(NULL, $block["module"] ."][". $block["delta"] ."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"] ."][". $block["delta"] ."][path", $block["path"], 10, 255),
+ $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][throttle", 1, $block["throttle"], NULL, module_exist('throttle') ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"] ."][". $block["delta"] ."][weight", $block["weight"]), form_radios(NULL, $block["module"] ."][". $block["delta"] ."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"] ."][". $block["delta"] ."][path", $block["path"], 10, 255),
$edit, $delete);
}
@@ -382,7 +382,7 @@ function block_list($region) {
** Check the current throttle status and see if block should be displayed
** based on server load.
*/
- if (!($block['throttle'] && (module_invoke("throttle", "status") >= 5))) {
+ if (!($block['throttle'] && (module_invoke("throttle", "status") > 4))) {
$block = array_merge($block, module_invoke($block['module'], 'block', 'view', $block['delta']));
}
if (isset($block['content']) && $block['content']) {
diff --git a/modules/system.module b/modules/system.module
index a8325329d..a7d173453 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -289,7 +289,7 @@ function system_listing($type) {
$row = array($info->name, $info->description, array("data" => (in_array($filename, $required) ? form_hidden("status][$filename", 1) . t("required") : form_checkbox("", "status][$filename", 1, $file->status)), "align" => "center"));
if ($type == "module") {
- $row[] = array("data" => (in_array($filename, $throttle_required) ? form_hidden("throttle][$filename", 0) . t("required") : form_checkbox(NULL, "throttle][$filename", 1, $file->throttle, NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled"))), "align" => "center");
+ $row[] = array("data" => (in_array($filename, $throttle_required) ? form_hidden("throttle][$filename", 0) . t("required") : form_checkbox(NULL, "throttle][$filename", 1, $file->throttle, NULL, module_exist('throttle') ? NULL : array("disabled" => "disabled"))), "align" => "center");
}
else if ($type == "theme") {
$row[] = array("data" => form_radio("", "theme_default", $info->name, (variable_get("theme_default",0) == $info->name) ? 1 : 0), "align" => "center");
diff --git a/modules/system/system.module b/modules/system/system.module
index a8325329d..a7d173453 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -289,7 +289,7 @@ function system_listing($type) {
$row = array($info->name, $info->description, array("data" => (in_array($filename, $required) ? form_hidden("status][$filename", 1) . t("required") : form_checkbox("", "status][$filename", 1, $file->status)), "align" => "center"));
if ($type == "module") {
- $row[] = array("data" => (in_array($filename, $throttle_required) ? form_hidden("throttle][$filename", 0) . t("required") : form_checkbox(NULL, "throttle][$filename", 1, $file->throttle, NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled"))), "align" => "center");
+ $row[] = array("data" => (in_array($filename, $throttle_required) ? form_hidden("throttle][$filename", 0) . t("required") : form_checkbox(NULL, "throttle][$filename", 1, $file->throttle, NULL, module_exist('throttle') ? NULL : array("disabled" => "disabled"))), "align" => "center");
}
else if ($type == "theme") {
$row[] = array("data" => form_radio("", "theme_default", $info->name, (variable_get("theme_default",0) == $info->name) ? 1 : 0), "align" => "center");