Remove remaining calls to idiot/eidiot. Should fix 1479
authorjeff <jeff>
Mon, 8 Oct 2007 19:14:28 +0000 (19:14 +0000)
committerjeff <jeff>
Mon, 8 Oct 2007 19:14:28 +0000 (19:14 +0000)
38 files changed:
htetc/handler.pl
httemplate/edit/process/cust_svc.cgi
httemplate/edit/process/domain_record.cgi
httemplate/edit/process/reg_code.cgi
httemplate/edit/rate_region.cgi
httemplate/edit/reg_code.cgi
httemplate/elements/errorpage.html [new file with mode: 0644]
httemplate/elements/tr-select-part_referral.html
httemplate/misc/bill.cgi
httemplate/misc/cancel-unaudited.cgi
httemplate/misc/delete-agent_payment_gateway.cgi
httemplate/misc/delete-cust_credit.cgi
httemplate/misc/delete-cust_pay.cgi
httemplate/misc/delete-cust_refund.cgi
httemplate/misc/delete-domain_record.cgi
httemplate/misc/delete-part_export.cgi
httemplate/misc/dump.cgi
httemplate/misc/inventory_item-import.html
httemplate/misc/process/cdr-import.html
httemplate/misc/process/cust_main-import.cgi
httemplate/misc/process/cust_main-import_charges.cgi
httemplate/misc/process/inventory_item-import.html
httemplate/misc/process/link.cgi
httemplate/misc/process/payment.cgi
httemplate/misc/unapply-cust_credit.cgi
httemplate/misc/unapply-cust_pay.cgi
httemplate/misc/unprovision.cgi
httemplate/misc/unsusp_pkg.cgi
httemplate/misc/unvoid-cust_pay_void.cgi
httemplate/misc/upload-batch.cgi
httemplate/misc/void-cust_pay.cgi
httemplate/search/cust_main.cgi
httemplate/search/cust_svc.html
httemplate/search/inventory_item.html
httemplate/search/reg_code.html
httemplate/search/sql.html
httemplate/search/svc_acct.cgi
httemplate/search/svc_broadband.cgi

index 1479145..8bf0d59 100644 (file)
@@ -281,6 +281,11 @@ sub handler
         $m->scomp(@_);
       }
 
+      sub errorpage {
+        use vars qw($m);
+        $m->comp('/elements/errorpage.html', @_);
+      }
+
       sub redirect {
         my( $location ) = @_;
         use vars qw($m);
index 3a07d1e..e9d5f62 100644 (file)
@@ -21,7 +21,7 @@
 %if ( $error ) {
 %  #$cgi->param('error', $error);
 %  #print $cgi->redirect(popurl(2). "cust_svc.cgi?". $cgi->query_string );
-%  eidiot($error);
+%  errorpage($error);
 %} else { 
 %  my $svcdb = $new->part_svc->svcdb;
 %  print $cgi->redirect(popurl(3). "view/$svcdb.cgi?$svcnum");
index 87bdf68..daf35ad 100755 (executable)
@@ -26,7 +26,7 @@
 
 <!-- mason kludge -->
 %
-%  eidiot($error);
+%  errorpage($error);
 %} else { 
 %  my $svcnum = $new->svcnum;
 %  print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum");
index 4fdea60..d93bb55 100644 (file)
@@ -1,7 +1,7 @@
 %
 %
 %$cgi->param('agentnum') =~ /^(\d+)$/
-%  or eidiot 'illegal agentnum '. $cgi->param('agentnum');
+%  or errorpage('illegal agentnum '. $cgi->param('agentnum'));
 %my $agentnum = $1;
 %my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
 %
index 12cb180..bd3dcbd 100644 (file)
@@ -27,7 +27,7 @@
 %if ( @rate_prefix ) {
 %  $countrycode = $rate_prefix[0]->countrycode;
 %  foreach my $rate_prefix ( @rate_prefix ) {
-%    eidiot 'multiple country codes per region not yet supported by web UI'
+%    errorpage('multiple country codes per region not yet supported by web UI')
 %      unless $rate_prefix->countrycode eq $countrycode;
 %  }
 %}
index 06bef48..f5f0f7b 100644 (file)
@@ -1,6 +1,6 @@
 %
 %my $agentnum = $cgi->param('agentnum');
-%$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
+%$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
 %$agentnum = $1;
 %my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
 %
diff --git a/httemplate/elements/errorpage.html b/httemplate/elements/errorpage.html
new file mode 100644 (file)
index 0000000..d28055e
--- /dev/null
@@ -0,0 +1,13 @@
+<% include("/elements/header.html", "Error processing your request") %>
+
+Your request could not be processed because of the following error<% (scalar(@_) > 1) ? 's' : '' %>:
+
+% while (@_) {
+
+<P><FONT SIZE="+1" COLOR="#ff0000"><B><% shift %></B></FONT>
+
+
+%}
+% $m->flush_buffer();
+% $HTML::Mason::Commands::m->abort();
+% #die "shouldn't fall through to here (mason \$m->abort didn't)";
index cd26c25..62795e9 100644 (file)
@@ -1,5 +1,5 @@
 % if ( scalar( @{$opt{'part_referrals'}} ) == 0 ) {
-%     eidiot "You have not created any advertising sources.  You must create at least one advertising source before adding a customer.  Go to ". popurl(2). "browse/part_referral.html and create one or more advertising sources.";
+    <P><FONT SIZE="+1" COLOR="#ff0000">You have not created any advertising sources.  You must create at least one advertising source before adding a customer.  Go to <A HREF="<% popurl(2) %>browse/part_referral.html">advertising source listing</A> and create one or more advertising sources.</FONT>
 %   } elsif ( scalar( @{$opt{'part_referrals'}} ) == 1 ) {
 
      <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'refnum' %>" VALUE="<% $opt{'part_referrals'}->[0]->refnum %>">
index 1bf1eb1..24dfd6b 100755 (executable)
@@ -11,7 +11,6 @@
 %my $error = $cust_main->bill(
 %#                          'time'=>$time
 %                         );
-%#&eidiot($error) if $error;
 %
 %unless ( $error ) {
 %  $error = $cust_main->apply_payments_and_credits
 %                                  #'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");
 %}
index 6f070a4..da60dc4 100755 (executable)
@@ -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));
 %}
