diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index a7ec8d272ce..7026aecb655 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -43,6 +43,7 @@ if (!$user->admin) if ($_GET["action"] == 'set') { $file = DOL_DOCUMENT_ROOT . '/includes/modules/expedition/methode_expedition_'.$_GET["value"].'.modules.php'; + $classname = 'methode_expedition_'.$_GET["value"]; require_once($file); @@ -61,9 +62,9 @@ if ($_GET["action"] == 'set') $expedition_addon_var_pdf = EXPEDITION_ADDON_PDF; -if (action == 'setpdf') +if ($_GET["action"] == 'setpdf') { - $sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = 'EXPEDITION_ADDON_PDF', value='".$value."', visible=0"; + $sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = 'EXPEDITION_ADDON_PDF', value='".$_GET["value"]."', visible=0"; if ($db->query($sql)) {