Commit Graph

1375 Commits (f3207cddc1db58e061bb7562482382c4d193dc26)

Author SHA1 Message Date
Joey Hess 2c51b18aec move check_canedit, check_content to IkiWiki library from editpage
It no longer makes sense to keep these functions in editpage, because
serveral plugins now exist that use them, and users may want to disable
editpage, while leaving those plugins enabled.

Most notably, comments uses both functions, and it's entirely appropriate
to disable editpage but still want to have comments enabled.

Less likely, attachments, rename, and remove all use check_canedit -- but
it would be unusual indeed to want to use these w/o editpage.
2009-02-12 16:33:35 -05:00
Joey Hess 9e786e7b24 update deps and bundles 2009-02-12 13:15:23 -05:00
Joey Hess 46819b530b shortcut: If default_pageext is set, first look for shortcuts.default_pageext
Falls back to looking for shortcuts.mdwn for backwards compatabiity; there
probably exist wikis that have changed the pageext but still use
shortcuts.mdwn.
2009-02-12 13:04:20 -05:00
Joey Hess badc6c229f Create any missing directory necessary to put the wrapper file into. Closes: #514384 2009-02-09 15:13:12 -05:00
Joey Hess 6605764c52 Fix unusual --setup --post-commit command line option combo. 2009-02-09 14:58:10 -05:00
Joey Hess 3403ba08da Updated German translation (Kai Wasserbäch). Closes: #514251 2009-02-05 12:47:58 -05:00
Joey Hess cba0b67a19 Work around XML::Atom strangeness that results in double-encoded posts. (smcv) 2009-02-03 15:05:18 -05:00
Joey Hess 3b83e52018 rename apache404 -> 404
This may already work with other web servers that have copied apache's
interface, and it should be easy to add support to it for web servers that
use some other interface. So, make the name more general.
2009-01-31 19:26:36 -05:00
Joey Hess e5c8bc6222 doc updates for goto branch merge 2009-01-31 19:10:48 -05:00
Joey Hess 78529b335c releasing version 3.03 2009-01-29 14:44:48 -05:00
Joey Hess 94c932ee3d thought 2009-01-27 13:14:53 -05:00
Joey Hess c1befe5d87 update 2009-01-26 20:39:12 -05:00
Joey Hess 625ccace9a underlay: New plugin, allows pulling in additional files not in version control. (smcv) 2009-01-26 20:15:34 -05:00
Joey Hess 9b4040992d meta: New "updated" metadata specifies a fake modification time for a page, to be output into RSS and Atom feeds. (smcv) 2009-01-26 20:11:33 -05:00
Joey Hess ce39f8e000 git: Fix malformed utf8 recieved from git.
If git log outputs malformed utf8 in, eg, usernames, detect it and fix it
up. This avoids commits such as f71abc92aa
breaking things.
2009-01-25 23:13:14 -05:00
Joey Hess 731fc9e7a2 comments: Add a moderation web interface. 2009-01-25 18:49:57 -05:00
Joey Hess c154fa5d6c comments: If comment content checks fail, store the comment (in .ikiwiki/comments_pending) for moderator review. 2009-01-25 15:42:13 -05:00
Joey Hess ee74e61ffc blogspam: Fix use of blogspam_options and blogspam_server config settings. 2009-01-25 14:37:04 -05:00
Joey Hess b5309d2dd7 Remove nonstandard css. Closes: #512378 2009-01-20 11:20:13 -05:00
Joey Hess 8360e96a86 blogspam: Log spam info on failure. 2009-01-19 14:11:15 -05:00
Joey Hess 639f464cb3 Avoid feeding decoded unicode to Term::ReadLine
That resulted in double encoded display when using perl's stub
readline module. Apparently that module unconditionally upgrades
text to utf8, in a quite braindead way.

