--- loncom/interface/domainprefs.pm 2018/07/06 22:39:57 1.334 +++ loncom/interface/domainprefs.pm 2018/07/25 20:23:31 1.335 @@ -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 @@ sub modify_ssl { 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 @@ sub modify_ssl { $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;