Added cgi args parser
authorJamie Cameron <jcameron@webmin.com>
Sun, 7 Jun 2009 22:53:31 +0000 (22:53 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 7 Jun 2009 22:53:31 +0000 (22:53 +0000)
logrotate/cgi_args.pl [new file with mode: 0644]

diff --git a/logrotate/cgi_args.pl b/logrotate/cgi_args.pl
new file mode 100644 (file)
index 0000000..6e0ae9f
--- /dev/null
@@ -0,0 +1,13 @@
+
+do 'logrotate-lib.pl';
+
+sub cgi_args
+{
+my ($cgi) = @_;
+if ($cgi eq 'edit_log.cgi') {
+       my $conf = &get_config();
+       my ($l) = grep { $_->{'members'} } @$conf;
+       return $l ? 'idx='.$l->{'index'} : 'new=1';
+       }
+return undef;
+}