diff --git a/htdocs/externalsite/admin/externalsite.php b/htdocs/externalsite/admin/externalsite.php index 45fdf290314..29ca25d00dc 100644 --- a/htdocs/externalsite/admin/externalsite.php +++ b/htdocs/externalsite/admin/externalsite.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2012 Juanjo Menent * * 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 @@ -40,7 +40,7 @@ $langs->load("externalsite"); $def = array(); -$action = GETPOST("action"); +$action = GETPOST('action','alpha'); // Sauvegardes parametres if ($action == 'update') @@ -49,7 +49,7 @@ if ($action == 'update') $db->begin(); - $exturl = GETPOST("EXTERNALSITE_URL"); + $exturl = GETPOST('EXTERNALSITE_URL','alpha'); $i+=dolibarr_set_const($db,'EXTERNALSITE_URL',trim($exturl),'chaine',0,'',$conf->entity); //$i+=dolibarr_set_const($db,'EXTERNALSITE_LABEL',trim($_POST["EXTERNALSITE_LABEL"]),'chaine',0,'',$conf->entity); @@ -99,7 +99,7 @@ print ""; print ""; print "".$langs->trans("ExternalSiteURL").""; -print "global->EXTERNALSITE_URL) . "\" size=\"40\">"; +print "global->EXTERNALSITE_URL) . "\" size=\"40\">"; print "http://localhost/myurl/"; print "
http://wikipedia.org/"; print ""; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 353714bc5bb..8ad93526b2c 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -34,8 +34,8 @@ if (!$user->admin) accessforbidden(); $def = array(); $lastftpentry=0; -$action = GETPOST("action"); -$entry = GETPOST("numero_entry"); +$action = GETPOST('action','alpha'); +$entry = GETPOST('numero_entry','alpha'); // Positionne la variable pour le nombre de rss externes $sql ="select MAX(name) as name from ".MAIN_DB_PREFIX."const"; @@ -52,7 +52,7 @@ else dol_print_error($db); } -if ($action == 'add' || GETPOST("modify")) +if ($action == 'add' || GETPOST('modify','alpha')) { $ftp_name = "FTP_NAME_" . $entry;// $_POST["numero_entry"]; $ftp_server = "FTP_SERVER_" . $entry; //$_POST["numero_entry"]; @@ -60,13 +60,13 @@ if ($action == 'add' || GETPOST("modify")) $error=0; $mesg=''; - if (! GETPOST("$ftp_name")) + if (! GETPOST("$ftp_name",'alpha')) { $error=1; $mesg.='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")).'
'; } - if (! GETPOST("$ftp_server")) + if (! GETPOST("$ftp_server",'alpha')) { $error=1; $mesg.='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Server")).'
'; @@ -81,11 +81,11 @@ if ($action == 'add' || GETPOST("modify")) $db->begin(); - $result1=dolibarr_set_const($db, "FTP_PORT_" . $entry,GETPOST($ftp_port),'chaine',0,'',$conf->entity); - if ($result1) $result2=dolibarr_set_const($db, "FTP_SERVER_" . $entry, GETPOST($ftp_server),'chaine',0,'',$conf->entity); - if ($result2) $result3=dolibarr_set_const($db, "FTP_USER_" . $entry,GETPOST($ftp_user),'chaine',0,'',$conf->entity); - if ($result3) $result4=dolibarr_set_const($db, "FTP_PASSWORD_" . $entry,GETPOST($ftp_password),'chaine',0,'',$conf->entity); - if ($result4) $result5=dolibarr_set_const($db, "FTP_NAME_" . $entry,GETPOST($ftp_name),'chaine',0,'',$conf->entity); + $result1=dolibarr_set_const($db, "FTP_PORT_" . $entry,GETPOST($ftp_port,'alpha'),'chaine',0,'',$conf->entity); + if ($result1) $result2=dolibarr_set_const($db, "FTP_SERVER_" . $entry, GETPOST($ftp_server,'alpha'),'chaine',0,'',$conf->entity); + if ($result2) $result3=dolibarr_set_const($db, "FTP_USER_" . $entry,GETPOST($ftp_user,'alpha'),'chaine',0,'',$conf->entity); + if ($result3) $result4=dolibarr_set_const($db, "FTP_PASSWORD_" . $entry,GETPOST($ftp_password,'alpha'),'chaine',0,'',$conf->entity); + if ($result4) $result5=dolibarr_set_const($db, "FTP_NAME_" . $entry,GETPOST($ftp_name,'alpha'),'chaine',0,'',$conf->entity); if ($result1 && $result2 && $result3 && $result4 && $result5) { @@ -102,7 +102,7 @@ if ($action == 'add' || GETPOST("modify")) } } -if ($_POST["delete"]) +if (GETPOST('delete','alpha')) { if($entry) {