[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Wed Jul 25 16:23:32 EDT 2018
raeburn Wed Jul 25 20:23:32 2018 EDT
Modified files:
/loncom/interface domainprefs.pm
Log:
- Need to check if the existing domain config for ssl action points at hash
to avoid ISE when saving SSL config for the first time.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.334 loncom/interface/domainprefs.pm:1.335
--- loncom/interface/domainprefs.pm:1.334 Fri Jul 6 22:39:57 2018
+++ loncom/interface/domainprefs.pm Wed Jul 25 20:23:31 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.334 2018/07/06 22:39:57 raeburn Exp $
+# $Id: domainprefs.pm,v 1.335 2018/07/25 20:23:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -16363,12 +16363,17 @@
if ($env{'form.'.$prefix.'_'.$type} =~ /^(no|req)$/) {
$value = $env{'form.'.$prefix.'_'.$type};
}
- if (ref($domconfig{$action}{$prefix}) eq 'HASH') {
- if ($domconfig{$action}{$prefix}{$type} ne '') {
- if ($value ne $domconfig{$action}{$prefix}{$type}) {
+ if (ref($domconfig{$action}) eq 'HASH') {
+ if (ref($domconfig{$action}{$prefix}) eq 'HASH') {
+ if ($domconfig{$action}{$prefix}{$type} ne '') {
+ if ($value ne $domconfig{$action}{$prefix}{$type}) {
+ $changes{$prefix}{$type} = 1;
+ }
+ $defaultshash{$action}{$prefix}{$type} = $value;
+ } else {
+ $defaultshash{$action}{$prefix}{$type} = $value;
$changes{$prefix}{$type} = 1;
}
- $defaultshash{$action}{$prefix}{$type} = $value;
} else {
$defaultshash{$action}{$prefix}{$type} = $value;
$changes{$prefix}{$type} = 1;
@@ -16448,10 +16453,10 @@
$domdefaults{'replication'} = $defaultshash{$action}{'replication'};
}
if (ref($defaultshash{$action}{'connto'}) eq 'HASH') {
- $domdefaults{'connto'} = $domconfig{$action}{'connto'};
+ $domdefaults{'connto'} = $defaultshash{$action}{'connto'};
}
if (ref($defaultshash{$action}{'connfrom'}) eq 'HASH') {
- $domdefaults{'connfrom'} = $domconfig{$action}{'connfrom'};
+ $domdefaults{'connfrom'} = $defaultshash{$action}{'connfrom'};
}
}
my $cachetime = 24*60*60;
More information about the LON-CAPA-cvs
mailing list