From 4ff5f1bf1c0c4b9f3bb32af179ae90284c07122d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Fri, 27 Jul 2012 23:50:36 +0200 Subject: [PATCH] Duplicated code --- htdocs/commande/fiche.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2a1f67139dd..cd8ef284fa2 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1480,9 +1480,11 @@ if ($action == 'create' && $user->rights->commande->creer) } } - //WYSIWYG Editor include_once(DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'); + //WYSIWYG Editor + require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); + // Template to use by default print ''.$langs->trans('Model').''; print ''; @@ -1495,7 +1497,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''.$langs->trans('NotePublic').''; print ''; - require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); //print ''; @@ -1507,8 +1509,8 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''.$langs->trans('NotePrivate').''; print ''; - require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); + + $doleditor = new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); //print ''; print '';