]> sipb.mit.edu Git - ikiwiki.git/commitdiff
really fix the baseurl problem
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 29 Jan 2008 23:19:47 +0000 (18:19 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 29 Jan 2008 23:19:47 +0000 (18:19 -0500)
the issue is that HTML::Template doesn't expand top-level variables when inside
a loop

IkiWiki/Plugin/recentchanges.pm

index 9dad0af5e2787c35cd254f2772750864675ef94f..5ac0a30ef87ea9848e8fa1dba043984000ec817b 100644 (file)
@@ -60,6 +60,8 @@ sub store ($$$) { #{{{
                        else {
                                $_->{link} = IkiWiki::pagetitle($_->{page});
                        }
+                       $_->{baseurl}="$config{url}/" if length $config{url};
+
                        $_;
                } @{$change->{pages}}
        ];
@@ -94,7 +96,6 @@ sub store ($$$) { #{{{
                commitdate => displaytime($change->{when}, "%X %x"),
                wikiname => $config{wikiname},
        );
-       $template->param(baseurl => "$config{url}/") if length $config{url};
        IkiWiki::run_hooks(pagetemplate => sub {
                shift->(page => $page, destpage => $page, template => $template);
        });