[freeside-commits] freeside/httemplate/misc/process cdr-import.html, 1.3, 1.3.2.1 cust_main-import.cgi, 1.5, 1.5.2.1 cust_main-import_charges.cgi, 1.4, 1.4.2.1 inventory_item-import.html, 1.3, 1.3.2.1 link.cgi, 1.15.2.1, 1.15.2.2 payment.cgi, 1.9.2.3, 1.9.2.4

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Oct 8 12:04:52 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail:/tmp/cvs-serv9413/httemplate/misc/process

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cdr-import.html cust_main-import.cgi 
	cust_main-import_charges.cgi inventory_item-import.html 
	link.cgi payment.cgi 
Log Message:
Remove remaining calls to idiot/eidiot.  Should fix 1479

Index: cust_main-import_charges.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/cust_main-import_charges.cgi,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- cust_main-import_charges.cgi	23 Aug 2006 22:25:38 -0000	1.4
+++ cust_main-import_charges.cgi	8 Oct 2007 19:04:49 -0000	1.4.2.1
@@ -16,7 +16,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import_charges.cgi
 %  } else {

Index: link.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/link.cgi,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -u -d -r1.15.2.1 -r1.15.2.2
--- link.cgi	7 May 2007 02:22:02 -0000	1.15.2.1
+++ link.cgi	8 Oct 2007 19:04:49 -0000	1.15.2.2
@@ -39,7 +39,7 @@
 %
 %  my $svc_x = $svc_x[0];
 %
-%  eidiot("$link_field not found!") unless $svc_x;
+%  errorpage("$link_field not found!") unless $svc_x;
 %
 %  $svcnum = $svc_x->svcnum;
 %
@@ -69,7 +69,7 @@
 
 <!-- mason kludge -->
 %
-%  idiot($error);
+% errorpage($error);
 %}
 %
 %

Index: payment.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/payment.cgi,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -u -d -r1.9.2.3 -r1.9.2.4
--- payment.cgi	11 Jul 2007 08:08:30 -0000	1.9.2.3
+++ payment.cgi	8 Oct 2007 19:04:49 -0000	1.9.2.4
@@ -18,20 +18,20 @@
 die "unknown custnum $custnum" unless $cust_main;
 
 $cgi->param('amount') =~ /^\s*(\d*(\.\d\d)?)\s*$/
-  or eidiot "illegal amount ". $cgi->param('amount');
+  or errorpage("illegal amount ". $cgi->param('amount'));
 my $amount = $1;
-eidiot "amount <= 0" unless $amount > 0;
+errorpage("amount <= 0") unless $amount > 0;
 
 $cgi->param('year') =~ /^(\d+)$/
-  or die "illegal year ". $cgi->param('year');
+  or errorpage("illegal year ". $cgi->param('year'));
 my $year = $1;
 
 $cgi->param('month') =~ /^(\d+)$/
-  or die "illegal month ". $cgi->param('month');
+  or errorpage("illegal month ". $cgi->param('month'));
 my $month = $1;
 
 $cgi->param('payby') =~ /^(CARD|CHEK)$/
