amélioration de la sécurité
This commit is contained in:
parent
5f8914693a
commit
6c1ff2d6d3
@ -116,10 +116,10 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
|
|||||||
|
|
||||||
if ($_POST["action"] == 'update')
|
if ($_POST["action"] == 'update')
|
||||||
{
|
{
|
||||||
$result = $soc->update($_GET["socid"],$user);
|
$result = $soc->update($socid,$user);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$soc->id = $_GET["socid"];
|
$soc->id = $socid;
|
||||||
// doublon sur le prefix comm
|
// doublon sur le prefix comm
|
||||||
$reload = 0;
|
$reload = 0;
|
||||||
$mesg = $soc->error; //"Erreur, le prefix '".$soc->prefix_comm."' existe déjà vous devez en choisir un autre";
|
$mesg = $soc->error; //"Erreur, le prefix '".$soc->prefix_comm."' existe déjà vous devez en choisir un autre";
|
||||||
@ -127,7 +127,7 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Header("Location: soc.php?socid=".$_GET["socid"]);
|
Header("Location: soc.php?socid=".$socid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,8 +153,8 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
|
|||||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user->rights->societe->creer)
|
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($_GET["socid"]);
|
$soc->fetch($socid);
|
||||||
$result = $soc->delete($_GET["socid"]);
|
$result = $soc->delete($socid);
|
||||||
|
|
||||||
if ($result == 0)
|
if ($result == 0)
|
||||||
{
|
{
|
||||||
@ -394,13 +394,13 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
|||||||
|
|
||||||
print_titre($langs->trans("EditCompany"));
|
print_titre($langs->trans("EditCompany"));
|
||||||
|
|
||||||
if ($_GET["socid"])
|
if ($socid)
|
||||||
{
|
{
|
||||||
if ($reload || ! $_POST["nom"])
|
if ($reload || ! $_POST["nom"])
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->id = $_GET["socid"];
|
$soc->id = $socid;
|
||||||
$soc->fetch($_GET["socid"]);
|
$soc->fetch($socid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -604,8 +604,8 @@ else
|
|||||||
* Fiche société en mode visu
|
* Fiche société en mode visu
|
||||||
*/
|
*/
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->id = $_GET["socid"];
|
$soc->id = $socid;
|
||||||
$result=$soc->fetch($_GET["socid"]);
|
$result=$soc->fetch($socid);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db,$soc->error);
|
dolibarr_print_error($db,$soc->error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user