use vars qw{%config %links %oldlinks %oldpagemtime %pagectime %pagecase
%renderedfiles %pagesources %depends %hooks %forcerebuild};
+my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
+
sub defaultconfig () { #{{{
wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$)},
wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]]+)\]\]/,
- wiki_processor_regexp => qr/\[\[(\w+)\s+([^\]]*)\]\]/,
wiki_file_regexp => qr/(^[-[:alnum:]_.:\/+]+$)/,
verbose => 0,
syslog => 0,
srcdir => undef,
destdir => undef,
pingurl => [],
- templatedir => "/usr/share/ikiwiki/templates",
- underlaydir => "/usr/share/ikiwiki/basewiki",
+ templatedir => "$installdir/share/ikiwiki/templates",
+ underlaydir => "$installdir/share/ikiwiki/basewiki",
setup => undef,
adminuser => undef,
adminemail => undef,
plugin => [qw{mdwn inline htmlscrubber}],
timeformat => '%c',
locale => undef,
+ sslcookie => 0,
} #}}}
sub checkconfig () { #{{{
return $config{cgiurl}."?".join("&", map "$_=$params{$_}", keys %params);
} #}}}
-sub styleurl (;$) { #{{{
+sub baseurl (;$) { #{{{
my $page=shift;
- return "$config{url}/style.css" if ! defined $page;
+ return "$config{url}/" if ! defined $page;
$page=~s/[^\/]+$//;
$page=~s/[^\/]+\//..\//g;
- return $page."style.css";
+ return $page;
} #}}}
sub abs2rel ($$) { #{{{
indexlink => indexlink(),
wikiname => $config{wikiname},
pagebody => $pagebody,
- styleurl => styleurl(),
- baseurl => "$config{url}/",
+ baseurl => baseurl(),
);
return $template->output;
}#}}}
my $a=shift;
my $b=shift;
+ return $a if $a eq $b;
+
# Support for old-style GlobLists.
if (is_globlist($a)) {
$a=globlist_to_pagespec($a);