Fix: filter on type of event was lost

This commit is contained in:
Laurent Destailleur 2013-10-15 16:42:19 +02:00
parent 751ef3ff1b
commit cb889c525c

View File

@ -82,7 +82,7 @@ $pid=GETPOST("projectid","int",3);
$status=GETPOST("status");
$type=GETPOST("type");
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=="0"?'':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') {
$action='show_month'; $day='';
@ -236,7 +236,7 @@ if ($filterd) $param.="&filterd=".$filterd;
if ($socid) $param.="&socid=".$socid;
if ($showbirthday) $param.="&showbirthday=1";
if ($pid) $param.="&projectid=".$pid;
if ($actioncode) $param.="&actioncode=".$actioncode;
if ($actioncode != '') $param.="&actioncode=".$actioncode;
if ($type) $param.="&type=".$type;
if ($action == 'show_day' || $action == 'show_week') $param.='&action='.$action;
$param.="&maxprint=".$maxprint;
@ -952,11 +952,10 @@ llxFooter();
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60)
{
global $user, $conf, $langs;
global $filter, $filtera, $filtert, $filterd, $status;
global $filter, $filtera, $filtert, $filterd, $status, $actioncode; // Filters used into search form
global $theme_datacolor;
global $cachethirdparties, $cachecontacts, $colorindexused;
print '<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'."\n";
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
print '<table class="nobordernopadding" width="100%">';
@ -1184,9 +1183,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
}
else
{
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?maxprint=0&month='.$monthshown.'&year='.$year;
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?maxprint=0&month='.$monthshown.'&year='.$year;
print ($status?'&status='.$status:'').($filter?'&filter='.$filter:'');
print ($filtera?'&filtera='.$filtera:'').($filtert?'&filtert='.$filtert:'').($filterd?'&filterd='.$filterd:'');
print ($actioncode!=''?'&actioncode='.$actioncode:'');
print '">'.img_picto("all","1downarrow_selected.png").' ...';
print ' +'.(count($eventarray[$daykey])-$maxprint);
print '</a>';