Commit Graph

1743 Commits (e6992480e2e0cf965650f84aa97e01fe0fa71544)

Author SHA1 Message Date
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 81165dd2e0 jump to comments anchor after post
Not ideal, it would be nicer to jump to the actual comment posted, but no
anchor is available.
2008-12-17 20:29:55 -05:00
Joey Hess 339bfbd44a typo 2008-12-17 20:22:42 -05:00
Joey Hess cd7ac8f72a add Comments link when displaying a page inline
This link will supplant the usual Discussion link for pages
that have comments enabled.
2008-12-17 19:38:02 -05:00
Joey Hess 5feffc8b0b fix test when comments_closed_pagespec is empty 2008-12-17 19:06:29 -05:00
Joey Hess 140c0bacba change around comments pagespecs
I think it is clearer to have one pagespec that controls all pages with
comments, and a separate pagespec that can be used to close new comments on
a subset of those pages.
2008-12-17 18:50:04 -05:00
Joey Hess 9b837fd5ed fix default values for config settings
defaults cannot be set in getsetup, do it in checkconfig to avoid
uninitialized value warnings.
2008-12-17 17:05:49 -05:00
Joey Hess bb93fccf06 Coding style change: Remove explcit vim folding markers. 2008-12-17 15:22:16 -05:00
Joey Hess 985b229be6 checksessionexpiry: rework
This function as factored out was a bit confusing, I think this makes more
sense.
2008-12-17 14:26:08 -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 15ec55eff5 elide unnecessary variables 2008-12-12 15:38:23 -05:00
Joey Hess ef972a871b remove fixme
sessioncgi hooks are always called with the wiki locked
2008-12-12 15:25:12 -05:00
Joey Hess 928f6938d2 fix redefinition of $author 2008-12-12 15:22:43 -05:00
Joey Hess 9557c7c890 move related code together 2008-12-12 15:19:01 -05:00
Joey Hess f3735891ca whitespace 2008-12-12 15:13:07 -05:00
Joey Hess 18eeb068a6 don't explicitly use inline
loadplugin("inline") should take care of that
2008-12-12 15:10:17 -05:00
Joey Hess 2a7849b838 avoid unnecessary variable 2008-12-12 15:08:06 -05:00
Joey Hess 0ced5995d5 get rid of the [postcomment] hack
I think that using a flag variable is sorta cleaner.

