ispman/ispman-web/cgi-bin/tmpl/vhosts add.tmpl,1.17,1.18 edit.tmpl,1.22,1.23
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31587/ispman-web/cgi-bin/tmpl/vhosts
Modified Files:
add.tmpl edit.tmpl
Log Message:
switching ispmanVhostDocumentRootOption, ispmanVhostScriptDirOption to use confVars instead of hardcoded defaults
Index: add.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/add.tmpl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- add.tmpl 18 Feb 2004 21:02:07 -0000 1.17
+++ add.tmpl 1 May 2004 18:21:39 -0000 1.18
@@ -131,11 +131,20 @@
<td>DocumentRoot directory options</td>
<td>
<select name=ispmanVhostDocumentRootOption MULTIPLE>
- <option value="Indexes" selected>Show Indexes in Directories</option>
- <option value="ExecCGI">Execute CGIs</option>
- <option value="Includes">Allow Includes</option>
- <option value="FollowSymLinks" selected>FollowSymLinks</option>
- <option value="MultiViews" selected>MultiViews</option>
+ <perl>
+ my $text="";
+ my @options=split ",",$ispman->getConf("apacheDocumentRootOptions");
+
+ for (@options){
+ if ($_ =~ s/^\*//) {
+ $text.="<option VALUE=\"$_\" selected>$_</option>";
+ } else {
+ $text.="<option VALUE=\"$_\">$_</option>";
+ }
+ }
+
+ $text
+ </perl>
</select>
</td>
</tr>
@@ -152,11 +161,20 @@
<td>ScriptDirectory options </td>
<td>
<select name=ispmanVhostScriptDirOption MULTIPLE>
- <option value="Indexes">Show Indexes in Directories</option>
- <option value="ExecCGI" selected>Execute CGIs</option>
- <option value="Includes">Allow Includes</option>
- <option value="FollowSymLinks">FollowSymLinks</option>
- <option value="MultiViews">MultiViews</option>
+ <perl>
+ my $text="";
+ my @options=split ",",$ispman->getConf("apacheScriptDirOptions");
+
+ for (@options){
+ if ($_ =~ s/^\*//) {
+ $text.="<option VALUE=\"$_\" selected>$_</option>";
+ } else {
+ $text.="<option VALUE=\"$_\">$_</option>";
+ }
+ }
+
+ $text
+ </perl>
</select>
</td>
</tr>
Index: edit.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/edit.tmpl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- edit.tmpl 1 May 2004 09:47:29 -0000 1.22
+++ edit.tmpl 1 May 2004 18:21:39 -0000 1.23
@@ -50,40 +50,32 @@
</tr>
<tr>
- <td>DocumentRoot directory options </td>
+ <td>DocumentRoot directory options</td>
<td>
<select name=ispmanVhostDocumentRootOption MULTIPLE>
<perl>
- my $allOptions=[qw(Indexes ExecCGI FollowSymLinks MultiViews Includes)];
-
- my $directoryOptions=$ispman->{'vhost'}->{"ispmanVhostDocumentRootOption"};
- my $selectedOptions;
- if (ref $directoryOptions eq "ARRAY"){
- for (@$directoryOptions){
- $selectedOptions->{$_}++;
- }
- } else {
- $selectedOptions->{$directoryOptions}++;
- }
-
- my $text="";
- for (@$allOptions){
- $text.="<option ";
- $text.=" selected " if $selectedOptions->{$_};
- $text.=">$_</option>\n";
- }
-
-
- $text
+ my @all_options=split ",",$ispman->getConf("apacheDocumentRootOptions");
+ my @dir_options=$ispman->as_array($ispman->{'vhost'}->{"ispmanVhostDocumentRootOption"});
+ my $selectedOptions;
+ for (@dir_options){
+ $selectedOptions->{$_}++;
+ }
+ my $text="";
+ for (@all_options){
+ $_ =~ s/\*//;
+ $text.=" <option";
+ $text.=" selected" if $selectedOptions->{$_};
+ $text.=">$_</option>\n";
+ }
+ $text
</perl>
-
</select>
</td>
</tr>
<tr>
- <td>ScriptDirectory (/cgi-bin/) </td>
+ <td>ScriptDirectory (/cgi-bin/)</td>
<td>
<input size=35 type=hidden name=ispmanVhostScriptDir value="<perl> $ispman->{'vhost'}->{"ispmanVhostScriptDir"}</perl>">
<perl> $ispman->{'vhost'}->{"ispmanVhostScriptDir"}</perl>
@@ -92,34 +84,27 @@
<tr>
- <td>Script directory options </td>
+ <td>Script directory options</td>
<td>
<select name=ispmanVhostScriptDirOption MULTIPLE>
<perl>
- my $allOptions=[qw(Indexes ExecCGI FollowSymLinks MultiViews Includes)];
-
- my $directoryOptions=$ispman->{'vhost'}->{"ispmanVhostScriptDirOption"};
- my $selectedOptions;
- if (ref $directoryOptions eq "ARRAY"){
- for (@$directoryOptions){
- $selectedOptions->{$_}++;
- }
- } else {
- $selectedOptions->{$directoryOptions}++;
- }
+ my @all_options=split ",",$ispman->getConf("apacheScriptDirOptions");
+ my @dir_options=$ispman->as_array($ispman->{'vhost'}->{"ispmanVhostScriptDirOption"});
+ my $selectedOptions;
+ for (@dir_options){
+ $selectedOptions->{$_}++;
+ }
my $text="";
- for (@$allOptions){
- $text.="<option ";
- $text.=" selected " if $selectedOptions->{$_};
- $text.=">$_</option>\n";
+ for (@all_options){
+ $_ =~ s/\*//;
+ $text.=" <option";
+ $text.=" selected" if $selectedOptions->{$_};
+ $text.=">$_</option>\n";
}
-
- $text
-
- </perl>
-
+ $text
+ </perl>
</select>
</td>
</tr>
-------------------------------------------------------
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