Uninstall scripts can exist for themes too
This commit is contained in:
parent
0e3b7e4d94
commit
41800b10f9
@ -7,12 +7,27 @@ BEGIN { push(@INC, "."); };
|
||||
$no_acl_check++;
|
||||
use WebminCore;
|
||||
&init_config();
|
||||
@themes = &list_themes();
|
||||
|
||||
if (@ARGV > 0) {
|
||||
@mods = map { local %minfo = &get_module_info($_); \%minfo } @ARGV;
|
||||
# Running for specified modules
|
||||
foreach $a (@ARGV) {
|
||||
local %minfo = &get_module_info($a);
|
||||
if (!%minfo) {
|
||||
# Try for a theme
|
||||
($tinfo) = grep { $_->{'dir'} eq $a } @themes;
|
||||
if ($tinfo) {
|
||||
push(@mods, $tinfo);
|
||||
}
|
||||
}
|
||||
else {
|
||||
push(@mods, \%minfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@mods = &get_all_module_infos();
|
||||
# Running on all modules and themes
|
||||
@mods = ( &get_all_module_infos(), @themes );
|
||||
}
|
||||
|
||||
foreach $m (@mods) {
|
||||
@ -26,7 +41,7 @@ foreach $m (@mods) {
|
||||
&foreign_call($m->{'dir'}, "module_uninstall");
|
||||
};
|
||||
if ($@) {
|
||||
print STDERR "$m->{'dir'}/postinstall.pl failed : $@\n";
|
||||
print STDERR "$m->{'dir'}/uninstall.pl failed : $@\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user