]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
what about managing creditentials in ikiwiki itself?
[ikiwiki.git] / IkiWiki.pm
index 1102fa52a967b94f8595c56415af10bcdca9ef24..799236f35fc2e26cbbfa8a84abb711b53bffc809 100644 (file)
@@ -1068,6 +1068,16 @@ sub baseurl (;$) {
        return $page;
 }
 
+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;
+}
+
 sub abs2rel ($$) {
        # Work around very innefficient behavior in File::Spec if abs2rel
        # is passed two relative paths. It's much faster if paths are
@@ -1906,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 => baseurl(),
-               html5 => $config{html5},
-               %params,
-       );
-       
-       return $template->output;
-}
-
 sub templateactions ($$) {
        my $template=shift;
        my $page=shift;