Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into fix_dev_avoid_php8_warning

This commit is contained in:
Regis Houssin 2025-01-14 07:40:08 +01:00
commit a3fd2ad245
24 changed files with 47 additions and 29 deletions

View file

@ -664,7 +664,7 @@ class Contact extends CommonObject
$sql .= ", phone = ".(isset($this->phone_pro) ? "'".$this->db->escape($this->phone_pro)."'" : "NULL");
$sql .= ", phone_perso = ".(isset($this->phone_perso) ? "'".$this->db->escape($this->phone_perso)."'" : "NULL");
$sql .= ", phone_mobile = ".(isset($this->phone_mobile) ? "'".$this->db->escape($this->phone_mobile)."'" : "NULL");
$sql .= ", priv = '".$this->db->escape($this->priv)."'";
$sql .= ", priv = ".((int) $this->priv);
$sql .= ", fk_prospectlevel = '".$this->db->escape($this->fk_prospectlevel)."'";
if (isset($this->stcomm_id)) {
$sql .= ", fk_stcommcontact = ".($this->stcomm_id > 0 || $this->stcomm_id == -1 ? $this->stcomm_id : "0");

View file

@ -245,7 +245,7 @@ function dolDecrypt($chain, $key = '')
* Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'.
* @param int $nosalt Do not include any salt
* @param int $mode 0=Return encoded password, 1=Return array with encoding password + encoding algorithm
* @return string|array<pass_encrypted:string,pass_encoding:string> Hash of string or array with pass_encrypted and pass_encoding
* @return string|array{pass_encrypted:string,pass_encoding:string} Hash of string or array with pass_encrypted and pass_encoding
* @see getRandomPassword(), dol_verifyHash()
*/
function dol_hash($chain, $type = '0', $nosalt = 0, $mode = 0)

View file

@ -33,7 +33,7 @@
*/
function dolStripPhpCode($str, $replacewith = '')
{
$str = str_replace('<?=', '<?php', $str);
$str = str_replace('<?=', '<?php echo', $str); // replace a bad practive
$newstr = '';
@ -77,9 +77,9 @@ function dolStripPhpCode($str, $replacewith = '')
*/
function dolKeepOnlyPhpCode($str)
{
$str = str_replace('<?=', '<?php', $str);
$str = str_replace('<?=', '<?php echo', $str);
$str = str_replace('<?php', '__LTINTPHP__', $str);
$str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this is Off in php.ini
$str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini
$str = str_replace('__LTINTPHP__', '<?php', $str);
$newstr = '';

View file

@ -489,15 +489,15 @@ class ConferenceOrBoothAttendee extends CommonObject
if (count($filter) > 0) {
foreach ($filter as $key => $value) {
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
$sqlwhere[] = $key.'='.((int) $value);
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
$sqlwhere[] = $this->db->sanitize($key).' = '.((int) $value);
} elseif (!empty($this->fields[$key]) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $this->db->sanitize($key)." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (strpos($value, '%') === false) {
$sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')';
$sqlwhere[] = $this->db->sanitize($key).' IN ('.$this->db->sanitize($this->db->escape($value)).')';
} else {
$sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
$sqlwhere[] = $this->db->sanitize($key)." LIKE '%".$this->db->escape($value)."%'";
}
}
}

View file

@ -257,6 +257,7 @@ logOutFromYourCustomerAccount=Déconnectez-vous de votre compte client
filteredByVersion=Filtré par version
removeFilter=Supprimer filtre
viewMyCart=Voir mon panier
Shipping=Expédition
freeShipping=Expédition gratuite !
noProducts=Aucun produits
nbrItemsInCart=Il y a <span class="ajax_cart_quantity">0</span> articles dans votre panier.

View file

@ -28,6 +28,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
@phan-var-force string $colorblind_deuteranopes_badgeWarning
';
?>
/* IDE Hack <style type="text/css"> */
/* Badge style is based on bootstrap framework */
.badge {

View file

@ -16,7 +16,8 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
* @var string $left
*/
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
:root {
--btncolortext: rgb(<?php print $colortextlink; ?>);

View file

@ -4,7 +4,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
}
include_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
?>
/* <style type="text/css" > don't remove this line it's an ide hack */
/* IDE Hack <style type="text/css"> */
/*
* Dropdown of user popup
*/

View file

@ -3,6 +3,8 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
}
?>
/* IDE Hack <style type="text/css"> */
.template-container {
display: flex;
justify-content: space-between;

View file

@ -28,7 +28,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
* @var string $path
*/
?>
/* <style type="text/css" > */ /* don't remove this line it's an ide hack */
/* IDE Hack <style type="text/css"> */
.flag-sprite {
background:url(<?php echo dol_buildpath($path.'/theme/common/flags/flag-sprite.png', 1) ?>) no-repeat top left; display:inline-block;

View file

@ -153,7 +153,7 @@ $leftmenuwidth = 240;
$borderradius = getDolGlobalString('THEME_ELDY_USEBORDERONTABLE') ? getDolGlobalInt('THEME_ELDY_BORDER_RADIUS', 6) : 0;
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/* ============================================================================== */
/* Default styles */

View file

@ -14,7 +14,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
@phan-var-force string $left
';
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/*
* Component: Info Box

View file

@ -25,7 +25,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by stylesheet');
}
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
.mainmenu::before{
/* font part */

View file

@ -55,6 +55,7 @@ if (!defined('NOSESSION')) {
}
require_once __DIR__.'/../../main.inc.php';
/**
* @var Conf $conf
*/

View file

@ -2,7 +2,9 @@
if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
} ?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/*
progress style is based on bootstrap and admin lte framework
*/
@ -198,4 +200,3 @@ body[class*="colorblind-"] .progress-bar-red, body[class*="colorblind-"] .progre
.progress-bar-consumed-late {
background-color: <?php echo colorAgressiveness($badgeDanger, -95, +70) ?>;
}

View file

@ -11,7 +11,8 @@
if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
} ?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/*

View file

@ -30,7 +30,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
@phan-var-force string $colorblind_deuteranopes_badgeWarning
';
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/*
Badge style is based on bootstrap framework
*/

View file

@ -13,7 +13,8 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
* @var string $textbutaction
*/
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
:root {
--btncolortext:rgb(<?php print $colortextlink; ?>);

View file

@ -7,7 +7,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
$atoploginusername = empty($user->photo) ? 52 : 0;
?>
/* <style type="text/css" > don't remove this line it's an ide hack */
/* IDE Hack <style type="text/css"> */
/*
* Dropdown of user popup
*/

View file

@ -2,7 +2,8 @@
if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
} ?>
/* <style type="text/css" > don't remove this line it's an ide hack */
/* IDE Hack <style type="text/css"> */
.flag-sprite {
background:url(<?php echo dol_buildpath($path.'/theme/common/flags/flag-sprite.png', 1) ?>) no-repeat top left; display:inline-block;

View file

@ -16,7 +16,8 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
@phan-var-force string $left
';
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/*

View file

@ -1,7 +1,8 @@
<?php if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
} ?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
.mainmenu::before{
/* font part */

View file

@ -4,6 +4,3 @@ if (!defined('ISLOADEDBYSTEELSHEET')) {
}
include dol_buildpath($path.'/theme/eldy/progress.inc.php', 0); // actually md use same style as eldy theme
?>
/* <style type="text/css" > */

View file

@ -396,7 +396,8 @@ print '*/'."\n";
$leftmenuwidth = 242;
?>
/* <style type="text/css" > */
/* IDE Hack <style type="text/css"> */
/* ============================================================================== */