Skip to content

Commit

Permalink
Merge branch 'develop' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Dec 10, 2024
2 parents 2c58bcc + 5ae8e8a commit 6b1c3a3
Show file tree
Hide file tree
Showing 32 changed files with 76 additions and 75 deletions.
18 changes: 7 additions & 11 deletions htdocs/admin/mails_senderprofile_list.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -803,14 +803,11 @@
$url .= '&limit='.((int) $limit);
}
if ($page) {
$url .= '&page='.urlencode((string) ($page));
}
if ($sortfield) {
$url .= '&sortfield='.urlencode($sortfield);
}
if ($sortorder) {
$url .= '&page='.urlencode($sortorder);
$url .= '&page='.urlencode((string) $page);
}
$url .= '&sortfield='.urlencode((string) $sortfield);
$url .= '&page='.urlencode((string) $sortorder);

print '<a class="editfielda reposition marginrightonly marginleftonly" href="'.$url.'&action=edit&token='.newToken().'&rowid='.$obj->rowid.'">'.img_edit().'</a>';
//print ' &nbsp; ';
print '<a class=" marginrightonly marginleftonly" href="'.$url.'&action=delete&token='.newToken().'">'.img_delete().'</a> &nbsp; ';
Expand All @@ -827,7 +824,6 @@
}
}


