AWFFull support
authorJamie Cameron <jcameron@webmin.com>
Fri, 14 Dec 2007 22:56:21 +0000 (22:56 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 14 Dec 2007 22:56:21 +0000 (22:56 +0000)
webalizer/CHANGELOG
webalizer/config-mandrake-linux-10.3-* [new file with mode: 0644]
webalizer/index.cgi
webalizer/lang/en
webalizer/webalizer-lib.pl

index 2db67fc..b540055 100644 (file)
@@ -6,3 +6,5 @@ Added a Module Config option to prevent the Webmin header and footer from being
 Log files from ProFTPd and WU-FTPd are now automatically made available for generating reports on.
 ---- Changes since 1.270 ----
 Added buttons for scheduling and de-scheduling multiple Webalizer reports at once.
+---- Changes since 1.380 ----
+Added support for AWFFull, a drop in Webalizer replacement. It is used by default on Mandriva 2007.1 and later.
diff --git a/webalizer/config-mandrake-linux-10.3-* b/webalizer/config-mandrake-linux-10.3-*
new file mode 100644 (file)
index 0000000..2487908
--- /dev/null
@@ -0,0 +1,4 @@
+webalizer=webalizer
+webalizer_conf=/etc/webalizer.conf
+auto=apache,squid,proftpd,wuftpd
+naked=0
index 55ab3f5..9797897 100755 (executable)
@@ -165,8 +165,9 @@ if (!$access{'view'} && $access{'global'}) {
 
 sub main_header
 {
+local $prog = &get_webalizer_prog();
 &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
-       &help_search_link("webalizer", "man", "doc", "google"),
-       undef, undef, &text('index_version', $webalizer_version));
+       &help_search_link($prog, "man", "doc", "google"),
+       undef, undef, &text('index_version_'.$prog, $webalizer_version));
 }
 
index aaea140..e7f5606 100644 (file)
@@ -1,5 +1,7 @@
 index_title=Webalizer Logfile Analysis
 index_version=Webalizer version $1
+index_version_webalizer=$index_version
+index_version_awffull=AWFFull
 index_ewebalizer=The logfile analysis command $1 was not found on your system. Maybe it is not installed, or your <a href='$2'>module configuration</a> is incorrect.
 index_econf=The Webalizer configuration file $1 was not found on your system. Maybe it is not installed, or your <a href='$2'>module configuration</a> is incorrect.
 index_add=Add a new log file for analysis.
index 633089b..7d932e7 100644 (file)
@@ -170,6 +170,7 @@ foreach $a (@all) {
        local @st = stat($a);
        $mtime{$a} = $st[9];
        }
+local $prog = &get_webalizer_prog();
 local $type = $lconf->{'type'} == 1 ? "" :
              $lconf->{'type'} == 2 ? "-F squid" :
              $lconf->{'type'} == 3 ? "-F ftp" : "";
@@ -252,6 +253,10 @@ return 0;
 sub get_webalizer_version
 {
 local $out = `$config{'webalizer'} -v 2>&1`;
+if ($out =~ /awffull +(\S+)/) {
+       # AWfull version
+       return $1;
+       }
 if ($? || $out !~ /\sV(\S+)/) {
        # Try -V
        $out = `$config{'webalizer'} -V 2>&1`;
@@ -260,6 +265,13 @@ ${$_[0]} = $out;
 return $out =~ /\sV(\S+)/ ? $1 : undef;
 }
 
+# get_webalizer_prog()
+# Returns either 'webalizer' or 'awffull'
+sub get_webalizer_prog
+{
+return $config{'webalizer'} =~ /awffull/i ? "awffull" : "webalizer";
+}
+
 # get_all_logs()
 # Returns a list of all log files the module can report on
 sub get_all_logs