From: eldy <>
Date: Sun, 20 Jun 2004 18:45:44 +0000 (+0000)
Subject: Some change to add scheduler management for update process
X-Git-Tag: AWSTATS_6_2_BETA~9
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7280df3db68069aa47c6af449c729cbfb11229ba;p=thirdparty%2FAWStats.git
Some change to add scheduler management for update process
Creating new config files can be done by copying an old one.
---
diff --git a/tools/webmin/awstats/awstats-webmin_changelog.txt b/tools/webmin/awstats/awstats-webmin_changelog.txt
index 985817d5..0835e64e 100644
--- a/tools/webmin/awstats/awstats-webmin_changelog.txt
+++ b/tools/webmin/awstats/awstats-webmin_changelog.txt
@@ -2,6 +2,13 @@ AWStats-Webmin module Changelog
-------------------------------
$Revision$ - $Author$ - $Date$
+1.400
+
+New features/improvements:
+- Some change to add scheduler management for update process
+- Creating new config files can be done by copying an old one.
+
+
1.300
Fixes:
diff --git a/tools/webmin/awstats/edit_config.cgi b/tools/webmin/awstats/edit_config.cgi
index 7e16db5e..ac9bba23 100644
--- a/tools/webmin/awstats/edit_config.cgi
+++ b/tools/webmin/awstats/edit_config.cgi
@@ -34,31 +34,62 @@ foreach my $key (keys %$lconf) {
$lconf->{$key}=~s/[\"\']\s*$//;
}
+# Put in @conflist, list of all existing config
+my @conflist=();
+foreach my $dir (split(/\s+/, $access{'dir'})) {
+ push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
+}
+
+
print "
\n";
print <
-function Submit_onClick() {
- if (document.editconfig.LogFormat.value=='') {
- alert('$text{save_errLogFormat}');
- document.editconfig.LogFormat.focus();
- return false;
- }
- if (document.editconfig.LogFile.value.match(/maillogconvert.pl/)!=null && document.editconfig.LogType.value != 'M') {
- alert('Your log file is preprocessed by maillogconvert.pl but is not defined as a "Mail" log type.\\nChange LogFile or LogType parameter.');
- document.editconfig.LogType.focus();
- return false;
- }
- if (document.editconfig.SiteDomain.value=='') {
- alert('$text{save_errSiteDomain}');
- document.editconfig.SiteDomain.focus();
- return false;
- }
- if (document.editconfig.DirData.value=='') {
- alert('$text{save_errDirData}');
- document.editconfig.DirData.focus();
- return false;
- }
+function Submit_onClick() {
+EOF
+# If create
+if ($in{'new'} && scalar @conflist) {
+print <\n";
-print "