diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 755d1eb23f9..79e6d3dbd6c 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -2,6 +2,7 @@ /* Copyright (C) 2008-2015 Laurent Destailleur * Copyright (C) 2011-2015 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,7 +96,7 @@ if ($actionsave) // Save nb of agenda if (! $error) { - $res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST('AGENDA_EXT_NB','alpha')),'chaine',0,'',$conf->entity); + $res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST('AGENDA_EXT_NB','int')),'chaine',0,'',$conf->entity); if (! $res > 0) $error++; if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5; $MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB; @@ -214,9 +215,9 @@ while ($i <= $MAXAGENDA) // Nb print ''.$langs->trans("AgendaExtNb",$key).""; // Name - print ''; + print ''; // URL - print ''; + print ''; // Offset TZ print ''; // Color (Possible colors are limited by Google) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 673ee101cf0..79347c24c4e 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -258,7 +258,7 @@ $out=''; $typeleaves=$holiday->getTypes(1,1); foreach($typeleaves as $key => $val) { - $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); + $nb_type = $holiday->getCPforUser($user_id, $val['rowid']); $nb_holiday += $nb_type; $out .= ' - '.$val['label'].': '.($nb_type?price2num($nb_type):0).'
'; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a24eda81fb3..dd449bda420 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -97,7 +97,8 @@ function test_sql_and_script_inject($val, $type) // All examples on page: http://ha.ckers.org/xss.html#XSScalc $sql_inj += preg_match('/