summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-05-05 20:06:50 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-05-05 20:06:50 -0400
commite77d0030d61b8b8ad44f296a003c8713766ffd51 (patch)
tree0b397fa4da20a5299f61b6aad6726a52cb250b60 /IkiWiki
parentad2f1805a9994440b68c6972b92a88a520ad98fc (diff)
inline: Minor optimisation.
When finding the pageurl, it was calling bestlink unnecessarily. Since at this point $page contains the full name of the page that is being inlined, there is no need to do bestlink's scan for it. This is only a minor optimisation, since bestlink is only called once per displayed, inlined page.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/inline.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 4507ace4d..27ea1c4a6 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -342,7 +342,7 @@ sub preprocess_inline (@) {
my $content=get_inline_content($page, $params{destpage});
$template->param(content => $content);
}
- $template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
+ $template->param(pageurl => urlto($page, $params{destpage}));
$template->param(inlinepage => $page);
$template->param(title => pagetitle(basename($page)));
$template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));