From c79fc516d3b2b7174d9c4fbf0844f606b58b5fbc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <ldestailleur@teclib.com> Date: Thu, 14 Aug 2014 17:27:28 +0200 Subject: [PATCH] Maj squelette --- dev/skeletons/skeleton_page.php | 2 +- htdocs/core/tpl/notes.tpl.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index fecd48637ed..aab1a965eb6 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -63,7 +63,7 @@ if ($user->societe_id > 0) // Load object if id or ref is provided as parameter $object=new Skeleton_Class($db); -if (($id || $ref) && $action != 'add') +if (($id > 0 || ! empty($ref)) && $action != 'add') { $result=$object->fetch($id,$ref); if ($result < 0) dol_print_error($db); diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 0cce9a3e3b4..66b310da69d 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -22,6 +22,7 @@ $note_public = 'note_public'; $note_private = 'note_private'; $colwidth=(isset($colwidth)?$colwidth:25); + $permission=(isset($permission)?$permission:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0)); // If already defined by caller page $moreparam=(isset($moreparam)?$moreparam:''); $value_public=$object->note_public; @@ -59,8 +60,9 @@ elseif ($module == 'contact') { $permission=$user->rights->societe->creer;} elseif ($module == 'shipping') { $permission=$user->rights->expedition->creer;} //else dol_print_error('','Bad value '.$module.' for param module'); -if (! empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata='ckeditor:dolibarr_notes:100%:200::1:12:100'; +if (! empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata='ckeditor:dolibarr_notes:100%:200::1:12:100'; // Rem: This var is for all notes, not only thirdparties note. else $typeofdata='textarea:12:100'; + ?> <!-- BEGIN PHP TEMPLATE NOTES --> -- GitLab