X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b14f84c4acccbc8450a9102b3b647013989b27bb..c98414e192285b2607ee9fcb27f0e8e00db5fb26:/IkiWiki.pm?ds=sidebyside
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 7655dada5..0791e1e75 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -355,7 +355,7 @@ sub getsetup () {
},
wiki_file_prune_regexps => {
type => "internal",
- default => [qr/(^|\/)\.\.(\/|$)/, qr/^\./, qr/\/\./,
+ default => [qr/(^|\/)\.\.(\/|$)/, qr/^\//, qr/^\./, qr/\/\./,
qr/\.x?html?$/, qr/\.ikiwiki-new$/,
qr/(^|\/).svn\//, qr/.arch-ids\//, qr/{arch}\//,
qr/(^|\/)_MTN\//, qr/(^|\/)_darcs\//,
@@ -442,7 +442,6 @@ sub getsetup () {
},
gettime => {
type => "internal",
- default => 0,
description => "running in gettime mode",
safe => 0,
rebuild => 0,
@@ -1087,14 +1086,16 @@ sub htmllink ($$$;@) {
$bestlink=htmlpage($bestlink);
if (! $destsources{$bestlink}) {
- return $linktext unless length $config{cgiurl};
- return " "create",
- page => lc($link),
- from => $lpage
- ).
- "\" rel=\"nofollow\">?$linktext"
+ my $cgilink = "";
+ if (length $config{cgiurl}) {
+ $cgilink = " "create",
+ page => lc($link),
+ from => $lpage
+ )."\" rel=\"nofollow\">?";
+ }
+ return "$cgilink$linktext"
}
}
@@ -1512,6 +1513,7 @@ sub loadindex () {
open ($in, "<", "$config{wikistatedir}/indexdb") || return;
}
else {
+ $config{gettime}=1; # first build
return;
}
}
@@ -1843,15 +1845,8 @@ sub deptype (@) {
}
my $file_prune_regexp;
-sub file_pruned ($;$) {
+sub file_pruned ($) {
my $file=shift;
- if (@_) {
- require File::Spec;
- $file=File::Spec->canonpath($file);
- my $base=File::Spec->canonpath(shift);
- return if $file eq $base;
- $file =~ s#^\Q$base\E/+##;
- }
if (defined $config{include} && length $config{include}) {
return 0 if $file =~ m/$config{include}/;
@@ -2226,7 +2221,7 @@ sub merge_influences {
my $anded=shift;
if (! $anded || (($this || %{$this->[1]}) &&
- ($other || %{$other->[1]}))) {
+ ($other || %{$other->[1]}))) {
foreach my $influence (keys %{$other->[1]}) {
$this->[1]{$influence} |= $other->[1]{$influence};
}
@@ -2250,7 +2245,7 @@ sub derel ($$) {
if ($path =~ m!^\./!) {
$from=~s#/?[^/]+$## if defined $from;
$path=~s#^\./##;
- $path="$from/$path" if length $from;
+ $path="$from/$path" if defined $from && length $from;
}
return $path;