]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' into next
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 26 Dec 2008 19:07:25 +0000 (14:07 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 26 Dec 2008 19:07:25 +0000 (14:07 -0500)
109 files changed:
IkiWiki.pm
IkiWiki/CGI.pm
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/amazon_s3.pm
IkiWiki/Plugin/anonok.pm
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/autoindex.pm
IkiWiki/Plugin/brokenlinks.pm
IkiWiki/Plugin/calendar.pm
IkiWiki/Plugin/camelcase.pm
IkiWiki/Plugin/color.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/conditional.pm
IkiWiki/Plugin/creole.pm
IkiWiki/Plugin/cutpaste.pm
IkiWiki/Plugin/ddate.pm
IkiWiki/Plugin/editdiff.pm
IkiWiki/Plugin/edittemplate.pm
IkiWiki/Plugin/embed.pm
IkiWiki/Plugin/external.pm
IkiWiki/Plugin/favicon.pm
IkiWiki/Plugin/filecheck.pm
IkiWiki/Plugin/format.pm
IkiWiki/Plugin/fortune.pm
IkiWiki/Plugin/goodstuff.pm
IkiWiki/Plugin/google.pm
IkiWiki/Plugin/googlecalendar.pm [deleted file]
IkiWiki/Plugin/graphviz.pm
IkiWiki/Plugin/haiku.pm
IkiWiki/Plugin/hnb.pm
IkiWiki/Plugin/html.pm
IkiWiki/Plugin/htmlbalance.pm
IkiWiki/Plugin/htmlscrubber.pm
IkiWiki/Plugin/htmltidy.pm
IkiWiki/Plugin/httpauth.pm
IkiWiki/Plugin/img.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/link.pm
IkiWiki/Plugin/linkmap.pm
IkiWiki/Plugin/listdirectives.pm
IkiWiki/Plugin/lockedit.pm
IkiWiki/Plugin/map.pm
IkiWiki/Plugin/mdwn.pm
IkiWiki/Plugin/meta.pm
IkiWiki/Plugin/mirrorlist.pm
IkiWiki/Plugin/more.pm
IkiWiki/Plugin/opendiscussion.pm
IkiWiki/Plugin/openid.pm
IkiWiki/Plugin/orphans.pm
IkiWiki/Plugin/otl.pm
IkiWiki/Plugin/pagecount.pm
IkiWiki/Plugin/pagestats.pm
IkiWiki/Plugin/pagetemplate.pm
IkiWiki/Plugin/parentlinks.pm
IkiWiki/Plugin/passwordauth.pm
IkiWiki/Plugin/pingee.pm
IkiWiki/Plugin/pinger.pm
IkiWiki/Plugin/poll.pm
IkiWiki/Plugin/polygen.pm
IkiWiki/Plugin/postsparkline.pm
IkiWiki/Plugin/prettydate.pm
IkiWiki/Plugin/progress.pm
IkiWiki/Plugin/rawhtml.pm
IkiWiki/Plugin/recentchanges.pm
IkiWiki/Plugin/recentchangesdiff.pm
IkiWiki/Plugin/relativedate.pm
IkiWiki/Plugin/remove.pm
IkiWiki/Plugin/rename.pm
IkiWiki/Plugin/search.pm
IkiWiki/Plugin/shortcut.pm
IkiWiki/Plugin/sidebar.pm
IkiWiki/Plugin/signinedit.pm
IkiWiki/Plugin/smiley.pm
IkiWiki/Plugin/sparkline.pm
IkiWiki/Plugin/table.pm
IkiWiki/Plugin/tag.pm
IkiWiki/Plugin/template.pm
IkiWiki/Plugin/testpagespec.pm
IkiWiki/Plugin/teximg.pm
IkiWiki/Plugin/textile.pm
IkiWiki/Plugin/toc.pm
IkiWiki/Plugin/toggle.pm
IkiWiki/Plugin/txt.pm
IkiWiki/Plugin/typography.pm
IkiWiki/Plugin/version.pm
IkiWiki/Plugin/websetup.pm
IkiWiki/Plugin/wikitext.pm
IkiWiki/UserInfo.pm
auto.setup
debian/NEWS
debian/changelog
doc/ikiwiki-transition.mdwn
doc/ikiwiki/directive.mdwn
doc/ikiwiki/pagespec.mdwn
doc/plugins/aggregate.mdwn
doc/plugins/contrib.mdwn
doc/plugins/discussion.mdwn
doc/plugins/googlecalendar.mdwn [deleted file]
doc/plugins/write.mdwn
doc/plugins/write/tutorial.mdwn
doc/roadmap.mdwn
doc/tips/upgrade_to_3.0.mdwn [new file with mode: 0644]
doc/todo/firm_up_plugin_interface.mdwn
ikiwiki-transition
t/basewiki_brokenlinks/index.mdwn
t/pagespec_match.t
t/pagespec_merge.t
t/tinyblog/index.mdwn
underlays/basewiki/directive.mdwn [deleted symlink]

index cc1e89acc04db45f18cb90a40e7a2a538b4350f4..f6adb360a56bcac7fca9e65e7551f6cb92c77328 100644 (file)
@@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
                 inject
                  %config %links %pagestate %wikistate %renderedfiles
                  %pagesources %destsources);
-our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
+our $VERSION = 3.00; # plugin interface version, next is ikiwiki version
 our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
 my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
 
