mason/dhandler: Pass arguments to the subcomponent.
[tgal] / mason / dhandler
index 813e637..ca5dad2 100755 (executable)
@@ -288,10 +288,9 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
     Trivial Gallery, copyright &copy; 2021 Mark Wooding.
     Free software: you can modify it and/or redistribute it under the
     terms of the
-    <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">GNU Affero
+    <a rel=license href="https://www.gnu.org/licenses/agpl-3.0.en.html">GNU Affero
     General Public License version 3</a>.
-    Browse or download
-    the <a href="https://git.distorted.org.uk/~mdw/tgal/">source code</a>.
+    Browse or download the <a href="<% $SRCURL %>">source code</a>.
   </div>
 % my $user =
 %   find_covering_file $IMGROOT, $path, ".tgal-footer.html";
@@ -309,7 +308,6 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 %###-------------------------------------------------------------------------
 <%once>
        use autodie;
-use Data::Dumper;
        use File::stat;
 
        use TrivGal;
@@ -325,7 +323,8 @@ use Data::Dumper;
        elsif (-d $st) { $comp = ".contact"; }
        elsif (-f $st) { $comp = ".image"; }
        else { $comp = ".not-found"; }
-       $m->comp($comp, path => $path);
+        $r->header_out("X-AGPL-Source" => $SRCURL);
+       $m->comp($comp, path => $path, %ARGS);
 </%init>
 %
 %###----- That's all, folks -------------------------------------------------