From 3521a1cebdd544b99b1f1df8221a1623e78f7011 Mon Sep 17 00:00:00 2001 From: mr_p Date: Fri, 22 Jan 2010 10:30:01 +0000 Subject: [PATCH] Disabled min- & max-display in userdefined-plots, if there is at least not one numeric value. git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@562 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- webfrontend/pgm3/include/userdefs.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webfrontend/pgm3/include/userdefs.php b/webfrontend/pgm3/include/userdefs.php index d97160be1..8884e2f86 100755 --- a/webfrontend/pgm3/include/userdefs.php +++ b/webfrontend/pgm3/include/userdefs.php @@ -269,8 +269,10 @@ if ($gnuplottype=='piri' or $gnuplottype=='fs20') $txtcolor=$bg3p; $fontsize=7; - $text="min= $mintemp max= $maxtemp"; - ImageTTFText ($im, $fontsize, 0, 67-$XcorrectMainTextUSERDEF, 49, $txtcolor, $fontttf, $text); + if (is_numeric($mintemp) || is_numeric($maxtemp)) { + $text="min= $mintemp max= $maxtemp"; + ImageTTFText ($im, $fontsize, 0, 67-$XcorrectMainTextUSERDEF, 49, $txtcolor, $fontttf, $text); + } $text=$resultreverse[0][0]; ImageTTFText ($im, $fontsize, 0, $imgmaxxuserdef-127, 15, $txtcolor, $fontttf, $text); #############################################################################