From: ivan Date: Mon, 10 May 2004 13:17:24 +0000 (+0000) Subject: fall back to password changing in the case of blank suspension/unsuspension commands... X-Git-Tag: freeside_1_4_2beta1~108 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=1ce793c9689ce4f4cd2646a0ce57f65a61a70d78;p=freeside.git fall back to password changing in the case of blank suspension/unsuspension commands, like some exports --- diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index 4431cc0c4..4f201cf9c 100644 --- a/FS/FS/part_export/shellcommands.pm +++ b/FS/FS/part_export/shellcommands.pm @@ -176,14 +176,25 @@ sub _export_delete { sub _export_suspend { my($self) = shift; - $self->_export_command('suspend', @_); + $self->_export_command_or_super('suspend', @_); } sub _export_unsuspend { my($self) = shift; - $self->_export_command('unsuspend', @_); + $self->_export_command_or_super('unsuspend', @_); } +sub _export_command_or_super { + my($self, $action) = (shift, shift); + if ( $self->option($action) =~ /^\s*$/ ) { + my $method = "SUPER::_export_$action"; + $self->$method(@_); + } else { + $self->_export_command($action, @_); + } +}; + + sub _export_command { my ( $self, $action, $svc_acct) = (shift, shift, shift); my $command = $self->option($action);