Commit Graph

1170 Commits (cd029da49314981dad3ee89cc10946075825fb21)

Author SHA1 Message Date
Joey Hess 2696e0c6db fixes 2008-07-14 23:00:29 -04:00
Joey Hess 76bda69a92 use prune to delete rendered files
This handles deleting empty directories too.
2008-07-14 22:45:12 -04:00
Simon McVittie b29d11b3c6 Fix aggregateinternal migration so it skips expired entries, and deletes output 2008-07-15 03:24:05 +01:00
Joey Hess af48316b1d Merge commit 'smcv/aggregateinternal' into aggregateinternal
Conflicts:

	IkiWiki/Plugin/aggregate.pm
2008-07-14 20:15:08 -04:00
Simon McVittie 302bb836f2 Use _aggregated as extension for internalized aggregation 2008-07-15 01:04:29 +01:00
Joey Hess 51bf0ea529 changes to debug message printing 2008-07-14 19:43:45 -04:00
Simon McVittie 50a5ab3c4e Add aggregateinternal mode to ikiwiki-transition.
Usage:
1. Update all pagespecs that use aggregated pages to use internal()
2. ikiwiki-transition aggregateinternal $srcdir $htmlext
   (where $srcdir and $htmlext are the srcdir and htmlext options in
   your .setup file)