@@ -194,7 +194,7 @@ sub getsetup () {
        },
        prefix_directives => {
                type => "boolean",
-               default => 0,
+               default => 1,
                description => "use '!'-prefixed preprocessor directives?",
                safe => 0, # changing requires manual transition
                rebuild => 1,
@@ -1596,40 +1596,6 @@ sub rcs_receive () {
        $hooks{rcs}{rcs_receive}{call}->();
 }
 
-sub globlist_to_pagespec ($) {
-       my @globlist=split(' ', shift);
-
-       my (@spec, @skip);
-       foreach my $glob (@globlist) {
-               if ($glob=~/^!(.*)/) {
-                       push @skip, $glob;
-               }
-               else {
-                       push @spec, $glob;
-               }
-       }
-
-       my $spec=join(' or ', @spec);
-       if (@skip) {
-               my $skip=join(' and ', @skip);
-               if (length $spec) {
-                       $spec="$skip and ($spec)";
-               }
-               else {
-                       $spec=$skip;
-               }
-       }
-       return $spec;
-}
-
-sub is_globlist ($) {
-       my $s=shift;
-       my $ret= ( $s =~ /[^\s]+\s+([^\s]+)/ && $1 ne "and" && $1 ne "or" );
-       print STDERR "warning: deprecated GlobList style PageSpec \"$s\" will stop working in ikiwiki version 3.0\n"
-               if $ret && $s !~ /TMPL_VAR/; # hack alert
-       return $ret;
-}
-
 sub safequote ($) {
        my $s=shift;
        $s=~s/[{}]//g;
@@ -1721,26 +1687,12 @@ sub pagespec_merge ($$) {
        my $b=shift;
 
        return $a if $a eq $b;
-
-        # Support for old-style GlobLists.
-        if (is_globlist($a)) {
-                $a=globlist_to_pagespec($a);
-        }
-        if (is_globlist($b)) {
-                $b=globlist_to_pagespec($b);
-        }
-
        return "($a) or ($b)";
 }
 
 sub pagespec_translate ($) {
        my $spec=shift;
 
-       # Support for old-style GlobLists.
-       if (is_globlist($spec)) {
-               $spec=globlist_to_pagespec($spec);
-       }
-
        # Convert spec to perl code.
        my $code="";
        while ($spec=~m{
index 81cb42d1309fd537ef7a7e7da799ca95ff7a50ee..3fadc462e5704cf446dc9e347d710265b1eae374 100644 (file)
@@ -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.");
index 97dd036f6f4ca2816b6a2beee0f8aeefbbc0d405..c667ee2a9f7429512d6287fdd91bd6422cd1500e 100644 (file)
@@ -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();
index 93c10b629320bf78b5fc1d7e28df24598244f2a4..10bf358e44a69148954fc36a0557330016fa4024 100644 (file)
@@ -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;
 
index 1cbdfe4e5f337972c5c2a92e3cbb84aa5ebd514b..243b9892056028ea3cd289257c70274a54a410f6 100644 (file)
@@ -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);
index 87da6cd4ebe50ab55bfab1484e9b87cdc7aa4fe7..087c315a9af355569921c9150c05c0ba89ec8df1 100644 (file)
@@ -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 (@) {
index bb08091aefdf97b4f3043470f3bb8703f2f47a88..555856b1189fe4508ac25997cad15669fb28ceea 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::autoindex;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 use Encode;
 
 sub import {
index 1c52099bf9be94360e7f6fde85befdd6e22ca4b4..bf0d7560dbc8a86a28b1ad694d9de326d0153f1f 100644 (file)
@@ -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);
index 88303fc44b971c226c1d0bf02464a75f68d96006..d473c8348234145b5dc7526584b9b7825b027e4a 100644 (file)
@@ -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;
 
index f9ee30fe288456666d8008045a589c5db24f3366..74a8397d7ebe33096393d4174f2975a4ce7bd03d 100644 (file)
@@ -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{
index 53d8389d231cacafc6320292bd2a6b4fcc1456e8..20505893b5885847370a99c84c900d6032d72ef9 100644 (file)
@@ -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);
index d8318d3e3afa309e7893fd994a8bbf8730fe0c3a..ddaa707322c5dd1065e0e8630b5b391a06755e9b 100644 (file)
@@ -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);
 
index 66253e07d9e5aa18d33a4d81db177acf672a8a90..4f3577b34fe7807f11762d80d971f9f1357f5f6f 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::conditional;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 use UNIVERSAL;
 
 sub import {
index 3c46a48df1e43336763361d3a9d4f3ded41cf76a..425e71043f0133f5b855c32932bc114542c83d7d 100644 (file)
@@ -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);
index e579c1ea27596b3ce02c8e48b70fde7499bf0055..417442f34e51d3e089186cd9f6839c001efb3bee 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::cutpaste;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %savedtext;
 
index 3470640dc1ed30748181d14118847680cbd47284..bb77ce59f267a5c9e541a1f42f88d6eca0eee4f1 100644 (file)
@@ -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 {
index 068b83b3c15f9b3a790e4c51c56fe5559eadff3a..7df6a9ffb42f53960f4881b43b34b86f49f6e798 100644 (file)
@@ -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;
 
index 7c0e7c2f84fe916f0b26250dfd3a4e0631448956..0bafc95d06d854b860e566a8c14134119d51db17 100644 (file)
@@ -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;
 
index 664c95763c97be51995c092b0689c3544ab17155..a7d38358fe3ab4177c2cf6a7817f3e037f2c8e4a 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::embed;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my $attribr=qr/[^<>"]+/;
 
index 2d540143f6471fa46ffd61f4563138ead5ee0b9f..066f15cf1b2f12ef4a027e5c9842d1b859358f23 100644 (file)
@@ -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;
index 68359a4aa2011d5bdadd461a62b0641526f3fd23..6060914c5a59a6736971f5557d97b3efc992d953 100644 (file)
@@ -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);
index 5040a185cace7e831ff4ab32ee39bd3e338b32cf..8575ee108eece4135c783993b718cfbb1f278c2e 100644 (file)
@@ -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,
index b4d3a3c5ffefc2c79c91be0ff207159614d0bb22..bbe3aa9fee56e28b978e8d11c0f5f71d6d1b8824 100644 (file)
@@ -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);
index 6a12f28fdfa80506d4dd3611da5382329d1989b1..17e57dea14fccb4c3f9e1c21a5926ef4880033cd 100644 (file)
@@ -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);
index 92bc8200a3e2dd7d982af6479782a3827ed863d5..46f2380cfa4ca98f071a45219c6fa9514d8f664c 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::goodstuff;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my @bundle=qw{
        brokenlinks
index 5394c5a6f8a503533d5388d602fbb64bbbf03ed7..4bba5775c2ba8583fc06504496e39792c2107bad 100644 (file)
@@ -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 (file)
index 24c2e15..0000000
+++ /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
index 23631da300509c9ced74dcfc4eb58ab14dd91e2b..b43e96a73adad4b1b8091c689110c70611a983f6 100644 (file)
@@ -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 {
index fe68c6eecb039edfbac1776d4b5e1b8f23b0ccd5..5a062a27606be6a0cb8d9a5a4f06ce8c0ec5cd6a 100644 (file)
@@ -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);
index d5b5ce3b4a1a46e67eb7dca435976c5b73658034..bd2177a06a1217de57700c40de641e9794133b5f 100644 (file)
@@ -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 {
index 9b9547cca77aec3235b7ca4e642a8c47b2067365..a7d5e8ce91af28d9053b9b831564e9b1fc13a7b3 100644 (file)
@@ -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);
index acbe40a5d6ea9f3e071c9e9199c677e1cbdbf6b7..261e273aab55eff23790a44ee7f460a70f6eba05 100644 (file)
@@ -9,7 +9,7 @@ package IkiWiki::Plugin::htmlbalance;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 use HTML::TreeBuilder;
 use HTML::Entities;
 
index 823b3d806cf1c51ae2eec5b715ff2991f7c79b3d..a249cdf7a43b2986b5ca519f88c01cc6fcf85141 100644 (file)
@@ -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.
index 02438ebeffef800e511556dc68ad27d1fd312456..6f3379ef457bddb7387c8485427ec88d51f5b0c5 100644 (file)
@@ -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 {
index 39edff6158e077c0c5c924ef645bb1b55bec5923..1816c9d74c27aaee1e2b6114e62dd06b8fca1d4c 100644 (file)
@@ -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);
index 395890c0e1bcafdebc1ff4b84082026a634b42a0..5c580c03cec01a5c4529fefd9f207702e0306d58 100644 (file)
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::img;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %imgdefaults;
 
index 8490b455fa8b50153f1368f31b8e6d1e27afd745..b88efc0bae9be84d13e754a54b8dffc61aa5cfde 100644 (file)
@@ -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;
index 3799209d062ad4308cebb3cead4e5f2617a87508..b79273f96240dcfc0a66308bb3a942f6198945f0 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::link;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my $link_regexp;
 
index cb9f3ef413cc0e0c4fa669595f376619fcb881e0..941ed5f3672145bb6111c5a6650fb14431641297 100644 (file)
@@ -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 {
index be82b0495f4d3481a80cf9ca33e981adf6f49ae8..d2cebca342756fdbb8d9a31e34b43fe527bd4b4d 100644 (file)
@@ -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");
index 31a9e70cd919124beb1b01b944b000b682e210be..0fa329251f0b7eb5e6814e50f68d020eaf047eb8 100644 (file)
@@ -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
index af14ef5dee9cd6b33e127794c9bf7be7ee80bd91..328493116e42e29125aca0353062886588e38e5f 100644 (file)
@@ -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);
index 0d5f398a07a83eb87351341c729a3b516e6784af..0e134c8224f470c6cc101e0b14e6106c44a541e6 100644 (file)
@@ -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);
index 8c214139f8b85f3630055a7b954213ec9645ebbf..15bb29b3fc8450e693fe4a3005f2f3925ab0f00b 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::meta;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %metaheaders;
 
index b726386f6bca9538cc74878e79b288544eaf0de4..737dcf767379e69819bc71c4f7d02800be5b62f6 100644 (file)
@@ -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);
index f1216ad3dfe8b4bf61b8296cb693150bbc81216d..77d5fb0772846dde323fd78a809f936365224fa5 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::more;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my $linktext = gettext("more");
 
index 95220d7b3ed39598ce0760fbdecc374b7f2c59ae..3da01efee154988d1432d0ed54680525569e224c 100644 (file)
@@ -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);
index 574c42f0ed83efd2e4e4690d2680a4cc1a92df56..5424c57e2c6f8e8093eb56d1aba6aee696a05b39 100644 (file)
@@ -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);
index 8e9ab0ff402a12799843981787f427dcfc13812c..605e6e43ada79398afe07d1c7c07393612eeca6d 100644 (file)
@@ -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);
index 280b19db0ae71e7029c940b15f0eade8c355ccad..c68fcbbe358762127411faec18840070f5bf8bd1 100644 (file)
@@ -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 {
index c08ab3931df261de093a558002712a4ccc5db685..a143f24d089d3ff0d405fd0c6f1544558375600c 100644 (file)
@@ -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);
index e20d0dac6e48f14b73faa2ff8fb0637a7e72975a..dbe69539d72311d8b43c752c9ae33ebe8017a763 100644 (file)
@@ -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' );
index 60db8b327de0d4a60eef07e7d6e861024c0dd148..1d8a84ca77726d5d8486fc632b2606b98e25b5f6 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagetemplate;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %templates;
 