-  or die "illegal payby ". $cgi->param('payby');
+  or errorpage("illegal payby ". $cgi->param('payby'));
 my $payby = $1;
 my %payby2fields = (
   'CARD' => [ qw( address1 address2 city state zip ) ],
@@ -42,11 +42,11 @@
            );
 
 $cgi->param('payname') =~ /^([\w \,\.\-\']+)$/
-  or eidiot gettext('illegal_name'). " payname: ". $cgi->param('payname');
+  or errorpage(gettext('illegal_name'). " payname: ". $cgi->param('payname'));
 my $payname = $1;
 
 $cgi->param('payunique') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
-  or eidiot gettext('illegal_text'). " payunique: ". $cgi->param('payunique');
+  or errorpage(gettext('illegal_text'). " payunique: ". $cgi->param('payunique'));
 my $payunique = $1;
 
 my $payinfo;
@@ -57,10 +57,10 @@
     $payinfo = $cust_main->payinfo;
   } else {
     $cgi->param('payinfo1') =~ /^(\d+)$/
-      or eidiot "illegal account number ". $cgi->param('payinfo1');
+      or errorpage("illegal account number ". $cgi->param('payinfo1'));
     my $payinfo1 = $1;
     $cgi->param('payinfo2') =~ /^(\d+)$/
-      or eidiot "illegal ABA/routing number ". $cgi->param('payinfo2');
+      or errorpage("illegal ABA/routing number ". $cgi->param('payinfo2'));
     my $payinfo2 = $1;
     $payinfo = $payinfo1. '@'. $payinfo2;
   }
@@ -73,22 +73,22 @@
   }
   $payinfo =~ s/\D//g;
   $payinfo =~ /^(\d{13,16})$/
-    or eidiot gettext('invalid_card'); # . ": ". $self->payinfo;
+    or errorpage(gettext('invalid_card')); # . ": ". $self->payinfo;
   $payinfo = $1;
   validate($payinfo)
-    or eidiot gettext('invalid_card'); # . ": ". $self->payinfo;
-  eidiot gettext('unknown_card_type')
+    or errorpage(gettext('invalid_card')); # . ": ". $self->payinfo;
+  errorpage(gettext('unknown_card_type'))
     if cardtype($payinfo) eq "Unknown";
 
   if ( defined $cust_main->dbdef_table->column('paycvv') ) {
     if ( length($cgi->param('paycvv') ) ) {
       if ( cardtype($payinfo) eq 'American Express card' ) {
         $cgi->param('paycvv') =~ /^(\d{4})$/
-          or eidiot "CVV2 (CID) for American Express cards is four digits.";
+          or errorpage("CVV2 (CID) for American Express cards is four digits.");
         $paycvv = $1;
       } else {
         $cgi->param('paycvv') =~ /^(\d{3})$/
-          or eidiot "CVV2 (CVC2/CID) is three digits.";
+          or errorpage("CVV2 (CVC2/CID) is three digits.");
         $paycvv = $1;
       }
     }
@@ -110,7 +110,7 @@
                                    map { $_ => $cgi->param($_) } 
                                      @{$payby2fields{$payby}}
                                  );
-  eidiot($error) if $error;
+  errotpage($error) if $error;
 
 } else {
 
@@ -124,7 +124,7 @@
     'paycvv'    => $paycvv,
     map { $_ => $cgi->param($_) } @{$payby2fields{$payby}}
   );
-  eidiot($error) if $error;
+  errorpage($error) if $error;
 
   $cust_main->apply_payments;
 
@@ -156,7 +156,7 @@
   $new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}};
 
   my $error = $new->replace($cust_main);
-  eidiot "payment processed successfully, but error saving info: $error"
+  errorpage("payment processed successfully, but error saving info: $error")
     if $error;
   $cust_main = $new;
 }

Index: cust_main-import.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/cust_main-import.cgi,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- cust_main-import.cgi	23 Aug 2006 22:25:38 -0000	1.5
+++ cust_main-import.cgi	8 Oct 2007 19:04:49 -0000	1.5.2.1
@@ -21,7 +21,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {

Index: cdr-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/cdr-import.html,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- cdr-import.html	23 Aug 2006 22:25:38 -0000	1.3
+++ cdr-import.html	8 Oct 2007 19:04:49 -0000	1.3.2.1
@@ -14,7 +14,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {

Index: inventory_item-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/inventory_item-import.html,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- inventory_item-import.html	23 Aug 2006 22:25:38 -0000	1.3
+++ inventory_item-import.html	8 Oct 2007 19:04:49 -0000	1.3.2.1
@@ -14,7 +14,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {



More information about the freeside-commits mailing list