Added CGI args parser
authorJamie Cameron <jcameron@webmin.com>
Wed, 10 Jun 2009 01:07:56 +0000 (01:07 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 10 Jun 2009 01:07:56 +0000 (01:07 +0000)
spam/cgi_args.pl [new file with mode: 0644]

diff --git a/spam/cgi_args.pl b/spam/cgi_args.pl
new file mode 100644 (file)
index 0000000..795fb3c
--- /dev/null
@@ -0,0 +1,12 @@
+
+do 'spam-lib.pl';
+
+sub cgi_args
+{
+my ($cgi) = @_;
+if ($cgi =~ /^edit_/) {
+       # First allowed file, if any
+       return $access{'file'} ? 'file='.&urlize($access{'file'}) : '';
+       }
+return undef;
+}