mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 15:04:51 +00:00
98_version.pm: improve configDB handling
git-svn-id: https://svn.fhem.de/fhem/trunk@26611 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
11ed5d6d91
commit
b1393c918e
@ -1,6 +1,5 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -70,8 +69,8 @@ CommandVersion($$)
|
|||||||
return "no loaded modules found that match: $param" if($param ne "" && $param ne "revision" && !@ret);
|
return "no loaded modules found that match: $param" if($param ne "" && $param ne "revision" && !@ret);
|
||||||
return (((!$param && !$noheader) || $param eq "revision") ? $fhem_revision : "").
|
return (((!$param && !$noheader) || $param eq "revision") ? $fhem_revision : "").
|
||||||
($noheader || !@ret ? "" : sprintf("%-".$max."s %s","File","Rev Last Change\n\n")).
|
($noheader || !@ret ? "" : sprintf("%-".$max."s %s","File","Rev Last Change\n\n")).
|
||||||
trim(join("\n", grep (($_ =~ /^fhem.pl|\d\d_/), @ret))."\n\n".
|
trim(join("\n", grep (($_ =~ /^fhem.pl|configDB.pm|\d\d_/), @ret))."\n\n".
|
||||||
join("\n", grep (($_ !~ /^fhem.pl|\d\d_/), @ret))
|
join("\n", grep (($_ !~ /^fhem.pl|configDB.pm|\d\d_/), @ret))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,6 +89,12 @@ sub version_sortModules($$)
|
|||||||
return -1 if($a_vals[0] eq "fhem.pl");
|
return -1 if($a_vals[0] eq "fhem.pl");
|
||||||
return 1 if($b_vals[0] eq "fhem.pl");
|
return 1 if($b_vals[0] eq "fhem.pl");
|
||||||
|
|
||||||
|
# configDB.pm next if used
|
||||||
|
if (configDBUsed()) {
|
||||||
|
return -1 if($a_vals[0] eq "configDB.pm");
|
||||||
|
return 1 if($b_vals[0] eq "configDB.pm");
|
||||||
|
}
|
||||||
|
|
||||||
$a_vals[0] =~ s/^\d\d_//;
|
$a_vals[0] =~ s/^\d\d_//;
|
||||||
$b_vals[0] =~ s/^\d\d_//;
|
$b_vals[0] =~ s/^\d\d_//;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user