[freeside-devel] Possible Changes to svc_www.cgi and svc_www.pm

Stephen Bechard steve at destek.net
Sat Jun 22 21:46:29 PDT 2002


> > If you mean editing the DNS/zone data, there's already
> > (import from/export to) BIND and a web editor for the zone files.
>
> I noticed in that view/svc_domain.cgi there was a (delete) option for each
> of the DNS/zone data records, but not and edit. I also noticed that there
is
> no error checking on the deletion of these zones compared to configured
> svc_www records that might be attached to it. :(

Here is a quick fix for the above issue in the delete-domain_record.cgi
Should probably really be handled in the domain_record.pm
Enjoy,
Steve

*** /tarballs/freeside-1.4.0pre14/httemplate/misc/delete-domain_record.cgi
Wed May 22 14:44:01 2002
--- delete-domain_record.cgi    Sun Jun 23 00:45:12 2002
***************
*** 6,15 ****
  my $recnum = $1;

  my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum});

! my $error = $domain_record->delete;
! eidiot($error) if $error;
!
! print $cgi->redirect($p. "view/svc_domain.cgi?". $domain_record->svcnum);

  %>
--- 6,20 ----
  my $recnum = $1;

  my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum});
+ my $svc_www = qsearchs('svc_www',{'recnum'=>$recnum});

! if($svc_www){
!    print "<FONT COLOR=RED><B>You cannot delete a Domain Record that has a
website configured</B></FONT><BR>";
!    print "<A HREF=". $p. "view/svc_domain.cgi?". $domain_record->svcnum.
">Back to Domain</A>";
! } else {
!    my $error = $domain_record->delete;
!    eidiot($error) if $error;
!    print $cgi->redirect($p. "view/svc_domain.cgi?".
$domain_record->svcnum);
! }

  %>






More information about the freeside-devel mailing list