freeside/httemplate/edit svc_www.cgi,1.2.4.3,1.2.4.4
ivan
ivan at pouncequick.420.am
Tue May 11 04:19:26 PDT 2004
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory pouncequick:/tmp/cvs-serv18192/httemplate/edit
Modified Files:
Tag: FREESIDE_1_4_BRANCH
svc_www.cgi
Log Message:
one reasonable default and one kludge, to improve webhosting UI
Index: svc_www.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_www.cgi,v
retrieving revision 1.2.4.3
retrieving revision 1.2.4.4
diff -u -d -r1.2.4.3 -r1.2.4.4
--- svc_www.cgi 6 May 2004 22:37:14 -0000 1.2.4.3
+++ svc_www.cgi 11 May 2004 11:19:23 -0000 1.2.4.4
@@ -56,9 +56,13 @@
my( %svc_acct, %arec );
if ($pkgnum) {
- my($u_part_svc, at u_acct_svcparts);
- foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) {
- push @u_acct_svcparts,$u_part_svc->getfield('svcpart');
+ my @u_acct_svcparts;
+ foreach my $svcpart (
+ map { $_->svcpart } qsearch( 'part_svc', { 'svcdb' => 'svc_acct' } )
+ ) {
+ next if $conf->exists('svc_www-usersvc_svcpart')
+ && grep { $svcpart == $_ } $conf->config('svc_www-usersvc_svcpart');
+ push @u_acct_svcparts, $svcpart;
}
my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
@@ -92,25 +96,23 @@
my($i_cust_svc);
foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) {
my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$i_cust_svc->getfield('svcnum')});
- my $domain_rec;
- foreach $domain_rec ( qsearch('domain_record',{
- 'svcnum' => $svc_domain->svcnum,
- 'rectype' => 'A' } ),
- qsearch('domain_record',{
- 'svcnum' => $svc_domain->svcnum,
- 'rectype' => 'CNAME'
- } ) ) {
- $arec{$domain_rec->recnum} =
- $domain_rec->reczone eq '@'
- ? $svc_domain->domain
- : $domain_rec->reczone. '.'. $svc_domain->domain;
+ if ( $conf->exists('svc_www-enable_subdomains') ) {
+ foreach my $domain_rec ( qsearch('domain_record',{
+ 'svcnum' => $svc_domain->svcnum,
+ 'rectype' => 'A' } ),
+ qsearch('domain_record',{
+ 'svcnum' => $svc_domain->svcnum,
+ 'rectype' => 'CNAME'
+ } ) ) {
+ $arec{$domain_rec->recnum} = $domain_rec->zone;
+ }
+ $arec{'www.'. $svc_domain->domain} = 'www.'. $svc_domain->domain
+ unless qsearchs('domain_record', { svcnum => $svc_domain->svcnum,
+ reczone => 'www', } );
}
$arec{'@.'. $svc_domain->domain} = $svc_domain->domain
unless qsearchs('domain_record', { svcnum => $svc_domain->svcnum,
reczone => '@', } );
- $arec{'www.'. $svc_domain->domain} = 'www.'. $svc_domain->domain
- unless qsearchs('domain_record', { svcnum => $svc_domain->svcnum,
- reczone => 'www', } );
}
}
}
More information about the freeside-commits
mailing list