mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Conver at module to new library
This commit is contained in:
17
at/at-lib.pl
17
at/at-lib.pl
@@ -1,9 +1,9 @@
|
||||
# at-lib.pl
|
||||
# Functions for listing and creating at jobs
|
||||
|
||||
do '../web-lib.pl';
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
&init_config();
|
||||
do '../ui-lib.pl';
|
||||
%access = &get_module_acl();
|
||||
|
||||
do "$config{'at_style'}-lib.pl";
|
||||
@@ -84,8 +84,8 @@ sub save_allowed
|
||||
if (@_) {
|
||||
local($_);
|
||||
&open_tempfile(ALLOW, ">$config{allow_file}");
|
||||
foreach (@_) {
|
||||
&print_tempfile(ALLOW, $_,"\n");
|
||||
foreach my $u (@_) {
|
||||
&print_tempfile(ALLOW, $u,"\n");
|
||||
}
|
||||
&close_tempfile(ALLOW);
|
||||
chmod(0444, $config{allow_file});
|
||||
@@ -102,11 +102,10 @@ else {
|
||||
sub save_denied
|
||||
{
|
||||
&lock_file($config{deny_file});
|
||||
if (@_) {
|
||||
local($_);
|
||||
&open_tempfile(DENY, "> $config{deny_file}");
|
||||
foreach (@_) {
|
||||
&print_tempfile(DENY, $_,"\n");
|
||||
if (@_ || !-r $config{'allow_file'}) {
|
||||
&open_tempfile(DENY, ">$config{deny_file}");
|
||||
foreach my $u (@_) {
|
||||
&print_tempfile(DENY, $u,"\n");
|
||||
}
|
||||
&close_tempfile(DENY);
|
||||
chmod(0444, $config{deny_file});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
line2=System configuration,11
|
||||
at_style=At system type,1,linux-Linux,solaris-Solaris,freebsd-FreeBSD,irix-Irix,macos-MacOS X,openserver-OpenServer
|
||||
at_dir=At jobs directory,0
|
||||
allow_file=Allow At users file,3,None
|
||||
|
||||
@@ -7259,7 +7259,7 @@ successful. The handle must have been one passed to open_tempfile.
|
||||
sub close_tempfile
|
||||
{
|
||||
my $file;
|
||||
my $fh = &callers_package($fh);
|
||||
my $fh = &callers_package($_[0]);
|
||||
|
||||
if (defined($file = $main::open_temphandles{$fh})) {
|
||||
# Closing a handle
|
||||
|
||||
Reference in New Issue
Block a user