summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorjeff <jeff>2007-10-08 19:14:28 +0000
committerjeff <jeff>2007-10-08 19:14:28 +0000
commit718f65eee1c797ea90a315b5f03fae75c80a5112 (patch)
treeb401a06d365a615c390d38f4a7ccbdabe9bc00ac /httemplate/misc
parent9fd3c8211ebccf727d1c048620d1527926a3b779 (diff)
Remove remaining calls to idiot/eidiot. Should fix 1479
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-xhttemplate/misc/bill.cgi4
-rwxr-xr-xhttemplate/misc/cancel-unaudited.cgi4
-rw-r--r--httemplate/misc/delete-agent_payment_gateway.cgi2
-rwxr-xr-xhttemplate/misc/delete-cust_credit.cgi2
-rwxr-xr-xhttemplate/misc/delete-cust_pay.cgi2
-rwxr-xr-xhttemplate/misc/delete-cust_refund.cgi2
-rwxr-xr-xhttemplate/misc/delete-domain_record.cgi2
-rwxr-xr-xhttemplate/misc/delete-part_export.cgi2
-rw-r--r--httemplate/misc/dump.cgi2
-rw-r--r--httemplate/misc/inventory_item-import.html2
-rw-r--r--httemplate/misc/process/cdr-import.html2
-rw-r--r--httemplate/misc/process/cust_main-import.cgi2
-rw-r--r--httemplate/misc/process/cust_main-import_charges.cgi2
-rw-r--r--httemplate/misc/process/inventory_item-import.html2
-rwxr-xr-xhttemplate/misc/process/link.cgi4
-rw-r--r--httemplate/misc/process/payment.cgi34
-rwxr-xr-xhttemplate/misc/unapply-cust_credit.cgi2
-rwxr-xr-xhttemplate/misc/unapply-cust_pay.cgi2
-rwxr-xr-xhttemplate/misc/unprovision.cgi2
-rwxr-xr-xhttemplate/misc/unsusp_pkg.cgi2
-rwxr-xr-xhttemplate/misc/unvoid-cust_pay_void.cgi2
-rw-r--r--httemplate/misc/upload-batch.cgi2
-rwxr-xr-xhttemplate/misc/void-cust_pay.cgi2
23 files changed, 41 insertions, 43 deletions
diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi
index 1bf1eb11e..24dfd6bbd 100755
--- a/httemplate/misc/bill.cgi
+++ b/httemplate/misc/bill.cgi
@@ -11,7 +11,6 @@
%my $error = $cust_main->bill(
%# 'time'=>$time
% );
-%#&eidiot($error) if $error;
%
%unless ( $error ) {
% $error = $cust_main->apply_payments_and_credits
@@ -33,14 +32,13 @@
% #'realtime' => $conf->exists('realtime-backend'),
% );
%}
-%#&eidiot($error) if $error;
%
%if ( $error ) {
%
<!-- mason kludge -->
%
-% &idiot($error);
+% errorpage($error);
%} else {
% print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");
%}
diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi
index 6f070a444..da60dc47b 100755
--- a/httemplate/misc/cancel-unaudited.cgi
+++ b/httemplate/misc/cancel-unaudited.cgi
@@ -14,7 +14,7 @@
%die "Unknown svcnum!" unless $cust_svc;
%my $cust_pkg = $cust_svc->cust_pkg;
%if ( $cust_pkg ) {
-% &eidiot( 'This account has already been audited. Cancel the '.
+% errorpage( 'This account has already been audited. Cancel the '.
% qq!<A HREF="${p}view/cust_main.cgi?!. $cust_pkg->custnum.
% '#cust_pkg'. $cust_pkg->pkgnum. '">'.
% 'package</A> instead.');
@@ -27,7 +27,7 @@
<!-- mason kludge -->
%
-% &eidiot($error);
+% errorpage($error);
%} else {
% print $cgi->redirect(popurl(2));
%}
diff --git a/httemplate/misc/delete-agent_payment_gateway.cgi b/httemplate/misc/delete-agent_payment_gateway.cgi
index fb0f1e4b8..20a202e0e 100644
--- a/httemplate/misc/delete-agent_payment_gateway.cgi
+++ b/httemplate/misc/delete-agent_payment_gateway.cgi
@@ -10,6 +10,6 @@
% });
%
% my $error = $agent_payment_gateway->delete;
-% eidiot($error) if $error;
+% errorpage($error) if $error;
%
% print $cgi->redirect($p. "browse/agent.cgi");
diff --git a/httemplate/misc/delete-cust_credit.cgi b/httemplate/misc/delete-cust_credit.cgi
index e4756a922..78df24989 100755
--- a/httemplate/misc/delete-cust_credit.cgi
+++ b/httemplate/misc/delete-cust_credit.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_credit->custnum;
%
%my $error = $cust_credit->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/delete-cust_pay.cgi b/httemplate/misc/delete-cust_pay.cgi
index 1fda82e2a..a0fa414d5 100755
--- a/httemplate/misc/delete-cust_pay.cgi
+++ b/httemplate/misc/delete-cust_pay.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_pay->custnum;
%
%my $error = $cust_pay->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/delete-cust_refund.cgi b/httemplate/misc/delete-cust_refund.cgi
index 3e44560d0..f3ac589aa 100755
--- a/httemplate/misc/delete-cust_refund.cgi
+++ b/httemplate/misc/delete-cust_refund.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_refund->custnum;
%
%my $error = $cust_refund->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/delete-domain_record.cgi b/httemplate/misc/delete-domain_record.cgi
index cccce357e..83e75ce20 100755
--- a/httemplate/misc/delete-domain_record.cgi
+++ b/httemplate/misc/delete-domain_record.cgi
@@ -8,7 +8,7 @@
%my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum});
%
%my $error = $domain_record->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/svc_domain.cgi?". $domain_record->svcnum);
%
diff --git a/httemplate/misc/delete-part_export.cgi b/httemplate/misc/delete-part_export.cgi
index 16389a90c..5f2ebb99c 100755
--- a/httemplate/misc/delete-part_export.cgi
+++ b/httemplate/misc/delete-part_export.cgi
@@ -8,7 +8,7 @@
%my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum});
%
%my $error = $part_export->delete;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "browse/part_export.cgi");
%
diff --git a/httemplate/misc/dump.cgi b/httemplate/misc/dump.cgi
index e8f4b6f38..486b66568 100644
--- a/httemplate/misc/dump.cgi
+++ b/httemplate/misc/dump.cgi
@@ -7,7 +7,7 @@
% }
% open(DUMP,"pg_dump $dbname |");
% } else {
-% eidiot "don't (yet) know how to dump ". driver_name. " databases\n";
+% errorpage("don't (yet) know how to dump ". driver_name. " databases");
% }
%
% http_header('Content-Type' => 'text/plain' );
diff --git a/httemplate/misc/inventory_item-import.html b/httemplate/misc/inventory_item-import.html
index 87c6af34c..363623806 100644
--- a/httemplate/misc/inventory_item-import.html
+++ b/httemplate/misc/inventory_item-import.html
@@ -1,7 +1,7 @@
%
%
%my $classnum = $cgi->param('classnum');
-%$classnum =~ /^(\d+)$/ or eidiot "illegal classnum $classnum";
+%$classnum =~ /^(\d+)$/ or errorpage("illegal classnum $classnum");
%$classnum = $1;
%my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
%
diff --git a/httemplate/misc/process/cdr-import.html b/httemplate/misc/process/cdr-import.html
index 68edaa21c..93137c3d0 100644
--- a/httemplate/misc/process/cdr-import.html
+++ b/httemplate/misc/process/cdr-import.html
@@ -14,7 +14,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/process/cust_main-import.cgi b/httemplate/misc/process/cust_main-import.cgi
index a5ede99a1..c8d1b6cd1 100644
--- a/httemplate/misc/process/cust_main-import.cgi
+++ b/httemplate/misc/process/cust_main-import.cgi
@@ -21,7 +21,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/process/cust_main-import_charges.cgi b/httemplate/misc/process/cust_main-import_charges.cgi
index e0ede576b..1a29bf600 100644
--- a/httemplate/misc/process/cust_main-import_charges.cgi
+++ b/httemplate/misc/process/cust_main-import_charges.cgi
@@ -16,7 +16,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import_charges.cgi
% } else {
diff --git a/httemplate/misc/process/inventory_item-import.html b/httemplate/misc/process/inventory_item-import.html
index f6159dc99..51337529f 100644
--- a/httemplate/misc/process/inventory_item-import.html
+++ b/httemplate/misc/process/inventory_item-import.html
@@ -14,7 +14,7 @@
<!-- mason kludge -->
%
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi
index 7c71371ee..66f4ee11d 100755
--- a/httemplate/misc/process/link.cgi
+++ b/httemplate/misc/process/link.cgi
@@ -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);
%}
%
%
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 29157d8f0..6377b13e8 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -18,20 +18,20 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
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 @@ my %type = ( 'CARD' => 'credit card',
);
$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 @@ if ( $payby eq 'CHEK' ) {
$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 @@ if ( $payby eq 'CHEK' ) {
}
$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 @@ if ( $cgi->param('batch') ) {
map { $_ => $cgi->param($_) }
@{$payby2fields{$payby}}
);
- eidiot($error) if $error;
+ errotpage($error) if $error;
} else {
@@ -124,7 +124,7 @@ if ( $cgi->param('batch') ) {
'paycvv' => $paycvv,
map { $_ => $cgi->param($_) } @{$payby2fields{$payby}}
);
- eidiot($error) if $error;
+ errorpage($error) if $error;
$cust_main->apply_payments;
@@ -156,7 +156,7 @@ if ( $cgi->param('save') ) {
$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;
}
diff --git a/httemplate/misc/unapply-cust_credit.cgi b/httemplate/misc/unapply-cust_credit.cgi
index 56a3ff854..f8fa63268 100755
--- a/httemplate/misc/unapply-cust_credit.cgi
+++ b/httemplate/misc/unapply-cust_credit.cgi
@@ -10,7 +10,7 @@
%
%foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) {
% my $error = $cust_credit_bill->delete;
-% eidiot($error) if $error;
+% errorpage($error) if $error;
%}
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
diff --git a/httemplate/misc/unapply-cust_pay.cgi b/httemplate/misc/unapply-cust_pay.cgi
index b28f61b0f..6bd6c07ee 100755
--- a/httemplate/misc/unapply-cust_pay.cgi
+++ b/httemplate/misc/unapply-cust_pay.cgi
@@ -10,7 +10,7 @@
%
%foreach my $cust_bill_pay ( $cust_pay->cust_bill_pay ) {
% my $error = $cust_bill_pay->delete;
-% eidiot($error) if $error;
+% errorpage($error) if $error;
%}
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
diff --git a/httemplate/misc/unprovision.cgi b/httemplate/misc/unprovision.cgi
index e42feda8a..b5e510695 100755
--- a/httemplate/misc/unprovision.cgi
+++ b/httemplate/misc/unprovision.cgi
@@ -22,7 +22,7 @@
<!-- mason kludge -->
%
-% &eidiot($error);
+% errorpage($error);
%} else {
% print $cgi->redirect(popurl(2)."view/cust_main.cgi?$custnum");
%}
diff --git a/httemplate/misc/unsusp_pkg.cgi b/httemplate/misc/unsusp_pkg.cgi
index 79c07a72a..80188c668 100755
--- a/httemplate/misc/unsusp_pkg.cgi
+++ b/httemplate/misc/unsusp_pkg.cgi
@@ -8,7 +8,7 @@
%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
%
%my $error = $cust_pkg->unsuspend;
-%&eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
%
diff --git a/httemplate/misc/unvoid-cust_pay_void.cgi b/httemplate/misc/unvoid-cust_pay_void.cgi
index 75c3edc06..625431a57 100755
--- a/httemplate/misc/unvoid-cust_pay_void.cgi
+++ b/httemplate/misc/unvoid-cust_pay_void.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_pay_void->custnum;
%
%my $error = $cust_pay_void->unvoid;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%
diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi
index 69d3ca6b1..5a15008b0 100644
--- a/httemplate/misc/upload-batch.cgi
+++ b/httemplate/misc/upload-batch.cgi
@@ -2,7 +2,7 @@
<!-- mason kludge -->
-% eidiot($error);
+% errorpage($error);
%# $cgi->param('error', $error);
%# print $cgi->redirect( "${p}cust_main-import.cgi
% } else {
diff --git a/httemplate/misc/void-cust_pay.cgi b/httemplate/misc/void-cust_pay.cgi
index b55d22c41..972a1a5bd 100755
--- a/httemplate/misc/void-cust_pay.cgi
+++ b/httemplate/misc/void-cust_pay.cgi
@@ -9,7 +9,7 @@
%my $custnum = $cust_pay->custnum;
%
%my $error = $cust_pay->void;
-%eidiot($error) if $error;
+%errorpage($error) if $error;
%
%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
%