more liberal path checks

This commit is contained in:
Oliver Gorwits
2012-01-18 15:40:27 +00:00
parent 45b0e969f4
commit 06bf5f4fdc
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ hook 'before' => sub {
]);
# set up default search options for each type
if (request->path =~ m{^/device}) {
if (request->path =~ m{/device$}) {
if (not param('tab') or param('tab') ne 'ports' or scalar keys %{params()} < 4) {
foreach my $col (@{ var('port_columns') }) {
params->{$col->{name}} = 'checked' if $col->{default} eq 'on';

View File

@@ -17,7 +17,7 @@ hook 'before' => sub {
}
# set up default search options for each type
if (request->path =~ m{^/search}) {
if (request->path =~ m{/search$}) {
if (not param('tab') or param('tab') ne 'node') {
params->{'stamps'} = 'checked';
}