From f94156f1c7e8d5b4a2954f2d00979bddc943a68b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 13 Feb 2012 09:51:09 +0100 Subject: [PATCH] Fix: Filters are workings --- htdocs/comm/action/index.php | 12 ++++++------ htdocs/comm/action/listactions.php | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 9442f14e5db..e13a6af9fdf 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -35,10 +35,10 @@ if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/core/lib/project.li if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3; -$filter=GETPOST("filter"); -$filtera = GETPOST("userasked","int")?GETPOST("userasked","int"):GETPOST("filtera","int"); -$filtert = GETPOST("usertodo","int")?GETPOST("usertodo","int"):GETPOST("filtert","int"); -$filterd = GETPOST("userdone","int")?GETPOST("userdone","int"):GETPOST("filterd","int"); +$filter=GETPOST("filter",'',3); +$filtera = GETPOST("userasked","int",3)?GETPOST("userasked","int",3):GETPOST("filtera","int",3); +$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$filterd = GETPOST("userdone","int",3)?GETPOST("userdone","int",3):GETPOST("filterd","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; @@ -72,8 +72,8 @@ $year=GETPOST("year","int")?GETPOST("year","int"):date("Y"); $month=GETPOST("month","int")?GETPOST("month","int"):date("m"); $week=GETPOST("week","int")?GETPOST("week","int"):date("W"); $day=GETPOST("day","int")?GETPOST("day","int"):0; -$actioncode=GETPOST("actioncode"); -$pid=GETPOST("projectid","int")?GETPOST("projectid","int"):0; +$actioncode=GETPOST("actioncode","alpha",3); +$pid=GETPOST("projectid","int",3); $status=GETPOST("status"); $maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index a60fbbe550a..76c3f79e628 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -39,14 +39,14 @@ $action=GETPOST('action','alpha'); $year=GETPOST("year",'int'); $month=GETPOST("month",'int'); $day=GETPOST("day",'int'); -$actioncode=GETPOST('actioncode'); -$pid=GETPOST("projectid",'int'); +$actioncode=GETPOST("actioncode","alpha",3); +$pid=GETPOST("projectid",'int',3); $status=GETPOST("status",'alpha'); -$filter=GETPOST("filter"); -$filtera = GETPOST("userasked","int")?GETPOST("userasked","int"):GETPOST("filtera","int"); -$filtert = GETPOST("usertodo","int")?GETPOST("usertodo","int"):GETPOST("filtert","int"); -$filterd = GETPOST("userdone","int")?GETPOST("userdone","int"):GETPOST("filterd","int"); +$filter=GETPOST("filter",'',3); +$filtera = GETPOST("userasked","int",3)?GETPOST("userasked","int",3):GETPOST("filtera","int",3); +$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$filterd = GETPOST("userdone","int",3)?GETPOST("userdone","int",3):GETPOST("filterd","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; $sortfield = GETPOST("sortfield",'alpha'); -- GitLab