eliminate some false laziness in FS::Misc::send_email vs. msg_template/email.pm send_...
[freeside.git] / FS / FS / part_export / domain_shellcommands.pm
index d15f41a..8e85d71 100644 (file)
@@ -26,7 +26,7 @@ tie my %options, 'Tie::IxHash',
   'options' => \%options,
   'notes'   => <<'END'
 Run remote commands via SSH, for domains.  You will need to
-<a href="../docs/ssh.html">setup SSH for unattended operation</a>.
+<a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.9:Documentation:Administration:SSH_Keys">setup SSH for unattended operation</a>.
 <BR><BR>Use these buttons for some useful presets:
 <UL>
   <LI>
@@ -49,8 +49,7 @@ The following variables are available for interpolation (prefixed with <code>new
   <LI><code>$uid</code> - of catchall account
   <LI><code>$gid</code> - of catchall account
   <LI><code>$dir</code> - home directory of catchall account
-  <LI>All other fields in
-    <a href="../docs/schema.html#svc_domain">svc_domain</a> are also available.
+  <LI>All other fields in <b>svc_domain</b> are also available.
 </UL>
 END
 );
@@ -112,19 +111,22 @@ sub _export_replace {
   ( $old_qdomain = $old_domain ) =~ s/\./:/g; #see dot-qmail(5): EXTENSION ADDRESSES
   ( $new_qdomain = $new_domain ) =~ s/\./:/g; #see dot-qmail(5): EXTENSION ADDRESSES
 
-  if ( $old->catchall ) {
+  { 
     no strict 'refs';
-    my $svc_acct = $old->catchall_svc_acct;
-    ${"old_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
-  } else {
-    ${"old_$_"} = '' foreach qw(uid gid dir);
-  }
-  if ( $new->catchall ) {
-    no strict 'refs';
-    my $svc_acct = $new->catchall_svc_acct;
-    ${"new_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
-  } else {
-    ${"new_$_"} = '' foreach qw(uid gid dir);
+
+    if ( $old->catchall ) {
+      my $svc_acct = $old->catchall_svc_acct;
+      ${"old_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
+    } else {
+      ${"old_$_"} = '' foreach qw(uid gid dir);
+    }
+    if ( $new->catchall ) {
+      my $svc_acct = $new->catchall_svc_acct;
+      ${"new_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
+    } else {
+      ${"new_$_"} = '' foreach qw(uid gid dir);
+    }
+
   }
 
   #done setting variables for the command