freeside/httemplate/view svc_www.cgi,1.11,1.12
Ivan Kohler
ivan at pouncequick.420.am
Thu May 26 12:17:01 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv5685/httemplate/view
Modified Files:
svc_www.cgi
Log Message:
make svc_www.usersvc optional
Index: svc_www.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_www.cgi,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- svc_www.cgi 22 Mar 2004 11:05:58 -0000 1.11
+++ svc_www.cgi 26 May 2005 19:16:59 -0000 1.12
@@ -21,9 +21,13 @@
#eofalse
my $usersvc = $svc_www->usersvc;
-my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } )
- or die "svc_www: Unknown usersvc $usersvc";
-my $email = $svc_acct->email;
+my $svc_acct = '';
+my $email = '';
+if ( $usersvc ) {
+ $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } )
+ or die "svc_www: Unknown usersvc $usersvc";
+ $email = $svc_acct->email;
+}
my $domain_record = qsearchs('domain_record', { 'recnum' => $svc_www->recnum } )
or die "svc_www: Unknown recnum ". $svc_www->recnum;
@@ -46,7 +50,15 @@
qq!<TR><TD ALIGN="right">Website name</TD>!.
qq!<TD BGCOLOR="#ffffff"><A HREF="http://$www">$www<A></TD></TR>!.
qq!<TR><TD ALIGN="right">Account</TD>!.
- qq!<TD BGCOLOR="#ffffff"><A HREF="${p}view/svc_acct.cgi?$usersvc">$email</A></TD></TR>!;
+ qq!<TD BGCOLOR="#ffffff">!;
+
+if ( $usersvc ) {
+ print qq!<A HREF="${p}view/svc_acct.cgi?$usersvc">$email</A>!;
+} else {
+ print '</i>(none)</i>';
+}
+
+print '</TD></TR>';
foreach (sort { $a cmp $b } $svc_www->virtual_fields) {
print $svc_www->pvf($_)->widget('HTML', 'view', $svc_www->getfield($_)),
More information about the freeside-commits
mailing list