From ae5136e51b87b414c737f4726c367c18db79fc49 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 15 Feb 2004 16:33:33 +0000 Subject: [PATCH] - Patch #5111 by Bart: fixed inconsistent default values. --- modules/queue.module | 4 ++-- modules/statistics.module | 14 +++++++------- modules/statistics/statistics.module | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/queue.module b/modules/queue.module index e2b3aef52c6..374cece6e24 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -68,7 +68,7 @@ function queue_vote($node, $vote) { $node->taxonomy[] = $term->tid; } - if (variable_get("queue_threshold_post", 3) <= $node->score) { + if (variable_get("queue_threshold_post", 4) <= $node->score) { $node->moderate = 0; $node->promote = 1; node_save($node); @@ -86,7 +86,7 @@ function queue_vote($node, $vote) { watchdog("special", "moderation: declined '$node->title'"); } } - else if (variable_get("queue_threshold_expire", 6) <= $node->votes) { + else if (variable_get("queue_threshold_expire", 8) <= $node->votes) { if ($node->revisions) { node_revision_rollback($node, end(node_revision_list($node))); watchdog("special", "moderation: expired '$node->title' (rollback)"); diff --git a/modules/statistics.module b/modules/statistics.module index fa7dc5a0556..f5c1b36c8ea 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -395,7 +395,7 @@ function statistics_settings() { // count content views settings $group = form_radios(t("Count content views"), "statistics_count_content_views", variable_get("statistics_count_content_views", 0), array("1" => t("Enabled"), "0" => t("Disabled")), t("Increment a counter each time content is viewed.")); - $group .= form_radios(t("Display counter values"), "statistics_display_counter", variable_get("statistics_display_counter", ""), array("1" => t("Enabled"), "0" => t("Disabled")), t("Display how many times given content has been viewed. User must have the \"access statistics\" permissions to be able to view these counts.")); + $group .= form_radios(t("Display counter values"), "statistics_display_counter", variable_get("statistics_display_counter", 0), array("1" => t("Enabled"), "0" => t("Disabled")), t("Display how many times given content has been viewed. User must have the \"access statistics\" permissions to be able to view these counts.")); $output .= form_group(t("Content viewing counter settings"), $group); // Popular content block settings @@ -470,17 +470,17 @@ function statistics_block($op = "list", $delta = 0) { case 0: $content = array(); - $daytop = variable_get("statistics_block_top_day_num", ""); + $daytop = variable_get("statistics_block_top_day_num", 0); if ($daytop) { $content[] = node_title_list(statistics_title_list("daycount", $daytop), t("Today's:")); } - $alltimetop = variable_get("statistics_block_top_all_num", ""); + $alltimetop = variable_get("statistics_block_top_all_num", 0); if ($alltimetop) { $content[] = node_title_list(statistics_title_list("totalcount", $alltimetop), t("All time:")); } - $lasttop = variable_get("statistics_block_top_last_num", ""); + $lasttop = variable_get("statistics_block_top_last_num", 0); if ($lasttop) { $content[] = node_title_list(statistics_title_list("timestamp", $lasttop), t("Last viewed:")); } @@ -501,7 +501,7 @@ function statistics_page() { $output = ""; // build day's most popular content list if enabled - if ($displaycount = variable_get("statistics_userpage_day_cnt", 10)) { + if ($displaycount = variable_get("statistics_userpage_day_cnt", 0)) { $table = ""; $table .= statistics_summary("daycount", $displaycount); $table .= "
"; @@ -510,7 +510,7 @@ function statistics_page() { } // build all time most popular content list if enabled - if ($displaycount = variable_get("statistics_userpage_all_cnt", "10")) { + if ($displaycount = variable_get("statistics_userpage_all_cnt", 0)) { $table = ""; $table .= statistics_summary("totalcount", $displaycount); $table .= "
"; @@ -519,7 +519,7 @@ function statistics_page() { } // build last viewed content list if enabled - if ($displaycount = variable_get("statistics_userpage_last_cnt", "10")) { + if ($displaycount = variable_get("statistics_userpage_last_cnt", 0)) { $table = ""; $table .= statistics_summary("timestamp", $displaycount); $table .= "
"; diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index fa7dc5a0556..f5c1b36c8ea 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -395,7 +395,7 @@ function statistics_settings() { // count content views settings $group = form_radios(t("Count content views"), "statistics_count_content_views", variable_get("statistics_count_content_views", 0), array("1" => t("Enabled"), "0" => t("Disabled")), t("Increment a counter each time content is viewed.")); - $group .= form_radios(t("Display counter values"), "statistics_display_counter", variable_get("statistics_display_counter", ""), array("1" => t("Enabled"), "0" => t("Disabled")), t("Display how many times given content has been viewed. User must have the \"access statistics\" permissions to be able to view these counts.")); + $group .= form_radios(t("Display counter values"), "statistics_display_counter", variable_get("statistics_display_counter", 0), array("1" => t("Enabled"), "0" => t("Disabled")), t("Display how many times given content has been viewed. User must have the \"access statistics\" permissions to be able to view these counts.")); $output .= form_group(t("Content viewing counter settings"), $group); // Popular content block settings @@ -470,17 +470,17 @@ function statistics_block($op = "list", $delta = 0) { case 0: $content = array(); - $daytop = variable_get("statistics_block_top_day_num", ""); + $daytop = variable_get("statistics_block_top_day_num", 0); if ($daytop) { $content[] = node_title_list(statistics_title_list("daycount", $daytop), t("Today's:")); } - $alltimetop = variable_get("statistics_block_top_all_num", ""); + $alltimetop = variable_get("statistics_block_top_all_num", 0); if ($alltimetop) { $content[] = node_title_list(statistics_title_list("totalcount", $alltimetop), t("All time:")); } - $lasttop = variable_get("statistics_block_top_last_num", ""); + $lasttop = variable_get("statistics_block_top_last_num", 0); if ($lasttop) { $content[] = node_title_list(statistics_title_list("timestamp", $lasttop), t("Last viewed:")); } @@ -501,7 +501,7 @@ function statistics_page() { $output = ""; // build day's most popular content list if enabled - if ($displaycount = variable_get("statistics_userpage_day_cnt", 10)) { + if ($displaycount = variable_get("statistics_userpage_day_cnt", 0)) { $table = ""; $table .= statistics_summary("daycount", $displaycount); $table .= "
"; @@ -510,7 +510,7 @@ function statistics_page() { } // build all time most popular content list if enabled - if ($displaycount = variable_get("statistics_userpage_all_cnt", "10")) { + if ($displaycount = variable_get("statistics_userpage_all_cnt", 0)) { $table = ""; $table .= statistics_summary("totalcount", $displaycount); $table .= "
"; @@ -519,7 +519,7 @@ function statistics_page() { } // build last viewed content list if enabled - if ($displaycount = variable_get("statistics_userpage_last_cnt", "10")) { + if ($displaycount = variable_get("statistics_userpage_last_cnt", 0)) { $table = ""; $table .= statistics_summary("timestamp", $displaycount); $table .= "
";