X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/21add7ffa87a5e622d18bdbb24c638c15bdb3800..b632d426422b7ff424eaae387cce60f9c1e7c448:/IkiWiki/Plugin/mirrorlist.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm index b726386f6..f54d94ad5 100644 --- a/IkiWiki/Plugin/mirrorlist.pm +++ b/IkiWiki/Plugin/mirrorlist.pm @@ -3,7 +3,7 @@ package IkiWiki::Plugin::mirrorlist; use warnings; use strict; -use IkiWiki 2.00; +use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "mirrorlist", call => \&getsetup); @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, mirrorlist => { type => "string", @@ -29,7 +30,8 @@ sub pagetemplate (@) { my %params=@_; my $template=$params{template}; - if ($template->query(name => "extrafooter")) { + if ($template->query(name => "extrafooter") && + keys %{$config{mirrorlist}} > 0) { my $value=$template->param("extrafooter"); $value.=mirrorlist($params{page}); $template->param(extrafooter => $value); @@ -38,7 +40,7 @@ sub pagetemplate (@) { sub mirrorlist ($) { my $page=shift; - return "

". + return ($config{html5} ? '

' : ''); } 1