index fb41e1c838161abd36b34699b847491549ca7aae..ebf1d449ae50522dac1174176810c4bd3db99799 100644 (file)
@@ -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);
index 7176f0c33b71f0a1062e064318e1f7601589671d..90e2ca56493767f655984973dddb80af58fd1285 100644 (file)
@@ -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);
index fcbe6b57b151cc7ac8a174d708f32ba9a589ca1d..f5386d0cae4ccb638913c9d6a7ac9a8e2a3d94af 100644 (file)
@@ -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);
index 7b4dce5867534c702f220b3df6e792c91b3cbb61..4a808866164d7e2f1e6e185b97b37e50cf0c307b 100644 (file)
@@ -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;
index 5ac5b818de872e16ecd9470f77c2d6a6486cdd20..bc1e3501e5e6b7c9c4a0d1568367e5d60bbf61cb 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::poll;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 use Encode;
 
 sub import {
index a32003778303870515ff1cf026e56a897839989c..bc21d71c725f892d3432dfa5ac22feb1241cfd97 100644 (file)
@@ -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 {
index 1753e4cf90b87fc615056d915d112a2f61fe4bc4..ba43561fbc0d5f291f3eb80163dc88c9b506effe 100644 (file)
@@ -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');
index 501f17f5d07e354246f0a149c4738943a38e999d..e155dd39b88285837007d51cc8da9b219d63be72 100644 (file)
@@ -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;
index 75da16d16de80e72b14b76dc2a11d63fe84c88f3..76d994acc7ad0f9d49c63c32d3d5d8dd54db5554 100644 (file)
@@ -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
 
index 73093439d55621ffa0bd75286e3d8a62ac2b2bb2..ad8a610c1420f73a3ce0eabf30f9300afcdff5a4 100644 (file)
@@ -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);
index 7071596e6603586d6d2682aef0c4d37f56b25788..ef108b3f00d4f031ef3ca3b0f1bab228f0dce279 100644 (file)
@@ -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;
 
index 4dea9c26bde1e8a446797139ba99c11b0f991ba7..e3ba9b8d8248858689619fee48a963912c593648 100644 (file)
@@ -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;
index e5fa8e1a5822983a6be7c53e3645f8ae77eb2be6..3e33cd5c358d42c56348bbaafa64daea6d8bb2c7 100644 (file)
@@ -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;
 
index 7815016625a3c84b4e8dc212d9fb86f728adf31d..21989aff3ff1c812af0ca83f5d8ecd72046393aa 100644 (file)
@@ -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);
index b1bb1576728945a00238949ce48821fe6cc1d5f5..54c7faf137c1c87d5e90156b74be3e1139ef04d3 100644 (file)
@@ -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);
index cc2130ad5b4a2d55e514d3d6891adb89caaaecfc..d79e3170ec4b4e86873d64d0200357670aa0df67 100644 (file)
@@ -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);
index 33d158d3eb6a74a3d02f64e996e66a9a8889724b..0e7cbd4d12f0705aa8706461c404a154ad8fbf99 100644 (file)
@@ -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);
index 746fa93bb3bcaf754f0d749f865f7d55906acb1d..41812e1c1f671da84be1a06a5821695fc5dc6f11 100644 (file)
@@ -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);
index 321c93ed522141ad6a11f7d14b5ed7a1a3fa2354..032a0034c0c4e3354ea8274a6259fb0478ad949e 100644 (file)
@@ -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);
index 70b8cef742c61db5c2c2a1c58650a702ade02f3d..1697a37c1981d0520f1966a53cd647324fcb2ba8 100644 (file)
@@ -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;
index dca755c634b161f656581f67f8328189729ffac5..1ed65e5b7c354df8d985ff73101b13da9c28bb44 100644 (file)
@@ -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]+)?/;
index b6f53f607b1741fc959afc452ef65e252b5a4e49..479f3d7450612fa63b3355aa9a3870c32cfeea6c 100644 (file)
@@ -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);
index ecc77cbb11162a5587de36ab30adc9edc9defdb1..d439109104a8fd10dfd8ea329d083b4241c42fd0 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::tag;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %tags;
 
