summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2004-05-10 13:17:23 +0000
committerivan <ivan>2004-05-10 13:17:23 +0000
commit07242e191cb2ad247fed8dacd392ef8bf47b5392 (patch)
treeb567da2b0050058580b2ea8d07a68a5267234dc9 /FS
parent4121477dde8c9400bf81023bea3e0d980b34bf91 (diff)
fall back to password changing in the case of blank suspension/unsuspension commands, like some exports
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/shellcommands.pm15
1 files changed, 13 insertions, 2 deletions
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);