summaryrefslogtreecommitdiff
path: root/includes/variable.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/variable.inc')
-rw-r--r--includes/variable.inc30
1 files changed, 6 insertions, 24 deletions
diff --git a/includes/variable.inc b/includes/variable.inc
index 20beb5efd..083f7d492 100644
--- a/includes/variable.inc
+++ b/includes/variable.inc
@@ -7,33 +7,15 @@ function variable_init($conf = array()) {
}
function handler_post_threshold($node, $default) {
- if ($node->type) {
- $function = $node->type ."_post_threshold";
- return $function($node, $default);
- }
- else {
- return $default;
- }
+ return ($threshold = category_post_threshold($node->cid) ? $threshold : $default);
}
function handler_dump_threshold($node, $default) {
- if ($node->type) {
- $function = $node->type ."_dump_threshold";
- return $function($node, $default);
- }
- else {
- return $default;
- }
+ return ($threshold = category_dump_threshold($node->cid) ? $threshold : $default);
}
-function handler_timout_threshold($node, $default) {
- if ($node->type) {
- $function = $node->type ."_timout_threshold";
- return $function($node, $default);
- }
- else {
- return $default;
- }
+function handler_expire_threshold($node, $default) {
+ return ($threshold = category_expire_threshold($node->cid) ? $threshold : $default);
}
function variable_get($name, $default, $object = 0) {
@@ -44,8 +26,8 @@ function variable_get($name, $default, $object = 0) {
return handler_post_threshold($object, $default);
case "dump_threshold":
return handler_dump_threshold($object, $default);
- case "timout_threshold":
- return handler_timout_threshold($object, $default);
+ case "expire_threshold":
+ return handler_expire_threshold($object, $default);
default:
return ($conf[$name] ? $conf[$name] : $default);
}