ispman/lib/ISPMan ApacheMan.pm,1.60,1.61
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-serv30634/lib/ISPMan
Modified Files:
ApacheMan.pm
Log Message:
fixed small bug with default webhost setting
changed logic for confVars apacheDocumentRootOptions, apacheScriptDirOptions
Index: ApacheMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ApacheMan.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- ApacheMan.pm 1 May 2004 10:08:37 -0000 1.60
+++ ApacheMan.pm 1 May 2004 18:16:25 -0000 1.61
@@ -299,19 +299,38 @@
print $self->{'message'};
return;
}
-
+
# check for defined webhosts
- my @webhosts=$self->as_array($r->param("webHost"));
- if ($#webhosts<0){
- # This can happen. For example from CCP
- @webhosts=$self->as_array($self->getDefaultWebHost($domain));
- $r->param("webHost",@webhosts);
+ my @webhosts;
+ if ($r->param("webHost")) {
+ @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));
+ $r->param("webHost",@webhosts);
}
+
+ # finaly check if webhosts are set
if ($#webhosts<0){
print "The webhost for $ispmanVhostName cannot be determined!<br>Please check DefaultFileHost for domain $domain!\n";
return;
}
-
+
+ # fill dir options if unset
+ if (!$r->param("ispmanVhostDocumentRootOption")) {
+ my @selected_options=();
+ for (split ",",$self->getConf("apacheDocumentRootOptions")) {
+ if ($_ =~ s/\*//) { push @selected_options,$_ };
+ }
+ $r->param("ispmanVhostDocumentRootOption",@selected_options);
+ }
+ if (!$r->param("ispmanVhostScriptDirOption")) {
+ my @selected_options=();
+ for (split ",",$self->getConf("apacheScriptDirOptions")) {
+ if ($_ =~ s/\*//) { push @selected_options,$_ };
+ }
+ $r->param("ispmanVhostScriptDirOption",@selected_options);
+ }
# seperate alias entry
if ($r->param("ispmanVhostServerAlias")) {
-------------------------------------------------------
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