(This is untested.)
2008-12-12 15:05:26 -05:00
Joey Hess 38c92e63bb move getsetup to usual place 2008-12-12 14:59:23 -05:00
Simon McVittie 473160c947 htmlbalance: don't compact whitespace, and set misc other options
Not compacting whitespace is the most important one: now that we run
sanitize hooks on individual posted comments in the comments plugin,
whitespace that is significant to Markdown (but not HTML) is lost.
(cherry picked from commit cb5aaa3cee)
2008-12-12 14:23:12 -05:00
Joey Hess 41efa5ac92 Merge branch 'master' into comments 2008-12-12 14:21:08 -05:00
Joey Hess 88e8d4bf8d meta: Pass info to htmlscrubber so htmlscrubber_skip can take effect. 2008-12-12 14:06:45 -05:00
Simon McVittie 1942fc3bd6 comments: Store dates in GMT and in ISO-8601
The [[!_comment]] directive is a serialization format, not something for
presentation to users, so we should use the least ambiguous possible
representation.
2008-12-12 11:02:41 +00:00
Joey Hess 8d3a3c6a1e simplifiy logic 2008-12-11 17:31:57 -05:00
Simon McVittie f2d5ead6af comments: Change internal-use-only directive from [[!comment]] to [[!_comment]] 2008-12-11 21:23:55 +00:00
Simon McVittie dd1fa13bce comments: Use new feedfile, emptyfeeds options to inline 2008-12-11 21:19:50 +00:00
Simon McVittie 3560460eb6 comments: don't interpolate IP into anonymous user's "name"
If an admin wants the IP in the comment display template they can still
get it (the default template shows it).
2008-12-11 21:14:05 +00:00
Simon McVittie 1698364da0 comments: fix invocation of possibly_foolish_untaint 2008-12-11 21:14:05 +00:00
Simon McVittie fbf145ca3f comments: avoid warning if there's no subject 2008-12-11 21:14:05 +00:00
Simon McVittie a5889912b3 comments: Optionally allow anonymous commenters to set their name/URL.
Also provide a way for the comment template to pick up the verified
username/IP.
2008-12-11 21:14:05 +00:00
Simon McVittie 0a69c7ed56 comments: Remove some dead code 2008-12-11 21:14:05 +00:00
Simon McVittie 44a7d77a30 comments: rename main field to "editcontent" consistent with editpage
This has the side-effect that Ikiwiki's default style.css gives the text
box 100% width.
2008-12-11 21:14:05 +00:00
Simon McVittie edb69335f2 comments: instead of hard-coding mdwn, allow any supported page format 2008-12-11 21:14:05 +00:00
Simon McVittie 9af0f04df3 comments: Save comments as a file with one big [[!comment]] directive.
This delays all comment formatting until the last possible time, allows
us to set metadata without worrying that commenters may be able to evade
it, and means that changes to how a comment is saved can be handled
gracefully. It also gives us somewhere to put the commenter's username
or IP address for later reference.
2008-12-11 21:14:05 +00:00
Simon McVittie 6a986a8a0b Remove dead code for preprocessing [[!comments]] 2008-12-11 21:14:05 +00:00
Simon McVittie 1d696aef2c comments: Duplicate logic and CGI hook from recentchanges to link user pages correctly 2008-12-11 21:14:05 +00:00
Simon McVittie f88870f102 Qualify name of formattime() correctly 2008-12-11 21:14:04 +00:00
Simon McVittie 80e84e32bf Delay checking for session expiry til we actually post a comment 2008-12-11 21:14:04 +00:00
Simon McVittie 24bfc3fdc5 comments: record the time at which each comment was posted 2008-12-11 21:14:04 +00:00
Simon McVittie e66e2c2a7e comments: Use a checkconfig hook to get the default value of comments_pagename 2008-12-11 21:14:04 +00:00
Simon McVittie 4ff161ba0b comments: render comments/commenturl in page.tmpl 2008-12-11 21:14:04 +00:00
Simon McVittie 49eabc676a comments: use global config to decide whether commenting is allowed, and for name of page
Also:
* decide comment page name sooner
* set permalink on it
2008-12-11 21:14:04 +00:00
Simon McVittie a9b0b3da5f comments: use global configuration for allow_directives, commit, and pagename 2008-12-11 21:14:04 +00:00
Simon McVittie d35a2bd2de comments: Add some global configuration 2008-12-11 21:14:04 +00:00
Simon McVittie 4972baac4d comments: make preprocess a no-op 2008-12-11 21:14:04 +00:00
Simon McVittie c9bb8b03a4 comments: document what linkuser does 2008-12-11 21:14:03 +00:00
Simon McVittie 404792c618 comments: add a stub pagetemplate hook to show the comments 2008-12-11 21:14:03 +00:00
Simon McVittie 3abfc1d71c comments: Use HTML entities to escape directives 2008-12-11 21:14:03 +00:00
Simon McVittie 430ac61f21 Embed comments into comments_embed.tmpl rather than concatenating in perl 2008-12-11 21:14:03 +00:00
Simon McVittie 286dbb0541 comments: use CGI module's checksessionexpiry 2008-12-11 21:14:03 +00:00
Simon McVittie 9a6005a212 editpage: factor out checksessionexpiry into IkiWiki::CGI 2008-12-11 21:14:03 +00:00
Simon McVittie cb5aaa3cee htmlbalance: don't compact whitespace, and set misc other options
Not compacting whitespace is the most important one: now that we run
sanitize hooks on individual posted comments in the comments plugin,
whitespace that is significant to Markdown (but not HTML) is lost.
2008-12-11 21:14:03 +00:00
Simon McVittie 249ea2ed75 comments: remove allowhtml option, just switch it on all the time
Now that posts are individually sanitized, that should be safe.
2008-12-11 21:14:03 +00:00
Simon McVittie 4663f364bb comments: load inline and mdwn lazily 2008-12-11 21:14:03 +00:00
Simon McVittie 9d92fd5eb0 comments: don't rely on mdwn getting loaded first 2008-12-11 21:14:03 +00:00
Simon McVittie ebe140201e comments: sanitize the body of each comment before posting it
This should ensure that users can't "break out" from the enclosing
<div>, making it impossible to forge comments (assuming htmlscrubber
is enabled, and so is either htmlbalance or htmltidy).
2008-12-11 21:14:03 +00:00
Simon McVittie 57e40b9ce5 Fix typo that led to comments being blanked 2008-12-11 21:14:02 +00:00
Simon McVittie 3d4aa065d6 postcomment: Rename plugin to comments, use *._comment files
The PageSpec is still called "postcomment" since that's what it means.
2008-12-11 21:14:02 +00:00
Simon McVittie 3c9ccb406b Rename smcvpostcomment plugin to postcomment to propose for inclusion 2008-12-11 21:14:02 +00:00
Simon McVittie b7db3444a5 smcvpostcomment: allow commenting to be closed 2008-12-11 21:14:02 +00:00
Simon McVittie f49603bf86 smcvpostcomment: import other plugins lazily and remove unnecessary use of CGI 2008-12-11 21:14:02 +00:00
Simon McVittie 442e4e7e12 smcvpostcomment: allow inlining to be disabled, and pass through atom etc. better 2008-12-11 21:14:02 +00:00
Simon McVittie bb4eb07bdd smcvpostcomment: make allowhtml etc. configurable, and don't allow commenting on pages where comments have never been allowed 2008-12-11 21:14:02 +00:00
Simon McVittie d18adfb1ad smcvpostcomment: indicate in form whether HTML and directives are allowed 2008-12-11 21:14:02 +00:00
Simon McVittie 1bd1b03766 smcvpostcomment: remove HTML if not allowed 2008-12-11 21:14:02 +00:00
Simon McVittie 660a4ef151 smcvpostcomment: always allow wikilinks, and do access control
wikilinks are harmless, so we might as well allow them.

