Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX missing check constant PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS #33277

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

hregis
Copy link
Contributor

@hregis hregis commented Feb 28, 2025

No description provided.

@hregis hregis requested a review from eldy February 28, 2025 11:21
@hregis hregis mentioned this pull request Feb 28, 2025
@@ -1158,7 +1158,7 @@
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="' . $langs->trans("Modify") . '">';
$morehtmlref .= '</form>';
} else {
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use
(getDolGlobalString('PROJECT_...
Instead of
If (empty(...
v18 accepts the 2 ways but higher version requires thebsecond one to it will avoid trouble when change will be merged upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eldy in v18 all the call of "PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS" are with $conf !
i change all with getDolGlobalString() ?!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only new introduced lines, old one should be updated by higher version...

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants