mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Handle non-numeric IDs
This commit is contained in:
@@ -127,7 +127,7 @@ if ($out && $dump->{'email'} && &foreign_check("mailboxes")) {
|
||||
|
||||
# Check for any dumps scheduled to run after this one
|
||||
foreach $follow (&list_dumps()) {
|
||||
if ($follow->{'follow'} == $dump->{'id'} && $follow->{'enabled'} == 2) {
|
||||
if ($follow->{'follow'} eq $dump->{'id'} && $follow->{'enabled'} == 2) {
|
||||
system("$cron_cmd $follow->{'id'}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
#do '../web-lib.pl';
|
||||
#do '../ui-lib.pl';
|
||||
&init_config();
|
||||
if ($gconfig{'os_type'} =~ /^\S+\-linux$/) {
|
||||
do "linux-lib.pl";
|
||||
|
||||
@@ -10,7 +10,7 @@ require './fsdump-lib.pl';
|
||||
@procs = &proc::list_processes();
|
||||
@running = &running_dumps(\@procs);
|
||||
|
||||
($job) = grep { $_->{'id'} == $in{'id'} &&
|
||||
($job) = grep { $_->{'id'} eq $in{'id'} &&
|
||||
$_->{'pid'} == $in{'pid'} } @running;
|
||||
$job || &error($text{'kill_egone'});
|
||||
&can_edit_dir($job) || &error($text{'kill_ecannot'});
|
||||
|
||||
@@ -10,7 +10,7 @@ require './fsdump-lib.pl';
|
||||
@procs = &proc::list_processes();
|
||||
@running = &running_dumps(\@procs);
|
||||
|
||||
($job) = grep { $_->{'id'} == $in{'id'} &&
|
||||
($job) = grep { $_->{'id'} eq $in{'id'} &&
|
||||
$_->{'pid'} == $in{'pid'} } @running;
|
||||
$job || &error($text{'newtape_egone'});
|
||||
&can_edit_dir($job) || &error($text{'newtape_ecannot'});
|
||||
|
||||
@@ -13,7 +13,7 @@ $dump->{'id'} || die "Dump $ARGV[0] does not exist!";
|
||||
# Find the status file
|
||||
opendir(DIR, $module_config_directory);
|
||||
foreach $f (readdir(DIR)) {
|
||||
if ($f =~ /^(\d+)\.(\d+)\.status$/ && $1 == $dump->{'id'}) {
|
||||
if ($f =~ /^(\d+)\.(\d+)\.status$/ && $1 eq $dump->{'id'}) {
|
||||
# Got it!
|
||||
$sfile = "$module_config_directory/$f";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user