chiark / gitweb /
Pass $dbh down through the stack, for better lifetime
[ypp-sc-tools.main.git] / yarrg / web / query_age
index 922e29f0c90031b97e1c485bb6fcb456946f8018..77d750c8c95ec2c0386b79f785111df215851e0b 100644 (file)
 
 
 </%doc>
+
+<%args>
+$quri
+$dbh
+</%args>
+
 <%once>
 my $meta_prettyprint_age= sub {
     my ($age,$floor,$plus) = @_;
@@ -56,7 +62,6 @@ eval '
 </%once>
 
 <%perl>
-
 my $now= time;
 
 my $row;
@@ -96,10 +101,8 @@ Time since this page loaded:
 <span id="daid_loaded">(not known; times above not updating)</span>
 
 <form action="lookup" method="get">
-% foreach my $a (keys %ARGS) {
-<input type="hidden" name="<% $a |h %>" value="<% $ARGS{$a} |h %>">
-% }
 <input type=submit name=submit value="Reload">
+<& "lookup:formhidden", ours => sub { 0; } &>
 </form>
 
 <&| script &>
@@ -128,8 +131,4 @@ Time since this page loaded:
 <%init>
 use POSIX;
 use CommodsWeb;
-my $dbh= dbw_connect('Midnight');
 </%init>
-<%cleanup>
-$dbh->rollback();
-</%cleanup>