3. Add aggregateinternal to your .setup file
4. Rebuild the wiki
2008-07-14 23:39:22 +01:00
Simon McVittie 18b3e970ff Merge commit 'origin/master' into aggregateinternal 2008-07-14 23:34:07 +01:00
intrigeri b391b5a80b pedigree: added DISTANCE loop variable
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-14 14:52:34 +02:00
intrigeri b857b229d8 pedigree: fix RELDEPTH in PEDIGREE_BUT_ROOT...
... at least when it's not used in the same template as
PEDIGREE_BUT_TWO_OLDEST (see Known bugs section in pedigree.mdwn for
details)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-14 14:25:42 +02:00
intrigeri df42a5ef21 pedigree: added _but_root & _but_two_oldest loops
... after having learned a bit of Perl, knocked my head against
Perl references and arrays of hashes, tried to use some nice
functionnal programming constructs - no success - to make things
more generic... I'm back to the roots, with this simple code :)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:03:22 +02:00
intrigeri 16cf69477d pedigree: fixed misc bugs
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:03:06 +02:00
intrigeri f32369f669 added new plugin: pedigree
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:02:23 +02:00
Joey Hess ffc99f5904 switch preprocess hooks to use error function 2008-07-13 15:05:34 -04:00
Joey Hess 0b140ed1c8 avoid hardlinking files owned by others
If hardlinks are enabled, it would hardlink files from the underlay. That
was sorta annoying if you tried to edit by hand for some reason, so let's
not. Files that are hardlinked should be rare enough that a few extra stats
won't hurt.
2008-07-12 23:31:27 -04:00
Joey Hess e3c0e49774 only htmlize errors when cgi is actually running 2008-07-12 23:23:25 -04:00
Joey Hess e4e3d7e2d4 convert fatal error to warning
Since perlmagick is not a hard dep, and goodstuff is enabled by default,
imgs should not crash builds
2008-07-12 20:21:42 -04:00
Simon McVittie bed1f1037a Add missing requirement of IkiWiki::render before starting to render things 2008-07-12 22:52:46 +01:00
Simon McVittie 5c0896e674 Make aggregated items be internal pages if --aggregateinternal is used.
This addresses <http://ikiwiki.info/todo/aggregate_to_internal_pages/>
in a simple way. With this approach, a flag day is required, on which all
users of aggregated pages start to inline them using the internal() pagespec;
after that, the aggregateinternal option can safely be switched on in the
setup file (and the old aggregated pages can be deleted by hand).
2008-07-12 18:15:11 +01:00
Simon McVittie 9a184badf5 Stop prepending urn:uuid: to guids that look like UUIDs 2008-07-12 17:34:40 +01:00
Simon McVittie 415c8e0cb5 Rename [[!inline atomid="..."]] to [[!inline guid="..."]] to be consistent with [[!meta guid="..."]], which also outputs an Atom <id> 2008-07-12 17:12:37 +01:00
Simon McVittie 2bd8ada5a6 Accept [[!inline ... atomid="..."]] and use it to populate the feed's Atom <id>.
This is often the same as the feed's <link> (in which case it can be omitted) but sometimes it's a urn:uuid: URN instead.
2008-07-12 17:09:41 +01:00
Joey Hess f707d62481 Merge commit 'smcv/master' 2008-07-12 12:02:57 -04:00
Joey Hess d101269bde Move yesno function out of inline and into IkiWiki core, not exported. 2008-07-12 12:01:22 -04:00
Simon McVittie 1f26a1bf16 Bug fix: use &IkiWiki::pagetitle rather than nonexistent &pagetitle in meta plugin, so that PageSpecs with title(...) work again 2008-07-12 16:44:55 +01:00
Joey Hess ca30d95a78 rename uuid to guid 2008-07-12 10:59:45 -04:00
Joey Hess 37471e92d9 elide temp var 2008-07-12 10:49:12 -04:00
Simon McVittie 9c6444bf68 meta plugin: if uuid looks like it is in fact a UUID, prepend "urn:uuid" (otherwise leave it alone, so we can assign non-UUID <id>s to Atom items to avoid planet-flooding) 2008-07-11 23:57:47 +01:00
Simon McVittie e767f18867 inline plugin: if meta plugin is also enabled, and has collected a uuid for a page, then pass it into the rssitem/atomitem templates 2008-07-11 23:44:12 +01:00
Simon McVittie 9b34b879e2 meta plugin: also collect [[!meta uuid="..."]] 2008-07-11 23:42:38 +01:00
Joey Hess d73d4fed03 rename beautify_url to stress it only works on the path component 2008-07-11 10:33:41 -04:00
Joey Hess d5de560f50 beautify url recentchanges_link redirs to
This ensures that the same link is reached as is used on pages,
so browsers will know that the link on pages has been visited, and color it
appropriately.
2008-07-11 09:44:47 -04:00
Joey Hess 4e1d7d8ff2 fix use ordering
The recent setup revamp exposed some latent bugs in use/package ordering
that caused some symbols to not the exported into the correct scope.
2008-07-11 06:09:34 -04:00
Joey Hess 598a8ce1f7 whitespace 2008-07-11 06:09:34 -04:00
Joey Hess 3879c56e71 Fixes creation of pages when clicking on WikiLinks starting with "/". 2008-07-10 15:36:18 -04:00
Joey Hess dcab5e2e48 template: Add support for a BASENAME variable. 2008-07-10 15:25:42 -04:00
Joey Hess 5d26ded381 work around CGI::Session constructor issues
The constructor can fail with a useless error message if module fail to
load. Work around this by evaling it, and checking for failures, and
printing CGI::Session->errstr to get a more useful message.
2008-07-10 13:17:56 -04:00
Joey Hess aa1f0080a8 clarifications, comments 2008-07-09 22:47:06 -04:00
Joey Hess 4e02dead14 Make it possible to load setup files w/o running them. Code needing to do so can call IkiWiki::Setup::load, and the values will be loaded into %IkiWiki::Setup::setup. 2008-07-09 22:39:26 -04:00
Joey Hess 06709cdf31 improve error message if virus checker fails w/o output 2008-07-09 16:53:03 -04:00
Joey Hess 2449c596af otl: Support utf-8 files. (Recai Oktaş) 2008-07-08 20:52:30 -04:00
Joey Hess ad02f69836 attachment: Support perl 5.8's buggy version of CGI.pm.
This is truely horribly disgusting. CGI::tmpFileName, in current perls, is
an undocumented function (which should be a clue..) that takes the original
filename of an uploaded attachment, and returns the name of the tempfile
that CGI has stored it in.

