Fix warning

This commit is contained in:
Laurent Destailleur
2025-07-31 21:12:01 +02:00
parent fd49eedc5b
commit c3ae90f191
2 changed files with 7 additions and 6 deletions

View File

@@ -259,14 +259,15 @@ class Documentation
} }
/** /**
* Output header + body * Output header + body
* *
* @param string $title Title of page * @param string $title Title of page
* @param string[] $arrayofjs Array of complementary js files * @param string[] $arrayofjs Array of complementary js files
* @param string[] $arrayofcss Array of complementary css files * @param string[] $arrayofcss Array of complementary css files
* @param string $hidenavmenu Hide nav menu
* @return void * @return void
*/ */
public function docHeader($title = '', $arrayofjs = [], $arrayofcss = []) public function docHeader($title = '', $arrayofjs = [], $arrayofcss = [], $hidenavmenu = '')
{ {
global $langs; global $langs;
$title = (!empty($title)) ? dol_escape_htmltag($title) : $langs->trans('Documentation'); $title = (!empty($title)) ? dol_escape_htmltag($title) : $langs->trans('Documentation');
@@ -275,7 +276,7 @@ class Documentation
top_htmlhead('', $title, 0, 0, $arrayofjs, $arrayofcss); top_htmlhead('', $title, 0, 0, $arrayofjs, $arrayofcss);
print '<body class="dolibarr-doc'.(GETPOST('hidenavmenu') ? "-bis" : "").'">'; print '<body class="dolibarr-doc'.($hidenavmenu ? "-bis" : "").'">';
} }
/** /**

View File

@@ -42,7 +42,7 @@ $langs->load('uxdocumentation');
$documentation = new Documentation($db); $documentation = new Documentation($db);
// Output html head + body - Param is Title // Output html head + body - Param is Title
$documentation->docHeader('Icons', [], ['admin/tools/ui/css/doc-icons.css']); $documentation->docHeader('Icons', [], ['admin/tools/ui/css/doc-icons.css'], GETPOST('hidenavmenu'));
// Set view for menu and breadcrumb // Set view for menu and breadcrumb
// Menu must be set in constructor of documentation class // Menu must be set in constructor of documentation class