From 258f9c20776a7e4be2367367e54980a9bf774888 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://svn.fhem.de/fhem/trunk@562 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/webfrontend/pgm3/include/userdefs.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/webfrontend/pgm3/include/userdefs.php b/fhem/webfrontend/pgm3/include/userdefs.php index d97160be1..8884e2f86 100755 --- a/fhem/webfrontend/pgm3/include/userdefs.php +++ b/fhem/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); #############################################################################