Merge pull request #11539 from hregis/9.0_bug2

FIX duplicate on the check (TODO field $onetrtd not used ?)
This commit is contained in:
Laurent Destailleur 2019-07-25 17:56:42 +02:00 committed by GitHub
commit 0d79905b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6289,7 +6289,7 @@ abstract class CommonObject
* @param array $params Optional parameters. Example: array('style'=>'class="oddeven"', 'colspan'=>$colspan)
* @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names)
* @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names)
* @param string $onetrtd All fields in same tr td
* @param string $onetrtd All fields in same tr td (TODO field not used ?)
* @return string
*/
function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0)
@ -6386,10 +6386,7 @@ abstract class CommonObject
$out .= '<tr id="'.$html_id.'" '.$csstyle.' class="'.$class.$this->element.'_extras_'.$key.'" '.$domData.' >';
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0)
{
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan='0'; }
}
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan='0'; }
if ($action == 'selectlines') { $colspan++; }