X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/75196e76b627709a6ecae3fa948e1fba7928a5ce..9efe370fa032791123e84a77d021eb89bbc7b91c:/IkiWiki.pm?ds=sidebyside

diff --git a/IkiWiki.pm b/IkiWiki.pm
index 97946bfcf..1102fa52a 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -544,7 +544,7 @@ sub checkconfig () {
 		error(gettext("Must specify url to wiki with --url when using --cgi"));
 	}
 
-	if (length $config{url}) {
+	if (defined $config{url} && length $config{url}) {
 		eval q{use URI};
 		my $baseurl = URI->new($config{url});
 
@@ -1140,7 +1140,7 @@ sub urlto ($;$$) {
 	my $absolute=shift;
 	
 	if (! length $to) {
-		return beautify_urlpath(baseurl($from)."index.$config{htmlext}");
+		$to = 'index';
 	}
 
 	if (! $destsources{$to}) {
@@ -1891,6 +1891,7 @@ sub template_depends ($$;@) {
 		},
 		loop_context_vars => 1,
 		die_on_bad_params => 0,
+		parent_global_vars => 1,
 		filename => $filename,
 		@_,
 		($untrusted ? (no_includes => 1) : ()),
@@ -2032,7 +2033,7 @@ sub rcs_recentchanges ($) {
 	$hooks{rcs}{rcs_recentchanges}{call}->(@_);
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
 	$hooks{rcs}{rcs_diff}{call}->(@_);
 }