index 1b7eb91bf91e3761a5a0ee9ff2fd753b65f9bb71..57bff20ff32ba57ce3e19ff9c2e5ec5d01bcb927 100644 (file)
@@ -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;
 
index a6e94dbbb5a2e88867a4ac03d49d65b141949446..440fca33be02cc6cf91ff9072c725d936571b334 100644 (file)
@@ -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);
index 57b23147eb194746e58a256d2ac4bebf9d5801df..dba5372b5fee98c33cf044e3b28024c53033649a 100644 (file)
@@ -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}
index d1b927b749b30220d22bfb5f3a2860a65e4f5204..b604aa3c52ab1d0fe34b686a4634920ac6310dc6 100644 (file)
@@ -6,7 +6,7 @@ package IkiWiki::Plugin::textile;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 use Encode;
 
 sub import {
index 460837b1d44587928702198a2fa38110ad6b76cd..a585564e74761045ee8e178b6dd8262ede94ee97 100644 (file)
@@ -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 {
index 967b07fcc039e42ff14fdd775338038f5c16e8e7..aae8cdf84beeff62d54197db0e5f1e2733fe5810 100644 (file)
@@ -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");
index d65bb20364cf194cc3a39f1c967c008c8830ac5b..8599bdc8ec881429472ef19f760113f27d0a678f 100644 (file)
@@ -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;
index e395b214394d6e0f4c98fafb25915ce1769eef01..f62be82bbea849090876053a4d81ee6c558260c6 100644 (file)
@@ -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);
index 3526dafde5bb4df0403aebda6c9bca5e3aadb86e..587cd55fa8f608fc2309d23eaa91ad1e32539c62 100644 (file)
@@ -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);
index 66dacfde34049ee4421da73e8fd6667a4155a81f..a47c2997611a492b6c6f0050dd91750c15a3a4c9 100644 (file)
@@ -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);
index 50571e524021311b88dfb3e719fadb37587252a8..accb03bbef8317cad028d95fe36a68b466d9bd0f 100644 (file)
@@ -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);
index 3423dc92335c9a0139e02d0562ee1ac9c01121c4..0bf100a959c934d23c8f73ac1f0962f856732a35 100644 (file)
@@ -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
index ef0f1723c9e48be1937ab9e1886a6074c405b15d..9cf5e7725ede534f1d5e16c1d7f06a8064156ed0 100644 (file)
@@ -40,6 +40,5 @@ IkiWiki::Setup::Automator->import(
        rss => 1,
        atom => 1,
        syslog => 1,
-       prefix_directives => 1,
        hardlink => 1,
 )
index a7a145d9bce7ee3a1bf307d73d2473ad862631f3..6fe70c9e4c8c34368f8aae0d353039fed36a0240 100644 (file)
@@ -1,3 +1,12 @@
+ikiwiki (3.00) unstable; urgency=low
+
+  The 3.0 release of ikiwiki changes several defaults and finishes
+  some transitions. You will need to modify your wikis to work with
+  ikiwiki 3.0. A document explaining the process is available
+  in </usr/share/doc/ikiwiki/html/tips/upgrade_to_3.0.html>
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 23 Dec 2008 16:14:18 -0500
+
 ikiwiki (2.62) unstable; urgency=low
 
   TexImg standard preamble changed
@@ -101,10 +110,7 @@ ikiwiki (2.40) unstable; urgency=low
   in their setup files.
 
   To convert your wiki to the new syntax, ikiwiki provides a new script
-  ikiwiki-transition.  It will convert preprocessor directives in
-  all files given on the command line.  To convert an entire wiki:
-
-  find wikidir/ -type f -name '*.mdwn' -print0 | xargs -0 ikiwiki-transition prefix_directives
+  ikiwiki-transition.
 
   Even with prefix_directives disabled, ikiwiki now allows an optional '!'
   prefix on preprocessor directives (but still requires a space).  Thus, a
index 96a70fcc9a8809c259d0f313b51145b992ed5483..9a96f7415d6a4856c2e971eaea659ca451bef3ec 100644 (file)
@@ -1,4 +1,19 @@
-ikiwiki (2.72) UNRELEASED; urgency=low
+ikiwiki (3.00) UNRELEASED; urgency=low
+
+  * Remove support for GlobLists.
+  * Remove support for configuring allowed attachments, locked pages,
+    and banned users from the admin preferences page. These can only be
+    controlled via the setup file now.
+  * ikiwiki-transition moveprefs can be used to move the above
+    admin preferences into a setup file.
+  * prefix_directives and aggregate_internal are now turned on by default.
+  * ikiwiki-transition prefix_directives syntax changed
+  * googlecalendar: removed this deprecated plugin. Use embed instead.
+  * Version 3.00 of the plugin API.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 24 Dec 2008 19:49:36 -0500
+
+ikiwiki (2.72) unstable; urgency=low
 
   * Avoid comments in recentchanges being broken links (smcv)
   * Add deprecation warning for GlobLists, which will stop working in 3.0.
@@ -6,7 +21,7 @@ ikiwiki (2.72) UNRELEASED; urgency=low
   * googlecalendar: Add runtime deprecation warning.
   * comments: Deal with users entering unqualified or partial urls.
 
- -- Joey Hess <joeyh@debian.org>  Mon, 22 Dec 2008 19:02:16 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 24 Dec 2008 19:49:32 -0500
 
 ikiwiki (2.71) unstable; urgency=low
 
index 8b7c3579fabd3c1af8cc58bb43d4a0f7b7d00985..18836d5f5745dc3f4184b857c9fdca124b92ead2 100644 (file)
@@ -8,24 +8,23 @@ ikiwiki-transition type ...
 
 # DESCRIPTION
 
-`ikiwiki-transition` aids in converting wiki pages when
-there's a major change in ikiwiki syntax. It also handles other transitions
-not involving wiki pages.
+`ikiwiki-transition` aids in converting wiki pages when there's a major
+change in ikiwiki syntax. It also handles other transitions not involving
+wiki pages.
 
-# prefix_directives
+# prefix_directives your.setup
 
-The `prefix_directives` mode converts the specified ikiwiki page from
-the old preprocessor directive syntax, requiring a space, to the new
-syntax, prefixed by '!'.
+The `prefix_directives` mode converts all pages from the old preprocessor
+directive syntax, requiring a space, to the new syntax, prefixed by '!'.
 
 Preprocessor directives which already use the new syntax will remain
 unchanged.
 
