Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 27, 2024
1 parent 8db9b30 commit 0312aae
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
10 changes: 10 additions & 0 deletions dev/translation/dynamic_translation_keys.lst
Expand Up @@ -1498,8 +1498,14 @@ LineDescription
LineDiscount
LineID
LineLabel
LineLT1Rate
LineLT1Type
LineLT2Rate
LineLT2Type
LineQty
LineTotalHT
LineTotalLT1
LineTotalLT2
LineTotalTTC
LineTotalVAT
LineUnitPrice
Expand Down Expand Up @@ -2251,6 +2257,7 @@ PriceQtyMinHTCurrency
PriceU
PrintGCPDesc
PrintIPPDesc
PRINTIPP_SSL
PrintMethod
PrintTestDescprintgcp
PrintTestDescprintipp
Expand Down Expand Up @@ -2598,6 +2605,9 @@ StateId
StateOrigin
StatusAtInstall
StatusDebitCredit
StatusMotif0
StatusMotif1
StatusMotif2
StatusOrderApproved
StatusOrderApprovedShort
StatusOrderOnProcessShort
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/errors.lang
Expand Up @@ -380,7 +380,7 @@ WarningGoOnAccountancySetupToAddAccounts=If this list is empty, go into menu %s
WarningCorrectedInvoiceNotFound=Corrected invoice not found
WarningCommentNotFound=Warning: Can't find the start and/or end comments for the section <b>%s</b> into the file <b>%s</b>
WarningAlreadyReverse=Stock movement already reversed

WarningParentIDDoesNotExistAnymore=Parent this parent ID does not exists anymore
SwissQrOnlyVIR = SwissQR invoice can only be added on invoices set to be paid with credit transfer payments.
SwissQrCreditorAddressInvalid = Creditor address is invalid (are ZIP and city set? (%s)
SwissQrCreditorInformationInvalid = Creditor information is invalid for IBAN (%s): %s
Expand Down
1 change: 0 additions & 1 deletion htdocs/langs/en_US/ticket.lang
Expand Up @@ -74,7 +74,6 @@ SolvedClosed=Solved
Deleted=Deleted

# Dict
TicketType=Type
Severity=Severity
TicketGroupIsPublic=Group is public
TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface
Expand Down
21 changes: 17 additions & 4 deletions htdocs/user/hierarchy.php
Expand Up @@ -114,7 +114,7 @@
}
$sqlfilter= '';
if (!empty($filters)) {
$sqlfilter = join(' AND ', $filters);
$sqlfilter = implode(' AND ', $filters);
}
// Load hierarchy of users
$user_arbo_all = $userstatic->get_full_tree(0, '');
Expand Down Expand Up @@ -196,18 +196,31 @@
if (!empty($user_arbo_all[$idparent])) {
$val = $user_arbo_all[$idparent];
$userstatic->id = $val['id'];
$userstatic->ref = $val['id'];
$userstatic->ref = (string) $val['id'];
$userstatic->login = $val['login'];
$userstatic->firstname = $val['firstname'];
$userstatic->lastname = $val['lastname'];
$userstatic->statut = $val['statut'];
$userstatic->status = $val['statut'];
$userstatic->email = $val['email'];
$userstatic->gender = $val['gender'];
$userstatic->socid = $val['fk_soc'];
$userstatic->admin = $val['admin'];
$userstatic->entity = $val['entity'];
$userstatic->photo = $val['photo'];

$entity = $val['entity'];
$entitystring = '';

// TODO Set of entitystring should be done with a hook
if (isModEnabled('multicompany') && is_object($mc)) {
if (empty($entity)) {
$entitystring = $langs->trans("AllEntities");
} else {
$mc->getInfo($entity);
$entitystring = $mc->label;
}
}

$li = '<span class="opacitymedium">';
$li .= $userstatic->getNomUrl(-1, '', 0, 1);
if (isModEnabled('multicompany') && $userstatic->admin && !$userstatic->entity) {
Expand Down Expand Up @@ -238,7 +251,7 @@
// We should not be here. If a record has a parent id, parent id should be into $user_arbo_all
$data[$key]['fk_menu'] = -2;
if (empty($data[-2])) {
$li = '<span class="opacitymedium">'.$langs->trans("ParentIDDoesNotExistAnymore").'</span>';
$li = '<span class="opacitymedium">'.$langs->trans("WarningParentIDDoesNotExistAnymore").'</span>';
$entry = '<table class="nobordernopadding centpercent"><tr class="trtree"><td class="usertddisabled">'.$li.'</td><td align="right" class="usertddisabled"></td></tr></table>';
$data[-2] = array(
'rowid'=>'-2',
Expand Down

0 comments on commit 0312aae

Please sign in to comment.