--- loncom/html/adm/helper/newslot.helper 2019/03/02 16:25:52 1.30.6.1
+++ loncom/html/adm/helper/newslot.helper 2015/09/23 23:05:04 1.31
@@ -26,32 +26,8 @@
my $name=$helper->{VARS}{'origname'};
my %slot=&Apache::lonnet::get('slots', [$name], $cdom, $cnum);
if (!ref($slot{$name})) { return $default; }
- if (($which eq 'ipdeny') || ($which eq 'ipallow')) {
- if (!exists($slot{$name}{'ip'})) { return $default; }
- } else {
- if (!exists($slot{$name}{$which})) { return $default; }
- }
- if (($which eq 'ipdeny') || ($which eq 'ipallow')) {
- my @allows;
- my @denies;
- foreach my $item (split(',',$slot{$name}{'ip'})) {
- $item =~ s/^\s*//;
- $item =~ s/\s*$//;
- if ($item =~ /^\!(.+)$/) {
- push(@denies,$1);
- } else {
- push(@allows,$item);
- }
- }
- if ($which eq 'ipdeny') {
- return join(',',@denies);
- }
- if ($which eq 'ipallow') {
- return join(',',@allows);
- }
- } else {
- return $slot{$name}{$which};
- }
+ if (!exists($slot{$name}{$which})) { return $default; }
+ return $slot{$name}{$which};
}
IP restrictions -- allow from all except:
-
-
-
IP restrictions -- deny from all except:
+
IP restrictions:
-
-