In old perls, though, CGI::tmpFileName does not take a filename. It takes
a key from the object's {'.tmpfiles'} hash. This key is something
crazy like '*Fh::fh00001group' -- apparently the stringification of a
filehandle object.

Just to add to the fun, tmpFileName doesn't take the key, it expects a
refernce to the key. Argh?!

But the fun doesn't stop there, because in perl 5.8, CGI.pm is also broken
in two other ways. The upload() method is supposed to return a filehandle
to the temp file. It doesn't. The param() method is supposed to return
a filehandle to the temp file, that stringifies to the original filename.
It returns just the original filename, no filehandle.

Combine all these bugs, and you end up with this disgusting commit. Since
I have no way to get the filehandle, I *need* to get the tempfile name.
If I had the filehandle, I could probably pass it into tmpFileName, and
it might strigify to the right key name. But I don't, so the only way to
determine the key is to grub through the .tmpfiles hash ourselves.

And finally, one the temp file name is discovered, a filehandle can finally
be obtained by (re)opening it.

I recommend that this commit be reverted when perl 5.8 is a mercifully
faded memory.

I'm really, really, really glad I'm actually being paid for working on
this right now!
2008-07-08 18:10:53 -04:00
Joey Hess 2e5785907d explicitly set form type to multipart
This is the default in unstable's formbuilder, but not in stable's,
and CGI multipart is needed for fule uploads.
2008-07-08 17:18:02 -04:00
Joey Hess 22839215fb check for tempfile being empty 2008-07-08 16:21:01 -04:00
Joey Hess 6f3c980e2b undef $fh before opening 2008-07-08 12:16:36 -04:00
Joey Hess 66f35e30dc another try at dealing with CGI.pm problem
open the temp file if all attempts to get a fd fail
2008-07-08 11:25:30 -04:00
Joey Hess 71f10579c0 attachment: Support old versions of CGI.pm that lack an upload method. 2008-07-08 10:42:58 -04:00
Joey Hess f156308aef attachment: Fix an uninitialised value warning when editing a page that currently has no attachments. 2008-07-08 09:40:46 -04:00
Joey Hess dbbc1e4040 minor improvements 2008-07-07 01:54:28 -04:00
Gabriel McManus 7b8f4d2d06 search: generate configuration files once only when rebuilding 2008-07-07 01:53:06 -04:00
Joey Hess 2f3a279f68 add virus checking to attachments plugin 2008-07-06 17:36:26 -04:00
Joey Hess 788c1e9eca avoid uninitialised value warnings 2008-07-06 17:35:50 -04:00
Joey Hess 6e2dc2b1fd avoid uninitialised value 2008-07-06 17:00:35 -04:00
Joey Hess 05124f9a86 editpage escaping fixes
* The editpage form now uses the raw page name, not the page title, in its
  'page' cgi parameter. Using the title was ambiguous and made it
  impossible to tell between some pages, like "foo/bar" and "foo__47__bar",
  sometimes causing the wrong page to be edited.
* This change means that some edit links need to be updated.
  Force a rebuild on upgrade to this version.
* Above change also allowed really fixing escaped slashes from the blogpost
  form.