(Term::ReadLine::Gnu::Perl worked ok.)
2009-01-18 14:52:49 -05:00
Joey Hess a94318f61c releasing version 3.02 2009-01-17 18:27:05 -05:00
Joey Hess 8e821c0e35 reorder 2009-01-16 22:42:24 -05:00
Joey Hess 7ee92cab40 blogspam: New plugin, adding spam filtering for page editing / comment posting using the BlogSpam.net API. 2009-01-16 22:39:11 -05:00
Joey Hess f7b2cfcf50 checkcontent: New hook, can be used to implement arbitrary content filters, including spam filters. 2009-01-16 20:46:55 -05:00
Joey Hess 6d785d6401 Add auto-blog.setup
It will set up an ikiwiki instance tuned for use in blogging.

As part of this change, move the example sites into /usr/share/ikiwiki so
they are available even if docs are not installed.
2009-01-12 19:04:24 -05:00
Joey Hess 1c0f3d40f2 Recommend libterm-readline-gnu-perl
since that makes auto.setup behave better.
2009-01-12 16:52:34 -05:00
Joey Hess 69fa793e11 update with a bit more info 2009-01-11 14:31:06 -05:00
Joey Hess 85dcc2958a pinger: Get whole url, don't just head.
Asking for only the head worked in my tests, but I've found a site where it
didn't -- apparently ikiwiki didn't get a chance to do or finish the
refresh when HEADed. Getting the whole url, waiting for ikiwiki to finish,
avoided the update problem.
2009-01-11 14:27:27 -05:00
Joey Hess 7a8ea68fc0 Consistently allow use of relative paths in all PageSpecs that take a page name parameter. Previously, match_created_before(), match_created_after(), match_sourcepage(), and match_destpage() did not support that, and the docs were not clear. 2009-01-10 14:36:03 -05:00
Joey Hess af9566a695 comments: Add support for removing comments via web interface. (smcv) 2009-01-10 14:17:27 -05:00
Joey Hess 81b088866b repolist: New plugin to support the rel=vcs-* microformat.
* repolist: New plugin to support the rel=vcs-* microformat.
* goodstuff: Include repolist by default. (But it does nothing until
  configured with the repository locations.)
2009-01-07 16:07:46 -05:00
Joey Hess 551544663d comments: Fix cache avoidance hack.
The ?updated needs to come before the #anchor or browsers will not follow
the anchor.
2009-01-07 11:12:32 -05:00
Joey Hess 72ca231fd0 rename: Show full names of affected pages. 2009-01-06 17:29:12 -05:00
Joey Hess 4ce73f2d88 table: Find links in external files in scan pass. 2009-01-06 15:36:32 -05:00
Joey Hess da166e7422 table: Fix misparsed links in external files
linkify data from external files at the same time as data from an inlined
table would be linkified.
2009-01-06 15:05:09 -05:00
Joey Hess eadb078e4c releasing version 3.01 2009-01-05 19:04:03 -05:00
Joey Hess bc0de40c3c A recent change to gitweb removed support for the form of diffurl that many ikiwiki setups use. Document how to use the new url form. 2009-01-05 18:26:09 -05:00
Joey Hess b0a03fef65 yesno: Always accept English even when localised.
It seems to be a failing of i18n in unix that the translation stops at the
commands and the parameters to them, and ikiwiki is no exception with its
currently untranslated directives. So the little bit that's translated sticks
out like a sore thumb. It also breaks building of wikis if a different locale
happens to be set.

I suppose the best thing to do is either give up on the localisation of this
part completly, or make it recognise English in addition to the locale. I've
tenatively chosen the latter.

