X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3d82d47e1896b8e64c1e22b09a05968fc481aebf..2da98a585e44bba0035b50040f59b5ed17d8f76c:/IkiWiki/Render.pm?ds=sidebyside diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index cb92d1ade..389063d46 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -63,7 +63,8 @@ sub genpage ($$) { #{{{ my $actions=0; if (length $config{cgiurl}) { - $template->param(editurl => cgiurl(do => "edit", page => $page)); + $template->param(editurl => cgiurl(do => "edit", page => $page)) + if IkiWiki->can("cgi_editpage"); $template->param(prefsurl => cgiurl(do => "prefs")); $actions++; } @@ -249,7 +250,7 @@ sub refresh () { #{{{ my $test=$config{srcdir}; while (length $test) { if (-l $test && ! $config{allow_symlinks_before_srcdir}) { - error("symlink found in srcdir path ($test) -- set allow_symlinks_before_srcdir to allow this"); + error(sprintf(gettext("symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to allow this"), $test)); } unless ($test=~s/\/+$//) { $test=dirname($test); @@ -278,7 +279,11 @@ sub refresh () { #{{{ else { $f=~s/^\Q$config{srcdir}\E\/?//; push @files, $f; - $exists{pagename($f)}=1; + my $pagename = pagename($f); + if ($exists{$pagename}) { + debug(sprintf(gettext("%s has multiple possible source pages"), $pagename)); + } + $exists{$pagename}=1; } } }, @@ -523,6 +528,7 @@ sub commandline_render () { #{{{ $content=linkify($page, $page, $content); $content=htmlize($page, $page, $type, $content); $pagemtime{$page}=(stat($srcfile))[9]; + $pagectime{$page}=$pagemtime{$page} if ! exists $pagectime{$page}; print genpage($page, $content); exit 0;