2008-07-06 15:52:04 -04:00
Joey Hess ca6d9da279 link to pagespec/attachment 2008-07-02 18:22:49 -04:00
Joey Hess c150590e27 factor out glob2re 2008-07-02 18:22:49 -04:00
Joey Hess 84e6c4fa66 add mimetype checking 2008-07-02 18:22:49 -04:00
Joey Hess ba707cdcd9 add user and ip support to attachment pagespecs 2008-07-02 16:33:35 -04:00
Joey Hess edfbd7e1aa toggle: Add javascript to top of page, not to end. This avoids flicker since closed toggles will not be displayed as the page is loading. 2008-07-02 16:14:18 -04:00
Joey Hess 1289beb53b xhtml fixes 2008-07-02 16:08:48 -04:00
Joey Hess 895faed642 toggle: Add support for toggles that are open by default.
Also fix to work in preview mode.
2008-07-02 16:02:01 -04:00
Joey Hess d593533af5 attachments interface visibility toggling 2008-07-02 15:42:32 -04:00
Joey Hess e998235240 export javascript, and support default-open toggles 2008-07-02 15:33:52 -04:00
Joey Hess ed25c2abf2 fixes 2008-07-01 20:35:54 -04:00
Joey Hess 883da338a4 some fit and finish fixes 2008-07-01 19:05:15 -04:00
Joey Hess 0abaf5aaae only show one sig fig 2008-07-01 18:41:30 -04:00
Joey Hess e8a13c32ba display human sizes 2008-07-01 18:40:42 -04:00
Joey Hess 8441d31535 add both kinds of links 2008-07-01 18:08:31 -04:00
Joey Hess c1e9e121b7 basic attachment list 2008-07-01 17:19:38 -04:00
Joey Hess 14cb2b0869 save attachments when page is saved too
A user might specify an attachment, but not click the upload button,
and just save the whole page instead.
2008-07-01 16:13:47 -04:00
Joey Hess 1405006fbf check attachments in and refresh 2008-07-01 15:35:01 -04:00
Joey Hess e87c3ae6df add allowed attachments field to admin prefs 2008-07-01 14:02:30 -04:00
Joey Hess 00962f589a minor optimisation 2008-07-01 13:51:22 -04:00
Joey Hess d7ca2f8f9b fix expensive move code path 2008-07-01 13:48:07 -04:00
Joey Hess 7cd40ea4eb better approach for cgi upload disabling
Make it a config setting, this way subtle load order issues don't come into
play. (As much?)
2008-07-01 13:43:32 -04:00
Joey Hess 5aee8d937d bugfixes 2008-07-01 13:39:02 -04:00
Joey Hess a78a981792 attachment location
Put the attachment in a subdir of the page it's attached to,
unless that page is an "index" page.
2008-07-01 13:31:09 -04:00
Joey Hess b4296a4943 simplification 2008-07-01 13:31:03 -04:00
Joey Hess de6ed410bc reorder
canedit should fail first as it's a less expensive and harder to pass test
2008-07-01 13:22:11 -04:00
Joey Hess dbf23748dd call check_canedit
Needed to prevent uploads of locked pages as attachments.
2008-07-01 13:20:42 -04:00
Joey Hess cec45b69da bugfix; support pagetype of "0" 2008-07-01 00:43:19 -04:00
Joey Hess 4fa115fdb5 copy the attachment into srcdir 2008-07-01 00:42:42 -04:00
Joey Hess 0f8ea7ecca break out fast_file_copy 2008-07-01 00:42:23 -04:00
Joey Hess 49514f39f6 fix some messages 2008-06-30 23:32:08 -04:00
Joey Hess b01ee9b3b3 add an ispage limit 2008-06-30 23:17:01 -04:00
Joey Hess 622033f5d6 minor improvements 2008-06-30 23:04:37 -04:00
Joey Hess 0a37c45f32 basic attachment plugin, unfinished
Currently includes UI, and a few tests of the attachment, as well as the
framework to extend pagespecs to test attachments. Does not actually save
the file yet.
2008-06-30 22:58:33 -04:00
Joey Hess dbab5e9b85 disable cgi uploads earlier
This allows plugins that want to enable uploads to do so by changing the
value of $CGI::DISABLE_UPLOADS at some point before the cgi hook is run.
2008-06-30 21:13:41 -04:00
Joey Hess e1d9747be1 remove unused editpage title
The title was set to editpage, but then always changed.
And some code tested for this. Remove this dead code.
2008-06-30 20:33:39 -04:00
Joey Hess 8e43bc0e0f Configure CGI.pm to disable file uploads by default. 2008-06-30 20:01:10 -04:00
Joey Hess b66f9a1981 call format hooks when generating page previews
* toc: Revert change in 2.45 that made it run at sanitize time. This breaks
  use of toc in a sidebar.
