diff --git a/fhem/FHEM/55_InfoPanel.pm b/fhem/FHEM/55_InfoPanel.pm
index 0bdc59603..bc37552f9 100644
--- a/fhem/FHEM/55_InfoPanel.pm
+++ b/fhem/FHEM/55_InfoPanel.pm
@@ -39,9 +39,11 @@
# 2015-02-14 - 7967 - added: item ticker (experimental)
# changed: img syntax
# 2015-02-15 - 7989 - added: item embed (experimental)
-# 7992 - added: xcondition (can be overridden by set)
+# 7995 - added: xcondition (can be overridden by set)
# set ovClear,ovDisable,ovEnable
# get counter, layout, overrides
+# 7997 - removed: trashcan due to performance issues
+# - added: break condition for includes
#
##############################################
# $Id: 55_InfoPanel.pm 7990 2015-02-14 22:28:21Z betateilchen $
@@ -88,7 +90,6 @@ sub btIP_itemText;
sub btIP_itemTextBox;
sub btIP_itemTicker;
sub btIP_itemTime;
-sub btIP_itemTrash;
sub btIP_changeColor;
sub btIP_color;
@@ -128,7 +129,7 @@ sub InfoPanel_Initialize($) {
$hash->{SetFn} = "btIP_Set";
$hash->{GetFn} = "btIP_Get";
$hash->{NotifyFn} = "btIP_Notify";
- $hash->{AttrList} = "autoreread:1,0 bgcolor refresh size title";
+ $hash->{AttrList} = "autoreread:1,0 bgcolor refresh size title noscript ";
$hash->{AttrList} .= " bgcenter:1,0 bgdir bgopacity tmin" if $useImgTools;
return undef;
@@ -237,6 +238,7 @@ sub btIP_readLayout {
my ($hash)= @_;
my $filename= $hash->{LAYOUTFILE};
my $name= $hash->{NAME};
+ my $level = 0;
my ($err, @layoutfile) = FileRead($filename);
if($err) {
@@ -244,7 +246,8 @@ sub btIP_readLayout {
$hash->{fhem}{layout} = "text ERROR 50 50 \"Error on reading layout!\"";
} else {
$hash->{fhem}{layout} = join("\n", @layoutfile);
- while($hash->{fhem}{layout} =~ m/\@include/ ) {
+ while($hash->{fhem}{layout} =~ m/\@include/ && $level < 1000) {
+ $level++;
my (@layout2,@include);
foreach my $ll (@layoutfile) {
if($ll !~ m/^\@include/) {
@@ -259,7 +262,8 @@ sub btIP_readLayout {
@layout2 = undef;
$hash->{fhem}{layout} = join("\n",@layoutfile);
}
- while($hash->{fhem}{layout} =~ m/\@finclude/ ) {
+ while($hash->{fhem}{layout} =~ m/\@finclude/ && $level < 1000) {
+ $level++;
my (@layout2,@include);
foreach my $ll (@layoutfile) {
if($ll !~ m/^\@finclude/) {
@@ -274,6 +278,7 @@ sub btIP_readLayout {
@layout2 = undef;
$hash->{fhem}{layout} = join("\n",@layoutfile);
}
+ $hash->{fhem}{layout} = "text ERROR 50 50 \"Loop detected in includes!\"" if ($level >= 1000);
$hash->{fhem}{layout} =~ s/\n\n/\n/g;
}
return;
@@ -680,49 +685,6 @@ sub btIP_itemTime {
return btIP_itemText($id,$x,$y,sprintf("%02d:%02d", $hour, $min),%params);
}
-sub btIP_itemTrash {
- return unless $useImgTools;
- my ($id,$x,$y,$scale,$fgcolor,$bgcolor,$link,%params)= @_;
- $id = ($id eq '-') ? createUniqueId() : $id;
- my $target;
- ($link,$target) = btIP_findTarget($link);
-
- my ($counter,$data,$info,$width,$height,$mimetype,$output);
-
-$data = ''.
-''.
-'';
-
- my ($r,$g,$b,$a) = btIP_color($fgcolor);
- $fgcolor = "rgb($r,$g,$b)";
- $data =~ s/fgcolor/$fgcolor/g;
-
- ($r,$g,$b,$a) = btIP_color($bgcolor);
- $bgcolor = "rgb($r,$g,$b)";
- ($width,$height,$mimetype,$data) = _btIP_imgData($data,$scale);
- $output = "";
- $output .= "\n" if($link && length($link));
- $output .= "