From: Joey Hess Date: Fri, 26 Dec 2008 21:11:13 +0000 (-0500) Subject: Merge branch 'master' into next X-Git-Tag: 3.00~4^2~10 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/c4f3d0554a02eba93d94d4c0914f4afddf85274b?hp=-c Merge branch 'master' into next --- c4f3d0554a02eba93d94d4c0914f4afddf85274b diff --combined IkiWiki.pm index f6adb360a,54e00ec7b..e509a7c2f --- a/IkiWiki.pm +++ b/IkiWiki.pm @@@ -24,7 -24,7 +24,7 @@@ our @EXPORT = qw(hook debug error templ 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 +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, @@@ -1536,15 -1536,19 +1536,19 @@@ sub run_hooks ($$) my $sub=shift; if (exists $hooks{$type}) { - my @deferred; + my (@first, @middle, @last); foreach my $id (keys %{$hooks{$type}}) { - if ($hooks{$type}{$id}{last}) { - push @deferred, $id; - next; + if ($hooks{$type}{$id}{first}) { + push @first, $id; + } + elsif ($hooks{$type}{$id}{last}) { + push @last, $id; + } + else { + push @middle, $id; } - $sub->($hooks{$type}{$id}{call}); } - foreach my $id (@deferred) { + foreach my $id (@first, @middle, @last) { $sub->($hooks{$type}{$id}{call}); } } @@@ -1596,6 -1600,40 +1600,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; @@@ -1687,12 -1725,26 +1691,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{ diff --combined IkiWiki/Plugin/inline.pm index b88efc0ba,58da0beb8..26bb120a2 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@@ -1,11 -1,11 +1,11 @@@ - #!/usr/bin/perl + !/usr/bin/perl # Page inlining and blogging. package IkiWiki::Plugin::inline; use warnings; use strict; use Encode; -use IkiWiki 2.00; +use IkiWiki 3.00; use URI; my %knownfeeds; @@@ -22,7 -22,7 +22,7 @@@ sub import call => \&IkiWiki::preprocess_inline); hook(type => "pagetemplate", id => "inline", call => \&IkiWiki::pagetemplate_inline); - hook(type => "format", id => "inline", call => \&format); + hook(type => "format", id => "inline", call => \&format, first => 1); # Hook to change to do pinging since it's called late. # This ensures each page only pings once and prevents slow # pings interrupting page builds. diff --combined debian/changelog index ddb979c31,0fa6590f0..2a872bb0e --- a/debian/changelog +++ b/debian/changelog @@@ -1,30 -1,14 +1,32 @@@ -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 htmlscrubber_skip + instead. + * embed: This plugin is deprecated, use htmlscrubber_skip instead. + Closes: ##462970. + * Version 3.00 of the plugin API. + + -- Joey Hess 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. * camelcase: Add camelcase_ignore setting. * googlecalendar: Add runtime deprecation warning. * comments: Deal with users entering unqualified or partial urls. + * inline: Run format hook first, to ensure other format hooks can affect + inlined content. Closes: #509710 - -- Joey Hess Mon, 22 Dec 2008 19:02:16 -0500 + -- Joey Hess Wed, 24 Dec 2008 19:49:32 -0500 ikiwiki (2.71) unstable; urgency=low diff --combined doc/plugins/write.mdwn index 8992fad01,9b5cf27f7..405876d58 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@@ -19,7 -19,7 +19,7 @@@ that can be fleshed out to make a usefu `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 @@@ -55,8 -55,8 +55,8 @@@ plugin, and a "call" parameter, which t hook. An optional "last" parameter, if set to a true value, makes the hook run - after all other hooks of its type. Useful if the hook depends on some other - hook being run first. + after all other hooks of its type, and an optional "first" parameter makes + it run first. Useful if the hook depends on some other hook being run first. ## Types of hooks @@@ -431,7 -431,7 +431,7 @@@ describes the plugin as a whole. For ex 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 +486,7 @@@ use the following hashes, using a page 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