* Call format hooks when generating page previews, thus fixing toc display
  there, as well as fixing inlins to again display in page previews, since
  it's started using format hooks. This also allows several other things,
  like embed, that use format hooks, to work during page preview time.
* Format hooks should not rely on getting an entire html document, as they
  will only get the body during page preview.
* toggle: Deal with preview mode when adding javascript.
2008-06-28 23:08:24 -04:00
Joey Hess 00503f25cd smiley: Generate links relative to the destpage. (Fixes a reversion from 2.41.) 2008-06-28 16:58:43 -04:00
Joey Hess 17a09ef88e pagesources might not be populated 2008-06-24 20:47:15 -04:00
Joey Hess 7fbbcc1615 only convert urls if the module is installed 2008-06-24 20:38:41 -04:00
Joey Hess a4d693f659 formatting 2008-06-24 20:35:21 -04:00
Joey Hess 532d4b0d5f rename to txt 2008-06-24 20:33:41 -04:00
Joey Hess 3f6d3f3be8 initial version 2008-06-24 20:33:03 -04:00
Bernd Zeimetz 4a9567595a Disable handling of "bare" links by the creole plugin.
This change needs libtext-wikicreole-perl (>= 0.05-2).
Also removing custom link function, there's no need for it -
if it is not defined, the unmodified markup will be returned.
2008-06-24 16:52:23 -04:00
Bernd Zeimetz b16c43a440 `template` option for aggregate.pm.
Allows to specify the template file which is used to
create the html pages.
2008-06-21 16:23:39 -04:00
Joey Hess 1b6b4da3a3 avoid creole parsing wikilinks
ikiwiki already does, and escaped links should not be processed by creole
after ikiwiki de-escapes them
2008-06-19 19:54:46 -04:00
Joey Hess 98095ccac4 creole: New plugin from Bernd Zeimetz. Closes: #486930 2008-06-19 19:11:18 -04:00
Joey Hess bd7edfd9ca textile: The Text::Textile perl module has some regexps that fail if input is flagged as utf-8, but contains invalid characters such as 0x92. To prevent it from crashing, re-encode the content before calling it, which will ensure that it's really utf-8. 2008-06-16 15:43:37 -04:00
Joey Hess 4da54999de meta: Store "description" in pagestate for use by other plugins.
map: Support show=description.
2008-06-15 19:08:50 -04:00
Joey Hess ebb2b9cbda bugfixes for show=title
Can't sort by titles; the tree building logic requires that the list be
sorted by page name.

Setting linktext => $page is not the same as omitting it entirely. So some
contortions to only set linktext when the page name is not being shown.
2008-06-15 19:08:24 -04:00
Joey Hess ce029bfe04 check that parent hash exists, to avoid creating it 2008-06-15 18:10:47 -04:00
Joey Hess 069b10cc6a note about titles and dependencies 2008-06-15 18:09:46 -04:00
Joey Hess 78a7f6938f style changes
Reindented, moved a TODO from page to code, trimmed some unnecessary
comments, and simplified the use of mkstemp.
2008-06-15 16:26:15 -04:00
Joey Hess a7a1d00e1c initial add 2008-06-15 16:25:18 -04:00
Joey Hess 71d984b310 map: Add a "show" parameter. "show=title" can be used to display page titles, rather than the default page name. Based on a patch from Jaldhar H. Vyas, Closes: #484510 2008-06-15 16:11:11 -04:00
Joey Hess 5807f1de04 fix two build bugs
* ikiwiki-mass-rebuild: Make group list comparison more robust.
* search: Work around xapian bug #486138 by only stemming locales
  in a whitelist.
