some random cleanups
authorivan <ivan>
Fri, 18 Jul 2008 22:29:09 +0000 (22:29 +0000)
committerivan <ivan>
Fri, 18 Jul 2008 22:29:09 +0000 (22:29 +0000)
FS/FS/UI/Web.pm
FS/FS/h_cust_svc.pm
FS/FS/part_export.pm
FS/FS/part_pkg.pm
FS/FS/svc_acct.pm

index e4a9ac1..98d812d 100644 (file)
@@ -332,8 +332,8 @@ setting is supplied, the <B>cust-fields</B> configuration value.
 =cut
 
 sub cust_fields {
-  my $svc_x = shift;
-  warn "FS::UI::Web::cust_fields called for $svc_x ".
+  my $record = shift;
+  warn "FS::UI::Web::cust_fields called for $record ".
        "(cust_fields: @cust_fields)"
     if $DEBUG > 1;
 
@@ -342,12 +342,12 @@ sub cust_fields {
 
   my $seen_unlinked = 0;
   map { 
-    if ( $svc_x->custnum ) {
-      warn "  $svc_x -> $_"
+    if ( $record->custnum ) {
+      warn "  $record -> $_"
         if $DEBUG > 1;
-      $svc_x->$_(@_);
+      $record->$_(@_);
     } else {
-      warn "  ($svc_x unlinked)"
+      warn "  ($record unlinked)"
         if $DEBUG > 1;
       $seen_unlinked++ ? '' : '(unlinked)';
     }
index 921be3a..e030436 100644 (file)
@@ -111,8 +111,6 @@ sub h_svc_x {
 # _upgrade_data
 #
 # Used by FS::Upgrade to migrate to a new database.
-#
-#
 
 use FS::UID qw( driver_name dbh );
 
index 983e0b0..16aad6d 100644 (file)
@@ -411,6 +411,7 @@ sub export_info {
 #  '';
 #}
 
+#false laziness w/part_pkg & cdr
 foreach my $INC ( @INC ) {
   foreach my $file ( glob("$INC/FS/part_export/*.pm") ) {
     warn "attempting to load export info from $file\n" if $DEBUG;
index 0b2c53d..536cd89 100644 (file)
@@ -1029,6 +1029,7 @@ sub _upgrade_data { # class method
 
 =cut
 
+#false laziness w/part_export & cdr
 my %info;
 foreach my $INC ( @INC ) {
   warn "globbing $INC/FS/part_pkg/*.pm\n" if $DEBUG;
@@ -1046,8 +1047,7 @@ foreach my $INC ( @INC ) {
       next;
     }
     unless ( keys %$info ) {
-      warn "no %info hash found in FS::part_pkg::$mod, skipping\n"
-        unless $mod =~ /^(passwdfile|null)$/; #hack but what the heck
+      warn "no %info hash found in FS::part_pkg::$mod, skipping\n";
       next;
     }
     warn "got plan info from FS::part_pkg::$mod: $info\n" if $DEBUG;
@@ -1060,7 +1060,7 @@ foreach my $INC ( @INC ) {
 }
 
 tie %plans, 'Tie::IxHash',
-  map { $_ => $info{$_} }
+  map  { $_ => $info{$_} }
   sort { $info{$a}->{'weight'} <=> $info{$b}->{'weight'} }
   keys %info;
 
index 3e3ecb5..84f52e8 100644 (file)
@@ -1140,7 +1140,7 @@ sub check {
       $recref->{_password} = $1.$2;
 
     } else {
-      return 'Illegal (crypt-encoded) password';
+      return 'Illegal (crypt-encoded) password: '. $recref->{_password};
     }
 
   } elsif ( $recref->{_password_encoding} eq 'plain' ) {