diff --git a/fhem/webfrontend/pgm3/CHANGED b/fhem/webfrontend/pgm3/CHANGED index 3c658a21d..084e4072f 100644 --- a/fhem/webfrontend/pgm3/CHANGED +++ b/fhem/webfrontend/pgm3/CHANGED @@ -139,3 +139,6 @@ It is not necessary to tell fhem that there are other logs. 2007-10-23 (071023cvs) -- feature: optimized speed for small devices (more than 50 percent on e.g a NSLU2) + +2007-10-24 (071024cvs) +-- bugfix: at least one new picture per day for userdefs (gnuplot picture) diff --git a/fhem/webfrontend/pgm3/HISTORY b/fhem/webfrontend/pgm3/HISTORY index 2207423e2..7ccbde216 100644 --- a/fhem/webfrontend/pgm3/HISTORY +++ b/fhem/webfrontend/pgm3/HISTORY @@ -39,3 +39,6 @@ - Martin 2007-10-23 - every module now checks if a redraw of the picture is really necessary. If not the old picture will be sent. The time to reload the screen now is down to less than 50 percent. + +- Martin 2007-10-24 + - Change in userdefs.php. At least one new picture per day for userdefs (gnuplot picture) diff --git a/fhem/webfrontend/pgm3/include/userdefs.php b/fhem/webfrontend/pgm3/include/userdefs.php index aff1c300b..c3d79472d 100755 --- a/fhem/webfrontend/pgm3/include/userdefs.php +++ b/fhem/webfrontend/pgm3/include/userdefs.php @@ -38,10 +38,12 @@ include "functions.php"; $execorder=$tailpath.' -1 '.$file; exec($execorder,$tail1); $parts = explode(" ", $tail1[0]); - + + $today= date("d"); $savefile=$AbsolutPath."/tmp/USERDEF.".$drawuserdef.".log.".$parts[0].".png"; - if (file_exists($savefile)) { + $fmtime=date ("d", filemtime($savefile)); #at least one new graphic per day (gnuplot) + if ((file_exists($savefile)) and ($fmtime == $today)) { $im2 = @ImageCreateFromPNG($savefile); header("Content-type: image/png"); @@ -69,7 +71,6 @@ include "functions.php"; $mintemp=100; $maxtemp=-100; $counter=count($array); - #if ($maxcountUSERDEF < $counter) {$counter=$maxcountUSERDEF;}; #Logrotate if ((($logrotateUSERDEFlines+100) < $counter) and ($logrotate == 'yes')) LogRotate($array,$file,$logrotateUSERDEFlines); @@ -314,11 +315,6 @@ function show_error($file,$drawuserdef,$imgmaxx,$imgmaxy,$type,$section) $txtcolor=$bg3p; ImageTTFText ($im, $fontsize, 0, 5, 17, $txtcolor, $fontttf, $text); $text="Please check the userdef[$section] of /config.php and refresh your browser"; - #$fontsize=7; - #ImageTTFText ($im, $fontsize, 0, 5, 30, $txtcolor, $fontttf, $text); - #$logname=$drawuserdef."log"; - #$fontsize=9; - #$text="define $logname FileLog $file $drawuserdef:.*s:.*"; ImageTTFText ($im, $fontsize, 0, 5, 45, $txtcolor, $fontttf, $text); header("Content-type: image/png"); diff --git a/fhem/webfrontend/pgm3/index.php b/fhem/webfrontend/pgm3/index.php index 82970d1ca..5c8680e73 100644 --- a/fhem/webfrontend/pgm3/index.php +++ b/fhem/webfrontend/pgm3/index.php @@ -41,7 +41,7 @@ include "include/gnuplot.php"; include "include/functions.php"; -$pgm3version='071023cvs'; +$pgm3version='071024'; $Action = $_POST['Action'];