ispman/lib/ISPMan ApacheMan.pm,1.62,1.63
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1979/lib/ISPMan
Modified Files:
ApacheMan.pm
Log Message:
adjusted vhost's webhost to changed getDomainAttribute function
Index: ApacheMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ApacheMan.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- ApacheMan.pm 1 May 2004 19:34:48 -0000 1.62
+++ ApacheMan.pm 2 May 2004 20:37:35 -0000 1.63
@@ -310,7 +310,7 @@
@webhosts=$self->as_array($r->param("webHost"));
} else {
# if caller didn't provide webhost we use the default for this domain
- @webhosts=$self->as_array($self->getDefaultWebHost($domain));
+ @webhosts=$self->getDefaultWebHost($domain);
$r->param("webHost",@webhosts);
}
@@ -564,28 +564,28 @@
sub addVhostProcess {
- my $self=shift;
- my ($domain, $vhost, $process, $param)=@_;
- my $vhostInfo=$self->getVhostInfo($vhost, $domain);
- my @webHosts=$self->as_array($vhostInfo->{'webHost'});
-
- unless (@webHosts){
- # No webHosts defined.
-
- my $_webhost;
-
- if ($_webhost=$self->getDefaultWebHost($domain)){
- push @webHosts, $_webhost;
- } else {
- print "No host in webserver is the group found. \nYou cannot add vhosts untill you define some hosts in the httpgroup\n";
- return;
- }
- }
+ my $self=shift;
+ my ($domain, $vhost, $process, $param)=@_;
+ my $vhostInfo=$self->getVhostInfo($vhost, $domain);
+ my @webHosts=$self->as_array($vhostInfo->{'webHost'});
-
- foreach (@webHosts){
- $self->addProcessToHost($domain, $_, $process, $param);
- }
+ unless (@webHosts){
+ # if no webhosts are defined get defaults from domain
+ my @webhost=$self->getDefaultWebHost($domain);
+ }
+
+ # if still no webhost are defined, warn user and bail out
+ unless (@webHosts) {
+ print "No host in webserver is the group found.\n"._
+ "You cannot add vhosts until you define some hosts in the httpgroup\n";
+ return 0;
+ }
+
+ foreach (@webHosts){
+ $self->addProcessToHost($domain, $_, $process, $param);
+ }
+
+ return 1;
}
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click