From 4e9a3225e135167b52ed8b7d49df63ee8aa6ac63 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 29 Apr 2008 06:00:58 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20probl=E8me=20avec=20les=20apostrophes=20?= =?UTF-8?q?Fix:=20le=20dossier=20parent=20=E9tait=20perdu=20si=20erreur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/ecm/docdir.php | 3 ++- htdocs/ecm/ecmdirectory.class.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index af26955951a..03d8c0d4f16 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -1,5 +1,6 @@ + * Copyright (C) 2008 Regis Houssin * * 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 @@ -138,7 +139,7 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("Label").''."\n"; print ''.$langs->trans ("AddIn").''; - print $formecm->select_all_sections($ecmdir->parent,'catParent'); + print $formecm->select_all_sections($ecmdir->fk_parent,'catParent'); print ''."\n"; // Description diff --git a/htdocs/ecm/ecmdirectory.class.php b/htdocs/ecm/ecmdirectory.class.php index 618a005191a..b3fb3ff138c 100644 --- a/htdocs/ecm/ecmdirectory.class.php +++ b/htdocs/ecm/ecmdirectory.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2008 Regis Houssin * * 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 @@ -77,7 +78,7 @@ class EcmDirectory // extends CommonObject $now=time(); // Clean parameters - $this->label=sanitize_string($this->label); + $this->label=sanitize_string($this->label); $this->fk_parent=trim($this->fk_parent); $this->description=trim($this->description); if (! $this->cachenbofdoc) $this->cachenbofdoc=0; @@ -97,9 +98,9 @@ class EcmDirectory // extends CommonObject $sql.= "date_c,"; $sql.= "fk_user_c"; $sql.= ") VALUES ("; - $sql.= " '".$this->label."',"; + $sql.= " '".addslashes($this->label)."',"; $sql.= " '".$this->fk_parent."',"; - $sql.= " '".$this->description."',"; + $sql.= " '".addslashes($this->description)."',"; $sql.= " ".($this->cachenbofdoc).","; $sql.= " ".$this->db->idate($this->date_c).","; $sql.= " '".$this->fk_user_c."'";