(Also accept 1 and 0 as input.)
2009-01-03 12:52:47 -05:00
Joey Hess 66ff63c296 Fix documentation about git hook to use right name. Closes: #510393 2009-01-03 12:40:22 -05:00
Joey Hess 3428cdd9d5 ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. Closes: #510518 2009-01-02 14:15:47 -05:00
Joey Hess dec016c6c9 releasing version 3.00 2008-12-31 15:21:40 -05:00
Joey Hess 3e8b7a6b19 websetup: Avoid a crash when a new array setup item has been added in a new ikiwiki release, and is thus not present in the setup file yet.
This happened with camelcase_ignore. The code tried to convert the undef
value for it into an array.
2008-12-31 00:44:54 -05:00
Joey Hess 47fc59c584 French translation update from Philippe Batailler. Closes: #510216 2008-12-30 13:38:27 -05:00
Joey Hess f34dc3d8bd htmlbalance: Demand-load HTML::TreeBuilder to avoid failing test suite if it is not present. 2008-12-29 15:08:18 -05:00
Joey Hess 0711c0c548 comments: Add cache avoidance.
This got lost when we added the jump-to-comment anchor.
2008-12-28 22:20:22 -05:00
Joey Hess c256a53fcb Replace blank OpenID placeholder logo with an unofficial OpenID logo developed by Anna Hess. The official logo does not seem destined to be free. 2008-12-28 16:19:47 -05:00
Joey Hess 17b2afe721 Merge branch 'master' into next
Conflicts:

	debian/changelog
	po/ikiwiki.pot
2008-12-28 15:12:11 -05:00
Joey Hess ec14786c90 releasing version 2.72 2008-12-28 15:05:05 -05:00
Joey Hess c4f3d0554a Merge branch 'master' into next 2008-12-26 16:11:13 -05:00
Joey Hess 7da319efc6 inline: Run format hook first
inline has a format hook that is an optimisation hack. Until this hook
runs, the inlined content is not present on the page. This can prevent
other format hooks, that process that content, from acting on inlined
content. In bug ##509710, we discovered this happened commonly for the
embed plugin, but it could in theory happen for many other plugins (color,
cutpaste, etc) that use format to fill in special html after sanitization.

The ordering was essentially random (hash key order). That's kinda a good
thing, because hooks should be independent of other hooks and able to run
in any order. But for things like inline, that just doesn't work.

To fix the immediate problem, let's make hooks able to be registered as
running "first". There was already the ability to make them run "last".

Now, this simple first/middle/last ordering is obviously not going to work
if a lot of things need to run first, or last, since then we'll be back to
being unable to specify ordering inside those sets. But before worrying about
that too much, and considering dependency ordering, etc, observe how few
plugins use last ordering: Exactly one needs it. And, so far, exactly one
needs first ordering. So for now, KISS.

Another implementation note: I could have sorted the plugins with
first/last/middle as the primary key, and plugin name secondary, to get a
guaranteed stable order. Instead, I chose to preserve hash order. Two
opposing things pulled me toward that decision:

1. Since has order is randomish, it will ensure that no accidental
   ordering assumptions are made.
