Added cgi args parser
authorJamie Cameron <jcameron@webmin.com>
Fri, 5 Jun 2009 19:51:11 +0000 (19:51 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 5 Jun 2009 19:51:11 +0000 (19:51 +0000)
lilo/cgi_args.pl [new file with mode: 0644]

diff --git a/lilo/cgi_args.pl b/lilo/cgi_args.pl
new file mode 100644 (file)
index 0000000..c417ea1
--- /dev/null
@@ -0,0 +1,13 @@
+
+do 'lilo-lib.pl';
+
+sub cgi_args
+{
+my ($cgi) = @_;
+if ($cgi eq 'edit_image.cgi') {
+       my $conf = &get_lilo_conf();
+       my @images = ( &find("image", $conf), &find("other", $conf) );
+       return @images ? 'idx='.$images[0]->{'index'} : 'new=1';
+       }
+return undef;
+}