ispman/ispman-web/cgi-bin/tmpl/domains/edit domainservices.tmpl,1.5,1.6
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/domains/edit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23974/ispman-web/cgi-bin/tmpl/domains/edit
Modified Files:
domainservices.tmpl
Log Message:
fixed perl warning
Index: domainservices.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/domains/edit/domainservices.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- domainservices.tmpl 8 Jan 2004 00:08:26 -0000 1.5
+++ domainservices.tmpl 6 Feb 2004 22:07:45 -0000 1.6
@@ -6,16 +6,20 @@
my $services=$ispman->getDomainServices();
my $selectedServices;
my $text="";
- if (ref $ispman->{'domain'}{'ispmanDomainService'} eq "ARRAY"){
- for (@{$ispman->{'domain'}{'ispmanDomainService'}}){
- $selectedServices->{$_}{'default'}=" selected ";
- }
- } else {
- $selectedServices->{$ispman->{'domain'}{'ispmanDomainService'}}{'default'}=" selected ";
- }
+
+ for (@{$ispman->as_array($ispman->{'domain'}{'ispmanDomainService'})}){
+ $selectedServices->{$_}=1;
+ }
for (keys %$services){
- $text.="<OPTION $selectedServices->{$services->{$_}{'ispmanDomainServiceName'}}{'default'} VALUE='$services->{$_}{'ispmanDomainServiceName'}'>$services->{$_}{'ispmanDomainServiceAlias'} </option>\n";
+ if (defined $selectedServices->{$_}){
+ $text.="<option selected";
+ } else {
+ $text.="<option ";
+ }
+
+ $text.="VALUE='$services->{$_}{'ispmanDomainServiceName'}'>";
+ $text.="$services->{$_}{'ispmanDomainServiceAlias'} </option>\n";
}
$text
</perl>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn