Bugfixing: FHEMWEB wont start without 99_priv_cgi
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@369 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
22
contrib/99_priv_cgi.pm
Normal file
22
contrib/99_priv_cgi.pm
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
##############################################
|
||||||
|
package main;
|
||||||
|
|
||||||
|
# call it whith http://localhost:8083/fhem/privcgi
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
sub priv_cgi_Initialize($)
|
||||||
|
{
|
||||||
|
$data{FWEXT}{"/privcgi"} = "priv_cgi_callback";
|
||||||
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
priv_cgi_callback($$)
|
||||||
|
{
|
||||||
|
my ($htmlarg) = @_;
|
||||||
|
Log 1, "Got $htmlarg";
|
||||||
|
return ("text/html; charset=ISO-8859-1", "Hello World");
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
@@ -32,6 +32,7 @@ sub FW_calcWeblink($$);
|
|||||||
|
|
||||||
use vars qw($__ME); # webname (fhem), needed by SVG
|
use vars qw($__ME); # webname (fhem), needed by SVG
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# As we are _not_ multithreaded, it is safe to use global variables.
|
# As we are _not_ multithreaded, it is safe to use global variables.
|
||||||
my %__icons; # List of icons
|
my %__icons; # List of icons
|
||||||
@@ -244,13 +245,13 @@ FW_AnswerCall($)
|
|||||||
}
|
}
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# Axels FHEMWEB Module...
|
# Axels FHEMWEB modules...
|
||||||
$arg = $1;
|
$arg = $1;
|
||||||
if(defined(%FWEXT)) {
|
if(defined($data{FWEXT})) {
|
||||||
foreach my $k (sort keys %FWEXT) {
|
foreach my $k (sort keys %{$data{FWEXT}}) {
|
||||||
if($arg =~ m/^$k/) {
|
if($arg =~ m/^$k/) {
|
||||||
no strict "refs";
|
no strict "refs";
|
||||||
($__RETTYPE, $__RET) = &{$FWEXT{$k}}($arg);
|
($__RETTYPE, $__RET) = &{$data{FWEXT}{$k}}($arg);
|
||||||
use strict "refs";
|
use strict "refs";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user