summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-01 13:34:00 +0100
committerintrigeri <intrigeri@boum.org>2009-01-01 13:34:00 +0100
commit5c2f6cb8935f828274511ba5ca0d92b586632740 (patch)
tree0c72d1f73c0424236a98a1d51d192ee5e0e507ae /IkiWiki
parentc3af3840a295780e0f32df398f2dc7d34653e75e (diff)
parent8202cfe19e65867d7e41339944a8d7ca6daffa22 (diff)
Merge commit 'upstream/master' into prv/po
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm32
-rw-r--r--IkiWiki/Plugin/aggregate.pm8
-rw-r--r--IkiWiki/Plugin/amazon_s3.pm2
-rw-r--r--IkiWiki/Plugin/anonok.pm2
-rw-r--r--IkiWiki/Plugin/attachment.pm52
-rw-r--r--IkiWiki/Plugin/autoindex.pm2
-rw-r--r--IkiWiki/Plugin/brokenlinks.pm2
-rw-r--r--IkiWiki/Plugin/calendar.pm2
-rw-r--r--IkiWiki/Plugin/camelcase.pm2
-rw-r--r--IkiWiki/Plugin/color.pm2
-rw-r--r--IkiWiki/Plugin/comments.pm7
-rw-r--r--IkiWiki/Plugin/conditional.pm2
-rw-r--r--IkiWiki/Plugin/creole.pm2
-rw-r--r--IkiWiki/Plugin/cutpaste.pm2
-rw-r--r--IkiWiki/Plugin/ddate.pm2
-rw-r--r--IkiWiki/Plugin/editdiff.pm2
-rw-r--r--IkiWiki/Plugin/edittemplate.pm2
-rw-r--r--IkiWiki/Plugin/embed.pm2
-rw-r--r--IkiWiki/Plugin/external.pm2
-rw-r--r--IkiWiki/Plugin/favicon.pm2
-rw-r--r--IkiWiki/Plugin/filecheck.pm2
-rw-r--r--IkiWiki/Plugin/format.pm2
-rw-r--r--IkiWiki/Plugin/fortune.pm2
-rw-r--r--IkiWiki/Plugin/goodstuff.pm2
-rw-r--r--IkiWiki/Plugin/google.pm2
-rw-r--r--IkiWiki/Plugin/googlecalendar.pm57
-rw-r--r--IkiWiki/Plugin/graphviz.pm2
-rw-r--r--IkiWiki/Plugin/haiku.pm2
-rw-r--r--IkiWiki/Plugin/hnb.pm2
-rw-r--r--IkiWiki/Plugin/html.pm2
-rw-r--r--IkiWiki/Plugin/htmlbalance.pm5
-rw-r--r--IkiWiki/Plugin/htmlscrubber.pm2
-rw-r--r--IkiWiki/Plugin/htmltidy.pm2
-rw-r--r--IkiWiki/Plugin/httpauth.pm2
-rw-r--r--IkiWiki/Plugin/img.pm2
-rw-r--r--IkiWiki/Plugin/inline.pm2
-rw-r--r--IkiWiki/Plugin/link.pm2
-rw-r--r--IkiWiki/Plugin/linkmap.pm2
-rw-r--r--IkiWiki/Plugin/listdirectives.pm2
-rw-r--r--IkiWiki/Plugin/lockedit.pm60
-rw-r--r--IkiWiki/Plugin/map.pm2
-rw-r--r--IkiWiki/Plugin/mdwn.pm2
-rw-r--r--IkiWiki/Plugin/meta.pm2
-rw-r--r--IkiWiki/Plugin/mirrorlist.pm2
-rw-r--r--IkiWiki/Plugin/more.pm2
-rw-r--r--IkiWiki/Plugin/opendiscussion.pm2
-rw-r--r--IkiWiki/Plugin/openid.pm2
-rw-r--r--IkiWiki/Plugin/orphans.pm2
-rw-r--r--IkiWiki/Plugin/otl.pm2
-rw-r--r--IkiWiki/Plugin/pagecount.pm2
-rw-r--r--IkiWiki/Plugin/pagestats.pm2
-rw-r--r--IkiWiki/Plugin/pagetemplate.pm2
-rw-r--r--IkiWiki/Plugin/parentlinks.pm2
-rw-r--r--IkiWiki/Plugin/passwordauth.pm2
-rw-r--r--IkiWiki/Plugin/pingee.pm2
-rw-r--r--IkiWiki/Plugin/pinger.pm2
-rw-r--r--IkiWiki/Plugin/poll.pm2
-rw-r--r--IkiWiki/Plugin/polygen.pm2
-rw-r--r--IkiWiki/Plugin/postsparkline.pm2
-rw-r--r--IkiWiki/Plugin/prettydate.pm2
-rw-r--r--IkiWiki/Plugin/progress.pm2
-rw-r--r--IkiWiki/Plugin/rawhtml.pm2
-rw-r--r--IkiWiki/Plugin/recentchanges.pm2
-rw-r--r--IkiWiki/Plugin/recentchangesdiff.pm2
-rw-r--r--IkiWiki/Plugin/relativedate.pm2
-rw-r--r--IkiWiki/Plugin/remove.pm2
-rw-r--r--IkiWiki/Plugin/rename.pm2
-rw-r--r--IkiWiki/Plugin/search.pm2
-rw-r--r--IkiWiki/Plugin/shortcut.pm2
-rw-r--r--IkiWiki/Plugin/sidebar.pm2
-rw-r--r--IkiWiki/Plugin/signinedit.pm2
-rw-r--r--IkiWiki/Plugin/smiley.pm2
-rw-r--r--IkiWiki/Plugin/sparkline.pm2
-rw-r--r--IkiWiki/Plugin/table.pm2
-rw-r--r--IkiWiki/Plugin/tag.pm2
-rw-r--r--IkiWiki/Plugin/template.pm2
-rw-r--r--IkiWiki/Plugin/testpagespec.pm2
-rw-r--r--IkiWiki/Plugin/teximg.pm2
-rw-r--r--IkiWiki/Plugin/textile.pm2
-rw-r--r--IkiWiki/Plugin/toc.pm2
-rw-r--r--IkiWiki/Plugin/toggle.pm2
-rw-r--r--IkiWiki/Plugin/txt.pm2
-rw-r--r--IkiWiki/Plugin/typography.pm2
-rw-r--r--IkiWiki/Plugin/version.pm2
-rw-r--r--IkiWiki/Plugin/websetup.pm4
-rw-r--r--IkiWiki/Plugin/wikitext.pm2
-rw-r--r--IkiWiki/UserInfo.pm20
87 files changed, 97 insertions, 304 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 81cb42d13..3fadc462e 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -203,25 +203,9 @@ sub cgi_prefs ($$) {
my $user_name=$session->param("name");
- # XXX deprecated, should be removed eventually
- $form->field(name => "banned_users", size => 50, fieldset => "admin");
- if (! is_admin($user_name)) {
- $form->field(name => "banned_users", type => "hidden");
- }
if (! $form->submitted) {
$form->field(name => "email", force => 1,
value => userinfo_get($user_name, "email"));
- if (is_admin($user_name)) {
- my $value=join(" ", get_banned_users());
- if (length $value) {
- $form->field(name => "banned_users", force => 1,
- value => join(" ", get_banned_users()),
- comment => "deprecated; please move to banned_users in setup file");
- }
- else {
- $form->field(name => "banned_users", type => "hidden");
- }
- }
}
if ($form->submitted eq 'Logout') {
@@ -239,17 +223,6 @@ sub cgi_prefs ($$) {
error("failed to set email");
}
- # XXX deprecated, should be removed eventually
- if (is_admin($user_name)) {
- set_banned_users(grep { ! is_admin($_) }
- split(' ',
- $form->field("banned_users"))) ||
- error("failed saving changes");
- if (! length $form->field("banned_users")) {
- $form->field(name => "banned_users", type => "hidden");
- }
- }
-
$form->text(gettext("Preferences saved."));
}
@@ -262,10 +235,7 @@ sub check_banned ($$) {
my $name=$session->param("name");
if (defined $name) {
- # XXX banned in userinfo is deprecated, should be removed
- # eventually, and only banned_users be checked.
- if (userinfo_get($session->param("name"), "banned") ||
- grep { $name eq $_ } @{$config{banned_users}}) {
+ if (grep { $name eq $_ } @{$config{banned_users}}) {
print $q->header(-status => "403 Forbidden");
$session->delete();
print gettext("You are banned.");
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 97dd036f6..c667ee2a9 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::aggregate;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Parser;
use HTML::Tagset;
use HTML::Entities;
@@ -46,7 +46,7 @@ sub getsetup () {
},
aggregateinternal => {
type => "boolean",
- example => 0,
+ example => 1,
description => "enable aggregation to internal pages?",
safe => 0, # enabling needs manual transition
rebuild => 0,
@@ -61,6 +61,10 @@ sub getsetup () {
}
sub checkconfig () {
+ if (! defined $config{aggregateinternal}) {
+ $config{aggregateinternal}=1;
+ }
+
if ($config{aggregate} && ! ($config{post_commit} &&
IkiWiki::commit_hook_enabled())) {
launchaggregation();
diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm
index 93c10b629..10bf358e4 100644
--- a/IkiWiki/Plugin/amazon_s3.pm
+++ b/IkiWiki/Plugin/amazon_s3.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::amazon_s3;
use warnings;
no warnings 'redefine';
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use IkiWiki::Render;
use Net::Amazon::S3;
diff --git a/IkiWiki/Plugin/anonok.pm b/IkiWiki/Plugin/anonok.pm
index 1cbdfe4e5..243b98920 100644
--- a/IkiWiki/Plugin/anonok.pm
+++ b/IkiWiki/Plugin/anonok.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::anonok;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "anonok", call => \&getsetup);
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index 87da6cd4e..087c315a9 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::attachment;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
add_underlay("javascript");
@@ -61,23 +61,6 @@ sub check_canattach ($$;$) {
);
}
- # XXX deprecated, should be removed eventually
- if ($allowed) {
- foreach my $admin (@{$config{adminuser}}) {
- my $allowed_attachments=IkiWiki::userinfo_get($admin, "allowed_attachments");
- if (defined $allowed_attachments &&
- length $allowed_attachments) {
- $allowed=pagespec_match($dest,
- $allowed_attachments,
- file => $file,
- user => $session->param("name"),
- ip => $ENV{REMOTE_ADDR},
- );
- last if $allowed;
- }
- }
- }
-
if (! $allowed) {
error(gettext("prohibited by allowed_attachments")." ($allowed)");
}
@@ -120,39 +103,6 @@ sub formbuilder_setup (@) {
$form->tmpl_param("attachments-class" => "toggleable-open");
}
}
- elsif ($form->title eq "preferences") {
- # XXX deprecated, should remove eventually
- my $session=$params{session};
- my $user_name=$session->param("name");
-
- $form->field(name => "allowed_attachments", size => 50,
- fieldset => "admin",
- comment => "deprecated; please move to allowed_attachments in setup file",
- );
- if (! IkiWiki::is_admin($user_name)) {
- $form->field(name => "allowed_attachments", type => "hidden");
- }
- if (! $form->submitted) {
- my $value=IkiWiki::userinfo_get($user_name, "allowed_attachments");
- if (length $value) {
- $form->field(name => "allowed_attachments", force => 1,
- value => IkiWiki::userinfo_get($user_name, "allowed_attachments"));
- }
- else {
- $form->field(name => "allowed_attachments", type => "hidden");
- }
- }
- if ($form->submitted && $form->submitted eq 'Save Preferences') {
- if (defined $form->field("allowed_attachments")) {
- IkiWiki::userinfo_set($user_name, "allowed_attachments",
- $form->field("allowed_attachments")) ||
- error("failed to set allowed_attachments");
- if (! length $form->field("allowed_attachments")) {
- $form->field(name => "allowed_attachments", type => "hidden");
- }
- }
- }
- }
}
sub formbuilder (@) {
diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm
index bb08091ae..555856b11 100644
--- a/IkiWiki/Plugin/autoindex.pm
+++ b/IkiWiki/Plugin/autoindex.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::autoindex;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use Encode;
sub import {
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index 1c52099bf..bf0d7560d 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::brokenlinks;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "brokenlinks", call => \&getsetup);
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index 88303fc44..d473c8348 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -20,7 +20,7 @@ package IkiWiki::Plugin::calendar;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use Time::Local;
use POSIX;
diff --git a/IkiWiki/Plugin/camelcase.pm b/IkiWiki/Plugin/camelcase.pm
index f9ee30fe2..74a8397d7 100644
--- a/IkiWiki/Plugin/camelcase.pm
+++ b/IkiWiki/Plugin/camelcase.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::camelcase;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
# This regexp is based on the one in Text::WikiFormat.
my $link_regexp=qr{
diff --git a/IkiWiki/Plugin/color.pm b/IkiWiki/Plugin/color.pm
index 53d8389d2..20505893b 100644
--- a/IkiWiki/Plugin/color.pm
+++ b/IkiWiki/Plugin/color.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::color;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "preprocess", id => "color", call => \&preprocess);
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index d8318d3e3..1c10417c3 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -7,7 +7,7 @@ package IkiWiki::Plugin::comments;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use Encode;
use POSIX qw(strftime);
@@ -506,7 +506,10 @@ sub sessioncgi ($$) {
error($conflict) if defined $conflict;
# Jump to the new comment on the page.
- IkiWiki::redirect($cgi, urlto($page, undef, 1)."#$location");
+ # The trailing question mark tries to avoid broken
+ # caches and get the most recent version of the page.
+ IkiWiki::redirect($cgi, urlto($page, undef, 1)."#$location?updated");
+
}
else {
IkiWiki::showform ($form, \@buttons, $session, $cgi,
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
index 66253e07d..4f3577b34 100644
--- a/IkiWiki/Plugin/conditional.pm
+++ b/IkiWiki/Plugin/conditional.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::conditional;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use UNIVERSAL;
sub import {
diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm
index 3c46a48df..425e71043 100644
--- a/IkiWiki/Plugin/creole.pm
+++ b/IkiWiki/Plugin/creole.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::creole;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "creole", call => \&getsetup);
diff --git a/IkiWiki/Plugin/cutpaste.pm b/IkiWiki/Plugin/cutpaste.pm
index e579c1ea2..417442f34 100644
--- a/IkiWiki/Plugin/cutpaste.pm
+++ b/IkiWiki/Plugin/cutpaste.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::cutpaste;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %savedtext;
diff --git a/IkiWiki/Plugin/ddate.pm b/IkiWiki/Plugin/ddate.pm
index 3470640dc..bb77ce59f 100644
--- a/IkiWiki/Plugin/ddate.pm
+++ b/IkiWiki/Plugin/ddate.pm
@@ -2,7 +2,7 @@
# Discordian date support fnord ikiwiki.
package IkiWiki::Plugin::ddate;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
no warnings;
sub import {
diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm
index 068b83b3c..7df6a9ffb 100644
--- a/IkiWiki/Plugin/editdiff.pm
+++ b/IkiWiki/Plugin/editdiff.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::editdiff;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Entities;
use IPC::Open2;
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index 7c0e7c2f8..0bafc95d0 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::edittemplate;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Template;
use Encode;
diff --git a/IkiWiki/Plugin/embed.pm b/IkiWiki/Plugin/embed.pm
index 664c95763..a7d38358f 100644
--- a/IkiWiki/Plugin/embed.pm
+++ b/IkiWiki/Plugin/embed.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::embed;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my $attribr=qr/[^<>"]+/;
diff --git a/IkiWiki/Plugin/external.pm b/IkiWiki/Plugin/external.pm
index 2d540143f..066f15cf1 100644
--- a/IkiWiki/Plugin/external.pm
+++ b/IkiWiki/Plugin/external.pm
@@ -6,7 +6,7 @@ package IkiWiki::Plugin::external;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use RPC::XML;
use RPC::XML::Parser;
use IPC::Open2;
diff --git a/IkiWiki/Plugin/favicon.pm b/IkiWiki/Plugin/favicon.pm
index 68359a4aa..6060914c5 100644
--- a/IkiWiki/Plugin/favicon.pm
+++ b/IkiWiki/Plugin/favicon.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::favicon;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "favicon", call => \&getsetup);
diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm
index 5040a185c..8575ee108 100644
--- a/IkiWiki/Plugin/filecheck.pm
+++ b/IkiWiki/Plugin/filecheck.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::filecheck;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %units=( #{{{ # size in bytes
B => 1,
diff --git a/IkiWiki/Plugin/format.pm b/IkiWiki/Plugin/format.pm
index b4d3a3c5f..bbe3aa9fe 100644
--- a/IkiWiki/Plugin/format.pm
+++ b/IkiWiki/Plugin/format.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::format;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "preprocess", id => "format", call => \&preprocess);
diff --git a/IkiWiki/Plugin/fortune.pm b/IkiWiki/Plugin/fortune.pm
index 6a12f28fd..17e57dea1 100644
--- a/IkiWiki/Plugin/fortune.pm
+++ b/IkiWiki/Plugin/fortune.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::fortune;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "fortune", call => \&getsetup);
diff --git a/IkiWiki/Plugin/goodstuff.pm b/IkiWiki/Plugin/goodstuff.pm
index 92bc8200a..46f2380cf 100644
--- a/IkiWiki/Plugin/goodstuff.pm
+++ b/IkiWiki/Plugin/goodstuff.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::goodstuff;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my @bundle=qw{
brokenlinks
diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm
index 5394c5a6f..4bba5775c 100644
--- a/IkiWiki/Plugin/google.pm
+++ b/IkiWiki/Plugin/google.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::google;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use URI;
my $host;
diff --git a/IkiWiki/Plugin/googlecalendar.pm b/IkiWiki/Plugin/googlecalendar.pm
deleted file mode 100644
index 24c2e1527..000000000
--- a/IkiWiki/Plugin/googlecalendar.pm
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/perl
-package IkiWiki::Plugin::googlecalendar;
-
-use warnings;
-use strict;
-use IkiWiki 2.00;
-
-print STDERR "warning: the googlecalendar plugin is deprecated and will be removed in ikiwiki 3.0 (use the embed plugin instead)\n";
-
-sub import {
- hook(type => "getsetup", id => "googlecalendar",
- call => \&getsetup);
- hook(type => "preprocess", id => "googlecalendar",
- call => \&preprocess);
- hook(type => "format", id => "googlecalendar",
- call => \&format);
-}
-
-sub getsetup () {
- return
- plugin => {
- safe => 1,
- rebuild => undef,
- },
-}
-
-sub preprocess (@) {
- my %params=@_;
-
- # Parse the html, looking for the url to embed for the calendar.
- # Avoid XSS attacks..
- my ($url)=$params{html}=~m#iframe\s+src="http://www\.google\.com/calendar/embed\?([^"<>]+)"#;
- if (! defined $url || ! length $url) {
- error gettext("failed to find url in html")
- }
- my ($height)=$params{html}=~m#height="(\d+)"#;
- my ($width)=$params{html}=~m#width="(\d+)"#;
-
- return "<div class=\"googlecalendar\" src=\"$url\" height=\"$height\" width=\"$width\"></div>";
-}
-
-sub format (@) {
- my %params=@_;
-
- $params{content}=~s/<div class=\"googlecalendar" src="([^"]+)" height="([^"]+)" width="([^"]+)"><\/div>/gencal($1,$2,$3)/eg;
-
- return $params{content};
-}
-
-sub gencal ($$$) {
- my $url=shift;
- my $height=shift;
- my $width=shift;
- return qq{<iframe src="http://www.google.com/calendar/embed?$url" style=" border-width:0 " width="$width" frameborder="0" height="$height"></iframe>};
-}
-
-1
diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm
index 23631da30..b43e96a73 100644
--- a/IkiWiki/Plugin/graphviz.pm
+++ b/IkiWiki/Plugin/graphviz.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::graphviz;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use IPC::Open2;
sub import {
diff --git a/IkiWiki/Plugin/haiku.pm b/IkiWiki/Plugin/haiku.pm
index fe68c6eec..5a062a276 100644
--- a/IkiWiki/Plugin/haiku.pm
+++ b/IkiWiki/Plugin/haiku.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::haiku;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "haiku", call => \&getsetup);
diff --git a/IkiWiki/Plugin/hnb.pm b/IkiWiki/Plugin/hnb.pm
index d5b5ce3b4..bd2177a06 100644
--- a/IkiWiki/Plugin/hnb.pm
+++ b/IkiWiki/Plugin/hnb.pm
@@ -10,7 +10,7 @@ package IkiWiki::Plugin::hnb;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use File::Temp qw(:mktemp);
sub import {
diff --git a/IkiWiki/Plugin/html.pm b/IkiWiki/Plugin/html.pm
index 9b9547cca..a7d5e8ce9 100644
--- a/IkiWiki/Plugin/html.pm
+++ b/IkiWiki/Plugin/html.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::html;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "html", call => \&getsetup);
diff --git a/IkiWiki/Plugin/htmlbalance.pm b/IkiWiki/Plugin/htmlbalance.pm
index acbe40a5d..26f8e494b 100644
--- a/IkiWiki/Plugin/htmlbalance.pm
+++ b/IkiWiki/Plugin/htmlbalance.pm
@@ -9,8 +9,7 @@ package IkiWiki::Plugin::htmlbalance;
use warnings;
use strict;
-use IkiWiki 2.00;
-use HTML::TreeBuilder;
+use IkiWiki 3.00;
use HTML::Entities;
sub import {
@@ -30,6 +29,8 @@ sub sanitize (@) {
my %params=@_;
my $ret = '';
+ eval q{use HTML::TreeBuilder};
+ error $@ if $@;
my $tree = HTML::TreeBuilder->new();
$tree->ignore_unknown(0);
$tree->ignore_ignorable_whitespace(0);
diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm
index 823b3d806..a249cdf7a 100644
--- a/IkiWiki/Plugin/htmlscrubber.pm
+++ b/IkiWiki/Plugin/htmlscrubber.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::htmlscrubber;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
# This regexp matches urls that are in a known safe scheme.
# Feel free to use it from other plugins.
diff --git a/IkiWiki/Plugin/htmltidy.pm b/IkiWiki/Plugin/htmltidy.pm
index 02438ebef..6f3379ef4 100644
--- a/IkiWiki/Plugin/htmltidy.pm
+++ b/IkiWiki/Plugin/htmltidy.pm
@@ -9,7 +9,7 @@ package IkiWiki::Plugin::htmltidy;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use IPC::Open2;
sub import {
diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm
index 39edff615..1816c9d74 100644
--- a/IkiWiki/Plugin/httpauth.pm
+++ b/IkiWiki/Plugin/httpauth.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::httpauth;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "httpauth", call => \&getsetup);
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index 395890c0e..5c580c03c 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::img;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %imgdefaults;
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index e1e57e43e..d8b5f8548 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::inline;
use warnings;
use strict;
use Encode;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use URI;
my %knownfeeds;
diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm
index e9623035b..48691d973 100644
--- a/IkiWiki/Plugin/link.pm
+++ b/IkiWiki/Plugin/link.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::link;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my $link_regexp;
diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm
index cb9f3ef41..941ed5f36 100644
--- a/IkiWiki/Plugin/linkmap.pm
+++ b/IkiWiki/Plugin/linkmap.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::linkmap;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use IPC::Open2;
sub import {
diff --git a/IkiWiki/Plugin/listdirectives.pm b/IkiWiki/Plugin/listdirectives.pm
index be82b0495..d2cebca34 100644
--- a/IkiWiki/Plugin/listdirectives.pm
+++ b/IkiWiki/Plugin/listdirectives.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::listdirectives;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
add_underlay("directives");
diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm
index 31a9e70cd..0fa329251 100644
--- a/IkiWiki/Plugin/lockedit.pm
+++ b/IkiWiki/Plugin/lockedit.pm
@@ -3,13 +3,11 @@ package IkiWiki::Plugin::lockedit;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "lockedit", call => \&getsetup);
hook(type => "canedit", id => "lockedit", call => \&canedit);
- hook(type => "formbuilder_setup", id => "lockedit",
- call => \&formbuilder_setup);
}
sub getsetup () {
@@ -52,63 +50,7 @@ sub canedit ($$) {
}
}
- # XXX deprecated, should be removed eventually
- foreach my $admin (@{$config{adminuser}}) {
- if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"),
- user => $session->param("name"),
- ip => $ENV{REMOTE_ADDR},
- )) {
- if (! defined $user ||
- ! IkiWiki::userinfo_get($session->param("name"), "regdate")) {
- return sub { IkiWiki::needsignin($cgi, $session) };
- }
- else {
- return sprintf(gettext("%s is locked and cannot be edited"),
- htmllink("", "", $page, noimageinline => 1));
- }
- }
- }
-
return undef;
}
-sub formbuilder_setup (@) {
- my %params=@_;
-
- # XXX deprecated, should be removed eventually
- my $form=$params{form};
- if ($form->title eq "preferences") {
- my $session=$params{session};
- my $cgi=$params{cgi};
- my $user_name=$session->param("name");
-
- $form->field(name => "locked_pages", size => 50,
- fieldset => "admin",
- comment => "deprecated; please move to locked_pages in setup file"
- );
- if (! IkiWiki::is_admin($user_name)) {
- $form->field(name => "locked_pages", type => "hidden");
- }
- if (! $form->submitted) {
- my $value=IkiWiki::userinfo_get($user_name, "locked_pages");
- if (length $value) {
- $form->field(name => "locked_pages", force => 1, value => $value);
- }
- else {
- $form->field(name => "locked_pages", type => "hidden");
- }
- }
- if ($form->submitted && $form->submitted eq 'Save Preferences') {
- if (defined $form->field("locked_pages")) {
- IkiWiki::userinfo_set($user_name, "locked_pages",
- $form->field("locked_pages")) ||
- error("failed to set locked_pages");
- if (! length $form->field("locked_pages")) {
- $form->field(name => "locked_pages", type => "hidden");
- }
- }
- }
- }
-}
-
1
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
index af14ef5de..328493116 100644
--- a/IkiWiki/Plugin/map.pm
+++ b/IkiWiki/Plugin/map.pm
@@ -9,7 +9,7 @@ package IkiWiki::Plugin::map;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "map", call => \&getsetup);
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm
index 0d5f398a0..0e134c822 100644
--- a/IkiWiki/Plugin/mdwn.pm
+++ b/IkiWiki/Plugin/mdwn.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::mdwn;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "mdwn", call => \&getsetup);
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 8c214139f..15bb29b3f 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::meta;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %metaheaders;
diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm
index b726386f6..737dcf767 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);
diff --git a/IkiWiki/Plugin/more.pm b/IkiWiki/Plugin/more.pm
index f1216ad3d..77d5fb077 100644
--- a/IkiWiki/Plugin/more.pm
+++ b/IkiWiki/Plugin/more.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::more;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my $linktext = gettext("more");
diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm
index 95220d7b3..3da01efee 100644
--- a/IkiWiki/Plugin/opendiscussion.pm
+++ b/IkiWiki/Plugin/opendiscussion.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::opendiscussion;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "opendiscussion", call => \&getsetup);
diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm
index 574c42f0e..5424c57e2 100644
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::openid;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getopt", id => "openid", call => \&getopt);
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index 8e9ab0ff4..605e6e43a 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::orphans;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "orphans", call => \&getsetup);
diff --git a/IkiWiki/Plugin/otl.pm b/IkiWiki/Plugin/otl.pm
index 280b19db0..c68fcbbe3 100644
--- a/IkiWiki/Plugin/otl.pm
+++ b/IkiWiki/Plugin/otl.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::otl;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use open qw{:utf8 :std};
sub import {
diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm
index c08ab3931..a143f24d0 100644
--- a/IkiWiki/Plugin/pagecount.pm
+++ b/IkiWiki/Plugin/pagecount.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagecount;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "pagecount", call => \&getsetup);
diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm
index e20d0dac6..dbe69539d 100644
--- a/IkiWiki/Plugin/pagestats.pm
+++ b/IkiWiki/Plugin/pagestats.pm
@@ -12,7 +12,7 @@ package IkiWiki::Plugin::pagestats;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
# Names of the HTML classes to use for the tag cloud
our @classes = ('smallestPC', 'smallPC', 'normalPC', 'bigPC', 'biggestPC' );
diff --git a/IkiWiki/Plugin/pagetemplate.pm b/IkiWiki/Plugin/pagetemplate.pm
index 60db8b327..1d8a84ca7 100644
--- a/IkiWiki/Plugin/pagetemplate.pm
+++ b/IkiWiki/Plugin/pagetemplate.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagetemplate;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %templates;
diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm
index 866201e5e..1ee69cbff 100644
--- a/IkiWiki/Plugin/parentlinks.pm
+++ b/IkiWiki/Plugin/parentlinks.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::parentlinks;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks);
diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm
index 7176f0c33..90e2ca564 100644
--- a/IkiWiki/Plugin/passwordauth.pm
+++ b/IkiWiki/Plugin/passwordauth.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::passwordauth;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup);
diff --git a/IkiWiki/Plugin/pingee.pm b/IkiWiki/Plugin/pingee.pm
index fcbe6b57b..f5386d0ca 100644
--- a/IkiWiki/Plugin/pingee.pm
+++ b/IkiWiki/Plugin/pingee.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::pingee;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "pingee", call => \&getsetup);
diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm
index 7b4dce586..4a8088661 100644
--- a/IkiWiki/Plugin/pinger.pm
+++ b/IkiWiki/Plugin/pinger.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::pinger;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %pages;
my $pinged=0;
diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm
index 5ac5b818d..bc1e3501e 100644
--- a/IkiWiki/Plugin/poll.pm
+++ b/IkiWiki/Plugin/poll.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::poll;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use Encode;
sub import {
diff --git a/IkiWiki/Plugin/polygen.pm b/IkiWiki/Plugin/polygen.pm
index a32003778..bc21d71c7 100644
--- a/IkiWiki/Plugin/polygen.pm
+++ b/IkiWiki/Plugin/polygen.pm
@@ -7,7 +7,7 @@ package IkiWiki::Plugin::polygen;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use File::Find;
sub import {
diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm
index 1753e4cf9..ba43561fb 100644
--- a/IkiWiki/Plugin/postsparkline.pm
+++ b/IkiWiki/Plugin/postsparkline.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::postsparkline;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
IkiWiki::loadplugin('sparkline');
diff --git a/IkiWiki/Plugin/prettydate.pm b/IkiWiki/Plugin/prettydate.pm
index 501f17f5d..e155dd39b 100644
--- a/IkiWiki/Plugin/prettydate.pm
+++ b/IkiWiki/Plugin/prettydate.pm
@@ -1,6 +1,6 @@
#!/usr/bin/perl
package IkiWiki::Plugin::prettydate;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use warnings;
no warnings 'redefine';
use strict;
diff --git a/IkiWiki/Plugin/progress.pm b/IkiWiki/Plugin/progress.pm
index 75da16d16..76d994acc 100644
--- a/IkiWiki/Plugin/progress.pm
+++ b/IkiWiki/Plugin/progress.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::progress;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my $percentage_pattern = qr/[0-9]+\%?/; # pattern to validate percentages
diff --git a/IkiWiki/Plugin/rawhtml.pm b/IkiWiki/Plugin/rawhtml.pm
index 73093439d..ad8a610c1 100644
--- a/IkiWiki/Plugin/rawhtml.pm
+++ b/IkiWiki/Plugin/rawhtml.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::rawhtml;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "rawhtml", call => \&getsetup);
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 7071596e6..ef108b3f0 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::recentchanges;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use Encode;
use HTML::Entities;
diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm
index 4dea9c26b..e3ba9b8d8 100644
--- a/IkiWiki/Plugin/recentchangesdiff.pm
+++ b/IkiWiki/Plugin/recentchangesdiff.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::recentchangesdiff;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Entities;
my $maxlines=200;
diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
index e5fa8e1a5..3e33cd5c3 100644
--- a/IkiWiki/Plugin/relativedate.pm
+++ b/IkiWiki/Plugin/relativedate.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::relativedate;
use warnings;
no warnings 'redefine';
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use POSIX;
use Encode;
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
index 781501662..21989aff3 100644
--- a/IkiWiki/Plugin/remove.pm
+++ b/IkiWiki/Plugin/remove.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::remove;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "remove", call => \&getsetup);
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index 227f59bfa..25ddd2d65 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::rename;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "rename", call => \&getsetup);
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index cc2130ad5..d79e3170e 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::search;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "search", call => \&getsetup);
diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm
index 33d158d3e..0e7cbd4d1 100644
--- a/IkiWiki/Plugin/shortcut.pm
+++ b/IkiWiki/Plugin/shortcut.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::shortcut;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "shortcut", call => \&getsetup);
diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm
index 746fa93bb..41812e1c1 100644
--- a/IkiWiki/Plugin/sidebar.pm
+++ b/IkiWiki/Plugin/sidebar.pm
@@ -6,7 +6,7 @@ package IkiWiki::Plugin::sidebar;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "sidebar", call => \&getsetup);
diff --git a/IkiWiki/Plugin/signinedit.pm b/IkiWiki/Plugin/signinedit.pm
index 321c93ed5..032a0034c 100644
--- a/IkiWiki/Plugin/signinedit.pm
+++ b/IkiWiki/Plugin/signinedit.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::signinedit;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "signinedit", call => \&getsetup);
diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm
index 70b8cef74..1697a37c1 100644
--- a/IkiWiki/Plugin/smiley.pm
+++ b/IkiWiki/Plugin/smiley.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::smiley;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %smileys;
my $smiley_regexp;
diff --git a/IkiWiki/Plugin/sparkline.pm b/IkiWiki/Plugin/sparkline.pm
index dca755c63..1ed65e5b7 100644
--- a/IkiWiki/Plugin/sparkline.pm
+++ b/IkiWiki/Plugin/sparkline.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::sparkline;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use IPC::Open2;
my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/;
diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm
index b6f53f607..479f3d745 100644
--- a/IkiWiki/Plugin/table.pm
+++ b/IkiWiki/Plugin/table.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::table;
use warnings;
use strict;
use Encode;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "table", call => \&getsetup);
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm
index ecc77cbb1..d43910910 100644
--- a/IkiWiki/Plugin/tag.pm
+++ b/IkiWiki/Plugin/tag.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::tag;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my %tags;
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index 1b7eb91bf..57bff20ff 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::template;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Template;
use Encode;
diff --git a/IkiWiki/Plugin/testpagespec.pm b/IkiWiki/Plugin/testpagespec.pm
index a6e94dbbb..440fca33b 100644
--- a/IkiWiki/Plugin/testpagespec.pm
+++ b/IkiWiki/Plugin/testpagespec.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::testpagespec;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "testpagespec", call => \&getsetup);
diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm
index 57b23147e..dba5372b5 100644
--- a/IkiWiki/Plugin/teximg.pm
+++ b/IkiWiki/Plugin/teximg.pm
@@ -8,7 +8,7 @@ use strict;
use Digest::MD5 qw(md5_hex);
use File::Temp qw(tempdir);
use HTML::Entities;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my $default_prefix = <<EOPREFIX;
\\documentclass{article}
diff --git a/IkiWiki/Plugin/textile.pm b/IkiWiki/Plugin/textile.pm
index d1b927b74..b604aa3c5 100644
--- a/IkiWiki/Plugin/textile.pm
+++ b/IkiWiki/Plugin/textile.pm
@@ -6,7 +6,7 @@ package IkiWiki::Plugin::textile;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use Encode;
sub import {
diff --git a/IkiWiki/Plugin/toc.pm b/IkiWiki/Plugin/toc.pm
index 460837b1d..a585564e7 100644
--- a/IkiWiki/Plugin/toc.pm
+++ b/IkiWiki/Plugin/toc.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::toc;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Parser;
sub import {
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index 967b07fcc..aae8cdf84 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::toggle;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
add_underlay("javascript");
diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm
index d65bb2036..8599bdc8e 100644
--- a/IkiWiki/Plugin/txt.pm
+++ b/IkiWiki/Plugin/txt.pm
@@ -8,7 +8,7 @@ package IkiWiki::Plugin::txt;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use HTML::Entities;
my $findurl=0;
diff --git a/IkiWiki/Plugin/typography.pm b/IkiWiki/Plugin/typography.pm
index e395b2143..f62be82bb 100644
--- a/IkiWiki/Plugin/typography.pm
+++ b/IkiWiki/Plugin/typography.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::typography;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getopt", id => "typography", call => \&getopt);
diff --git a/IkiWiki/Plugin/version.pm b/IkiWiki/Plugin/version.pm
index 3526dafde..587cd55fa 100644
--- a/IkiWiki/Plugin/version.pm
+++ b/IkiWiki/Plugin/version.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::version;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "version", call => \&getsetup);
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm
index 66dacfde3..95d044c08 100644
--- a/IkiWiki/Plugin/websetup.pm
+++ b/IkiWiki/Plugin/websetup.pm
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::websetup;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "websetup", call => \&getsetup);
@@ -139,7 +139,7 @@ sub showfields ($$$@) {
my $value=$config{$key};
if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) {
- $value=[@{$value}, "", ""]; # blank items for expansion
+ $value=[(ref $value eq 'ARRAY' ? @{$value} : ""), "", ""]; # blank items for expansion
}
if ($info{type} eq "string") {
diff --git a/IkiWiki/Plugin/wikitext.pm b/IkiWiki/Plugin/wikitext.pm
index 50571e524..accb03bbe 100644
--- a/IkiWiki/Plugin/wikitext.pm
+++ b/IkiWiki/Plugin/wikitext.pm
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::wikitext;
use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "wiki", call => \&getsetup);
diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm
index 3423dc923..0bf100a95 100644
--- a/IkiWiki/UserInfo.pm
+++ b/IkiWiki/UserInfo.pm
@@ -74,24 +74,4 @@ sub is_admin ($) {
return grep { $_ eq $user_name } @{$config{adminuser}};
}
-# XXX deprecated, should be removed eventually
-sub get_banned_users () {
- my @ret;
- my $userinfo=userinfo_retrieve();
- foreach my $user (keys %{$userinfo}) {
- push @ret, $user if $userinfo->{$user}->{banned};
- }
- return @ret;
-}
-
-# XXX deprecated, should be removed eventually
-sub set_banned_users (@) {
- my %banned=map { $_ => 1 } @_;
- my $userinfo=userinfo_retrieve();
- foreach my $user (keys %{$userinfo}) {
- $userinfo->{$user}->{banned} = $banned{$user};
- }
- return userinfo_store($userinfo);
-}
-
1