print '</tr>'."\n";
}

Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/bank/class/paymentvarious.class.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2017-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -845,7 +845,7 @@ public function getKanbanView($option = '', $arraydata = null)
if ($selected >= 0) {
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
if (!empty($bankline)) {
if (!empty($bankline) && $bankline instanceof AccountLine) {
$return .= ' | <span class="info-box-status ">'.$bankline->getNomUrl(1).'</span>';
}
if (property_exists($this, 'datep')) {
Expand Down
5 changes: 2 additions & 3 deletions htdocs/compta/prelevement/class/bonprelevement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,7 @@ public function create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL'
// Pre-store some values into variables to simplify following sql requests
if ($sourcetype != 'salary') {
$entities = $type != 'bank-transfer' ? getEntity('invoice') : getEntity('supplier_invoice');
$sqlTable = $type != 'bank-transfer' ? "facture" : "facture_fourn";
$socOrUser = 'fk_soc';
$societeOrUser = 'societe';
} else {
Expand All @@ -1099,8 +1100,6 @@ public function create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL'
$societeOrUser = 'user';
}

$sqlTable = $type != 'bank-transfer' ? "facture" : "facture_fourn";

$thirdpartyBANId = 0;

// Check if there is an iban associated to the bank transfer request or if we take the default
Expand Down Expand Up @@ -1160,7 +1159,7 @@ public function create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL'
$sql .= ", CONCAT(s.firstname,' ',s.lastname) as name";
$sql .= ", f.ref, sr.bic, sr.iban_prefix, 'FRST' as frstrecur";
}
$sql .= " FROM " . $this->db->prefix() . $sqlTable . " as f";
$sql .= " FROM " . $this->db->prefix() . $sqlTable . " as f"; // f is salary, facture or facture_fourn
$sql .= " LEFT JOIN " . $this->db->prefix() . "prelevement_demande as pd ON f.rowid = pd.fk_".$this->db->sanitize($sqlTable);
$sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($societeOrUser)." as s ON s.rowid = f.".$this->db->sanitize($socOrUser);
$sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($societeOrUser."_rib")." as sr ON s.rowid = sr.".$this->db->sanitize($socOrUser);
Expand Down
22 changes: 12 additions & 10 deletions htdocs/core/modules/facture/doc/pdf_crabe.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class pdf_crabe extends ModelePDFFactures
*/
public function __construct($db)
{
global $conf, $langs, $mysoc;
global $langs, $mysoc;

// Translations
$langs->loadLangs(array("main", "bills"));
Expand Down Expand Up @@ -359,10 +359,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$certprivate = empty($user->conf->CERTIFICATE_CRT_PRIVATE) ? '' : $user->conf->CERTIFICATE_CRT_PRIVATE;
// If user has no certificate, we try to take the company one
if (!$cert) {
$cert = !getDolGlobalString('CERTIFICATE_CRT') ? '' : $conf->global->CERTIFICATE_CRT;
$cert = getDolGlobalString('CERTIFICATE_CRT');
}
if (!$certprivate) {
$certprivate = !getDolGlobalString('CERTIFICATE_CRT_PRIVATE') ? '' : $conf->global->CERTIFICATE_CRT_PRIVATE;
$certprivate = getDolGlobalString('CERTIFICATE_CRT_PRIVATE');
}
// If a certificate is found
if ($cert) {
Expand Down Expand Up @@ -1162,14 +1162,17 @@ protected function _tableau_versements_header($pdf, $object, $outputlangs, $defa
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs, $outputlangsbis)
{
// phpcs:enable
global $conf, $mysoc, $hookmanager;
global $mysoc, $hookmanager;

$default_font_size = pdf_getPDFFontSize($outputlangs);

$pdf->SetFont('', '', $default_font_size - 1);

krsort($this->tva_array);

// Clean data type
$object->total_tva = (float) $object->total_tva;

// Show VAT details
if ($object->total_tva != 0 && getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
$pdf->SetFillColor(224, 224, 224);
Expand Down Expand Up @@ -1227,7 +1230,7 @@ protected function _tableau_info(&$pdf, $object, $posy, $outputlangs, $outputlan
}
}

// If France, show VAT mention if not applicable
// If France, show VAT mention if applicable
if ($this->emetteur->country_code == 'FR' && empty($object->total_tva) && (empty($mysoc->tva_assuj) || ($this->emetteur->isInEEC() && $object->thirdparty->isInEEC()))) {
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
Expand Down Expand Up @@ -1367,7 +1370,7 @@ protected function _tableau_info(&$pdf, $object, $posy, $outputlangs, $outputlan
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') {
// If payment mode unregulated or payment mode forced to CHQ
if (getDolGlobalInt('FACTURE_CHQ_NUMBER')) {
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);

if (getDolGlobalInt('FACTURE_CHQ_NUMBER') > 0) {
$account = new Account($this->db);
Expand All @@ -1385,7 +1388,7 @@ protected function _tableau_info(&$pdf, $object, $posy, $outputlangs, $outputlan
$posy = $pdf->GetY() + 2;
}
}
if ($conf->global->FACTURE_CHQ_NUMBER == -1) {
if (getDolGlobalInt('FACTURE_CHQ_NUMBER') == -1) {
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('', 'B', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0);
Expand All @@ -1404,7 +1407,7 @@ protected function _tableau_info(&$pdf, $object, $posy, $outputlangs, $outputlan
// If payment mode not forced or forced to VIR, show payment with BAN
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') {
if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) {
$bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account);
$bankid = ($object->fk_account <= 0 ? getDolGlobalString('FACTURE_RIB_NUMBER') : $object->fk_account);
if ($object->fk_bank > 0) {
$bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank
}
Expand Down Expand Up @@ -1828,7 +1831,7 @@ protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs
$index++;
$index++;
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $conf->global->BILL_TEXT_TOTAL_FOOTER, 0, 'L', 0);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, getDolGlobalString('BILL_TEXT_TOTAL_FOOTER'), 0, 'L', 0);
}

return ($tab2_top + ($tab2_hl * $index));
Expand Down Expand Up @@ -1877,7 +1880,6 @@ protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);

//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
Expand Down
27 changes: 13 additions & 14 deletions htdocs/core/modules/facture/doc/pdf_octopus.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1329,14 +1329,17 @@ public function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
*/
protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlangsbis)
{
global $conf, $mysoc, $hookmanager;
global $mysoc, $hookmanager;

$default_font_size = pdf_getPDFFontSize($outputlangs);

$pdf->SetFont('', '', $default_font_size - 1);

krsort($this->tva_array);

// Clean data type
$object->total_tva = (float) $object->total_tva;

// Show VAT details
if ($object->total_tva != 0 && getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
$pdf->SetFillColor(224, 224, 224);
Expand Down Expand Up @@ -1394,7 +1397,7 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan
}
}

// If France, show VAT mention if not applicable
// If France, show VAT mention if applicable
if ($this->emetteur->country_code == 'FR' && empty($object->total_tva) && (empty($mysoc->tva_assuj) || ($this->emetteur->isInEEC() && $object->thirdparty->isInEEC()))) {
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
Expand Down Expand Up @@ -1664,7 +1667,7 @@ protected function drawTotalTable(&$pdf, $object, $deja_regle, $posy, $outputlan
$pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);

$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = ((isModEnabled('multicurrency') && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht, 0, $outputlangs), 0, 'R', 1);

Expand Down Expand Up @@ -2549,7 +2552,7 @@ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
*/
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
global $conf, $hookmanager;
global $hookmanager;

// Default field style for content
$this->defaultContentsFieldsStyle = array(
Expand Down Expand Up @@ -2871,7 +2874,6 @@ public function _tableFirstPage(&$pdf, $tab_top, $tab_height, $nexY, $outputlang

$width = $this->page_largeur - $this->marge_gauche - $this->marge_droite - 83;

//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
//$pdf->Rect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, $this->corner_radius, '1001', 'F', explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
Expand Down Expand Up @@ -3069,8 +3071,6 @@ public function _tableFirstPage(&$pdf, $tab_top, $tab_height, $nexY, $outputlang
*/
public function getDataSituation(&$object)
{
global $conf, $db;

// Fetch previous and next situations invoices.
// Return all previous and next invoices (both standard and credit notes)
$object->fetchPreviousNextSituationInvoice();
Expand Down Expand Up @@ -3233,7 +3233,6 @@ public function displayRetainedWarranty($object)
return $object->displayRetainedWarranty();
} else {
// FOR RETROCOMPATIBILITY
global $conf;

// TODO : add a flag on invoices to store this conf USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL

Expand Down Expand Up @@ -3365,7 +3364,7 @@ public function printRoundedRectBtp($pdf, $x, $y, $w, $h, $r, $hidetop = 0, $hid
*/
public function btpGetInvoiceAmounts($id, $forceReadFromDB = false)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
global $user, $langs, $mysoc, $db, $hookmanager, $nblignes;

$object = new Facture($db);
$object->fetch($id);
Expand Down Expand Up @@ -3517,7 +3516,7 @@ public function resumeLastPage(&$pdf, $object, $deja_regle, $posy, $outputlangs,
if (count($propals)) {
$propal = array_pop($propals);

$total_ht = ($conf->multicurrency->enabled && $propal->multicurrency_tx != 1) ? $propal->multicurrency_total_ht : $propal->total_ht;
$total_ht = (isModEnabled('multicurrency') && $propal->multicurrency_tx != 1) ? $propal->multicurrency_total_ht : $propal->total_ht;
$remain_to_pay = $total_ht;

$pdf->SetTextColor(0, 0, 60);
Expand All @@ -3540,7 +3539,7 @@ public function resumeLastPage(&$pdf, $object, $deja_regle, $posy, $outputlangs,
} elseif (count($orders)) {
$order = array_pop($orders);

$total_ht = ($conf->multicurrency->enabled && $order->multicurrency_tx != 1 ? $order->multicurrency_total_ht : $order->total_ht);
$total_ht = (isModEnabled('multicurrency') && $order->multicurrency_tx != 1 ? $order->multicurrency_total_ht : $order->total_ht);
$remain_to_pay = $total_ht;
}

Expand Down Expand Up @@ -3608,7 +3607,7 @@ public function resumeLastPage(&$pdf, $object, $deja_regle, $posy, $outputlangs,
$pdf->SetXY($posx, $posy);
$pdf->MultiCell($width, $height, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);

$total_ht = ($conf->multicurrency->enabled && $invoice->multicurrency_tx != 1 ? $invoice->multicurrency_total_ht : $invoice->total_ht);
$total_ht = (isModEnabled('multicurrency') && $invoice->multicurrency_tx != 1 ? $invoice->multicurrency_total_ht : $invoice->total_ht);

$pdf->SetXY($posx + $width, $posy);
$pdf->MultiCell($width2, $height, price($sign * ($total_ht + (!empty($invoice->remise) ? $invoice->remise : 0)), 0, $outputlangs), 0, 'R', 1);
Expand Down Expand Up @@ -3651,8 +3650,8 @@ public function resumeLastPage(&$pdf, $object, $deja_regle, $posy, $outputlangs,

$index++;

$total_ht = ($conf->multicurrency->enabled && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ht : $invoice->total_ht;
$total_ttc = ($conf->multicurrency->enabled && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ttc : $invoice->total_ttc;
$total_ht = (isModEnabled('multicurrency') && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ht : $invoice->total_ht;
$total_ttc = (isModEnabled('multicurrency') && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ttc : $invoice->total_ttc;

// Total TTC
$pdf->SetXY($posx, $posy + $height * $index);
Expand Down
11 changes: 7 additions & 4 deletions htdocs/core/modules/facture/doc/pdf_sponge.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,9 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan

krsort($this->tva_array);

// Clean data type
$object->total_tva = (float) $object->total_tva;

// Show VAT details
if ($object->total_tva != 0 && getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
$pdf->SetFillColor(224, 224, 224);
Expand Down Expand Up @@ -1325,7 +1328,7 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan
}
}

// If France, show VAT mention if not applicable
// If France, show VAT mention if applicable
if ($this->emetteur->country_code == 'FR' && empty($object->total_tva) && (empty($mysoc->tva_assuj) || ($this->emetteur->isInEEC() && $object->thirdparty->isInEEC()))) {
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
Expand Down Expand Up @@ -1468,7 +1471,7 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') {
// If payment mode unregulated or payment mode forced to CHQ
if (getDolGlobalInt('FACTURE_CHQ_NUMBER')) {
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);

if (getDolGlobalInt('FACTURE_CHQ_NUMBER') > 0) {
$account = new Account($this->db);
Expand All @@ -1486,7 +1489,7 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan
$posy = $pdf->GetY() + 2;
}
}
if ($conf->global->FACTURE_CHQ_NUMBER == -1) {
if (getDolGlobalInt('FACTURE_CHQ_NUMBER') == -1) {
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('', 'B', $default_font_size - $diffsizetitle);
$pdf->MultiCell($posxend - $this->marge_gauche, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0);
Expand Down Expand Up @@ -1570,7 +1573,7 @@ protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlan
*/
protected function drawTotalTable(&$pdf, $object, $deja_regle, $posy, $outputlangs, $outputlangsbis)
{
global $conf, $mysoc, $hookmanager;
global $mysoc, $hookmanager;

$sign = 1;
if ($object->type == 2 && getDolGlobalString('INVOICE_POSITIVE_CREDIT_NOTE')) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/eventorganization/conferenceorbooth_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
// Define a complementary filter for search of next/prev ref.
if (!$user->hasRight('project', 'all', 'lire')) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
}

dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/eventorganization/conferenceorbooth_contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
// Define a complementary filter for search of next/prev ref.
if (!$user->hasRight('project', 'all', 'lire')) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
}

dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/eventorganization/conferenceorbooth_document.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
// Define a complementary filter for search of next/prev ref.
if (!$user->hasRight('project', 'all', 'lire')) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
}

dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/eventorganization/conferenceorbooth_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
// Define a complementary filter for search of next/prev ref.
if (!$user->hasRight('project', 'all', 'lire')) {
$objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
$project->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
$project->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
}

dol_banner_tab($project, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
Expand Down
Loading

0 comments on commit 6b1c3a3

Please sign in to comment.