Debug v17

This commit is contained in:
Laurent Destailleur 2023-02-18 20:47:19 +01:00
parent a81510ccd6
commit b35d768d05
4 changed files with 12 additions and 7 deletions

View File

@ -8711,9 +8711,9 @@ abstract class CommonObject
if ($usesharelink) {
if ($val['share']) {
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) {
if (empty($maxHeight) || ($photo_vignette && $imgarray['height'] > $maxHeight)) {
$return .= '<!-- Show original file (thumb not yet available with shared links) -->';
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'"'.($maxHeight ?' height="'.$maxHeight.'"': '').' src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
} else {
$return .= '<!-- Show original file -->';
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
@ -8723,9 +8723,9 @@ abstract class CommonObject
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png" title="'.dol_escape_htmltag($alt).'">';
}
} else {
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) {
if (empty($maxHeight) || ($photo_vignette && $imgarray['height'] > $maxHeight)) {
$return .= '<!-- Show thumb -->';
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').' maxwidth150onsmartphone maxwidth200" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').' maxwidth150onsmartphone maxwidth200"'.($maxHeight ?' height="'.$maxHeight.'"': '').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
} else {
$return .= '<!-- Show original file -->';
$return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">';

View File

@ -130,8 +130,12 @@ function dol_getImageSize($file, $url = false)
if ($filetoread) {
$infoImg = getimagesize($filetoread); // Recuperation des infos de l'image
$ret['width'] = $infoImg[0]; // Largeur de l'image
$ret['height'] = $infoImg[1]; // Hauteur de l'image
if ($infoImg) {
$ret['width'] = $infoImg[0]; // Largeur de l'image
$ret['height'] = $infoImg[1]; // Hauteur de l'image
} else {
$ret['width'] = $ret['height'] = '';
}
}
return $ret;

View File

@ -4900,7 +4900,7 @@ div.titre {
color: var(--colortexttitlenotab);
}
.tertiary {
color: var(--colortexttitlenotab);
color: var(--colortexttitlenotab2);
}
table.centpercent.notopnoleftnoright.table-fiche-title {

View File

@ -60,6 +60,7 @@ $colorbacklinepairchecked = '230,237,244'; // line checked
$colorbacklinebreak = '250,246,251';
$colorbackbody = '248,248,248';
$colortexttitlenotab = '80,71,5';
$colortexttitlenotab2 = '100,0,100';
$colortexttitle = '20,20,20';
$colortexttitlelink = '0,0,120';
$colortext = '0,0,0';