Changeset 173 for trunk/dns.cgi
- Timestamp:
- 11/30/11 15:43:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r169 r173 102 102 my $logingroup = ($session->param('logingroup') ? $session->param('logingroup') : 1); 103 103 my $curgroup = ($session->param('curgroup') ? $session->param('curgroup') : $logingroup); 104 my $group = ($webvar{group} ? $webvar{group} : 1);105 104 106 105 # per-page startwith, filter, searchsubs … … 182 181 push @viewablegroups, $logingroup; 183 182 184 my $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl"); 183 my $page; 184 eval { 185 $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl"); 186 }; 187 if ($@) { 188 warn "Bad page $webvar{page} requested"; 189 $page = HTML::Template->new(filename => "$templatedir/badpage.tmpl"); 190 $page->param(badpage => $q->escapeHTML($webvar{page})); 191 $webvar{page} = 'badpage'; 192 } 185 193 186 194 # handle login redirect … … 1407 1415 1408 1416 ##common bits 1409 if ($webvar{page} ne 'login' ) {1417 if ($webvar{page} ne 'login' && $webvar{page} ne 'badpage') { 1410 1418 $page->param(username => $session->param("username")); 1411 1419
Note:
See TracChangeset
for help on using the changeset viewer.