This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / FS / FS / msg_template.pm
index 5582d0f..7321351 100644 (file)
@@ -191,30 +191,15 @@ sub prepare {
   # create substitution table
   ###  
   my %hash;
-  my @objects = ($cust_main);
-  my @prefixes = ('');
-  if( ref $object ) {
-    if( ref($object) eq 'ARRAY' ) {
-      # [new, old], for provisioning tickets
-      push @objects, $object->[0], $object->[1];
-      push @prefixes, 'new_', 'old_';
-    }
-    else {
-      push @objects, $object;
-      push @prefixes, '';
-    }
-  }
-
-  foreach my $obj (@objects) {
-    my $prefix = shift @prefixes;
+  foreach my $obj ($cust_main, $object || ()) {
     foreach my $name (@{ $subs->{$obj->table} }) {
       if(!ref($name)) {
         # simple case
-        $hash{$prefix.$name} = $obj->$name();
+        $hash{$name} = $obj->$name();
       }
       elsif( ref($name) eq 'ARRAY' ) {
         # [ foo => sub { ... } ]
-        $hash{$prefix.($name->[0])} = $name->[1]->($obj);
+        $hash{$name->[0]} = $name->[1]->($obj);
       }
       else {
         warn "bad msg_template substitution: '$name'\n";
@@ -381,9 +366,7 @@ sub substitutions {
     
     # for welcome and limit warning messages
     'svc_acct' => [qw(
-      svcnum
       username
-      domain
       ),
       [ password          => sub { shift->getfield('_password') } ],
     ],