diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest index ebbf1aab4eb..5e514a32a47 100644 --- a/htdocs/cache.manifest +++ b/htdocs/cache.manifest @@ -8,7 +8,7 @@ CACHE MANIFEST # Files listed under CACHE will be ALWAYS cached after they are loaded. # And they will be always used from Cache after (even after refresh). CACHE: -theme/dolibarr_logo.png +theme/dolibarr_logo.svg support/ support/index.php diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index f9bc453d999..7d8b819b75c 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -672,27 +672,27 @@ if (!empty($date_start) && !empty($date_stop)) } elseif ($data['item'] == 'ExpenseReport') { $expensereport->id = $data['id']; $expensereport->ref = $data['ref']; - print $expensereport->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $expensereport->getNomUrl(1, 0, 0, '', 0, 0); } elseif ($data['item'] == 'SalaryPayment') { $salary_payment->id = $data['id']; $salary_payment->ref = $data['ref']; - print $salary_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $salary_payment->getNomUrl(1, '', 0, '', 0); } elseif ($data['item'] == 'Donation') { $don->id = $data['id']; $don->ref = $data['ref']; - print $don->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $don->getNomUrl(1, 0, '', 0); } elseif ($data['item'] == 'SocialContributions') { $charge_sociales->id = $data['id']; $charge_sociales->ref = $data['ref']; - print $charge_sociales->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $charge_sociales->getNomUrl(1, 0, 0, 0, 0); } elseif ($data['item'] == 'VariousPayment') { $various_payment->id = $data['id']; $various_payment->ref = $data['ref']; - print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $various_payment->getNomUrl(1, '', 0, 0); } elseif ($data['item'] == 'LoanPayment') { $payment_loan->id = $data['id']; $payment_loan->ref = $data['ref']; - print $payment_loan->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $payment_loan->getNomUrl(1, 0, 0, '', 0); } else { print $data['ref']; } diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 9302ed09afb..4199e51cb68 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -328,6 +328,8 @@ class Interfaces continue; } + $text = ''; + try { $objMod = new $modName($db); diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 0a50eb7407f..1b2a5c1245f 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -230,8 +230,8 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo); $width = 150; - } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } } } @@ -254,7 +254,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 13598015688..409df1362e9 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -470,15 +470,15 @@ class DataPolicyCron { $sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key); - $resql = $db->query($sql); + $resql = $this->db->query($sql); - if ($resql && $db->num_rows($resql) > 0) + if ($resql && $this->db->num_rows($resql) > 0) { - $num = $db->num_rows($resql); + $num = $this->db->num_rows($resql); $i = 0; require_once $params['file']; - $object = new $params['class']($db); + $object = new $params['class']($this->db); while ($i < $num && !$error) { diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 77dbd177cbd..59c293e6386 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -916,11 +916,13 @@ class Don extends CommonObject /** * Return clicable name (with picto eventually) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param int $notooltip 1=Disable tooltip - * @return string Chaine avec URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $notooltip 1=Disable tooltip + * @param string $moretitle Add more text to title tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string Chaine avec URL */ - public function getNomUrl($withpicto = 0, $notooltip = 0) + public function getNomUrl($withpicto = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) { global $conf, $langs; @@ -928,10 +930,18 @@ class Don extends CommonObject $result = ''; $label = ''.$langs->trans("Donation").''; - if (!empty($this->id)) + if (!empty($this->id)) { $label .= '
'.$langs->trans('Ref').': '.$this->id; + } + if ($moretitle) $label .= ' - '.$moretitle; - $linkstart = ''; + $url = DOL_URL_ROOT.'/don/card.php?id='.$this->id; + + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + + $linkstart = ''; $linkend = ''; $result .= $linkstart; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 485d48dc443..ce152317710 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -507,25 +507,39 @@ class PaymentLoan extends CommonObject /** * Return clicable name (with eventually a picto) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto - * @param int $maxlen Max length label - * @return string Chaine with URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto + * @param int $maxlen Max length label + * @param int $notooltip 1=Disable tooltip + * @param string $moretitle Add more text to title tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL */ - public function getNomUrl($withpicto = 0, $maxlen = 0) + public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) { - global $langs; + global $langs, $conf; + + if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; - - if (!empty($this->id)) - { - $link = ''; - $linkend = ''; - - if ($withpicto) $result .= ($link.img_object($langs->trans("ShowPayment").': '.$this->ref, 'payment').$linkend.' '); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + $label = ''.$langs->trans("Loan").''; + if (!empty($this->id)) { + $label .= '
'.$langs->trans('Ref').': '.$this->id; } + if ($moretitle) $label .= ' - '.$moretitle; + + $url = DOL_URL_ROOT.'/loan/payment/card.php?id='.$this->id; + + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + + $linkstart = ''; + $linkend = ''; + + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto != 2) $result .= $this->ref; + $result .= $linkend; return $result; } diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index fad19564fdc..2070bedf568 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -440,7 +440,7 @@ class MyObject extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < min($limit, $num)) + while ($i < ($limit ? min($limit, $num) : $num)) { $obj = $this->db->fetch_object($resql); diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 30529b49f56..31ec69f3a42 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -121,7 +121,7 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index bb2a1652d8f..7b6892552d1 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1015,7 +1015,7 @@ class Product extends CommonObject $sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null'); $sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null'); $sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null'); - $sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && $this->seuil_stock_alerte != '') ? "'".$this->db->escape($this->seuil_stock_alerte)."'" : "null"); + $sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && is_numeric($this->seuil_stock_alerte)) ? (int) $this->seuil_stock_alerte : 'null'); $sql .= ", description = '".$this->db->escape($this->description)."'"; $sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null'); $sql .= ", customcode = '".$this->db->escape($this->customcode)."'"; diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index 9328a8ecd1b..b185f8c933f 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -105,8 +105,11 @@ img.demothumb { object-fit: contain; height: 140px; background-position-y: bottom; + background-position-x: right; +} +.demologo { + width: 200px; } - @media only screen and (max-width: 767px) { diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index c470055dbce..f0caf948770 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -274,13 +274,13 @@ print "\n"; print '
'; print '
'; -print ''; +print ''; print '
'; print '
'; print '
'; print '
'; -print '
'.$langs->trans("DemoDesc").'

'; +print '
'.$langs->trans("DemoDesc").'

'; print '
'.$langs->trans("ChooseYourDemoProfil").'
'; print '
'; print '
'; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5b456893bf9..7f788a84671 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -113,9 +113,9 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 150; } - elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) + elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; $width = 150; } @@ -130,7 +130,7 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 83e757b78f8..2378728a8d3 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -191,7 +191,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index ddd1943329e..ea7fd71c9e6 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -793,7 +793,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 2610219d69d..a3f6d733fcb 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -245,7 +245,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 6b7805cf473..b1d6c149a51 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -181,7 +181,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 91f24bbb915..91d0fe9bb1a 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -34,7 +34,6 @@ $WS_DOL_URL_WSDL = 'https://ec.europa.eu/taxation_customs/vies/checkVatService.w $WS_METHOD = 'checkVat'; - $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; diff --git a/htdocs/theme/dolibarr_logo.png b/htdocs/theme/dolibarr_logo.png index 77c21461910..c15f03c821b 100644 Binary files a/htdocs/theme/dolibarr_logo.png and b/htdocs/theme/dolibarr_logo.png differ diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index b0f3a5aab6c..83289521538 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -192,13 +192,13 @@ elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.' $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 128; } -elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png')) +elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg'; } -elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) +elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } // Security graphical code