X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/885bff723998525c10d7ea8ad295547f5fcc939a..cc5f8de9e89c0028c94974a6b81f17f0628e9888:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 35e64d815..7d1f5c401 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -810,17 +810,23 @@ sub srcfile ($;$) { return (srcfile_stat(@_))[0]; } -sub add_underlay ($) { +sub add_literal_underlay ($) { my $dir=shift; - if ($dir !~ /^\//) { - $dir="$config{underlaydirbase}/$dir"; - } - if (! grep { $_ eq $dir } @{$config{underlaydirs}}) { unshift @{$config{underlaydirs}}, $dir; } +} +sub add_underlay ($) { + my $dir = shift; + + if ($dir !~ /^\//) { + $dir="$config{underlaydirbase}/$dir"; + } + + add_literal_underlay($dir); + # why does it return 1? we just don't know return 1; } @@ -1916,39 +1922,6 @@ sub template ($;@) { template_depends(shift, undef, @_); } -sub misctemplate ($$;@) { - my $title=shift; - my $content=shift; - my %params=@_; - - my $template=template("page.tmpl"); - - my $page=""; - if (exists $params{page}) { - $page=delete $params{page}; - } - run_hooks(pagetemplate => sub { - shift->( - page => $page, - destpage => $page, - template => $template, - ); - }); - templateactions($template, ""); - - $template->param( - dynamic => 1, - title => $title, - wikiname => $config{wikiname}, - content => $content, - baseurl => $config{url}.'/', - html5 => $config{html5}, - %params, - ); - - return $template->output; -} - sub templateactions ($$) { my $template=shift; my $page=shift;