]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
remove, redundant
[ikiwiki.git] / IkiWiki.pm
index 1cbe975c058cc7a455dc4127067d1bf943776651..5c62c7f9bd5eb5deaa583228ded3040544ad0c64 100644 (file)
@@ -13,7 +13,9 @@ use vars qw{%config %links %oldlinks %oldpagemtime %pagectime %pagecase
 use Exporter q{import};
 our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
                  bestlink htmllink readfile writefile pagetype srcfile pagename
+                 displaytime
                  %config %links %renderedfiles %pagesources);
+our $VERSION = 1.00;
 
 # Optimisation.
 use Memoize;
@@ -23,7 +25,7 @@ memoize("pagespec_translate");
 my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
 
 sub defaultconfig () { #{{{
-       wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$)},
+       wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$|.arch-ids/|{arch}/)},
        wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]]+)\]\]/,
        wiki_file_regexp => qr/(^[-[:alnum:]_.:\/+]+$)/,
        verbose => 0,
@@ -60,6 +62,7 @@ sub defaultconfig () { #{{{
        timeformat => '%c',
        locale => undef,
        sslcookie => 0,
+       httpauth => 0,
 } #}}}
    
 sub checkconfig () { #{{{
@@ -319,7 +322,7 @@ sub baseurl (;$) { #{{{
 sub abs2rel ($$) { #{{{
        # Work around very innefficient behavior in File::Spec if abs2rel
        # is passed two relative paths. It's much faster if paths are
-       # absolute!
+       # absolute! (Debian bug #376658)
        my $path="/".shift;
        my $base="/".shift;
 
@@ -589,7 +592,7 @@ sub template ($;@) { #{{{
        HTML::Template->new(template_params(@_));
 } #}}}
 
-sub misctemplate ($$) { #{{{
+sub misctemplate ($$;@) { #{{{
        my $title=shift;
        my $pagebody=shift;
        
@@ -599,8 +602,12 @@ sub misctemplate ($$) { #{{{
                indexlink => indexlink(),
                wikiname => $config{wikiname},
                pagebody => $pagebody,
-       baseurl => baseurl(),
+               baseurl => baseurl(),
+               @_,
        );
+       run_hooks(pagetemplate => sub {
+               shift->(page => "", destpage => "", template => $template);
+       });
        return $template->output;
 }#}}}