From 52f964d7c3ab6011b47852e4fb3431cb2afd3aff Mon Sep 17 00:00:00 2001 From: nitroxmh Date: Mon, 7 May 2012 12:33:06 +0000 Subject: [PATCH] Bugfix, userdefs.php now works with new gnuplot git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1542 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- webfrontend/pgm3/CHANGED | 3 +++ webfrontend/pgm3/HISTORY | 3 +++ webfrontend/pgm3/include/userdefs.php | 19 +++++++++++++------ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/webfrontend/pgm3/CHANGED b/webfrontend/pgm3/CHANGED index 675676679..47f57bc18 100644 --- a/webfrontend/pgm3/CHANGED +++ b/webfrontend/pgm3/CHANGED @@ -216,5 +216,8 @@ It is not necessary to tell fhem that there are other logs. 2012-05-02 -- Bugfix: getting xmllist from FHEM without \r\n, no netcat any more Changed: index.php, config.php + +2012-05-07 + -- Bugfix: userdefs.php works with new gnuplot-version diff --git a/webfrontend/pgm3/HISTORY b/webfrontend/pgm3/HISTORY index 430cfd7f9..a0df77e71 100644 --- a/webfrontend/pgm3/HISTORY +++ b/webfrontend/pgm3/HISTORY @@ -119,3 +119,6 @@ - Martin 2012-05-03 -- Bugfix: getting xmllist from FHEM without \r\n + +- Martin 2012-05-07 + -- bugfix: userdefs.php. Now wokrs with new Gnuplot (imagecopy) diff --git a/webfrontend/pgm3/include/userdefs.php b/webfrontend/pgm3/include/userdefs.php index 34640b999..4f878c209 100755 --- a/webfrontend/pgm3/include/userdefs.php +++ b/webfrontend/pgm3/include/userdefs.php @@ -12,6 +12,7 @@ include "functions.php"; $userdefnr=$_GET['userdefnr']; +#$userdefnr=0; $room=$userdef[$userdefnr]['room']; @@ -29,7 +30,9 @@ include "functions.php"; $gnuplottype=$userdef[$userdefnr]['gnuplottype']; - +# echo "userdefnr: $userdefnr"; +# echo "file: $file"; +#exit; if (! file_exists($file)) show_error($file,$drawuserdef,$imgmaxxuserdef,$imgmaxyuserdef,$type,$userdefnr); @@ -76,6 +79,7 @@ include "functions.php"; #Logrotate if ((($logrotateUSERDEFlines+100) < $counter) and ($logrotate == 'yes')) LogRotate($array,$file,$logrotateUSERDEFlines); +#echo "test1"; #print_r($array[1]); #print_r($array[1][12]); exit; ########################################################################### @@ -108,7 +112,6 @@ include "functions.php"; - # Start Graphic $im = ImageCreateTrueColor($imgmaxxuserdef,$imgmaxyuserdef); $black = ImageColorAllocate($im, 0, 0, 0); @@ -156,6 +159,7 @@ include "functions.php"; if ($maxcountUSERDEF < $_SESSION["maxdata"]) {$anzlines=$maxcountUSERDEF;} else {$anzlines= $_SESSION["maxdata"];} + if ($gnuplottype=='piri' or $gnuplottype=='fs20') { $datumtomorrow= mktime (0,0,0,date("m") ,date("d")+1,date("Y")); @@ -168,7 +172,7 @@ if ($gnuplottype=='piri' or $gnuplottype=='fs20') $messageA=<<