summaryrefslogtreecommitdiff
path: root/modules/statistics.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-04-14 14:02:36 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-04-14 14:02:36 +0000
commit803dacf65225d78c2ffe60a853b1c822f4e628e1 (patch)
tree100589c9025917ddd5888207f06e6a4b10d26248 /modules/statistics.module
parentfd0ef2cc48e683e2ae2eff0b48435011a5858061 (diff)
downloadbrdo-803dacf65225d78c2ffe60a853b1c822f4e628e1.tar.gz
brdo-803dacf65225d78c2ffe60a853b1c822f4e628e1.tar.bz2
Poll.module / Statistics.module: fixing bug caused by using array_merge and drupal_map_assoc. This causes array keys to be renumbered, leading to bugs.
Remember to use $array1 + $array2 instead.
Diffstat (limited to 'modules/statistics.module')
-rw-r--r--modules/statistics.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index 2057714f4..c5e5a7e71 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -392,14 +392,14 @@ function statistics_settings() {
$output .= form_group(t("Content viewing counter settings"), $group);
// Popular content block settings
- $numbers = array_merge(array("0" => t("Disabled")), drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40)));
+ $numbers = array("0" => t("Disabled")) + drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40));
$group = form_select(t("Number of day's top views to display"), "statistics_block_top_day_num", variable_get("statistics_block_top_day_num", 0), $numbers, t("How many content items to display in \"day\" list. Requires enabled content viewing counters."));
$group .= form_select(t("Number of all time views to display"), "statistics_block_top_all_num", variable_get("statistics_block_top_all_num", 0), $numbers, t("How many content items to display in \"all time\" list. Requires enabled content viewing counters."));
$group .= form_select(t("Number of most recent views to display"), "statistics_block_top_last_num", variable_get("statistics_block_top_last_num", 0), $numbers, t("How many content items to display in \"recently viewed\" list. Requires enabled content viewing counters."));
$output .= form_group(t("\"Popular content\" block settings"), $group);
// Popular content page settings
- $numbers = array_merge(array("0" => t("Disabled")), drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25)));
+ $numbers = array("0" => t("Disabled")) + drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25));
$group = form_textfield(t("Name for link to user page"), "statistics_userpage_link", variable_get("statistics_userpage_link", ""), 20, 40, t("This node generates a user page listing your site's most popular content. If you specify a name here, a link to the \"Popular content\" page will be added automatically."));
$group .= form_select(t("Number of day's top views to display"), "statistics_userpage_day_cnt", variable_get("statistics_userpage_day_cnt", 0), $numbers, t("How many content items to display in the \"day\" list. Requires enabled content viewing counters."));
$group .= form_select(t("Number of all time top views to display"), "statistics_userpage_all_cnt", variable_get("statistics_userpage_all_cnt", 0), $numbers, t("How many content items to display in the \"all time\" list. Requires enabled content viewing counters."));