2008-06-13 13:05:44 -04:00
Joey Hess ecfb14f7d1 Don't generate empty title attributes, etc, and allow setting defaults for class and id too. 2008-06-08 00:02:33 -04:00
Joey Hess f6b47b0d1c img: Support captions. 2008-06-07 23:45:40 -04:00
Joey Hess 3215b5a982 finishing touches on the new search plugin
- Add a Help link.
- If the pageterm is too long, hash it.
2008-06-04 15:24:28 -04:00
Joey Hess a3d8f4904e set rebuild before loading plugins
This fixes a recent minor reversion caused by loading plugins earlier than
the messages are printed. Some plugins might check if rebuild is set.
2008-06-04 15:22:41 -04:00
Joey Hess ea5da19189 fix uninitialized value problem
This occurred when a plugin, loaded earlier, filled out a template in its
checkconfig, before recentchanges's checkconfig had run. Since such a
template won't be a recentchanges template, just test for the value being
uninitialized and skip processing.
2008-06-04 15:00:24 -04:00
Joey Hess e4119f048c The search interface now allows searching for a page by title ("title:foo"), as well as for pages that contain a given link ("link:bar"). 2008-06-04 14:13:21 -04:00
Joey Hess 319e2c94de it's not $title, try the other variable 2008-06-04 13:41:15 -04:00
Joey Hess 295e958da5 don't use meta title
Using the title obscured path info, and made search results look
inconsistent. Since nothing else uses the title like that, it didn't make
sense for search to.
2008-06-04 13:12:10 -04:00
Joey Hess bf9829352b have the xapian stemmer use a language based on LANG 2008-06-04 02:41:02 -04:00
Joey Hess 27376abb3c also decode html entities in the title 2008-06-04 01:50:51 -04:00
Joey Hess 4a51e384eb decode html entities 2008-06-04 01:34:26 -04:00
Joey Hess 9976c31aca fix clearing index on page deletion 2008-06-04 01:28:35 -04:00
Joey Hess 1dddec0ba9 Pass a destpage parameter to the sanitize hook.
Because the search plugin needed it, also because it's one of the few
plugins that didn't already have it.

