From 52baefbe85187b26bba2ee73eeccdc05eeb074b8 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 7 Sep 2011 06:08:01 +0000 Subject: [PATCH] Qual: Uniformize code --- htdocs/webservices/admin/webservices.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index 46d49adf1ba..8ab85c8ee05 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -1,7 +1,8 @@ * Copyright (C) 2005-2010 Laurent Destailleur - * + * Copyright (C) 2011 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 * the Free Software Foundation; either version 2 of the License, or @@ -30,9 +31,7 @@ $langs->load("admin"); if (!$user->admin) accessforbidden(); - -$actionsave=$_POST["save"]; - +$actionsave=GETPOST("save"); // Sauvegardes parametres if ($actionsave) @@ -41,7 +40,7 @@ if ($actionsave) $db->begin(); - $i+=dolibarr_set_const($db,'WEBSERVICES_KEY',trim($_POST["WEBSERVICES_KEY"]),'chaine',0,'',$conf->entity); + $i+=dolibarr_set_const($db,'WEBSERVICES_KEY',trim(GETPOST("WEBSERVICES_KEY")),'chaine',0,'',$conf->entity); if ($i >= 1) { @@ -51,7 +50,7 @@ if ($actionsave) else { $db->rollback(); - $mesg = "".$langs->trans("SaveFailed").""; + $mesg = "".$langs->trans("Error").""; } } @@ -141,6 +140,7 @@ if ($conf->fournisseur->enabled) } print '
'; +dol_htmloutput_mesg($mesg); $db->close();