no more &swapuid
[freeside.git] / FS / bin / freeside-bill
index 417df76..3462fa1 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use Fcntl qw(:flock);
 use Date::Parse;
 use Getopt::Std;
-use FS::UID qw(adminsuidsetup swapuid);
+use FS::UID qw(adminsuidsetup);
 use FS::Record qw(qsearch qsearchs);
 use FS::cust_main;
 
@@ -72,13 +72,15 @@ foreach $cust_main (
 
 sub untaint_argv {
   foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV
-    $ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+    #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+    # Date::Parse
+    $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
     $ARGV[$_]=$1;
   }
 }
 
 sub usage {
-  die "Usage:\n\n  bill [ -c [ i ] ] [ -d 'date' ] [ -b ] user\n";
+  die "Usage:\n\n  freeside-bill [ -c [ i ] ] [ -d 'date' ] [ -b ] user\n";
 }
 
 =head1 NAME
@@ -102,7 +104,7 @@ the bill and collect methods of a cust_main object.  See L<FS::cust_main>.
   -i: real-time billing (as opposed to batch billing).  only relevant
       for credit cards.
 
-  -d: Pretent it's 'date'.  Date is in any format Date::Parse is happy with,
+  -d: Pretend it's 'date'.  Date is in any format Date::Parse is happy with,
       but be careful.
 
 user: From the mapsecrets file - see config.html from the base documentation
@@ -112,7 +114,7 @@ customers.  Otherwise, bills all customers.
 
 =head1 VERSION
 
-$Id: freeside-bill,v 1.3 1999-10-04 08:23:26 ivan Exp $
+$Id: freeside-bill,v 1.7 2001-08-21 09:34:13 ivan Exp $
 
 =head1 BUGS