From 7c4ddc4c3cbe205e403f21360e4eb3cd04709d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Sat, 23 Nov 2024 11:07:41 +0100 Subject: [PATCH] fix phpstan doc ui --- .../tools/ui/class/documentation.class.php | 4 +-- .../admin/tools/ui/components/test_arrays.php | 35 +++++++++---------- .../tools/ui/components/test_buttons.php | 3 +- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/htdocs/admin/tools/ui/class/documentation.class.php b/htdocs/admin/tools/ui/class/documentation.class.php index 3d5128cc16b..06a919d274f 100644 --- a/htdocs/admin/tools/ui/class/documentation.class.php +++ b/htdocs/admin/tools/ui/class/documentation.class.php @@ -77,7 +77,6 @@ class Documentation */ private function setMenu() { - global $hookmanager; @@ -315,7 +314,8 @@ class Documentation } /** - * Output summary + * Output summary + * * @param int $showsubmenu Show Sub menus: 0 = No, 1 = Yes * @param int $showsubmenu_summary Show summary of sub menus: 0 = No, 1 = Yes * @return void diff --git a/htdocs/admin/tools/ui/components/test_arrays.php b/htdocs/admin/tools/ui/components/test_arrays.php index 0cfaf869942..553816c58d5 100644 --- a/htdocs/admin/tools/ui/components/test_arrays.php +++ b/htdocs/admin/tools/ui/components/test_arrays.php @@ -32,7 +32,7 @@ if ($user->socid > 0) { accessforbidden(); } - +$optioncss = GETPOST('optioncsss', 'alpha'); /* * View @@ -186,15 +186,14 @@ $productspecimen = new Product($db); $productspecimen->initAsSpecimen(); $object = $productspecimen; $param = ''; -$actioncode = ''; -$status = ''; -$filter = ''; -$filtert = ''; -$socid = 0; -$type = 0; -$usergroup = 0; - -$sortfield = 'aaa'; +$actioncode = getDolGlobalString('MAIN_TEST_UI_ACTION_CODE'); // '' by default +$status = getDolGlobalString('MAIN_TEST_UI_STATUS'); // '' by default; +$filter = getDolGlobalString('MAIN_TEST_UI_FILTER'); // '' by default; +$filtert = getDolGlobalString('MAIN_TEST_UI_FILTERT'); // '' by default; +$socid = getDolGlobalInt('MAIN_TEST_UI_SOCID', 0); // 0 by default; +$type = getDolGlobalInt('MAIN_TEST_UI_TYPE', 0); // 0 by default; +$usergroup = getDolGlobalInt('MAIN_TEST_UI_USERGROUP', 0); // 0 by default; +$sortfield = getDolGlobalString('MAIN_TEST_UI_SORTFIELD', 'aaa'); // 'aaa' by default; $sortorder = 'ASC'; $tasksarray = array(1, 2, 3); // To force having several lines $tagidfortablednd = 'tablelines3'; @@ -265,18 +264,16 @@ $cate_arbo = array('field1' => 'value1d into the select list D', 'field2' => 'va $moreforfilter .= $form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced $moreforfilter .= ''; -if (!empty($moreforfilter)) { - print '
'; - print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
'; -} +print '
'; +print $moreforfilter; +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +print '
'; ?> -" id="tablelines3"> +
" id="tablelines3"> trans('title1'), 0, $_SERVER["PHP_SELF"], 'aaa', '', '', 'align="left"', $sortfield, $sortorder); ?> diff --git a/htdocs/admin/tools/ui/components/test_buttons.php b/htdocs/admin/tools/ui/components/test_buttons.php index 619e91b3922..dbeba208def 100644 --- a/htdocs/admin/tools/ui/components/test_buttons.php +++ b/htdocs/admin/tools/ui/components/test_buttons.php @@ -1,7 +1,6 @@ - */ -/* + * * This program and files/directory inner it is free software: you can * redistribute it and/or modify it under the terms of the * GNU Affero General Public License (AGPL) as published by