I also considered adding it to htmlize, but I really cannot imagine caring
what the destpage is when htmlizing. (I'll probably be poven wrong later.)
2008-06-04 01:24:23 -04:00
Joey Hess 1546b48b97 move indexing to sanitize hook
I think this will give better results overall.

I made %IkiWiki::preprocessing accessible and used it to avoid indexing
at unnecessary points.
2008-06-04 00:58:46 -04:00
Joey Hess ce826411b2 more search improvements 2008-06-04 00:38:40 -04:00
Joey Hess aefe5dd9cb more substr fixes 2008-06-04 00:25:56 -04:00
Joey Hess fab1333b67 Filter hooks are no longer called during the scan phase. This will prevent wikilinks added by filters from being scanned properly. But no known filter hook does that, and calling filters unncessarily during scan slowed down complex filters such as the one used to update the xapian index. 2008-06-04 00:15:15 -04:00
Joey Hess 53b188ed35 add a colon to disambiguate
The omega docs suggest doing this if the term may contain upper case, which
it could here.
2008-06-03 23:59:25 -04:00
Joey Hess 9c717d0873 avoid warning
"substr outside of string"
2008-06-03 23:58:19 -04:00
Joey Hess 7fc29119db use "U" term
this seems to be the thing to use for a unique id
2008-06-03 23:56:45 -04:00
Joey Hess 3ba723d79a don't loop forever 2008-06-03 23:55:00 -04:00
Joey Hess 6b7d90d88a fixed most of the xapian todos 2008-06-03 23:52:56 -04:00
Joey Hess 18b0aa1f13 prettify page names, and drop the redunadant url display 2008-06-03 22:11:33 -04:00
Joey Hess 02357b0b32 fix toindex 2008-06-03 21:59:21 -04:00
Joey Hess 44fde6cbff first pass at doing xapian indexing
Still some TODOs to fill in.
2008-06-03 21:14:56 -04:00
Joey Hess 8a6a5320ed search: Converted to use xapian-omega.
Everything is done except for the actual indexing. I plan to do incremental
indexing as pages change.
2008-06-03 15:29:54 -04:00
Joey Hess 99e5e6dd08 inline: The optimisation in 2.41 broke nested inlines. Detect those and avoid overoptimising. 2008-05-31 15:10:23 -04:00
Joey Hess 0a35e8a352 haiku: Generate valid xhtml. 2008-05-30 19:10:58 -04:00
Joey Hess e943812dc9 hashed password support, and empty password security fix
This implements the previously documented hashed password support.

While implementing that, I noticed a security hole, which this commit
also fixes..
2008-05-30 17:35:34 -04:00
Joey Hess 9d93029f01 teximg: If the log isn't written, avoid ugly error messages. 2008-05-29 19:29:40 -04:00
Joey Hess b0a7b2f3d7 teximg: Fix logurl. 2008-05-29 19:28:46 -04:00
Joey Hess d5d56a24bd When calling decode_utf8 on known-problimatic content in aggregate, explicitly pass 0 (FB_DEFAULT) as the second parameter. Apparently perl 5.8 needs this to avoid crashing on malformed utf-8, despite its docs saying it is the default. 2008-05-28 15:38:04 -04:00
Thomas Schwinge 1e16ab178d Avoid ``uninitialized value'' warning when there actually is no difference between the two versions. 2008-05-25 14:25:34 -04:00
Joey Hess f6f25758a8 Perls older than 5.10 need to use the old method of decoding utf-8 in CGI values. Neither method will work for all versions of perl, so check version number at runtime. 2008-05-21 15:30:56 -04:00
Joey Hess 9a8a67f078 display an error message if CGI::Session fails to load 2008-05-21 15:15:11 -04:00
Joey Hess 0bf5248427 git: Skip over signed-off-by and similar lines in commit messages when generating recentchanges. 2008-05-15 18:03:44 -04:00
Joey Hess 8a888a8fed inline: Display a message if the 'pages' parameter is missing, before it just expanded to nothing. 2008-05-15 17:22:54 -04:00
Joey Hess 833610a5b4 orphans: As a special case, the toplevel index page is never considered an orphaned page. 2008-05-15 16:47:44 -04:00
Joey Hess fba4a198b5 mdwn: Add a multimarkdown setup file option. 2008-05-13 12:43:25 -04:00
Joey Hess fb3d5b4800 Fixes for behavior changes in perl 5.10's CGI
Something has changed in CGI.pm in perl 5.10. It used to not care
if STDIN was opened using :utf8, but now it'll mis-encode utf-8 values
when used that way by ikiwiki. Now I have to binmode(STDIN) before
instantiating the CGI object.

In 57bba4dac1, I changed from decoding
CGI::Formbuilder fields to utf-8, to decoding cgi parameters before setting
up the form object. As of perl 5.10, that approach no longer has any effect
(reason unknown). To get correctly encoded values in FormBuilder forms,
they must once again be decoded after the form is set up.

As noted in 57bba4da, this can cause one set of problems for
formbuilder_setup hooks if decode_form_utf8 is called before the hooks, and
a different set if it's called after. To avoid both sets of problems, call
it both before and after. (Only remaining problem is the sheer ugliness and
inefficiency of that..)

I think that these changes will also work with older perl versions, but I
haven't checked.

Also, in the case of the poll plugin, the cgi parameter needs to be
explcitly decoded before it is used to handle utf-8 values. (This may have
always been broken, not sure if it's related to perl 5.10 or not.)
2008-05-12 20:44:22 -04:00