Fix: problme avec les apostrophes

This commit is contained in:
Regis Houssin 2007-07-23 20:24:33 +00:00
parent d45a056645
commit 58f564ce6f
2 changed files with 22 additions and 22 deletions

View File

@ -125,13 +125,13 @@ class Entrepot
*/
function update($id, $user)
{
$this->libelle=trim($this->libelle);
$this->description=trim($this->description);
$this->libelle=addslashes(trim($this->libelle));
$this->description=addslashes(trim($this->description));
$this->lieu=trim($this->lieu);
$this->address=trim($this->address);
$this->lieu=addslashes(trim($this->lieu));
$this->address=addslashes(trim($this->address));
$this->cp=trim($this->cp);
$this->ville=trim($this->ville);
$this->ville=addslashes(trim($this->ville));
$this->pays_id=trim($this->pays_id?$this->pays_id:0);
$sql = "UPDATE ".MAIN_DB_PREFIX."entrepot ";

View File

@ -53,15 +53,15 @@ if ($_POST["action"] == 'add')
{
$entrepot = new Entrepot($db);
$entrepot->ref = trim($_POST["ref"]);
$entrepot->libelle = trim($_POST["libelle"]);
$entrepot->description = trim($_POST["desc"]);
$entrepot->statut = trim($_POST["statut"]);
$entrepot->lieu = trim($_POST["lieu"]);
$entrepot->address = trim($_POST["address"]);
$entrepot->cp = trim($_POST["cp"]);
$entrepot->ville = trim($_POST["ville"]);
$entrepot->pays_id = trim($_POST["pays_id"]);
$entrepot->ref = $_POST["ref"];
$entrepot->libelle = $_POST["libelle"];
$entrepot->description = $_POST["desc"];
$entrepot->statut = $_POST["statut"];
$entrepot->lieu = $_POST["lieu"];
$entrepot->address = $_POST["address"];
$entrepot->cp = $_POST["cp"];
$entrepot->ville = $_POST["ville"];
$entrepot->pays_id = $_POST["pays_id"];
if ($entrepot->libelle) {
$id = $entrepot->create($user);
@ -84,14 +84,14 @@ if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel"))
$entrepot = new Entrepot($db);
if ($entrepot->fetch($_POST["id"]))
{
$entrepot->libelle = trim($_POST["libelle"]);
$entrepot->description = trim($_POST["desc"]);
$entrepot->statut = trim($_POST["statut"]);
$entrepot->lieu = trim($_POST["lieu"]);
$entrepot->address = trim($_POST["address"]);
$entrepot->cp = trim($_POST["cp"]);
$entrepot->ville = trim($_POST["ville"]);
$entrepot->pays_id = trim($_POST["pays_id"]);
$entrepot->libelle = $_POST["libelle"];
$entrepot->description = $_POST["desc"];
$entrepot->statut = $_POST["statut"];
$entrepot->lieu = $_POST["lieu"];
$entrepot->address = $_POST["address"];
$entrepot->cp = $_POST["cp"];
$entrepot->ville = $_POST["ville"];
$entrepot->pays_id = $_POST["pays_id"];
if ( $entrepot->update($_POST["id"], $user) > 0)
{