Fix: problème avec les apostrophes
Fix: le dossier parent était perdu si erreur
This commit is contained in:
parent
6664deb106
commit
4e9a3225e1
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2008 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -138,7 +139,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.$ecmdir->label.'"></td></tr>'."\n";
|
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.$ecmdir->label.'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans ("AddIn").'</td><td>';
|
print '<tr><td>'.$langs->trans ("AddIn").'</td><td>';
|
||||||
print $formecm->select_all_sections($ecmdir->parent,'catParent');
|
print $formecm->select_all_sections($ecmdir->fk_parent,'catParent');
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2008 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -77,7 +78,7 @@ class EcmDirectory // extends CommonObject
|
|||||||
$now=time();
|
$now=time();
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->label=sanitize_string($this->label);
|
$this->label=sanitize_string($this->label);
|
||||||
$this->fk_parent=trim($this->fk_parent);
|
$this->fk_parent=trim($this->fk_parent);
|
||||||
$this->description=trim($this->description);
|
$this->description=trim($this->description);
|
||||||
if (! $this->cachenbofdoc) $this->cachenbofdoc=0;
|
if (! $this->cachenbofdoc) $this->cachenbofdoc=0;
|
||||||
@ -97,9 +98,9 @@ class EcmDirectory // extends CommonObject
|
|||||||
$sql.= "date_c,";
|
$sql.= "date_c,";
|
||||||
$sql.= "fk_user_c";
|
$sql.= "fk_user_c";
|
||||||
$sql.= ") VALUES (";
|
$sql.= ") VALUES (";
|
||||||
$sql.= " '".$this->label."',";
|
$sql.= " '".addslashes($this->label)."',";
|
||||||
$sql.= " '".$this->fk_parent."',";
|
$sql.= " '".$this->fk_parent."',";
|
||||||
$sql.= " '".$this->description."',";
|
$sql.= " '".addslashes($this->description)."',";
|
||||||
$sql.= " ".($this->cachenbofdoc).",";
|
$sql.= " ".($this->cachenbofdoc).",";
|
||||||
$sql.= " ".$this->db->idate($this->date_c).",";
|
$sql.= " ".$this->db->idate($this->date_c).",";
|
||||||
$sql.= " '".$this->fk_user_c."'";
|
$sql.= " '".$this->fk_user_c."'";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user