]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
Revert "added hook urlpath" and "rename urlpath hook into tweakurlpath..."
[ikiwiki.git] / IkiWiki.pm
index 245eaafba243a8c4dd341524d9d6f087a9a63be7..8b3a911143934b0fe6acf674edf6b18e2bbc84d1 100644 (file)
@@ -411,7 +411,7 @@ sub getsetup () { #{{{
                rebuild => 0,
        },
        allow_symlinks_before_srcdir => {
-               type => "string",
+               type => "boolean",
                default => 0,
                description => "allow symlinks in the path leading to the srcdir (potentially insecure)",
                safe => 0,
@@ -655,8 +655,19 @@ sub newpagefile ($$) { #{{{
 sub targetpage ($$) { #{{{
        my $page=shift;
        my $ext=shift;
-       
-       if (! $config{usedirs} || $page eq 'index') {
+
+       my $targetpage='';
+       run_hooks(targetpage => sub {
+               $targetpage=shift->(
+                       page => $page,
+                       ext => $ext,
+               );
+       });
+
+       if (defined $targetpage && (length($targetpage) > 0)) {
+               return $targetpage;
+       }
+       elsif (! $config{usedirs} || $page eq 'index') {
                return $page.".".$ext;
        }
        else {
@@ -1582,8 +1593,8 @@ sub rcs_getctime ($) { #{{{
        $hooks{rcs}{rcs_getctime}{call}->(@_);
 } #}}}
 
-sub rcs_test_receive ($) { #{{{
-       $hooks{rcs}{rcs_test_receive}{call}->(@_);
+sub rcs_receive () { #{{{
+       $hooks{rcs}{rcs_receive}{call}->();
 } #}}}
 
 sub globlist_to_pagespec ($) { #{{{