Add on $conf value of the function get_recent_post_dates
git-svn-id: http://piwigo.org/svn/trunk@1871 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
bd3f9519fe
commit
e06d9ae13d
4 changed files with 27 additions and 3 deletions
|
@ -353,7 +353,8 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l
|
|||
|
||||
if ($conf['nbm_send_html_mail'] and $conf['nbm_send_recent_post_dates'])
|
||||
{
|
||||
$recent_post_dates = get_recent_post_dates(7, 3, 9);
|
||||
$recent_post_dates = get_recent_post_dates_array(
|
||||
$conf['recent_post_dates']['NBM']);
|
||||
foreach ($recent_post_dates as $date_detail)
|
||||
{
|
||||
$env_nbm['mail_template']->assign_block_vars
|
||||
|
|
4
feed.php
4
feed.php
|
@ -2,7 +2,7 @@
|
|||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
|
@ -164,7 +164,7 @@ else
|
|||
}
|
||||
}
|
||||
|
||||
$dates = get_recent_post_dates(5, 6, 6);
|
||||
$dates = get_recent_post_dates_array($conf['recent_post_dates']['RSS']);
|
||||
|
||||
foreach($dates as $date_detail)
|
||||
{ // for each recent post date we create a feed item
|
||||
|
|
|
@ -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 |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue