]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Webmin mdule updated to 1.210
authoreldy <>
Tue, 11 Nov 2003 03:16:37 +0000 (03:16 +0000)
committereldy <>
Tue, 11 Nov 2003 03:16:37 +0000 (03:16 +0000)
tools/webmin/awstats/awstats-lib.pl
tools/webmin/awstats/edit_config.cgi
tools/webmin/awstats/index.cgi

index 0f788d73e04e097ae04f1b6089f46189e335aaeb..c583e88d0b215e78bd45e4c9f798dce032e1e957 100644 (file)
@@ -271,7 +271,7 @@ print "</table>\n";
 sub scan_config_dir
 {
 my $dir=shift;
-opendir(DIR, $dir) || die "Can't scan directory $dir";
+opendir(DIR, $dir) || return;
 local @rv = grep { /^awstats\.(.*)conf$/ } sort readdir(DIR);
 closedir(DIR);
 foreach my $file (0..@rv-1) {
index 9db6ff5016b486576f857c1f7d6f731211ec4394..fc9bc512ba25197ae68e7e8930d6b3fb9e2484e9 100644 (file)
@@ -93,8 +93,8 @@ print "<tr $cb> <td><table width=100%>\n";
 my $filenametosave="";
 if ($in{'new'}) {
        print "<tr> <td><b>$text{'edit_add'}</b></td> <td>\n";
-#      print "<input type=text name=new size=40 value='$config{'awstats_conf'}/awstats.newconfig.conf'>";
-       print "<input type=text name=new size=40 value='/etc/awstats/awstats.newconfig.conf'>";
+#      print "<input type=text name=new size=50 value='$config{'awstats_conf'}/awstats.newconfig.conf'>";
+       print "<input type=text name=new size=50 value='/etc/awstats/awstats.newconfig.conf'>";
        print "</td> <td> </td> </tr>\n";
        print "<tr> <td colspan=3><hr></td> </tr>\n";
 } else {
@@ -104,7 +104,7 @@ print "<input type=hidden name=oldfile value='$in{'file'}'>\n";
 
 print "<tr> <td colspan=3>MAIN SETUP SECTION (Required to make AWStats work)<br><hr></td> </tr>\n";
 
-print "<tr> <td><b>LogFile</b></td> <td> <input type=text name=LogFile size=40 value='$lconf->{'LogFile'}'> ".&file_chooser_button("LogFile",0,0)." </td> <td> ";
+print "<tr> <td><b>LogFile</b></td> <td> <input type=text name=LogFile size=50 value='$lconf->{'LogFile'}'> ".&file_chooser_button("LogFile",0,0)." </td> <td> ";
 print &hblink($text{'help_help'}, "help.cgi?param=LogFile")." </td> </tr>\n";
 print "<tr> <td><b>LogType</b></td> <td> ";
 print "<select name=LogType><option value='W'".($lconf->{'LogType'} eq 'W'?" selected":"").">W (Web server log file)</option>\n";
@@ -119,7 +119,7 @@ print "<tr> <td><b>LogSeparator</b></td> <td> <input size=10 name=LogSeparator t
 print &hblink($text{'help_help'}, "help.cgi?param=LogSeparator")." </td> </tr>\n";
 print "<tr> <td><b>SiteDomain</b></td> <td> <input name=SiteDomain type=text value='$lconf->{'SiteDomain'}'> </td> <td> ";
 print &hblink($text{'help_help'}, "help.cgi?param=SiteDomain")." </td> </tr>\n";
-print "<tr> <td><b>HostAliases</b></td> <td> <input size=40 name=HostAliases type=text value='$lconf->{'HostAliases'}'> </td> <td> ";
+print "<tr> <td><b>HostAliases</b></td> <td> <input size=50 name=HostAliases type=text value='$lconf->{'HostAliases'}'> </td> <td> ";
 print &hblink($text{'help_help'}, "help.cgi?param=HostAliases")." </td> </tr>\n";
 print "<tr> <td><b>DNSLookup</b></td> <td> <input size=10 name=DNSLookup type=text value='$lconf->{'DNSLookup'}'> </td> <td> ";
 print &hblink($text{'help_help'}, "help.cgi?param=DNSLookup")." </td> </tr>\n";
index b07337f3dad7190f3f9ec30183f37c65242ea7d2..be4f39cac293e6a77d53e931608ef1fa2ddc8246 100644 (file)
@@ -96,7 +96,12 @@ if (&foreign_check("apache") && $auto{'apache'}) {
 
 # Build list of config files from allowed directories
 foreach my $dir (split(/\s+/, $access{'dir'})) {
-       push(@config, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
+       my @conflist=();
+       push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
+       foreach my $file (@conflist) {  
+               next if (!&can_edit_config($file));
+               push @config, $file;
+       }
 }
 
 # Write message for allowed directories
@@ -138,13 +143,6 @@ if (@config) {
                print "<tr $cb>\n";
 
                local ($size, $latest);
-#              foreach $f (@files) {
-#                      local @st = stat($f);
-#                      $size += $st[7];
-#                      $latest = $st[9] if ($st[9] > $latest);
-#                      }
-#              $latest = $latest ? localtime($latest) : "<br>";
-
                print "<td>";
                print "$l";
                if ($access{'global'}) {        # Edit config