Fix #38781 allow editing dictionary entries with rowid = 0 (ST_NEVER) (#38841)

This commit is contained in:
ThomasNgr-OpenDSI 2026-06-18 09:19:59 +02:00 committed by GitHub
parent db6314ce9b
commit 4978cccc3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2046,7 +2046,7 @@ if ($id > 0) {
print '</td>';
}
if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) {
$tmpaction = 'edit';
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
@ -2058,7 +2058,7 @@ if ($id > 0) {
}
print '<td colspan="3" class="center">';
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
print '<div name="'.(isset($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
print '<input type="hidden" name="page" value="'.dol_escape_htmltag($page).'">';
print '<input type="hidden" name="rowid" value="'.dol_escape_htmltag($rowid).'">';
if (!is_null($withentity)) {