mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 12:38:37 +00:00
: minor code cleanup
git-svn-id: https://svn.fhem.de/fhem/trunk@21562 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b6a80580fd
commit
afab2c32db
@ -155,7 +155,7 @@ sub InfoPanel_Initialize {
|
|||||||
$hash->{AttrList} .= "title noscript showTime:1,0 ";
|
$hash->{AttrList} .= "title noscript showTime:1,0 ";
|
||||||
$hash->{AttrList} .= " bgcenter:1,0 bgdir bgopacity tmin" if $useImgTools;
|
$hash->{AttrList} .= " bgcenter:1,0 bgdir bgopacity tmin" if $useImgTools;
|
||||||
|
|
||||||
return undef;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub btIP_Define {
|
sub btIP_Define {
|
||||||
@ -173,7 +173,7 @@ sub btIP_Define {
|
|||||||
btIP_readLayout($hash);
|
btIP_readLayout($hash);
|
||||||
|
|
||||||
readingsSingleUpdate($hash,'state','defined',1);
|
readingsSingleUpdate($hash,'state','defined',1);
|
||||||
return undef;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub btIP_Undef {
|
sub btIP_Undef {
|
||||||
@ -181,7 +181,7 @@ sub btIP_Undef {
|
|||||||
# check if last device
|
# check if last device
|
||||||
my $url = '/btip';
|
my $url = '/btip';
|
||||||
delete $data{FWEXT}{$url} if int(devspec2array('TYPE=InfoPanel')) == 1;
|
delete $data{FWEXT}{$url} if int(devspec2array('TYPE=InfoPanel')) == 1;
|
||||||
return undef;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub btIP_Set {
|
sub btIP_Set {
|
||||||
@ -254,7 +254,7 @@ sub btIP_Notify {
|
|||||||
|
|
||||||
Log3(undef, 4, "InfoPanel: $hash->{NAME} reread layout after edit.");
|
Log3(undef, 4, "InfoPanel: $hash->{NAME} reread layout after edit.");
|
||||||
undef = btIP_readLayout($hash);
|
undef = btIP_readLayout($hash);
|
||||||
return undef;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub btIP_readLayout {
|
sub btIP_readLayout {
|
||||||
|
@ -106,7 +106,7 @@ sub GoogleAuth_Define {
|
|||||||
|
|
||||||
Log3($hash,4,"googleAuth $name: defined");
|
Log3($hash,4,"googleAuth $name: defined");
|
||||||
readingsSingleUpdate($hash,'state','defined',1);
|
readingsSingleUpdate($hash,'state','defined',1);
|
||||||
return undef;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub GoogleAuth_Delete {
|
sub GoogleAuth_Delete {
|
||||||
@ -133,7 +133,7 @@ sub GoogleAuth_Set {
|
|||||||
} else {
|
} else {
|
||||||
return $usage
|
return $usage
|
||||||
}
|
}
|
||||||
return undef;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub GoogleAuth_Get {
|
sub GoogleAuth_Get {
|
||||||
@ -194,7 +194,7 @@ sub _ga_make_url {
|
|||||||
$label =~ s/\s/\%20/g;
|
$label =~ s/\s/\%20/g;
|
||||||
my $qrsize = AttrVal($name,'ga_qrSize','200x200');
|
my $qrsize = AttrVal($name,'ga_qrSize','200x200');
|
||||||
my $secret_base32 = getKeyValue("googleAuth$name");
|
my $secret_base32 = getKeyValue("googleAuth$name");
|
||||||
return undef unless defined($secret_base32);
|
return unless defined($secret_base32);
|
||||||
my $url = "otpauth://totp/$label?secret=$secret_base32&issuer=FHEM";
|
my $url = "otpauth://totp/$label?secret=$secret_base32&issuer=FHEM";
|
||||||
my $qr_url = "https://chart.googleapis.com/chart?cht=qr&chs=$qrsize"."&chl=";
|
my $qr_url = "https://chart.googleapis.com/chart?cht=qr&chs=$qrsize"."&chl=";
|
||||||
$qr_url .= uri_escape($url);
|
$qr_url .= uri_escape($url);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user