aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config_default.inc.php6
-rw-r--r--include/functions_notification.inc.php17
2 files changed, 23 insertions, 0 deletions
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 5879fe2d8..e6d947514 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -577,6 +577,12 @@ $conf['nbm_max_treatment_timeout_percent'] = 0.8;
// nbm_treatment_timeout_default is used by default
$conf['nbm_treatment_timeout_default'] = 20;
+// Parameters used in get_recent_post_dates for the 2 kind of notification
+$conf['recent_post_dates'] = array(
+ 'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6),
+ 'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9)
+ );
+
// +-----------------------------------------------------------------------+
// | Set default admin layout |
// +-----------------------------------------------------------------------+
diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php
index 8677d5bff..c744e046b 100644
--- a/include/functions_notification.inc.php
+++ b/include/functions_notification.inc.php
@@ -511,6 +511,23 @@ SELECT DISTINCT c.uppercats, COUNT(DISTINCT i.id) img_count
return $dates;
}
+/*
+ Call function get_recent_post_dates but
+ the parameters to be passed to the function, as an indexed array.
+
+*/
+function get_recent_post_dates_array($args)
+{
+ return
+ get_recent_post_dates
+ (
+ (empty($args['max_dates']) ? 3 : $args['max_dates']),
+ (empty($args['max_elements']) ? 3 : $args['max_elements']),
+ (empty($args['max_cats']) ? 3 : $args['max_cats'])
+ );
+}
+
+
/**
* returns html description about recently published elements grouped by post date
* @param $date_detail: selected date computed by get_recent_post_dates function