add params with config prefix if config exists
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 12:38:00 +0000 (12:38 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 9 Oct 2010 12:38:00 +0000 (12:38 +0000)
lib/PXElator/httpd.pm

index a7a1d00..6f72a5a 100644 (file)
@@ -365,7 +365,9 @@ warn "XXX pids = ", dump( $daemons::pids );
                        my $conf = client::all_conf( $ip );
                        my $config = delete $conf->{config};
 
-                       my @editable = ( qw/hostname config homepage/, grep { m{^\Q$config\E} } keys %$conf );
+                       my @editable = ( qw/hostname config homepage/ );
+                       # add params with config prefix if config exists
+                       push @editable, grep { m{^\Q$config\E} } keys %$conf if $config;
                        my @update = grep { defined $param->{$_} } @editable;
                        if ( @update ) {
                                client::conf( $ip, $_ => $param->{$_} ) foreach @update;