-Note that if the page contains wiki links with spaces, which some
+Note that if a page contains wiki links with spaces, which some
 older versions of ikiwiki accepted, the prefix_directives transition will
 treat these as preprocessor directives and convert them.
 
-# setupformat
+# setupformat your.setup
 
 The `setupformat` mode converts a setup file from using a single `wrappers` block
 to using `cgi_wrapper`, `git_wrapper`, etc.
@@ -33,25 +32,30 @@ to using `cgi_wrapper`, `git_wrapper`, etc.
 Note that all comments and any unusual stuff like perl code in the setup
 file will be lost, as it is entirely rewritten by the transition.
 
-# aggregateinternal
+# aggregateinternal your.setup
 
 The `aggregateinternal` mode moves pages aggregated by the aggregate plugin
 so that the `aggregateinternal` option can be enabled.
 
-# indexdb
+# moveprefs your.setup
+
+Moves values that used to be admin preferences into the setup file.
+
+Note that all comments and any unusual stuff like perl code in the setup
+file will be lost, as it is entirely rewritten by the move.
+
+# indexdb srcdir
 
 The `indexdb` mode handles converting a plain text `.ikiwiki/index` file to
-a binary `.ikiwiki/indexdb`. In this mode, you should specify the srcdir of
-the wiki as the second parameter. You do not normally need to run
+a binary `.ikiwiki/indexdb`. You do not normally need to run
 `ikiwiki-transition indexdb`; ikiwiki will automatically run it as
 necessary.
 
-# hashpassword
+# hashpassword srcdir
 
 The `hashpassword` mode forces any plaintext passwords stored in the
 `.ikiwiki/userdb` file to be replaced with password hashes. (The
-Authen::Passphrase perl module is needed to do this.) In this mode, you
-should specify the srcdir of the wiki as the second parameter. 
+Authen::Passphrase perl module is needed to do this.)
 
 If this is not done explicitly, a user's plaintext password will be
 automatically converted to a hash when a user logs in for the first time
index c4342dee8a644ff1778672a3b1ff89ca1d4c2668..fb88aa72d494df0408baa77051abf729d7b83b12 100644 (file)
@@ -28,15 +28,13 @@ of text with triple-quotes:
        3. "baz"
        """]]
 
-ikiwiki also has an older syntax for directives, which requires a
-space in directives to distinguish them from [[wikilinks|ikiwiki/wikilink]].
-This syntax has several disadvantages: it requires a space after directives
-with no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
-[[wikilinks|ikiwiki/wikilink]].  ikiwiki now provides the `!`-prefixed syntax
-shown above as the preferred alternative.  However, ikiwiki still supports
-wikis using the older syntax, if the `prefix_directives` option is not enabled.
-For backward compatibility with existing wikis, this option currently
-defaults to off, so ikiwiki supports the old syntax.
+ikiwiki also has an older syntax for directives, which requires a space in
+directives to distinguish them from [[wikilinks|ikiwiki/wikilink]]. This
+syntax has several disadvantages: it requires a space after directives with
+no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
+[[wikilinks|ikiwiki/wikilink]].  ikiwiki now provides the `!`-prefixed
+syntax shown above as default.  However, ikiwiki still supports wikis using
+the older syntax, if the `prefix_directives` option is disabled.
 
 [[!if test="enabled(listdirectives)" then="""
 Here is a list of currently available directives in this wiki:
index d4dd265cc79a9e38701fedc12f787041754c4e48..86abe574564c3e43f9f590bd60be5024661ffe1b 100644 (file)
@@ -72,22 +72,3 @@ filenames of the pages in the wiki, so a pagespec "foo" used on page
 "a/b" will not match a page named "a/foo" or "a/b/foo". To match
 relative to the directory of the page containing the pagespec, you can
 use "./". For example, "./foo" on page "a/b" matches page "a/foo".
-
-## Old syntax
-
-The old PageSpec syntax was called a "GlobList", and worked differently in
-two ways:
-
-1. "and" and "or" were not used; any page matching any item from the list
-   matched.
-2. If an item was prefixed with "`!`", then no page matching that item
-   matched, even if it matched an earlier list item.
-
-For example, here is the old way to match all pages except for the SandBox
-and Discussion pages:
-
-       * !SandBox !*/Discussion
-
-Using this old syntax is still supported. However, the old syntax is
-deprecated and will be removed at some point, and using the new syntax is
-recommended.
index 6fc87853b44141fe33725bad2f881cc0395e856f..e2efcd83f1d67dc17481f5cd2b2534329290a445 100644 (file)
@@ -5,10 +5,6 @@ This plugin allows content from other feeds to be aggregated into the
 wiki. To specify feeds to aggregate, use the
 [[ikiwiki/directive/aggregate]] [[ikiwiki/directive]].
 
-New users of aggregate should enable the `aggregateinternal => 1` option in the
-.setup file. If you don't do so, you will need to enable the [[html]] plugin
-as well as aggregate itself, since feed entries will be stored as HTML.
-
 The [[meta]] and [[tag]] plugins are also recommended. Either the
 [[htmltidy]] or [[htmlbalance]] plugin is suggested, since feeds can easily
 contain html problems, some of which these plugins can fix.
@@ -27,37 +23,19 @@ visit is `http://whatever/ikiwiki.cgi?do=aggregate_webtrigger`. Anyone
 can visit the url to trigger an aggregation run, but it will only check
 each feed if its `updateinterval` has passed.
 
-## internal pages and `aggregateinternal`
+## aggregated pages
 
 This plugin creates a page for each aggregated item. 
 
 If the `aggregateinternal` option is enabled in the setup file (which is
-recommended), aggregated pages are stored in the source directory with a
+the default), aggregated pages are stored in the source directory with a
 "._aggregated" extension. These pages cannot be edited by web users, and
 do not generate first-class wiki pages. They can still be inlined into a
 blog, but you have to use `internal` in [[PageSpecs|IkiWiki/PageSpec]],
 like `internal(blog/*)`.
 
