X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f401d6617a11efcedda1c956b2ccea061a7540f..295a08394f1f962459d26db06624ff5d17bc3008:/IkiWiki/Plugin/relativedate.pm?ds=inline

diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
index c9280ef14..4ae0be861 100644
--- a/IkiWiki/Plugin/relativedate.pm
+++ b/IkiWiki/Plugin/relativedate.pm
@@ -27,19 +27,18 @@ sub format (@) {
         my %params=@_;
 
 	if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
-		# no </body> tag, probably in preview mode
-		$params{content}=include_javascript($params{page}, 1).$params{content};
+		# no <body> tag, probably in preview mode
+		$params{content}=include_javascript(undef).$params{content};
 	}
 	return $params{content};
 }
 
-sub include_javascript ($;$) {
-	my $page=shift;
-	my $absolute=shift;
+sub include_javascript ($) {
+	my $from=shift;
 	
-	return '<script src="'.urlto("ikiwiki/ikiwiki.js", $page, $absolute).
+	return '<script src="'.urlto("ikiwiki/ikiwiki.js", $from).
 		'" type="text/javascript" charset="utf-8"></script>'."\n".
-		'<script src="'.urlto("ikiwiki/relativedate.js", $page, $absolute).
+		'<script src="'.urlto("ikiwiki/relativedate.js", $from).
 		'" type="text/javascript" charset="utf-8"></script>';
 }