clean code (#35894)

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Frédéric FRANCE
2025-10-23 14:05:59 +02:00
committed by GitHub
parent 802e4b6491
commit f89cc919b8
2 changed files with 3 additions and 3 deletions

View File

@@ -671,7 +671,7 @@ function ajax_event($htmlname, $events)
* @param int<0,2> $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin.
* @param int<0,1> $forcenoajax 1 = Force to use a ahref link instead of ajax code.
* @param int<0,1> $setzeroinsteadofdel 1 = Set constant to '0' instead of deleting it when $input is empty.
* @param string|array<string,string> $suffix Suffix to use on the name of the switch picto when option is on. Example: array('ifoff' => '_red', 'ifon' => '_green')
* @param string|array{ifoff:string,ifon:string} $suffix Suffix to use on the name of the switch picto when option is on. Example: array('ifoff' => '_red', 'ifon' => '_green')
* @param string $mode Add parameter &mode= to the href link (Used for href link)
* @param string $morecss More CSS. Example: 'inline-block reposition'
* @param User|int $userconst If set, use the ajax On/Off for user or user ID $userconst

View File

@@ -189,12 +189,12 @@ $coldisplay++;
if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) {
$nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT');
}
$enable = (isset($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0);
$enable = getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS');
$toolbarname = 'dolibarr_details';
if (getDolGlobalString('FCKEDITOR_ENABLE_DETAILS_FULL')) {
$toolbarname = 'dolibarr_notes';
}
$doleditor = new DolEditor('product_desc', GETPOSTISSET('product_desc') ? GETPOST('product_desc', 'restricthtml') : $line->description, '', (!getDolGlobalString('MAIN_DOLEDITOR_HEIGHT') ? 164 : $conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enable, $nbrows, '98%');
$doleditor = new DolEditor('product_desc', GETPOSTISSET('product_desc') ? GETPOST('product_desc', 'restricthtml') : $line->description, '', getDolGlobalInt('MAIN_DOLEDITOR_HEIGHT', 164), $toolbarname, '', false, true, $enable, $nbrows, '98%');
$doleditor->Create();
} else {
print '<textarea id="product_desc" class="flat" name="product_desc" readonly style="width: 200px; height:80px;">';