X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/c91b39fdb52c935fbca20ca55a256278f4661a5b..4f412100be4679ea984453c8d7a2bc910ee4877f:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index ef8ccb2da..799236f35 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1072,6 +1072,8 @@ sub urlabs ($$) { my $url=shift; my $urlbase=shift; + return $url unless defined $urlbase && length $urlbase; + eval q{use URI}; URI->new_abs($url, $urlbase)->as_string; } @@ -1914,39 +1916,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;