index fb0f1e4..20a202e 100644 (file)
@@ -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");
index e4756a9..78df249 100755 (executable)
@@ -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);
 %
index 1fda82e..a0fa414 100755 (executable)
@@ -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);
 %
index 3e44560..f3ac589 100755 (executable)
@@ -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);
 %
index cccce35..83e75ce 100755 (executable)
@@ -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);
 %
index 16389a9..5f2ebb9 100755 (executable)
@@ -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");
 %
index e8f4b6f..486b665 100644 (file)
@@ -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' );
index 87c6af3..3636238 100644 (file)
@@ -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 } );
 %
index 68edaa2..93137c3 100644 (file)
@@ -14,7 +14,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {
index a5ede99..c8d1b6c 100644 (file)
@@ -21,7 +21,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {
index e0ede57..1a29bf6 100644 (file)
@@ -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 f6159dc..5133752 100644 (file)
@@ -14,7 +14,7 @@
 
     <!-- mason kludge -->
 %
-%    eidiot($error);
+% errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {
index 7c71371..66f4ee1 100755 (executable)
@@ -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 29157d8..6377b13 100644 (file)
@@ -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;
 }
index 56a3ff8..f8fa632 100755 (executable)
@@ -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);
index b28f61b..6bd6c07 100755 (executable)
@@ -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);
index e42feda..b5e5106 100755 (executable)
@@ -22,7 +22,7 @@
 
 <!-- mason kludge -->
 %
-%  &eidiot($error);
+%  errorpage($error);
 %} else {
 %  print $cgi->redirect(popurl(2)."view/cust_main.cgi?$custnum");
 %}
index 79c07a7..80188c6 100755 (executable)
@@ -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'));
 %
index 75c3edc..625431a 100755 (executable)
@@ -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);
 %
index 69d3ca6..5a15008 100644 (file)
@@ -2,7 +2,7 @@
 
     <!-- mason kludge -->
 
-%    eidiot($error);
+%    errorpage($error);
 %#    $cgi->param('error', $error);
 %#    print $cgi->redirect( "${p}cust_main-import.cgi
 %  } else {
index b55d22c..972a1a5 100755 (executable)
@@ -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);
 %
