diff --git a/webfrontend/pgm3/CHANGED b/webfrontend/pgm3/CHANGED index d375fd5c6..396c3c104 100644 --- a/webfrontend/pgm3/CHANGED +++ b/webfrontend/pgm3/CHANGED @@ -204,3 +204,6 @@ It is not necessary to tell fhem that there are other logs. -- Feature: DBLog for everything except UserDefs Changed: index.php, config.php, fht.php, hsm100.php, fhtpulldown.php, ks300.php +2010-04-26 + -- Bugfix: userdefs.php: FS20-Type the first time with broken graphic + diff --git a/webfrontend/pgm3/HISTORY b/webfrontend/pgm3/HISTORY index d2df539c9..957e7213b 100644 --- a/webfrontend/pgm3/HISTORY +++ b/webfrontend/pgm3/HISTORY @@ -108,3 +108,5 @@ - Martin 2010-03-12 -- Bugfix: better check of availability of google-weather -- Feature: DBLog added for everything except UserDefs +-Martin 201004-26 + -- Bugfxi: the FS20-Type from Userdef the first time with a broken graphic diff --git a/webfrontend/pgm3/include/userdefs.php b/webfrontend/pgm3/include/userdefs.php index 8884e2f86..34640b999 100755 --- a/webfrontend/pgm3/include/userdefs.php +++ b/webfrontend/pgm3/include/userdefs.php @@ -42,13 +42,14 @@ include "functions.php"; $today= date("H"); $savefile=$AbsolutPath."/tmp/USERDEF.".$drawuserdef.".log.".$parts[0].".png"; - $fmtime=date ("H", filemtime($savefile)); #at least one new graphic per hour (gnuplot) - if ((file_exists($savefile)) and ($fmtime == $today)) { - + if (file_exists($savefile)) { + $fmtime=date ("H", filemtime($savefile)); #at least one new graphic per hour (gnuplot) + if ($fmtime == $today) { $im2 = @ImageCreateFromPNG($savefile); header("Content-type: image/png"); imagePng($im2); exit; # ;-))) + } } else #delete old pngs { @@ -239,6 +240,7 @@ if ($gnuplottype=='piri' or $gnuplottype=='fs20') fputs($f1,$message); fclose($f1); exec("$gnuplot $AbsolutPath/tmp/$drawuserdef",$output); + sleep(3); $w = imagesx($im); $h = imagesy($im);