Author: locilka Date: Tue Feb 7 11:53:41 2012 New Revision: 67372 URL: http://svn.opensuse.org/viewcvs/yast?rev=67372&view=rev Log: - Backported a real fix for NameVirtualHost from trunk (bnc#486475) - 2.17.14 Modified: branches/SuSE-Code-11-SP2-Branch/http-server/VERSION branches/SuSE-Code-11-SP2-Branch/http-server/package/yast2-http-server.changes branches/SuSE-Code-11-SP2-Branch/http-server/src/YaPI/HTTPD.pm Modified: branches/SuSE-Code-11-SP2-Branch/http-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/http-server/VERSION?rev=67372&r1=67371&r2=67372&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/http-server/VERSION (original) +++ branches/SuSE-Code-11-SP2-Branch/http-server/VERSION Tue Feb 7 11:53:41 2012 @@ -1 +1 @@ -2.17.13 +2.17.14 Modified: branches/SuSE-Code-11-SP2-Branch/http-server/package/yast2-http-server.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/http-server/package/yast2-http-server.changes?rev=67372&r1=67371&r2=67372&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/http-server/package/yast2-http-server.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/http-server/package/yast2-http-server.changes Tue Feb 7 11:53:41 2012 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Feb 7 11:45:02 UTC 2012 - locilka@suse.cz + +- Backported a real fix for NameVirtualHost from trunk (bnc#486475) +- 2.17.14 + +------------------------------------------------------------------- Thu Dec 22 09:39:32 UTC 2011 - jsrain@suse.cz - removed superfluous spaces from .desktop-file (bnc#712052) Modified: branches/SuSE-Code-11-SP2-Branch/http-server/src/YaPI/HTTPD.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/http-server/src/YaPI/HTTPD.pm?rev=67372&r1=67371&r2=67372&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/http-server/src/YaPI/HTTPD.pm (original) +++ branches/SuSE-Code-11-SP2-Branch/http-server/src/YaPI/HTTPD.pm Tue Feb 7 11:53:41 2012 @@ -538,6 +538,7 @@ # $vhost_files->{$ip} = @newdata; # } + $self->validateNVH(); } @@ -588,29 +589,28 @@ # push(@newdata, $row); # } # } -my $params = $self->getVhType($hostid); - - $self->deleteVH($hostid); - $self->createVH($hostid, $data, $params); - $self->validateNVH(); + my $params = $self->getVhType($hostid); + $self->deleteVH($hostid); + $self->createVH($hostid, $data, $params); } sub validateNVH (){ - my @nb = (); + my %nb = (); foreach my $key ( keys( %{$vhost_files} ) ){ if(($key ne 'ip-based') && ($key ne 'main')){ - push(@nb, $key); + my $host_ip=$vhost_files->{$key}->[0]->{'HostIP'}; + $nb{$host_ip}=1; } } + my @tmp_data=(); foreach my $row (@{$vhost_files->{main}{DATA}}){ - push(@tmp_data, $row) if ($row->{KEY} ne 'NameVirtualHost'); + push(@tmp_data, $row) if ($row->{KEY} ne 'NameVirtualHost'); } $vhost_files->{main}{DATA} = \@tmp_data; - - foreach my $ip (@nb){ + foreach my $ip (keys %nb){ push(@{$vhost_files->{main}{DATA}}, {KEY=>'NameVirtualHost', VALUE=>$ip} ); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org