diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index b49c82c5b84..7e52f0ea2c6 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -1,6 +1,7 @@ - * Copyright (C) 2011-2014 Juanjo Menent +/* Copyright (C) 2008-2011 Laurent Destailleur + * Copyright (C) 2011-2014 Juanjo Menent + * 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 @@ -91,7 +92,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; @@ -205,9 +206,9 @@ while ($i <= $MAXAGENDA) // Nb print ''.$langs->trans("AgendaExtNb",$key).""; // Name - print ''; + print ''; // URL - print ''; + print ''; // Color (Possible colors are limited by Google) print ''; //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index cd8377ca5a8..ef2f93284be 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('/