-For backward compatibility, the default is that these pages have the
-".html" extension, and are first-class wiki pages -- each one generates
-a separate HTML page in the output, and they can even be edited.
-
-That turns out to not be ideal for aggregated content, because publishing
-files for each of those pages is a waste of disk space and CPU, and you
-probably don't want to allow them to be edited. So, there is an alternative
-method that can be used (and is recommended), turned on by the
-`aggregateinternal` option in the setup file.
-
-If you are already using aggregate and want to enable `aggregateinternal`,
-you should follow this process:
-
-1. Update all [[PageSpecs|ikiwiki/PageSpec]] that refer to the aggregated
-   pages -- such as those in inlines. Put "internal()" around globs 
-   in those PageSpecs. For example, if the PageSpec was `foo/*`, it should
-   be changed to `internal(foo/*)`. This has to be done because internal
-   pages are not matched by regular globs.
-2. Turn on `aggregateinternal` in the setup file.
-3. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
-   files in the srcdir. The command to run is
-   `ikiwiki-transition aggregateinternal $setupfile`,
-4. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+If `aggregateinternal` is disabled, you will need to enable the [[html]]
+plugin as well as aggregate itself, since feed entries will be stored as
+HTML, and as first-class wiki pages -- each one generates
+a separate HTML page in the output, and they can even be edited. This
+option is provided only for backwards compatability.
index 7a28edaba136ae13b8b462c9302958c240c990f6..e22b13f713b0ffc25ff2f9c56e25814789ee1154 100644 (file)
@@ -2,6 +2,6 @@ Contributed [[plugins]]:
 
 (See [[install]] for installation help.)
 