2. Assume for a minute that ordering matters a lot more than expected.
   Drastically changing the order a particular configuration uses could
   result in a lot of subtle bugs cropping up. (I hope this assumption is
   false, partly due to #1, but can't rule it out.)
2008-12-26 16:09:23 -05:00
Joey Hess c2d2ff0199 deprecate embed plugin too
I see that this plugin's lists of safe content are already well out of
date, and htmlscrubber_skip offers a non whitelist based approach, so let's
deprecate this plugin for 3.0.
2008-12-26 15:27:49 -05:00
Joey Hess 6f1539320b Merge branch 'master' into next 2008-12-26 14:07:25 -05:00
Joey Hess 9db06329c9 comments: Deal with users entering unqualified or partial urls.
People seem to be able to expect to enter www.foo.com and get away with it.
The resulting my.wiki/www.foo.com link was not ideal.

To fix it, use URI::Heuristic to expand such things into a real url. It
even looks up hostnames in the DNS if necessary.
2008-12-26 14:07:19 -05:00
Joey Hess 914c839ceb Merge branch 'master' into next
Conflicts:

	IkiWiki/Plugin/googlecalendar.pm
2008-12-25 16:36:16 -05:00
Joey Hess 0d406010ff googlecalendar: Add runtime deprecation warning. 2008-12-25 16:31:58 -05:00
Joey Hess 5f55ee0b78 more 3.0 docs, changelog 2008-12-24 19:55:43 -05:00
Joey Hess 04f064e78a make ikiwiki-transition prefix_directives take a setup file
This is easier to remeber, and less error-prone than passing it all the
pages in the wiki.
2008-12-24 19:48:42 -05:00
Joey Hess c9e65fded1 camelcase: Add camelcase_ignore setting. 2008-12-23 19:11:03 -05:00
Joey Hess 70dc0355bd Merge branch 'master' into next
Conflicts:

	IkiWiki.pm
2008-12-23 17:22:57 -05:00
Joey Hess c8cde4858e Add deprecation warning for GlobLists, which will stop working in 3.0. 2008-12-23 17:13:57 -05:00
Joey Hess db7983c846 beginning docs for 3.0 2008-12-23 16:20:37 -05:00
Joey Hess 8dc052a1ce merge recentchanges comments fix 2008-12-22 19:04:02 -05:00
Joey Hess 836bf625c9 formatting 2008-12-21 16:45:59 -05:00
Joey Hess 4b66a8d00a openid branch merged 2008-12-21 13:14:31 -05:00
Joey Hess c84fcdd32a meta: Process meta date during scan pass so that the date will always affect sorting in inlines. 2008-12-21 01:52:08 -05:00
Joey Hess f3bec255e4 aggregate: If a feed fails to be downloaded, try again immediatly next time aggregation is run, even if the usual time has not passed. Closes: #508622 (Michael Gold) 2008-12-17 21:27:28 -05:00
Joey Hess bb93fccf06 Coding style change: Remove explcit vim folding markers. 2008-12-17 15:22:16 -05:00
Joey Hess 613a54a3cb Merge branch 'master' into comments 2008-12-17 14:06:57 -05:00
Joey Hess f9b87a9f8b monotone: When getting the log, tell monotone how many entries we want, rather than closing the pipe, which it dislikes. (thm) 2008-12-17 13:59:12 -05:00
Joey Hess b2366f764b rename: Fix double-escaping of page name in edit box.
titlepage normally escapes, but so does formbuilder.
2008-12-17 13:56:10 -05:00
Joey Hess be3579fd70 update changelog 2008-12-12 14:29:42 -05:00
Joey Hess 40a6496817 update copyright 2008-12-12 14:27:56 -05:00
Joey Hess 1f43a4fccc add log entry 2008-12-12 14:23:33 -05:00
Joey Hess 88e8d4bf8d meta: Pass info to htmlscrubber so htmlscrubber_skip can take effect. 2008-12-12 14:06:45 -05:00
Joey Hess b67632cdcd inline: Support feedfile option to change the filename of the feed generated. 2008-12-11 15:01:26 -05:00
Joey Hess 63eb9d834e inline: Support emptyfeeds=no option to skip generating empty feeds. 2008-12-11 14:04:38 -05:00
Joey Hess c9646ac23c German translation update from Kai Wasserbäch. Closes: #507056 2008-11-28 08:52:56 -08:00
Joey Hess 91cb55d96b Correct --dumpsetup to include the srcdir in the setup file. 1997-08-14 08:31:42 -04:00
Joey Hess 7cc14ddf44 fix handling of wrappergroup option
Had forgot to include it in the option list.
2008-11-26 13:28:16 -05:00
Joey Hess a2a63a096b Spanish translation update from Victor Moral. 1997-08-14 07:20:02 -04:00
Joey Hess a493752a4d French translation update from Philippe Batailler. Closes: #506250 2008-11-19 17:30:21 -05:00
Joey Hess 15269fed64 improve escaping of wikilinks and preprocessor directives
The old method failed for '[' x 3.
2008-11-18 02:43:17 -05:00
Joey Hess 767bf9c483 Change deb dependencies to list Text::Markdown before markdown (really this time). 2008-11-17 18:46:20 -05:00
Joey Hess 2e6157e977 don't need libxml-atom-perl now 2008-11-17 14:40:24 -05:00
Joey Hess c0f4735f1f adding htmlbalance; housekeeping
Used the contrib version of the plugin page since it seemed better than the
other one.
2008-11-17 14:09:53 -05:00
Joey Hess 31a1a3215b releasing version 2.70 2008-11-12 18:01:46 -05:00
Joey Hess 716560b7f1 check for invalid utf-8, and toss it back to avoid crashes
Since ikiwiki uses open :utf8, perl assumes that files contain valid utf-8.
If it turns out to be malformed it may later crash while processing strings
read from them, with 'Malformed UTF-8 character (fatal)'.

As at least a quick fix, use utf8::valid as soon as data is read, and if
it's not valid, call encode_utf8 on the string, thus clearing the utf-8
flag. This may cause follow-on encoding problems, but will avoid this
crash, and the input file was broken anyway, so GIGO is a reasonable
response. (I looked at calling decode_utf8 after, but it seemed to cause
more trouble than it was worth. BTW, use open ':encoding(utf8)' avaoids
this problem, but the corrupted data later causes Storable to crash when
writing the index.)

This is a quick fix, clearly imperfect:
- It might be better to explicitly call decode_utf8 when reading files,
  rather than using the IO layer.
- Data read other than by readfile() can still sneak in bad utf-8. While
  ikiwiki does very little file input not using it, stdin for the CGI
  would be one way.
2008-11-12 17:30:54 -05:00
Joey Hess ecd4f0ee55 make unlockwiki drop the cgilock
This is necessary so that things that fork to the background,
like pinger, and inline ping, don't block other cgis from running.

Note that websetup also calls unlockwiki, before refreshing / rebuilding
the wiki. It makes perfect sense for that not to block other cgis.
2008-11-11 20:48:02 -05:00
Joey Hess d1b22b2524 lockwiki changes
* Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up
  for up to one second. The bailout code is no longer needed.
* Remove support for unused optional wait parameter from lockwiki.
2008-11-11 15:54:52 -05:00
Joey Hess 6611f3a2d9 bzr: Fix dates for recentchanges. 2008-11-11 13:44:47 -05:00
Joey Hess 6049fac46e typo 2008-11-10 21:43:59 -05:00
Joey Hess f8a09ba105 tag: Normalize tagbase so leading/trailing slashes in it don't break things. 2008-11-10 19:48:58 -05:00
Joey Hess f0e58faefa Add rel=nofollow to recentchanges_links for the same (weak) reasons it was earlier added to edit links. 2008-11-10 18:05:30 -05:00
Joey Hess 7f80e52543 Fix the link() pagespec to match links that are internally recorded as absolute.
This fixes a problem exposed by the recent change to tags
(a2839de936). That recorded tag links as
absolute by including a leading slash in the link. The same could also be
done with an absolute wikilink.

In either case, link() would not match such links, unless the leading slash
was included in the link to match. But that's not right, because pagespecs
match absolute by default. So strip the leading slash.

Note that to keep any existing `link(/foo)` pagespecs working after this
change, the leading slash is removed from there, too.
2008-11-09 15:31:57 -05:00
Joey Hess 11d377af81 txt: Do not encode quotes when filtering the txt, as that broke later parsing of any directives on the page. 2008-11-06 20:49:18 -05:00
Joey Hess db5ea4d4f0 meta: Plugin is now enabled by default since the basewiki uses it. 2008-11-06 16:08:11 -05:00
Joey Hess ecf2399f4f aggregate: Try to query XML::Feed for the base url when derelevatising links. Since this needs the just released XML::Feed 0.3, as well as a not yet released XML::RSS, it will fall back to the old method if no xml:base info is available. 2008-11-06 16:05:10 -05:00
Joey Hess 2e00af6096 releasing version 2.68 2008-11-03 16:42:06 -05:00
Joey Hess 936e016de9 reorg 2008-10-31 17:22:55 -04:00