Changeset 238 for trunk/dns.cgi
- Timestamp:
- 02/22/12 18:03:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r237 r238 78 78 $session->param('domlistsortby','domain'); 79 79 $session->param('domlistorder','ASC'); 80 $session->param('revzonessortby','revnet'); 81 $session->param('revzonesorder','ASC'); 80 82 $session->param('useradminsortby','user'); 81 83 $session->param('useradminorder','ASC'); … … 195 197 my $page; 196 198 eval { 197 $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl"); 199 # sigh. can't set loop_context_vars or global_vars once instantiated. 200 $page = HTML::Template->new(filename => "$templatedir/$webvar{page}.tmpl", 201 loop_context_vars => 1, global_vars => 1); 198 202 }; 199 203 if ($@) { 200 warn "Bad page $webvar{page} requested";204 my $msg = $@; 201 205 $page = HTML::Template->new(filename => "$templatedir/badpage.tmpl"); 202 $page->param(badpage => $q->escapeHTML($webvar{page})); 206 if (-e "$templatedir/$webvar{page}.tmpl") { 207 $page->param(badtemplate => $q->escapeHTML($msg)); 208 } else { 209 warn "Bad page $webvar{page} requested"; 210 $page->param(badpage => $q->escapeHTML($webvar{page})); 211 } 203 212 $webvar{page} = 'badpage'; 204 213 }
Note:
See TracChangeset
for help on using the changeset viewer.