Skip to content

Commit

Permalink
Added CGI args parser
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jun 10, 2009
1 parent e393ad3 commit f5f6bb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions dhcpd/cgi_args.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

do 'dhcpd-lib.pl';

sub cgi_args
{
my ($cgi) = @_;
if ($cgi eq 'edit_group.cgi' || $cgi eq 'edit_host.cgi' ||
$cgi eq 'edit_subnet.cgi' || $cgi eq 'edit_shared.cgi' ||
$cgi eq 'edit_keys.cgi' || $cgi eq 'edit_zones.cgi') {
# Creating new one
return 'new=1';
}
elsif ($cgi eq 'edit_options.cgi') {
# Global options
return '';
}
return undef;
}
1 change: 0 additions & 1 deletion dhcpd/edit_text.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# * Display form to manually edit dhcpd.conf file (pass to save_text.cgi)

require './dhcpd-lib.pl';
&ReadParse();
$access{'noconfig'} && &error($text{'text_ecannot'});
$conf = &get_config();
&ui_print_header($text{'text_editor'}, $text{'text_title'}, "");
Expand Down

0 comments on commit f5f6bb4

Please sign in to comment.