diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index fd963ec6cd1..b1afdd1279d 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -46,6 +46,13 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; +$search_start = -1; +if(GETPOST('search_startyear')!='') $search_start = dol_mktime(0, 0, 0, GETPOST('search_startmonth'), GETPOST('search_startday'), GETPOST('search_startyear')); + +$search_end = -1; +if(GETPOST('search_endyear')!='') $search_end= dol_mktime(0, 0, 0, GETPOST('search_endmonth'), GETPOST('search_endday'), GETPOST('search_endyear')); + + if (empty($sortfield)) $sortfield='rowid'; if (empty($sortorder)) $sortorder='DESC'; @@ -128,7 +135,7 @@ else if($action === 'downloadcsv') { * View */ -$blocks = $block_static->getLog('all', 0, GETPOST('all','alpha') ? 0 : 50, $sortfield, $sortorder); +$blocks = $block_static->getLog('all', 0, GETPOST('all','alpha') ? 0 : 50, $sortfield, $sortorder, $search_start, $search_end); $form=new Form($db); @@ -154,7 +161,27 @@ print ' '; print '