mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Update functions.lib.php
This commit is contained in:
committed by
GitHub
parent
4137e92430
commit
3fd041e861
@@ -3265,12 +3265,13 @@ function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $mo
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (is_numeric($picto))
|
if (is_numeric($picto)) {
|
||||||
{
|
//$leveltopicto = array(0=>'weather-clear.png', 1=>'weather-few-clouds.png', 2=>'weather-clouds.png', 3=>'weather-many-clouds.png', 4=>'weather-storm.png');
|
||||||
$leveltopicto = array(0=>'weather-clear.png', 1=>'weather-few-clouds.png', 2=>'weather-clouds.png', 3=>'weather-many-clouds.png', 4=>'weather-storm.png');
|
//$picto = $leveltopicto[$picto];
|
||||||
return '<i class="fa fa-weather-level'.$picto.'"></i>';
|
return '<i class="fa fa-weather-level'.$picto.'"></i>';
|
||||||
$picto = $leveltopicto[$picto];
|
} elseif (!preg_match('/(\.png|\.gif)$/i', $picto)) {
|
||||||
} elseif (!preg_match('/(\.png|\.gif)$/i', $picto)) $picto .= '.png';
|
$picto .= '.png';
|
||||||
|
}
|
||||||
|
|
||||||
$path = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/weather/'.$picto;
|
$path = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/weather/'.$picto;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user