From: Manni H. <man...@us...> - 2006-03-02 09:56:20
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28420/Proxy Modified Files: NNTP.pm Log Message: Merge the four nntp configuration templates into one handy template file. Index: NNTP.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/NNTP.pm,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** NNTP.pm 20 Feb 2006 02:14:29 -0000 1.40 --- NNTP.pm 2 Mar 2006 09:56:17 -0000 1.41 *************** *** 128,148 **** $self->register_configuration_item_( 'configuration', ! 'nntp_port', ! 'nntp-port.thtml', ! $self ); ! ! $self->register_configuration_item_( 'configuration', ! 'nntp_force_fork', ! 'nntp-force-fork.thtml', ! $self ); ! ! $self->register_configuration_item_( 'configuration', ! 'nntp_separator', ! 'nntp-separator.thtml', ! $self ); ! ! $self->register_configuration_item_( 'security', ! 'nntp_local', ! 'nntp-security-local.thtml', $self ); --- 128,133 ---- $self->register_configuration_item_( 'configuration', ! 'nntp_config', ! 'nntp-configuration.thtml', $self ); *************** *** 427,444 **** my ( $self, $name, $templ, $language ) = @_; ! if ( $name eq 'nntp_port' ) { $templ->param( 'nntp_port' => $self->config_( 'port' ) ); - } - - # Separator Character widget - if ( $name eq 'nntp_separator' ) { $templ->param( 'nntp_separator' => $self->config_( 'separator' ) ); - } - - if ( $name eq 'nntp_local' ) { $templ->param( 'nntp_if_local' => $self->config_( 'local' ) ); - } - - if ( $name eq 'nntp_force_fork' ) { $templ->param( 'nntp_force_fork_on' => $self->config_( 'force_fork' ) ); } --- 412,419 ---- my ( $self, $name, $templ, $language ) = @_; ! if ( $name eq 'nntp_config' ) { $templ->param( 'nntp_port' => $self->config_( 'port' ) ); $templ->param( 'nntp_separator' => $self->config_( 'separator' ) ); $templ->param( 'nntp_if_local' => $self->config_( 'local' ) ); $templ->param( 'nntp_force_fork_on' => $self->config_( 'force_fork' ) ); } *************** *** 465,480 **** my ($status, $error); ! if ( $name eq 'nntp_port' ) { if ( defined $$form{nntp_port} ) { if ( ( $$form{nntp_port} >= 1 ) && ( $$form{nntp_port} < 65536 ) ) { $status = sprintf $$language{Configuration_NNTPUpdate}, $self->config_( 'port' ); } else { $error = $$language{Configuration_Error3}; } ! } ! return ($status, $error); ! } - if ( $name eq 'nntp_separator' ) { if ( defined $$form{nntp_separator} ) { if ( length($$form{nntp_separator}) == 1 ) { --- 440,454 ---- my ($status, $error); ! if ( $name eq 'nntp_config' ) { ! if ( defined $$form{nntp_port} ) { if ( ( $$form{nntp_port} >= 1 ) && ( $$form{nntp_port} < 65536 ) ) { + $self->config_( 'port', $$form{nntp_port} ); $status = sprintf $$language{Configuration_NNTPUpdate}, $self->config_( 'port' ); } else { $error = $$language{Configuration_Error3}; } ! } if ( defined $$form{nntp_separator} ) { if ( length($$form{nntp_separator}) == 1 ) { *************** *** 485,504 **** } } - return ($status, $error); - } - if ( $name eq 'nntp_local' ) { if ( defined $$form{nntp_local} ) { $self->config_( 'local', $$form{nntp_local} ); } - return( undef, undef); - } - - if ( $name eq 'nntp_force_fork' ) { if ( defined $$form{nntp_force_fork} ) { $self->config_( 'force_fork', $$form{nntp_force_fork} ); } ! return( undef, undef); } return $self->SUPER::validate_item( $name, $templ, $language, $form ); --- 459,472 ---- } } if ( defined $$form{nntp_local} ) { $self->config_( 'local', $$form{nntp_local} ); } if ( defined $$form{nntp_force_fork} ) { $self->config_( 'force_fork', $$form{nntp_force_fork} ); } ! ! return( $status, $error ); } return $self->SUPER::validate_item( $name, $templ, $language, $form ); |