Access control for this plugin is a bit odd, since we specifically
don't want to allow comments to be edited - so the check is whether the
user is allowed to edit a deliberately invalid page name,
page/commented/on[smcvpostcomment]. You can put smcvpostcomment(*)
or smcvpostcomment(some/subdir/*) in $config{anonok_pagespec}
or the opposite in $config{locked_pages} to allow "editing" (really
just posting) comments.
2008-12-11 21:14:02 +00:00
Simon McVittie 798dea2033 smcvpostcomment: reduce length of subject field 2008-12-11 21:14:02 +00:00
Simon McVittie 29862a8cc8 smcvpostcomment: explain what $fake is for 2008-12-11 21:14:01 +00:00
Simon McVittie 42b15f7633 smcvpostcomment: avoid warnings if form field 'body' is undef 2008-12-11 21:14:01 +00:00
Simon McVittie e65c7b73af smcvpostcomment: load inline plugin more forcibly 2008-12-11 21:14:01 +00:00
Simon McVittie 49835784d8 smcvpostcomment: use better names for special comment files 2008-12-11 21:14:01 +00:00
Simon McVittie bd8c4674a8 smcvpostcomment: use gettext where appropriate 2008-12-11 21:14:01 +00:00
Simon McVittie f77f7a02a6 Add initial version of a postcomment plugin (temporarily namespaced as smcvpostcomment) 2008-12-11 21:14:01 +00: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 38f5e3ba69 move feedpages application up
I wanted this nearer to the top, but decided to put it after the
add_depends. Reasoning: It's possible with a combinaton of feedpages and
show options to make @list and @feedlist contain completly differing sets
of pages. We want to add_depends all pages in both sets. We could combine
the two lists and add_depends that, but it's slightly more efficient to
defer reducing @feedlist, and add_depends whichever list is longer.
2008-12-11 13:58:40 -05:00
intrigeri 3190e5cea7 Merge commit 'upstream/master' into prv/po 2008-11-13 04:39:53 +01:00
intrigeri 5eed0fd97d po(change): reset renamed pages status at a better time
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 04:37:26 +01:00
intrigeri d795a295c9 po: initial infrastructure to deal with renamed master page
This is a skeleton that does nothing yet.
See the comments in the code for an overview of the issue that arises, due to
the renamepage hook never being called globally.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 03:55:55 +01:00
intrigeri c390056eb2 po(delete): added hook, and function skeleton
Not implemented yet, 'cos the renamepage hook has to come first.
Else translations would be deleted on rename, what a shame.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 01:38:22 +01:00
intrigeri cb1fe44f5d po(change): avoid losing information before guessing the same...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 01:07:52 +01:00
intrigeri 8745d67f06 po(istranslatablefile): extracted this from istranslatable
... will need this soon to deal with master file deletion.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 00:56:23 +01:00
intrigeri 190c641c8a po(otherlanguages): return pages that should exist
... instead of already existing ones.
This fixes the "missing otherlanguages links on master pages just created via
the CGI" bug.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 23:27:30 +01:00
intrigeri 36312b13b4 po: memoized istranslatable, eventually
And enjoy a 10% rebuild time enhancement on a complex wiki full of maps and
other pseudo-dynamic content, with some other costly plugins enabled. So it
could well mean 20% on a more usual wiki.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 22:32:47 +01:00
intrigeri 10c4e858b8 po(change): flush Memoize cache, to fix bug after rename/remove
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 21:18:48 +01:00
intrigeri c440a39ba4 po(htmlize): ignore PO files not managed by this plugin
This way, the po plugin will not appropriate PO files it is not responsible for,
and PO files existing before this plugin was enabled can coexist peacefully with
our own ones.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 18:06:04 +01:00
intrigeri 2f27eb9693 po: ooops, fixed just introduced bug
(I just removed in istranslation and _istranslation the dependency on
istranslatable... which broke things in a subtle way, hard to see at the first
glance.)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 17:52:00 +01:00
intrigeri e18a9d9a88 parentlinks: fixed links when po plugin is enabled
(and usedirs is disabled)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 17:36:00 +01:00
intrigeri aed42eb34a po: fix istranslation/istranslatable for pages starting with /
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 17:29:12 +01:00
intrigeri f4815e3b12 po(mybestlink): fixed when fed with path beginning with /
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 16:54:51 +01:00
intrigeri eba2dee941 po: compute internal links from a slave page relative to its master page
e.g. a link appearing on a slave page links to its masterpage's subpages.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 15:04:50 +01: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
intrigeri b19d0d3d24 Merge commit 'upstream/po' into prv/po 2008-11-12 01:08:57 +01:00
Joey Hess 0d1593a201 Merge commit 'intrigeri/po' into po 2008-11-11 17:52:51 -05:00
Joey Hess 2a56ec6644 Merge branch 'master' into po 2008-11-11 17:52:32 -05:00
intrigeri 40ffc92953 po: fixed bug when a new translatable page is created
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 23:04:58 +01:00
intrigeri 2b4e76a961 po: change a bit the way links are generated
This will soon enable usage of translated page titles in link.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 22:29:47 +01:00
Joey Hess eef8b966b3 O_CREATE needs mode 2008-11-11 15:53:55 -05:00
Joey Hess 9a48669f1e avoid multiple ikiwiki cgi processes piling up, eating all memory, and thrashing
Fixed by making the cgi wrapper wait on a cgilock.
If you had to set apache's MaxClients low to avoid ikiwiki thrashing
your server, you can now turn it up to a high value.

The downside to this is that a cgi call that doesn't need to call lockwiki
will be serialised by this so only one can run at a time. (For example,
do=search.) There are few such calls, and all of them call loadindex,
so each still eats gobs of memory, so serialising them still seems ok.
2008-11-11 15:40:04 -05:00
Joey Hess 6611f3a2d9 bzr: Fix dates for recentchanges. 2008-11-11 13:44:47 -05:00
intrigeri f0abaa9fc9 po: fixed link to home page when po_link_to=negotiated, added testcase
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 18:42:14 +01:00
intrigeri f0e796d9a1 po(change): fix uninitialized variables when running IkiWiki::refresh()
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 16:04:40 +01:00
intrigeri 43a1d36378 po: added HOMEPAGEURL template variable, documented when to use it
Hopefully all links should now be consistent with the chosen linking behavior,
but who knows...

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 15:27:39 +01:00
intrigeri cfe101fff9 po: fixed link to homepage from non-translation page
Added testcases for this bug.
It remains broken when generated from <TMPL_VAR BASEURL>, though.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 15:06:26 +01:00
intrigeri 6b82ef44b0 po: some code simplification/clarification
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 14:11:34 +01:00
intrigeri 3d8d47d785 Merge commit 'upstream/master' into prv/po 2008-11-11 04:40:24 +01:00
intrigeri 0d8cbfc5e0 po(scan): make more clear what's being done
Mostly comments, and also a small code change: simplification and implementation
details hiding.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 04:32:20 +01:00
intrigeri d57ef86380 po: reorder nearly all of the module code
It has grown up incrementally and new helper functions were added right in the
middle of the hooks, most often near the place they were used, which is
practical when doing initial development, but quite ugly afterwards, when helper
functions are useful to separate logic and implementation details.

Today's refactoring commits have brought the code to a much more maintainable
state, IMHO.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 04:05:39 +01:00
Joey Hess 53752bcb5d remove redundant link munge
This is not needed now that tagpage returns a page name starting with a
slash.

(Also fixes a minor bug that the edit links started with double slashes due
to the hack.)
2008-11-10 21:47:29 -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
intrigeri a7d329c173 po(match_lang, match_currentlang): use the lang() function
... now that it exists, instead of duplicating it.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 21:30:06 +01:00
intrigeri b4ab0d0b9e po: rewrote otherlanguagesloop()
It is now more elegant IMHO, and the output is now sorted according to the
language name (instead of code).

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 21:19:21 +01:00
intrigeri c5513548c9 po: factorize extraction of a slave page's masterpage and lang
The very same code was repeated at dozens of places.

NB: the real work is now done is _istranslation(), which is memoized,
so the additional function calls overhead should be compensated.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 20:40:44 +01:00
intrigeri 864bc2d9d0 po(otherlanguagesloop): start factorizing
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 18:38:25 +01:00
intrigeri 1255acc02c po: finish abstracting %filtered by putting it into a blackbox
i.e. it is invisible for everyone but its accessors/mutators

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 15:30:49 +01:00
intrigeri 38cdda66d7 po: actually use pofiles() function, to enhance code clarity
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 15:09:56 +01:00
intrigeri 5575786803 po: abstract "doing something for the same page in every other language"
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 14:55:21 +01:00
intrigeri 532ec56a5f po: abstract implementation details for %translations building and resetting
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:56:46 +01:00
intrigeri 3174b4c6f3 po: abstract %filtered implementation details
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:51:00 +01:00
intrigeri 00732f19b9 po: clarify error messages
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:22:50 +01:00
intrigeri 6fc898df75 po: clarify code with some comments
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:14:42 +01:00
intrigeri aef1b0f503 po: prevent a slave page to depend on itself
It has never caused harm yet, but it might in the future.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 12:48:27 +01:00
intrigeri 646d7bf6a3 po(refreshpot): define the input charset before read()'ing
... to prevent the use of Encode::Guess::guess_encoding() in
Locale::Po4a::Transtractor (just a minor security measure, dependent on po4a
internals, but we have no reason to think Encode::Guess is not safe).

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-08 21:32:04 +01:00
intrigeri f652af11fd Merge commit 'upstream/master' into pub/po 2008-11-07 22:19:34 +01:00
intrigeri a0ac346079 po: finished backlinks implementation
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 22:17:54 +01:00
intrigeri 34ab884242 po: implemented linking/backlinks specification for po_link_to=negotiated
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 21:27:00 +01:00
intrigeri 3e341e64c2 po: added pofiles() function, will use this soon
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 21:23:23 +01:00
intrigeri 4879a7f033 po: add comments
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 16:33:10 +01: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
intrigeri daa04ae436 po: fix link to homepage in special case
... by wrapping IkiWiki::urlto in order to workaround hard-coded
/index.$config{htmlext}, which is wrong when usedirs=0 and po_link_to=current
and translatable homepage

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 17:28:04 +01:00
intrigeri 8b001dbb00 po: redesign (once more) automatic POT/PO files update
Now use the change hook to update these files, check them into VCS, and trigger
IkiWiki::refresh as needed. The needsbuild hook's help was required to prevent
infinite looping.

This more rigorous way of doing this fixes recentchanges (that was previously
not updated in some cases), and probably is a better long-term solution than the
two previously tested ones.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 15:54:55 +01:00
intrigeri 802be94104 po: use prep_writefile before creating any files in refreshpot and refreshpo
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:17:33 +01:00
intrigeri 10af328ff1 po: syntax warning fix
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:08:33 +01:00
intrigeri 7ad5c5cbdc po: fixed whitespace
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:55:03 +01:00
intrigeri 769be3d48e po: po_link_to is safe, and fallbacks to a working value if needed
warnings are displayed if it is set to an invalid or incompatible value
(e.g. po_link_to=negotiated and disabled usedirs)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:47:09 +01:00
intrigeri 419de149a6 po: mark po_translatable_pages as a safe configuration setting
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:29:48 +01:00
intrigeri 34afa2c07d po: po_master_language and po_slave_languages are safe config settings
... and check their validity in checkconfig

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:26:45 +01:00
intrigeri c96dd00480 po: added license and copyright
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:01:33 +01:00
intrigeri 1f54c13ec2 Merge commit 'upstream/po' into prv/po
Conflicts:

	IkiWiki/Plugin/po.pm
	doc/plugins/po.mdwn

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 12:28:31 +01:00
Joey Hess 17bd930bc9 first pass over code
Only change of note is quoting some strings in a regexp, just in case
(also avoids the . matching any character!)

Mostly whitespace changes of no consequence.
2008-11-05 15:18:07 -05:00
Joey Hess ae37bca0e2 backup refs to injected subs later
In case two plugins both inject replacements for these subs,
backup the ref just before injecting to make sure the most
recent version is seen.
2008-11-05 15:09:54 -05:00
Joey Hess 9b16e7f148 minor layout changes 2008-11-05 15:09:04 -05:00
Joey Hess 7e95723dad avoid hitting the shell with system() 2008-11-05 14:45:45 -05:00
Joey Hess 9bedf53c0f another reason to require rebuilds (and not be marked safe)
the plugin changes html filenames, so requiring a manual transition to
enable
2008-11-05 13:57:48 -05:00
Joey Hess 127a8a3701 Merge commit 'intrigeri/po' 2008-11-05 13:50:26 -05:00