index 56bb9ca..b0f657f 100755 (executable)
 %  if ( $cgi->param('otaker_on') ) {
 %    die "access denied"
 %      unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-%    $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n";
+%    $cgi->param('otaker') =~ /^(\w{1,32})$/ or errorpage("Illegal otaker");
 %    $search{otaker} = $1;
 %  } elsif ( $cgi->param('agentnum_on') ) {
-%    $cgi->param('agentnum') =~ /^(\d+)$/ or eidiot "Illegal agentnum\n";
+%    $cgi->param('agentnum') =~ /^(\d+)$/ or errorpage("Illegal agentnum");
 %    $search{agentnum} = $1;
 %#  } else {
 %#    die "unknown query...";
 
 <!-- mason kludge -->
 %
-%  eidiot "No matching customers found!\n";
+%  errorpage("No matching customers found!");
 %} else { 
 %
 
 %
 %  if ( $cgi->param('referral_custnum') ) {
 %    $cgi->param('referral_custnum') =~ /^(\d+)$/
-%      or eidiot "Illegal referral_custnum\n";
+%      or errorpage("Illegal referral_custnum");
 %    my $referral_custnum = $1;
 %    my $cust_main = qsearchs('cust_main', { custnum => $referral_custnum } );
 %    print '<FORM METHOD="GET">'.
 %    print ' <SELECT NAME="referral_depth" SIZE="1" onChange="changed(this)">';
 %    my $max = 8; #config file
 %    $cgi->param('referral_depth') =~ /^(\d*)$/ 
-%      or eidiot "Illegal referral_depth";
+%      or errorpage("Illegal referral_depth");
 %    my $referral_depth = $1;
 %
 %    foreach my $depth ( 1 .. $max ) {
 %
 %  my $custnum = $cgi->param('custnum_text');
 %  $custnum =~ s/\D//g;
-%  $custnum =~ /^(\d{1,23})$/ or eidiot "Illegal customer number\n";
+%  $custnum =~ /^(\d{1,23})$/ or errorpage("Illegal customer number");
 %  $custnum = $1;
 %  
 %  [ qsearchs('cust_main', { 'custnum' => $custnum } ) ];
 %
 %  my($card)=$cgi->param('card');
 %  $card =~ s/\D//g;
-%  $card =~ /^(\d{13,16})$/ or eidiot "Illegal card number\n";
+%  $card =~ /^(\d{13,16})$/ or errorpage("Illegal card number");
 %  my($payinfo)=$1;
 %
 %  [ qsearch('cust_main',{'payinfo'=>$payinfo, 'payby'=>'CARD'}),
 %
 %sub referralsearch {
 %  $cgi->param('referral_custnum') =~ /^(\d+)$/
-%    or eidiot "Illegal referral_custnum";
+%    or errorpage("Illegal referral_custnum");
 %  my $cust_main = qsearchs('cust_main', { 'custnum' => $1 } )
-%    or eidiot "Customer $1 not found";
+%    or errorpage("Customer $1 not found");
 %  my $depth;
 %  if ( $cgi->param('referral_depth') ) {
 %    $cgi->param('referral_depth') =~ /^(\d+)$/
-%      or eidiot "Illegal referral_depth";
+%      or errorpage("Illegal referral_depth");
 %    $depth = $1;
 %  } else {
 %    $depth = 1;
 %  }
 %
 %  $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/
-%    or eidiot "Illegal last name";
+%    or errorpage("Illegal last name");
 %  my($last)=$1;
 %
 %  if ( $last_type{'Exact'} || $last_type{'Fuzzy'} ) {
 %
 %  $cgi->param('company_text') =~
 %    /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
-%      or eidiot "Illegal company";
+%      or errorpage("Illegal company");
 %  my $company = $1;
 %
 %  if ( $company_type{'Exact'} || $company_type{'Fuzzy'} ) {
 %
 %  $cgi->param('address2_text') =~
 %    /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
-%      or eidiot "Illegal address2";
+%      or errorpage("Illegal address2");
 %  my $address2 = $1;
 %
 %  push @cust_main, qsearch( 'cust_main',
 %  } elsif ( $phone =~ /^(\d{3,4})$/ ) {
 %    $phone = $1;
 %  } else {
-%    eidiot gettext('illegal_phone'). ": $phone";
+%    errorpage(gettext('illegal_phone'). ": $phone");
 %  }
 %
 %  my @fields = qw(daytime night fax);
index 9a43a41..3beca4d 100644 (file)
@@ -90,7 +90,7 @@ if ( length( $cgi->param('search_svc') ) ) {
   push @extra_sql, "svcpart = $1";
 
 } else {
-  eidiot("No search term specified");
+  errorpage("No search term specified");
 }
 
 #here is the agent virtualization
index 1e7bdd9..cd37e26 100644 (file)
@@ -77,7 +77,7 @@ die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
 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( {
index 87e0fcd..f65b00d 100644 (file)
@@ -31,10 +31,10 @@ die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
 my $agentnum = $cgi->param('agentnum');
-$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
+$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
 $agentnum = $1;
 my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
 
 my $count_query = "SELECT COUNT(*) FROM reg_code WHERE agentnum = $agentnum";
 
-<%init>
+</%init>
index 5f64ebc..df9b8cd 100644 (file)
@@ -2,7 +2,7 @@
                'title' => 'Query Results',
                'name'  => 'rows',
                'query' => 'SELECT '. ( $cgi->param('sql')
-                                       || eidiot('Empty query') ),
+                             || errorpage('Empty query') ),
     )
 %>
 <%init>
index 1c1f1bf..8cd689a 100755 (executable)
@@ -51,7 +51,7 @@ if ( $cgi->param('domain') ) {
   unless ( $svc_domain ) {
     #it would be nice if this looked more like the other "not found"
     #errors, but this will do for now.
-    eidiot "Domain ". $cgi->param('domain'). " not found at all";
+    errorpage("Domain ". $cgi->param('domain'). " not found at all");
   } else {
     push @extra_sql, 'domsvc = '. $svc_domain->svcnum;
   }
index fb1ecf4..5671161 100755 (executable)
@@ -65,7 +65,7 @@
 
 <!-- mason kludge -->
 %
-%  eidiot "No matching broadband services found!\n";
+% errorpage("No matching broadband services found!");
 %} else {
 %