diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index fecd48637edf85d927e9b61490bedf666fdd1c7e..aab1a965eb625ae0a6f45659f8a4cc0a62a5ed2c 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 0cce9a3e3b476f2e7a20018bac049ff91d87743f..66b310da69d8887d40f632737fc8402558517ad1 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 -->