diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm mezzanine_patched_e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm --- e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm 2007-01-19 14:33:22.000000000 -0700 +++ mezzanine_patched_e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm 2007-04-14 05:14:39.000000000 -0600 @@ -19,9 +19,6 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Technical support for this program is available from Mitel Networks -# Please visit our web site www.mitel.com/sme/ for details. #---------------------------------------------------------------------- package esmith::FormMagick::Panel::remoteaccess; @@ -109,7 +106,7 @@ =cut sub get_prop { - my ($fm, $item, $prop) = @_; + my ($self, $item, $prop) = @_; warn "You must specify a record key" unless $item; warn "You must specify a property name" unless $prop; my $record = $db->get($item) or warn "Couldn't get record for $item"; @@ -123,7 +120,7 @@ =cut sub get_value { - my $fm = shift; + my $self = shift; my $item = shift; return ($db->get($item)->value()); } @@ -252,17 +249,17 @@ sub show_telnet_section { - my $fm = shift; - my $q = $fm->cgi; + my $self = shift; + my $q = $self->cgi; my $mode = get_telnet_mode(); # Don't show telnet setting if it is off return '' if $mode eq 'off'; my %options = ( - public => $fm->localise('PUBLIC'), - private => $fm->localise('PRIVATE'), - off => $fm->localise('NO_ACCESS'), + public => $self->localise('PUBLIC'), + private => $self->localise('PRIVATE'), + off => $self->localise('NO_ACCESS'), ); print $q->Tr( @@ -272,10 +269,10 @@ $q->Tr( $q->td({-colspan => 2}, $q->span({-class => "error-noborders"}, - $fm->localise('DESC_TELNET_ACCESS')))), + $self->localise('DESC_TELNET_ACCESS')))), $q->Tr( $q->td({-class => "sme-noborders-label"}, - $fm->localise('LABEL_TELNET_ACCESS')), + $self->localise('LABEL_TELNET_ACCESS')), $q->td({-class => "sme-noborders-content"}, $q->popup_menu(-name => 'TelnetAccess', -values => [ keys %options ], @@ -291,21 +288,21 @@ sub show_ftp_section { - my $fm = shift; - my $q = $fm->{cgi}; + my $self = shift; + my $q = $self->{cgi}; # Don't show ftp setting unless the property exists return '' unless $db->get('ftp'); my %options = ( - normal => $fm->localise('PUBLIC'), - private => $fm->localise('PRIVATE'), - off => $fm->localise('NO_ACCESS'), + normal => $self->localise('PUBLIC'), + private => $self->localise('PRIVATE'), + off => $self->localise('NO_ACCESS'), ); my %loginOptions = ( - private => $fm->localise('PASSWORD_LOGIN_PRIVATE'), - public => $fm->localise('PASSWORD_LOGIN_PUBLIC'), + private => $self->localise('PASSWORD_LOGIN_PRIVATE'), + public => $self->localise('PASSWORD_LOGIN_PUBLIC'), ); print $q->Tr( @@ -315,10 +312,10 @@ $q->Tr( $q->td({-colspan => 2}, $q->span({-class => "sme-noborders"}, - $fm->localise('DESC_FTP_ACCESS')))), + $self->localise('DESC_FTP_ACCESS')))), $q->Tr( $q->td({-class => "sme-noborders-label"}, - $fm->localise('LABEL_FTP_ACCESS')), + $self->localise('LABEL_FTP_ACCESS')), $q->td({-class => "sme-noborders-content"}, $q->popup_menu(-name => 'FTPAccess', -values => [ keys %options ], @@ -327,10 +324,10 @@ $q->Tr( $q->td({-colspan => 2}, $q->span({-class => "sme-noborders"}, - $fm->localise('DESC_FTP_LOGIN')))), + $self->localise('DESC_FTP_LOGIN')))), $q->Tr( $q->td({-class => "sme-noborders-label"}, - $fm->localise('LABEL_FTP_LOGIN')), + $self->localise('LABEL_FTP_LOGIN')), $q->td({-class => "sme-noborders-content"}, $q->popup_menu(-name => 'FTPPasswordLogin', -values => [ keys %loginOptions ], @@ -595,15 +592,15 @@ sub change_settings { - my ($fm) = @_; + my ($self) = @_; my %conf; - my $q = $fm->{'cgi'}; + my $q = $self->{'cgi'}; # Don't process the form unless we clicked the Save button. The event is # called even if we chose the Remove link or the Add link. - return unless($q->param('Next') eq $fm->localise('SAVE')); + return unless($q->param('Next') eq $self->localise('SAVE')); my $access = ($q->param ('TelnetAccess') || 'off'); my $sshaccess = ($q->param ('sshAccess') || 'off'); @@ -690,14 +687,14 @@ # $rec->set_prop('Device', $serialConsole); # } - $fm->cgi->param(-name=>'wherenext', -value=>'First'); + $self->cgi->param(-name=>'wherenext', -value=>'First'); - unless ($fm->add_new_valid_from) + unless ($self->add_new_valid_from) { return ''; } - unless ($fm->remove_valid_from) + unless ($self->remove_valid_from) { return ''; } @@ -708,15 +705,15 @@ or die "Error occurred while resetting ipsec certificates.\n"; $q->param(-name=>'ipsecrwReset', -value=>''); } - $fm->set_ipsecrw_sessions; + $self->set_ipsecrw_sessions; unless ( system( "/sbin/e-smith/signal-event", "remoteaccess-update" ) == 0 ) { - $fm->error('ERROR_UPDATING'); + $self->error('ERROR_UPDATING'); return undef; } - $fm->success('SUCCESS'); + $self->success('SUCCESS'); } sub get_ipsecrw_sessions @@ -732,8 +729,8 @@ sub show_ipsecrw_section { - my $fm = shift; - my $q = $fm->cgi; + my $self = shift; + my $q = $self->cgi; # Don't show ipsecrw setting unless the status property exists return '' unless ($db->get('ipsec') @@ -745,20 +742,20 @@ $q->table( $q->Tr( $q->td({-colspan => 2, -class => "sme-noborders"}, - $fm->localise('DESC_IPSECRW'))), + $self->localise('DESC_IPSECRW'))), $q->Tr( $q->td({-class => "sme-noborders-label"}, - $fm->localise('LABEL_IPSECRW_SESS')), + $self->localise('LABEL_IPSECRW_SESS')), $q->td({-class => "sme-noborders-content"}, $q->textfield(-name => 'ipsecrwSessions', -value => get_ipsecrw_sessions(), -size => '3'))), $q->Tr( $q->td({-colspan => 2, -class => "sme-noborders"}, - $fm->localise('DESC_IPSECRW_RESET'))), + $self->localise('DESC_IPSECRW_RESET'))), $q->Tr( $q->td({-class => "sme-noborders-label"}, - $fm->localise('LABEL_IPSECRW_RESET')), + $self->localise('LABEL_IPSECRW_RESET')), $q->td({-class => "sme-noborders-content"}, $q->checkbox(-name => 'ipsecrwReset', -label => ''))), ) @@ -771,8 +768,8 @@ sub set_ipsecrw_sessions { - my $fm = shift; - my $q = $fm->cgi; + my $self = shift; + my $q = $self->cgi; my $sessions = $q->param('ipsecrwSessions'); if (defined $sessions) {