-[[!inline pages="plugins/contrib/* !*/Discussion" 
+[[!inline pages="plugins/contrib/* and !*/Discussion" 
 feedpages="created_after(plugins/contrib/navbar)" archive="yes"
 rootpage="plugins/contrib" postformtext="Add a new plugin named:" show=0]]
index 70157f1e2b03b52d465adb54113bdef38d111000..854307a98ad971b7659adb271871a0dcb192e0ca 100644 (file)
@@ -34,12 +34,3 @@ Any objections to listing plugins alphabetically rather than by creation date?
 >> "recently changed" list with the 10 most recently changed plugins
 >> at the top.  That would allow what you suggested, but still allow
 >> the main list to be alphabetical. -- [[Will]]
-
-How about adding a deprecated tag in order to clean up the plugin list?
-
-> AFAIK it's currently the only one. --[[Joey]]
-For instance [[googlecalendar]] is listed as plugin but should probably be removed from Ikiwiki in a future major version (v3?).
-
--- [[AlexandreDupas]]
-
diff --git a/doc/plugins/googlecalendar.mdwn b/doc/plugins/googlecalendar.mdwn
deleted file mode 100644 (file)
index bca2ae7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-[[!template id=plugin name=googlecalendar author="[[Joey]]"]]
-[[!tag type/special-purpose]]
-
-*Note*: This plugin is deprecated. Please switch to the [[embed]] plugin.
-
-This plugin allows embedding a google calendar iframe in the wiki.
-Normally, if the [[htmlscrubber]] is enabled, such iframes are scrubbed out
-of the wiki content since they're not very safe if created by malicious
-users. But some iframes are legitimate, and safe, if you trust the embedded
-content. This plugin is an example of how to deal with this in ikiwiki.
-
-Example use:
-
-       \[[!googlecalendar html="""
-       <iframe src="http://www.google.com/calendar/embed?src=adkrdken8mupngh13jshlbenoc%40group.calendar.google.com&title=OSEL%20Calendar&chrome=NAVIGATION&bgcolor=%2371d873&height=588" style=" border-width:0 " width="480" frameborder="0" height="588"></iframe>
-       """]]
-
-The iframe should be the one provided by google. Note that it's used in a
-way that avoids cross-site scripting attacks, assuming you trust google's
-content.
index b6fa96f913ff7c2cb89a1e9fa78b1241abad6958..8992fad0142ec91c4ff4345722423e3c9972b203 100644 (file)
@@ -19,7 +19,7 @@ that can be fleshed out to make a useful plugin.
 `IkiWiki::Plugin::pagecount` is another simple example. All perl plugins
 should `use IkiWiki` to import the ikiwiki plugin interface. It's a good
 idea to include the version number of the plugin interface that your plugin
-expects: `use IkiWiki 2.00`.
+expects: `use IkiWiki 3.00`.
 
 An external plugin is an executable program. It can be written in any
 language. Its interface to ikiwiki is via XML RPC, which it reads from
@@ -431,7 +431,7 @@ describes the plugin as a whole. For example:
 
 To import the ikiwiki plugin interface:
 
-       use IkiWiki '2.00';
+       use IkiWiki '3.00';
 
 This will import several variables and functions into your plugin's
 namespace. These variables and functions are the ones most plugins need,
@@ -486,7 +486,7 @@ use the following hashes, using a page name as the key:
   destination file.
 * `%pagesources` contains the name of the source file for each page.
 
-Also, the %IkiWiki::version variable contains the version number for the
+Also, the `%IkiWiki::version` variable contains the version number for the
 ikiwiki program.
 
 ### Library functions
index e1b34b8000ebefcabedef8aabbfe1c1a4a9cb249..5345f71f257c2979065189942ac77ce1074fa1e6 100644 (file)
@@ -27,7 +27,7 @@ important one is the IkiWiki module.
 
        use warnings;
        use strict;
-       use IkiWiki 2.00;
+       use IkiWiki 3.00;
 
 Ok, boilerplate is out of the way. Now to add the one function that ikiwiki
 expects to find in any module: `import`. The import function is called when
index 9ed5742ebd3fef350c5cc7a11c4d29f2c6dddfdc..83c654b5e5b8686ea9a4994111de0e6bee1d1318 100644 (file)
@@ -7,10 +7,7 @@ This is the roadmap for ikiwiki development.
 
 Released 29 April 2006.
 
-The 1.x series changed a great deal over the more than 50 releases in its
-lifetime. It is now in maintenance mode, only security issues or really bad
-bugs will be fixed in 1.x going forward. 1.x will stop being supported with
-the release of 3.0.
+The 1.x series is no longer supported.
 
 ----
 
@@ -32,28 +29,43 @@ the release of 3.0.
 
 Released 30 April 2007.
 
-The 2.x series is expected to undergo continuing development for some time,
-adding improvements and new features, but avoiding changes that break
-backwards compatability.
+The 2.x series is now in maintenance mode. Only security fixes and fixes for
+really bad bugs will be applied going forward.
 
 ----
 
 # 3.0
 
-Version 3.0 will be an opportunity to make significant transitions.
-
-* Default to using `prefix_directives`.
-* Default to using `aggregateinternal`.
-* Remove deprecated prefs form settings for `allowed_attachments` and
-  `locked_pages`.
-* Finalise a new version of the plugin API, exporting additional commonly
-  used functions from IkiWiki.pm. See [[todo/firm_up_plugin_interface]]
-
-It will include a vast number of new features, bugfixes, and other
-improvements, far too many to list here.
+Version 3.0 is an opportunity to make significant transitions.
+Read [[tips/upgrade_to_3.0]] for the steps you will need to
+follow when upgrading your wiki to this version.
+
+The highlights of the changes in version 3.0 include:
+
+* Blog-style [[plugins/comments]] as an alternative to Discussion pages.
+* Support for uploading [[attachments|plugins/attachment]].
+* Can [[plugins/rename]] and [[plugins/remove]] pages and files via the web.
+* [[Web_based_setup|plugins/websetup]].
+* Many new plugins including [[plugins/htmlbalance]], [[plugins/format]],
+  [[plugins/progress]], [[plugins/color]], [[plugins/autoindex]],
+  [[plugins/cutpaste]], [[plugins/hnb]], [[plugins/creole]], [[plugins/txt]],
+  [[plugins/amazon_s3]], [[plugins/pinger]], [[plugins/pingee]],
+  [[plugins/edittemplate]]
+* The RecentChanges page is compiled statically, not generated from the CGI.
+* Support for additional revision control systems: [[rcs/bzr]],
+  [[rcs/monotone]]
+* Support for [[tips/trusted_git_push]].
+* A new version (3.00) of the plugin API, exporting additional
+  commonly used functions from `IkiWiki.pm`. Nearly everything in ikiwiki is
+  now a plugin, from WikiLinks to page editing, to RecentChanges.
+* Far too many bug fixes, features, and enhancements to list here.
 
 Release is planned for fall^Wlate, 2008.
 
+The 3.x series is expected to undergo continuing development for some time,
+adding improvements and new features, but avoiding changes that break
+backwards compatability.
+
 ----
 
 # future goals
diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn
new file mode 100644 (file)
index 0000000..3a515a6
--- /dev/null
@@ -0,0 +1,88 @@
+Version 3.0 of ikiwiki makes some significant changes, which
+you will need to deal with when upgrading from ikiwiki 2.x.
+
+[[!toc ]]
+
+## setup file format change
+
+The layout of the setup file changed in a significant way in version 2.60
+of ikiwiki. If you have not changed yours to the new format, now would be a
+good time to do so. Some new features, like the [[plugins/websetup]]
+interface, need the new format setup file.
+  
+You can convert old setup files into the new format by running
+`ikiwiki-transition setupformat your.setup`
+
+# moving settings from Preferences page
+
+The admin preferences page used to have settings for allowed attachments,
+locked pages, and banned users. These three settings have moved to the
+setup file, and will no longer appear on the admin preferences page once
+your wiki is upgraded to 3.0.
+
+You can move these preferences into the setup file by running
+`ikiwiki-transition moveprefs your.setup`
+
+(Make sure you have converted the setup file to the new format first.)
+
+## prefix directives
+
+In 3.0, the syntax ikiwiki uses for [[directives|ikiwiki/directive]] has
+changed, requiring that the directive start with a bang: 
+
+       \[[!directive ...]]
+
+If you would like to keep the old syntax, it is still supported, add the
+following to your setup file:
+       
+       prefix_directives => 0,
+
+To convert to the new syntax, run 
+`ikiwiki-transition prefix_directives your.setup`
+
+(And then commit the changes it makes to pages in your srcdir.)
+
+## GlobLists
+
+In 3.0, the old "GlobList" syntax for [[PageSpecs|ikiwiki/PageSpec]] is no
+longer supported. A GlobList contains multiple term, but does not separate
+them with "and" or "or":
+
+       sandbox !*/Discussion
+
+To convert this to a modern PageSpec, simply add "and" or "or" as
+appropriate between terms:
+       
+       sandbox and !*/Discussion
+
+GlobLists have been deprecated for more than two years. If your wiki dates
+to the ikiwiki 1.0 era, you should check it for any that might have lurked
+unnoticed in it since back then. Ikiwiki version 2.72 will print warnings
+about any GlobLists it sees.
+
+## aggregateinternal
+
+If your wiki uses the [[aggregate|plugins/aggregate]] plugin, it will start
+to aggregate feeds to special "internal" pages.
+
+If you don't want this change, you can add the following to your setup
+file:
+
+       aggregateinternal => 0,
+
+Otherwise, follow this procedure to upgrade a wiki using the aggregate plugin:
+
+1. Update all [[PageSpecs|ikiwiki/PageSpec]] that refer to the aggregated
+   pages -- such as those in inlines. Put "internal()" around globs
+   in those PageSpecs. For example, if the PageSpec was `foo/*`, it should
+   be changed to `internal(foo/*)`. This has to be done because internal
+   pages are not matched by regular globs.
+2. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
+   files in the srcdir. The command to run is
+   `ikiwiki-transition aggregateinternal your.setup`,
+3. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+
+## googlecalendar
+
+This plugin has been deprecated for a long time, and is removed in 3.0. If
+your wiki used it, you should enable the [[plugins/embed]] plugin, instead.
index c2e190884662eaab277e5e75770f91bb2fdb7480..c7553f7dd2b8f368b5a1842cec10494f816a62a7 100644 (file)
@@ -92,3 +92,5 @@ Probably needs to evolve more and be more widely used before being exported.
 
 * %IkiWiki::pagecase (aggregate)
 * %IkiWiki::backlinks (pagestats)
+
+[[done]] (until 4.0)..
index e42a5137c72f4ef403aeda4e117944e575928d6d..b15d9f46b825a50ddd47bacff59ceb85c33edf2e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -i
+#!/usr/bin/perl
 use warnings;
 use strict;
 use IkiWiki;
@@ -42,11 +42,33 @@ sub handle_directive {
 }
 
 sub prefix_directives {
-       $/=undef; # process whole files at once
-       
-       while (<>) {
-               s{$regex}{handle_directive($1, $2, $3, $4)}eg;
-               print;
+       my $setup=shift;
+       if (! defined $setup) {
+               usage();
+       }
+
+       require IkiWiki::Setup;
+       require IkiWiki::Plugin::aggregate;
+
+       %config = IkiWiki::defaultconfig();
+       IkiWiki::Setup::load($setup);
+       IkiWiki::loadplugins();
+       IkiWiki::checkconfig();
+       IkiWiki::loadindex();
+
+       if (! %pagesources) {
+               error "ikiwiki has not built this wiki yet, cannot transition";
+       }
+
+       foreach my $page (values %pagesources) {
+               next unless defined pagetype($page) &&
+                           -f $config{srcdir}."/".$page;
+               my $content=readfile($config{srcdir}."/".$page);
+               my $oldcontent=$content;
+               $content=~s{$regex}{handle_directive($1, $2, $3, $4)}eg;
+               if ($oldcontent ne $content) {
+                       writefile($page, $config{srcdir}, $content);
+               }
        }
 }
 
@@ -109,12 +131,10 @@ sub aggregateinternal {
        require IkiWiki::Plugin::aggregate;
 
        %config = IkiWiki::defaultconfig();
-       IkiWiki::Setup::load();
+       IkiWiki::Setup::load($setup);
        IkiWiki::checkconfig();
 
        IkiWiki::Plugin::aggregate::migrate_to_internal();
-
-       print "... now add aggregateinternal => 1 to your .setup file\n";
 }
 
 sub setupformat {
@@ -161,14 +181,49 @@ sub setupformat {
        IkiWiki::Setup::dump($setup);
 }
 
+sub moveprefs {
+       my $setup=shift;
+       if (! defined $setup) {
+               usage();
+       }
+
+       require IkiWiki::Setup;
+
+       %config = IkiWiki::defaultconfig();
+       IkiWiki::Setup::load($setup);
+       IkiWiki::checkconfig();
+
+       eval q{use IkiWiki::UserInfo};
+       error $@ if $@;
+
+       foreach my $field (qw{allowed_attachments locked_pages}) {
+               my $orig=$config{$field};
+               foreach my $admin (@{$config{adminuser}}) {
+                       my $a=IkiWiki::userinfo_get($admin, $field);
+                       if (defined $a && length $a &&
+                           $a ne $orig && # might already have been moved
+                           defined $config{$field} &&
+                           length $config{$field}) {
+                                $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a);
+                       }
+               }
+       }
+
+       my %banned=map { $_ => 1 } @{$config{banned_users}}, IkiWiki::get_banned_users();
+       $config{banned_users}=[sort keys %banned];
+
+       IkiWiki::Setup::dump($setup);
+}
+
 sub usage {
        print STDERR "Usage: ikiwiki-transition type ...\n";
        print STDERR "Currently supported transition subcommands:\n";
-       print STDERR "\tprefix_directives file\n";
-       print STDERR "\tindexdb srcdir\n";
-       print STDERR "\thashpassword srcdir\n";
+       print STDERR "\tprefix_directives setupfile ...\n";
        print STDERR "\taggregateinternal setupfile\n";
        print STDERR "\tsetupformat setupfile\n";
+       print STDERR "\tmoveprefs setupfile\n";
+       print STDERR "\thashpassword srcdir\n";
+       print STDERR "\tindexdb srcdir\n";
        exit 1;
 }
 
@@ -190,6 +245,9 @@ elsif ($mode eq 'aggregateinternal') {
 elsif ($mode eq 'setupformat') {
        setupformat(@ARGV);
 }
+elsif ($mode eq 'moveprefs') {
+       moveprefs(@ARGV);
+}
 else {
        usage();
 }
@@ -247,3 +305,15 @@ sub oldloadindex {
        
        return close($in);
 }
+
+# Used to be in IkiWiki/UserInfo, but only used here now.
+sub get_banned_users () {
+       my @ret;
+       my $userinfo=userinfo_retrieve();
+       foreach my $user (keys %{$userinfo}) {
+               push @ret, $user if $userinfo->{$user}->{banned};
+       }
+       return @ret;
+}
+
+1
index 0a6b2c39ef3538de2bf3189683fde1f191553c31..41768f7820a093676460395bf7831e0e78050560 100644 (file)
@@ -1 +1 @@
-[[brokenlinks ]]
+[[!brokenlinks ]]
index 7c0ac235b8b522391885816d76040f88a79a6406..69cf361de4ed6aa4fa3cb591aa5c3481cab46a49 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
-use Test::More tests => 58;
+use Test::More tests => 51;
 
 BEGIN { use_ok("IkiWiki"); }
 
@@ -77,12 +77,3 @@ ok(! pagespec_match("foo", "no_such_function(foo)"), "foo");
 my $ret=pagespec_match("foo", "(invalid");
 ok(! $ret, "syntax error");
 ok($ret =~ /syntax error/, "error message");
-
-# old style globlists
-ok(pagespec_match("foo", "foo bar"), "simple list");
-ok(pagespec_match("bar", "foo bar"), "simple list 2");
-ok(pagespec_match("foo", "f?? !foz"));
-ok(! pagespec_match("foo", "f?? !foo"));
-ok(! pagespec_match("foo", "* !foo"));
-ok(! pagespec_match("foo", "foo !foo"));
-ok(! pagespec_match("foo.png", "* !*.*"));
index cbb06219c15184d82caf320b5842f16de74daf6a..9e38d576164c184ada3bd48646126fe818259250 100755 (executable)
@@ -28,17 +28,17 @@ ok(same("!foo", "!bar", "foo"), "double inversion failed match");
 ok(same("!foo", "!bar", "bar"), "double inversion failed match 2");
 ok(same("*", "!bar", "foo"), "glob+inversion match");
 ok(same("*", "!bar", "bar"), "matching glob and matching inversion");
-ok(same("* !foo", "!bar", "bar"), "matching glob and matching inversion");
-ok(same("* !foo", "!bar", "foo"), "matching glob with matching inversion and non-matching inversion");
-ok(same("* !foo", "!foo", "foo"), "matching glob with matching inversion and matching inversion");
+ok(same("* and !foo", "!bar", "bar"), "matching glob and matching inversion");
+ok(same("* and !foo", "!bar", "foo"), "matching glob with matching inversion and non-matching inversion");
+ok(same("* and !foo", "!foo", "foo"), "matching glob with matching inversion and matching inversion");
 ok(same("b??", "!b??", "bar"), "matching glob and matching inverted glob");
 ok(same("f?? !f??", "!bar", "bar"), "matching glob and matching inverted glob");
 ok(same("b??", "!b?z", "bar"), "matching glob and non-matching inverted glob");
 ok(same("f?? !f?z", "!bar", "bar"), "matching glob and non-matching inverted glob");
 ok(same("!foo bar baz", "!bar", "bar"), "matching list and matching inversion");
 ok(pagespec_match("foo/Discussion",
-       IkiWiki::pagespec_merge("* !*/Discussion", "*/Discussion")), "should match");
-ok(same("* !*/Discussion", "*/Discussion", "foo/Discussion"), "Discussion merge 1");
-ok(same("*/Discussion", "* !*/Discussion", "foo/Discussion"), "Discussion merge 2");
+       IkiWiki::pagespec_merge("* and !*/Discussion", "*/Discussion")), "should match");
+ok(same("* and !*/Discussion", "*/Discussion", "foo/Discussion"), "Discussion merge 1");
+ok(same("*/Discussion", "* and !*/Discussion", "foo/Discussion"), "Discussion merge 2");
 ok(same("*/Discussion !*/bar", "*/bar !*/Discussion", "foo/Discussion"), "bidirectional merge 1");
 ok(same("*/Discussion !*/bar", "*/bar !*/Discussion", "foo/bar"), "bidirectional merge 2");
index 010c85de176b49373a879e2227edd4d1653f5fe1..72ba7846aa3620f124b8205e21c5f65fcf1cecae 100644 (file)
@@ -1 +1 @@
-[[inline pages="post" rss=yes]]
+[[!inline pages="post" rss=yes]]
diff --git a/underlays/basewiki/directive.mdwn b/underlays/basewiki/directive.mdwn
deleted file mode 120000 (symlink)
index e8ce42c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../doc/ikiwiki/directive.mdwn
\ No newline at end of file