mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
98_Installer: add support for proposed fhem.pl patch
git-svn-id: https://svn.fhem.de/fhem/trunk@19017 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4174c6d6e2
commit
37825e24b2
@ -18,6 +18,7 @@ sub Installer_Initialize($) {
|
|||||||
"disable:1,0 "
|
"disable:1,0 "
|
||||||
. "disabledForIntervals "
|
. "disabledForIntervals "
|
||||||
. "updateListReading:1,0 "
|
. "updateListReading:1,0 "
|
||||||
|
. "implicitGlobalSearch:0,1 "
|
||||||
. $readingFnAttributes;
|
. $readingFnAttributes;
|
||||||
|
|
||||||
return FHEM::Meta::InitMod( __FILE__, $modHash );
|
return FHEM::Meta::InitMod( __FILE__, $modHash );
|
||||||
@ -47,6 +48,7 @@ BEGIN {
|
|||||||
ReadingsTimestamp
|
ReadingsTimestamp
|
||||||
defs
|
defs
|
||||||
modules
|
modules
|
||||||
|
cmds
|
||||||
packages
|
packages
|
||||||
Log
|
Log
|
||||||
Log3
|
Log3
|
||||||
@ -965,6 +967,8 @@ sub CreateSearchList ($$$) {
|
|||||||
$colOpen . $txtOpen . 'Device Name' . $txtClose . $colClose;
|
$colOpen . $txtOpen . 'Device Name' . $txtClose . $colClose;
|
||||||
push @ret,
|
push @ret,
|
||||||
$colOpen . $txtOpen . 'Device Type' . $txtClose . $colClose;
|
$colOpen . $txtOpen . 'Device Type' . $txtClose . $colClose;
|
||||||
|
push @ret,
|
||||||
|
$colOpen . $txtOpen . 'Device State' . $txtClose . $colClose;
|
||||||
push @ret, $rowClose;
|
push @ret, $rowClose;
|
||||||
}
|
}
|
||||||
$found++;
|
$found++;
|
||||||
@ -994,6 +998,11 @@ sub CreateSearchList ($$$) {
|
|||||||
|
|
||||||
$l .= $colOpen . $linkDev . $colClose;
|
$l .= $colOpen . $linkDev . $colClose;
|
||||||
$l .= $colOpen . $linkMod . $colClose;
|
$l .= $colOpen . $linkMod . $colClose;
|
||||||
|
$l .=
|
||||||
|
$colOpen
|
||||||
|
. (
|
||||||
|
defined( $defs{$device}{STATE} ) ? $defs{$device}{STATE} : '' )
|
||||||
|
. $colClose;
|
||||||
|
|
||||||
$l .= $rowClose;
|
$l .= $rowClose;
|
||||||
|
|
||||||
@ -1350,6 +1359,34 @@ sub CreateSearchList ($$$) {
|
|||||||
}
|
}
|
||||||
push @ret, $tableClose if ($foundPerl);
|
push @ret, $tableClose if ($foundPerl);
|
||||||
|
|
||||||
|
#TODO works only if fhem.pl patch was accepted:
|
||||||
|
# https://forum.fhem.de/index.php/topic,98937.0.html
|
||||||
|
if ( defined( $hash->{CL} )
|
||||||
|
&& defined( $hash->{CL}{'.iDefCmdMethod'} )
|
||||||
|
&& $hash->{CL}{'.iDefCmdMethod'} eq 'always' )
|
||||||
|
{
|
||||||
|
my $cmdO = $hash->{CL}{'.iDefCmdOrigin'};
|
||||||
|
|
||||||
|
if ( defined( $cmds{$cmdO} )
|
||||||
|
&& defined( $hash->{CL}{'.iDefCmdOverwrite'} )
|
||||||
|
&& $hash->{CL}{'.iDefCmdOverwrite'} )
|
||||||
|
{
|
||||||
|
my $cmd = $search;
|
||||||
|
$cmd =~ s/^$cmdO//;
|
||||||
|
$cmd = $cmdO . '!' . ( $cmd && $cmd ne '' ? ' ' . $cmd : '' );
|
||||||
|
|
||||||
|
unshift @ret,
|
||||||
|
$lb
|
||||||
|
. $lb
|
||||||
|
. 'Did you mean to <a href="?cmd='
|
||||||
|
. $cmd
|
||||||
|
. $FW_CSRF
|
||||||
|
. '">run command '
|
||||||
|
. $cmdO
|
||||||
|
. '</a> instead?';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($found) {
|
if ($found) {
|
||||||
unshift @ret,
|
unshift @ret,
|
||||||
$lb
|
$lb
|
||||||
@ -1411,6 +1448,7 @@ sub CreateSearchList ($$$) {
|
|||||||
else {
|
else {
|
||||||
unshift @ret, 'Nothing found';
|
unshift @ret, 'Nothing found';
|
||||||
}
|
}
|
||||||
|
|
||||||
unshift @ret,
|
unshift @ret,
|
||||||
'<a name="searchResultTOP"></a><h2>Search result: ' . $search . '</h2>';
|
'<a name="searchResultTOP"></a><h2>Search result: ' . $search . '</h2>';
|
||||||
|
|
||||||
@ -1786,14 +1824,6 @@ sub CreateMetadataList ($$$) {
|
|||||||
$modMeta->{resources}{x_wiki}{web};
|
$modMeta->{resources}{x_wiki}{web};
|
||||||
$url .= '/' unless ( $url =~ m/\/$/ );
|
$url .= '/' unless ( $url =~ m/\/$/ );
|
||||||
|
|
||||||
if ( defined( $modMeta->{resources}{x_wiki}{modpath} ) ) {
|
|
||||||
$url .= '/' unless ( $url =~ m/\/$/ );
|
|
||||||
$url .=
|
|
||||||
$modMeta->{resources}{x_wiki}{modpath};
|
|
||||||
$url .= '/' unless ( $url =~ m/\/$/ );
|
|
||||||
$url .= $modName eq 'Global' ? 'global' : $modName;
|
|
||||||
}
|
|
||||||
|
|
||||||
$l .=
|
$l .=
|
||||||
'<a href="' . $url . '" target="_blank">' . $title . '</a>';
|
'<a href="' . $url . '" target="_blank">' . $title . '</a>';
|
||||||
}
|
}
|
||||||
|
@ -1933,8 +1933,8 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
|||||||
&& defined( $modMeta->{resources}{x_wiki} ) )
|
&& defined( $modMeta->{resources}{x_wiki} ) )
|
||||||
{
|
{
|
||||||
if ( defined( $modMeta->{x_vcs} ) ) {
|
if ( defined( $modMeta->{x_vcs} ) ) {
|
||||||
$modMeta->{resources}{x_wiki}{web} = 'https://wiki.fhem.de/';
|
$modMeta->{resources}{x_wiki}{web} =
|
||||||
$modMeta->{resources}{x_wiki}{modpath} = 'wiki/';
|
'https://wiki.fhem.de/wiki/' . $modName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user